lakoon
20th August 2004, 14:54
Hello
I have the following situation:
Inserting a sales order line with always starting the subprocess and ending at the end works perfectly.
If I try to insert serveral sales order lines without ending the subsession i get for the second position during the stpapi.insert() call the error message:
"Link on stack failed zero pointer pushed"
"Can not continue in tdsls4102s000 in DLL: ottstpstandard (get.company)"
What is the sequence of the stpapi calls that I am able to insert several lines at once?
My code (creates the error):
stpapi.put.field("tdsls4101m000", "tdsls040.orno", str$(orno$))
ret.find = stpapi.find("tdsls4101m000")
stpapi.handle.subproc("tdsls4101m000", "tdsls4102s000", "add")
stpapi.continue.process("tdsls4101m000", e.mess)
select mytyble_with_position
selectdo
stpapi.put.field("tdsls4102s000", "tdsls041.item", str$(item$))
...
ret.ins = stpapi.insert("tdsls4102s000", true, e.mess)
if not ret.ins then
ret.rec = stpapi.recover("tdsls4102s000", e.mess)
endif
endselect
stpapi.end.session("tdsls4102s000", e.mess)
stpapi.end.session("tdsls4101m000",e.mess)
Thanks for any hint.
/lakoon
I have the following situation:
Inserting a sales order line with always starting the subprocess and ending at the end works perfectly.
If I try to insert serveral sales order lines without ending the subsession i get for the second position during the stpapi.insert() call the error message:
"Link on stack failed zero pointer pushed"
"Can not continue in tdsls4102s000 in DLL: ottstpstandard (get.company)"
What is the sequence of the stpapi calls that I am able to insert several lines at once?
My code (creates the error):
stpapi.put.field("tdsls4101m000", "tdsls040.orno", str$(orno$))
ret.find = stpapi.find("tdsls4101m000")
stpapi.handle.subproc("tdsls4101m000", "tdsls4102s000", "add")
stpapi.continue.process("tdsls4101m000", e.mess)
select mytyble_with_position
selectdo
stpapi.put.field("tdsls4102s000", "tdsls041.item", str$(item$))
...
ret.ins = stpapi.insert("tdsls4102s000", true, e.mess)
if not ret.ins then
ret.rec = stpapi.recover("tdsls4102s000", e.mess)
endif
endselect
stpapi.end.session("tdsls4102s000", e.mess)
stpapi.end.session("tdsls4101m000",e.mess)
Thanks for any hint.
/lakoon