‎2009 Jun 02 11:16 PM
In a delivery user exit,
Is there a way to tell the program to execute a particular function module 2 minutes after it SAVES the document?
‎2009 Jun 02 11:30 PM
‎2009 Jun 03 4:07 AM
Hey..
Use wait..it worked for me..
WAIT UP TO 5 seconds.
Check the duration of time other process needs to complete and then specify the time.
Regards,
KC
‎2009 Jun 03 4:50 AM
Hi,
Press F1 Help on WAIT. That is the only possible way to delay the program.
Thanks,
Babu Kilari
‎2009 Jun 03 5:06 AM
Hi,
You have to use
WAIT UP TO 10 seconds statement.
Regards,
Jyothi CH.
‎2009 Jun 03 5:21 AM
Thanks for all the repsonses. Sorry I was out for a while. The code is in the user exit which triggers after hitting the SAVE button when the delivery is being created. I want the function module to execute 120 seconds after the delivery is saved
‎2009 Jun 03 5:34 AM
As suggested by others you should use the WAIT statement to acheive your requirement.
what function module you are calling, is it a standard one or z?
Regards
Karthik D
‎2009 Jun 03 5:52 AM
My problem is as follows.
I go to sales order in change mode and do Sales Order--> Deliver
Then when the delivery is saved, sales order is still in change mode as I started from the sales order in change mode. While doing this I need to update the order quanity of sales order with the delivery quantity (as they will always be off by few percentage poitns) by going in to the same sales order. I do this through BAPI_SALESDOCUMENT_CHANGE and BAPI_TRANSACTION_COMMIT.
When the sales order is changed it puts the sales order on credit hold. I need to undo it
I try to do this though CALL FUNCTION 'SD_ORDER_CREDIT_RELEASE' but I get a message saying the sals order is locked. It will be unlocked only once te delivery is saved. How do I make this function mdule execute after the delivery is saved.
‎2009 Jun 03 6:16 AM
Hi,
Instead i suggest you to go for user exit routines available and change the item quantity before the SO gets stored.
There are several form routine to help you achieve your requirement.
Regards
Karthik D
‎2009 Jun 03 6:36 AM
Ite, quantity is changing fine with the BAPI. Its the credit that needs to be released with the function module 'SD_ORDER_CREDIT_RELEASE'
‎2009 Jun 03 5:31 AM
Hi,
Refer these FM's
SWE_CD_TST_DELAY
TH_DELAY_FUNC_TEST
C14Z_WAIT_N_SECONDS
Regards,
Jyothi CH.
‎2009 Jun 03 6:54 AM
First of all, this is really a weired whish. Why do you want to do so? There must be a really good reason for that, cause all those suggesting the wait keyword didnt mention that the wait will do a DATABASE COMMIT and i'm really in doubt that you want to have this in a user exit where you dont have control when und who is executing that.
Telling the reason for that may lead to a good solution. Using wait isnt one.