patwanirav
5th September 2013, 09:23
In ERP LN 6.1 FP7 when i write the AFS code for killing the session, the control pass from that line but when i see into shell it doesn't close the session.
For Example:
stpapi.enum.answer("whinh3512m000", "whinh0030", tcyesno.no)
stpapi.form.command("whinh2110m000", 5, "receive.order.lines", err.msg)
stpapi.end.session("whinh3512m000")
in the above code it doesn't kill the whinh3512m000 session.
But when i write the same code with 1 or 2 seconds delay it kills the session successfully.
For Example:
stpapi.enum.answer("whinh3512m000", "whinh0030", tcyesno.no)
stpapi.form.command("whinh2110m000", 5, "receive.order.lines", err.msg)
suspend(2000)
stpapi.end.session("whinh3512m000")
Now my problem is i don't want to put suspend in my code. So please help me to resolve this problem or give me some alternate solution.
Thanks in advance...
For Example:
stpapi.enum.answer("whinh3512m000", "whinh0030", tcyesno.no)
stpapi.form.command("whinh2110m000", 5, "receive.order.lines", err.msg)
stpapi.end.session("whinh3512m000")
in the above code it doesn't kill the whinh3512m000 session.
But when i write the same code with 1 or 2 seconds delay it kills the session successfully.
For Example:
stpapi.enum.answer("whinh3512m000", "whinh0030", tcyesno.no)
stpapi.form.command("whinh2110m000", 5, "receive.order.lines", err.msg)
suspend(2000)
stpapi.end.session("whinh3512m000")
Now my problem is i don't want to put suspend in my code. So please help me to resolve this problem or give me some alternate solution.
Thanks in advance...