VishalMistry
2nd October 2017, 16:20
Hello,

I have a session which calls upon AFS of tdsls4102s000 (sales order lines) for updating the warehouse in open sales order lines. The issue is the session just hangs on second record when it tries to update. It goes through perfectly on first record, but when the select query reaches second record, after successfully puting (tdsls041.orno & tdsls041.pono) it simply hangs on the stpapi.update call.

I have attached script with a hope to find what could be wrong in the script. Any hint will be highly appreaciated.

Vishal

rahul ingale
2nd October 2017, 17:54
Check return value of stpapi.update.if return value is zero then recover the session.use set commands AFS.LoG = 1 to check how AFS running.file will be created in temp folder.

mark_h
2nd October 2017, 18:41
Watch you background processes. Make sure the update is not starting something unaccounted for in the code. And if necessary close the session inside the selectdo or even try a suspend statement after each update(give the background session plenty of time to process before trying the next record).

VishalMistry
11th October 2017, 18:31
Hello Mark,

I thoroughly tested and it was not an issue related to any sub-process started. I just had to check the result of stpapi.update call, before making any further stpapi call. In case the stpapi.update call fails, then any subsequent stpapi call would fail.

I have attached script part for reference in case someone faces similar issue.

Thanks,
Vishal