arthur_info
24th February 2010, 22:15
Hello,
I was searching by the threads, and, I'm thinking that the code below should works. But the system don't shows any error but also don't choose any supplier. P.S: I've tested manually and works.
(...) put the fields of the indice...
"stpapi.find("tdcotd201m000"," ")"
the function above returns 1
"stpapi.mark("tdcotd201m000"," ")"
the function above mark the current record, ok?
"stpapi.application.option("tdcotd201m000",0,1," ")"
the function above chooses the current record... I think...
"stpapi.enum.answer("tdcotd201m000","tdcot00005.d",1)"
the function above says "Yes" for the question... This works, I've tested.
So... What I'm doing wrong? The screenshot is attached.
And other problem. Where I found the command line to activate the AFSLOG like the manual says:
"For bw: -- -set AFSLOG=1 in the Command field "
Thanks a lot...
Arthur
bdittmar
25th February 2010, 09:50
Hello,
I was searching by the threads, and, I'm thinking that the code below should works. But the system don't shows any error but also don't choose any supplier. P.S: I've tested manually and works.
(...) put the fields of the indice...
"stpapi.find("tdcotd201m000"," ")"
the function above returns 1
"stpapi.mark("tdcotd201m000"," ")"
the function above mark the current record, ok?
"stpapi.application.option("tdcotd201m000",0,1," ")"
the function above chooses the current record... I think...
"stpapi.enum.answer("tdcotd201m000","tdcot00005.d",1)"
the function above says "Yes" for the question... This works, I've tested.
So... What I'm doing wrong? The screenshot is attached.
And other problem. Where I found the command line to activate the AFSLOG like the manual says:
"For bw: -- -set AFSLOG=1 in the Command field "
Thanks a lot...
Arthur
Hello,
start bw, choose configure, use command at the last line.
Regards
goooch
25th February 2010, 13:39
Hi Arthur,
I think in AFS you should answer first, then start option
arthur_info
25th February 2010, 13:47
Hum... About the debug, I've found it here, but the error below appeared...
process 1 - Error : Can't read session or object (set)
message_loop_nesting error, nesting level = 2 (should be 1)
message_loop_nesting error, nesting level = 1 (should be 0)
Windows Sockets error 10053
Connection with server broken
I've write "set AFSLOG=1" in the command field. Is it correct?
Any suggestion?
Regards
Arthur
arthur_info
25th February 2010, 14:59
I changed the order, with the answer first, but the supplier is still not chosen ...
Any other idea?
Thanks a lot...
mark_h
25th February 2010, 15:39
Bernd is correct the answer to the question should be before the question is asked. My questions is why are you using stpapi.application and not stpapi.continue.process? They are the same thing in this case from the looks of your form - try that. Second what happens after you answer yes? If it runs another session you might have to account for it also. I also assume your stpapi.find actually a parameter in it for the message that find returns - along with some of the other commands.
arthur_info
9th March 2010, 20:30
I'm trying to use this command but also don't works...
stpapi.continue.process("tdcotd201m000")
It's weird because don't appear any error message, but don't mark and choose the correct supplier...
arthur_info
9th March 2010, 21:20
In fact, the routine is like that:
Public Shared Function ProcessaRotinaBaan(ByRef BaanObj As Object, ByVal sSession As String, ByVal iForm As Integer, ByVal iOption As Integer, Optional ByVal sReferencia1 As String = "", Optional ByVal sReferencia2 As String = "", Optional ByVal sReferencia3 As String = "") As String
Dim sErrMsg = Space(50)
BaanObj.ParseExecFunction("ottstpapihand", "stpapi.continue.process(" & Chr(34) & sSession & Chr(34) & "," & Chr(34) & sErrMsg & Chr(34) & ")")
'BaanObj.ParseExecFunction("ottstpapihand", "stpapi.application.option(" & Chr(34) & sSession & Chr(34) & "," & CStr(iForm) & "," & CStr(iOption) & "," & Chr(34) & sErrMsg & Chr(34) & ")")
If BaanObj.Error <> 0 Or BaanObj.ReturnValue <> "1" Or sErrMsg <> "" Then
Return sReferencia1 & vbCr & vbLf & _
sReferencia2 & vbCr & vbLf & _
sReferencia3 & vbCr & vbLf & _
"Erro: " & BaanObj.FunctionCall.ToString().Substring(InStr(BaanObj.FunctionCall, ",1,") + 3, BaanObj.FunctionCall.ToString().Length - InStr(BaanObj.FunctionCall, ",1,") - 6)
Else
Return String.Empty
End If
End Function
The "option" command is disabled, because don't works too...
mark_h
9th March 2010, 23:13
Here is my best guess on what I would expect to see:
stpapi.put <-- Put the fields to find.
stpapi.find <-- this will find the record and usually mark the record as current
stpapi.enum.answer <-- answer to the question.
stpapi.continue <-- continue to start processing
Can't speculate what the continue might require.
arthur_info
10th March 2010, 22:30
Mark
I don't have words to express my gratitude. The only problem was the order of commands and instead of using the other command, the right was to use "continue". It worked perfectly.
Thank you very much,
Arthur