‎2011 Feb 03 10:37 AM
Hi Experts,
I want some action to be performed when PO is saved. I have written that part of code in one FM which will be executed parallely/independently in new session. So, that it does not create any delay while saving PO.
I have called that FM(From PO Customer-Exit) in new task when PO is saved.
I don't want to execute that FM in background task.
In case if user logged-off from SAP system while that FM processing is still going on, then that part of code will not be executed and it will not serve my purpose.
How can I prevent user from logging-off till the time that FM completes execution ?
Appreciate your response.
Thanks,
Saurabh
‎2011 Feb 03 10:53 AM
Please let us know why you are going for a new task and what operation are you performing in your other task ?
May be you could use some badi-methods before save for this purpose.
‎2011 Feb 03 11:00 AM
I want to transfer files from Presentation server to application server when PO is saved.
I have written code to transfer files from Presentaion to application server in that FM.
Thanks,
Saurabh
‎2011 Feb 03 11:03 AM
Why don't you try with BADI ME_PURCHDOC_POSTED, method " POSTED" ?
‎2011 Feb 03 11:17 AM
I can use BAdI or Custromer Exit. It does not matter.
My concern is if user logged off from system, when the FM in new task is still being processed then it will create a problem.
‎2011 Feb 03 11:59 AM
You can avoid the new task and write the code to place file inside the method mentioned by Vinod.
‎2011 Feb 04 5:27 AM
It will take extra time to save the PO(if 8-10 files(size : approx. 8-9 MB) are to be transferred) , which I do not want.
‎2011 Feb 04 5:43 AM
Hello,
If i understand correctly you want to achieve something similar to the "New Debugger" session. When you're in the "new debugger" session, the system doesn't let you to "log off"
Let me see if i can find something on this.
Cheers,
Suhas
‎2011 Feb 04 6:04 AM
‎2011 Feb 04 6:08 AM