Baanboard.com

Go Back   Baanboard.com > Forum > BB Language Forums > Forum español

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 25th October 2016, 11:35
RafaPros RafaPros is offline
Newbie
 
Join Date: Jul 2016
Posts: 2
RafaPros is on a distinguished road
Baan: IV - DB: SQL Server - OS: Windows Server 2008
Problema con ASF tisfc0202m000 y tdilc4113s000
Baan: Baan IVc4

Cuando quiero poner el primer valor en un campo de la tabla de la subsesión se me queda colgado. Este es el código que utilizo:

Baanobj.ParseExecFunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc001.cprj" & Chr(34) & "," & Chr(34) & codobra & Chr(34) & ")")
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc001.mitm" & Chr(34) & "," & Chr(34) & articulo & Chr(34) & ")")

If Baanobj.Error <> 0 Then
ErrDon = "Error al poner valor de Obra y Pieza"
MsgBox("Baan IV automatización " & Baanobj.Error & vbCrLf & "Valor de retorno de la función: " & Baanobj.Error.ToString & vbCrLf & "Donde: " & ErrDon)
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.end.session(" & Chr(34) & Sesion & Chr(34) & ")")
Baanobj.Quit
Baanobj = Nothing
Exit Sub
End If

RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.find(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")
Dim tempstr2 = Baanobj.FunctionCall
' MsgBox("PARADA DE COMPROBACION, RESULTADO DE FIND = " & tempstr2)
If Baanobj.Error <> 0 Then
ErrDon = "Error en la búsqueda de la OF " & OF_cod
MsgBox("Baan IV automatización " & Baanobj.Error & vbCrLf & "Valor de retorno de la función: " & Baanobj.Error.ToString & vbCrLf & "Donde: " & ErrDon)
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.end.session(" & Chr(34) & Sesion & Chr(34) & ")")
Baanobj.Quit
Baanobj = Nothing
Exit Sub
End If

Baanobj.ParseExecFunction("ottstpapihand", "stpapi.get.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc001.pdno" & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")

tempstr2 = Baanobj.FunctionCall
tempstr2 = Mid(tempstr2, 25 + Len(Sesion) + 13, 6)
' MsgBox("PARADA DE COMPROBACION, RESULTADO DE GET PDNO = " & tempstr2)
If V_pdno <> CInt(tempstr2) Then
MsgBox("Hay un problema entre el número de orden leida en el grid (" & V_pdno & ") y el número obtenido en BaaN (" & CInt(tempstr2) & ")")
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.end.session(" & Chr(34) & Sesion & Chr(34) & ")")
Baanobj.Quit
Baanobj = Nothing
Exit Sub
' V_pdno = CInt(tempstr2)
End If

If RetVal = 0 Then
TipMsg = 6
Observa = "*** ACTUALIZANDO en tabla BaaN, Banobj = " & Baanobj.error & ", RetVal = " & RetVal & " " & codobra & " " & articulo & " - " & OF_cod & " : " & V_pdno & " / " & tempstr2
Mostrar_Avisos(Observa, TipMsg)

'21/09/2016 - Ponemos los valores en los distintos campos que el usuario pone en la sesión Interactiva

Baanobj.ParseExecFunction("ottstpapihand", "stpapi.get.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "qdlv.frm" & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")
Dim tempstr = Baanobj.FunctionCall
tempstr = Mid(tempstr, 25 + Len(Sesion) + 7, 3)
valor = (cantidad + Val(tempstr)).ToString
'MsgBox("PARADA DE COMPROBACION, RESULTADO DE GET qdlv.frm = " & tempstr & " - Cantidad final = " & valor)
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "qdlv.frm" & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")

Dim Temp_Fecha = piezasGridView.GetRowCellValue(xRow, "fechaFabricacion")
Dim Temp_fecha1 = Temp_Fecha.Day.ToString.PadLeft(2, "0") & Temp_Fecha.Month.ToString.PadLeft(2, "0") & Temp_Fecha.Year.ToString
'MsgBox("PARADA DE COMPROBACION, lectura de fecha en grid = " & Temp_fecha1.ToString)
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc001.dldt" & Chr(34) & "," & Chr(34) & Temp_fecha1 & Chr(34) & ")")

tempstr2 = Baanobj.FunctionCall
valor = cantidad.ToString

Dim cantidad1 As Decimal
Try
Baanobj.ParseExecFunction("ottstpapihand", "stpapi.get.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc001.qrdr" & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")
tempstr = Baanobj.FunctionCall
tempstr = Mid(tempstr, 25 + Len(Sesion) + 13, 3)
total = Val(tempstr)

Baanobj.ParseExecFunction("ottstpapihand", "stpapi.get.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "qdlv.frm" & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")
Dim tempstr1 = Baanobj.FunctionCall
tempstr1 = Mid(tempstr1, 25 + Len(Sesion) + 8, 3)
cantidad1 = Val(tempstr1)

'Controlamos que la serie de " & tempstr2 & " esté o no completa " & cantidad1.ToString & " de " & total.ToString)
If cantidad1 = total Then
RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "comp.frm" & Chr(34) & "," & Chr(34) & "1" & Chr(34) & ")")
Else
RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "comp.frm" & Chr(34) & "," & Chr(34) & "2" & Chr(34) & ")")
End If
Catch
MsgBox("¡¡¡¡¡¡¡¡¡¡¡¡¡¡Error controlando que la serie esté o no completa" & cantidad1.ToString & " de " & total.ToString)
End Try

RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.enum.answer(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc02023" & Chr(34) & "," & "1" & ")")
If RetVal <> 0 Then
MsgBox("*** ERROR *** Contestando a isfc02023")
End If
RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.enum.answer(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc02024" & Chr(34) & "," & "1" & ")")
If RetVal <> 0 Then
MsgBox("*** ERROR *** Contestando a isfc02024")
End If
RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.enum.answer(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & "tisfc02029" & Chr(34) & "," & "1" & ")")
If RetVal <> 0 Then
MsgBox("*** ERROR *** Contestando a isfc02029")
End If
Baanobj.timeout = 300
Try
RetVal = Baanobj.parseexecfunction("ottstpapihand", "stpapi.handle.subproc(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & subsesion & Chr(34) & "," & Chr(34) & "add" & Chr(34) & ")")
If Baanobj.error <> 0 Then
MsgBox("¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Error al lanzar la subsesión " & subsesion & ", Handle = " & Baanobj.error & " obj " & Baanobj.ToString)
End If
Catch hand As Exception
MsgBox("¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Error al lanzar la subsesión tdilc4113s000f, Handle = " & RetVal & " obj " & Baanobj.ToString)
End Try

Dim retval3 As Integer = 0

'*******************************************************************************************************************
'* 25/10/2016 - Esta sección se utiliza para probar las posibles soluciones encontradas en Baanboard*
'* No se corresponde con lo que es la secuencia lógica de instrucciones *
'*******************************************************************************************************************
RetVal = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.end.session(" & Chr(34) & Sesion & Chr(34) & ")")
If RetVal <> 0 Then
MsgBox("*** ERROR *** end.session tisfc0202m000")
End If

MsgBox("PARADA DE COMPROBACION, ENTRADA EN PUESTA DE DATOS 4113 - QSTC, SUBSESIÓN = " & subsesion)

Hasta aquí todo sin errores ni problemas, en la siguiente instrucción es donde se me queda colgado;

retval3 = Baanobj.parseexecfunction("ottstpapihand", "stpapi.put.field(" & Chr(34) & subsesion & Chr(34) & "," & Chr(34) & "tdilc402.qstc" & Chr(34) & "," & Chr(34) & cantidad & Chr(34) & ")")
If retval3 <> 0 Then
MsgBox("Retval3 Put qstc = " & retval3)
End If
MsgBox("PARADA ¡¡¡¡¡ ANTES DE CONTINUE PROCESS !!!!!! PARA COMPROBACIÓN DE DATOS, RETVAL3 = " & retval3)


valor = ""
Try
RetVal2 = Baanobj.ParseExecFunction("ottstpapihand", "stpapi.continue.process(" & Chr(34) & Sesion & Chr(34) & "," & Chr(34) & valor & Chr(34) & ")")
MsgBox("Continuar proceso = " & RetVal2 & vbCrLf & valor)
Catch
MsgBox("¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Error al Continuar proceso = " & RetVal2 & vbCrLf & valor)
End Try
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problemas con subsesión tdilc4113s000 desde sesión tisfc0202m000 RafaPros AFS/DDC/OLE: Function servers 5 26th October 2016 17:15
Problemas con Mail Merge 7.2 de NAZDAQ crtapioca Forum español 1 11th May 2012 12:09
Problema con depreciacion de Activo fijo CarmenLucia Forum español 0 4th May 2012 18:33
CUrioso problema con función AFS find fbernaus Forum español 2 3rd October 2007 17:11
PROBLEMA CON brp.ready gget79 Forum español 2 3rd October 2007 16:57


All times are GMT +2. The time now is 15:12.


©2001-2017 - Baanboard.com - Baanforums.com