Via AFS I am able to insert a new salesorder via tdsls4101m000. Todo this I add the orderserie/ type of order and customernumber and then use stpapi.insert, which correctly adds a new salesorder. But after the insertion of the header of the salesorder I need to insert the lines of the order. And need to know the ordernumber just inserted.(or don't I?)
I tried to use use the stp.get.field of the field tsdld040.orno, but get back the same orderserie I started with, but never the newly created number.
Anybody having an example or idea what I should do?