kuldeepsharma
9th July 2008, 09:59
Hi All,
I have delete Po Lines thru AFS. which should be simple.
following is my code
stpapi.put.field( "tdpur4101m000", "tdpur040.orno", str$(tdsil909.orno))
ret_val = stpapi.find( "tdpur4101m000",error )
if ret_val = 1 then
stpapi.handle.subproc("tdpur4101m000", session.code, "add")
stpapi.continue.process("tdpur4101m000", error )
stpapi.put.field( session.code, "tdpur041.pono", str$(tdsil909.pono))
ret_val = stpapi.find( session.code,error )
if ret_val = 1 then
stpapi.enum.answer(session.code,"ttstpq0100",tcyesno.yes)
ret_val = stpapi.delete(session.code, true, error)
if not isspace(error) then
message("%s of this P.O %d and Position %d " , error,tdsil909.orno,tdsil909.pono)
endif
stpapi.end.session("tdpur5106s000", error)
stpapi.end.session(session.code, error)
endif
stpapi.end.session(session.code, error)
endif
stpapi.end.session("tdpur4101m000", error)
Its working fine till it encounters stpapi.end.session. its hanging when controls comes to stpapi.end session for ending tdpur4105s000 (session.code)
it has given value 1 for stpapi.delete cammnd and no errors are filled.
i don't now why it is hanging.
May be it is some thing to do with a message which session fires when deleting PO line
"This action can take long time becaus of checking restricted references"
"OK"
i don't know how to pass enter for this message thru afs (if this is the problem)
I have tried to searh the forum for this but I have not got anything on this.
can somebody please help me on this.
Lots of thanks in advance.
in anticipation on an early reply.
Thanks again
kuldeep sharma
I have delete Po Lines thru AFS. which should be simple.
following is my code
stpapi.put.field( "tdpur4101m000", "tdpur040.orno", str$(tdsil909.orno))
ret_val = stpapi.find( "tdpur4101m000",error )
if ret_val = 1 then
stpapi.handle.subproc("tdpur4101m000", session.code, "add")
stpapi.continue.process("tdpur4101m000", error )
stpapi.put.field( session.code, "tdpur041.pono", str$(tdsil909.pono))
ret_val = stpapi.find( session.code,error )
if ret_val = 1 then
stpapi.enum.answer(session.code,"ttstpq0100",tcyesno.yes)
ret_val = stpapi.delete(session.code, true, error)
if not isspace(error) then
message("%s of this P.O %d and Position %d " , error,tdsil909.orno,tdsil909.pono)
endif
stpapi.end.session("tdpur5106s000", error)
stpapi.end.session(session.code, error)
endif
stpapi.end.session(session.code, error)
endif
stpapi.end.session("tdpur4101m000", error)
Its working fine till it encounters stpapi.end.session. its hanging when controls comes to stpapi.end session for ending tdpur4105s000 (session.code)
it has given value 1 for stpapi.delete cammnd and no errors are filled.
i don't now why it is hanging.
May be it is some thing to do with a message which session fires when deleting PO line
"This action can take long time becaus of checking restricted references"
"OK"
i don't know how to pass enter for this message thru afs (if this is the problem)
I have tried to searh the forum for this but I have not got anything on this.
can somebody please help me on this.
Lots of thanks in advance.
in anticipation on an early reply.
Thanks again
kuldeep sharma