‎2005 Apr 20 10:58 PM
Hi Experts-
I want to set the 'wait time' (_WAIT) parameter as a profile parameter for a table lock object.
I have created a lock object on a ZTable. I lock and unlock this object in exclusive non-cumulative mode through the enqueue and dequeue lock object function modules. These generated FMs are invoked via my custom function module.
My function module will run in the background as a scheduled task in R/3. I execute the Enqueue FM at the start of the FM and keep the table locked until the last step finishes in my FM and then I Dequeue it. I want to have the processing wait and retry the Enqueuring FM at set intervals in case the one run doesn't finish entirely and a new run of this same job kicks off.
Thank you,
- Vik.
‎2005 Apr 21 12:10 AM
Set the wait parameter = 'X'. These means that if it encounters a lock, then it will wait a certain time for the lock to be released. This certain time is a system value set by your basis team. I don't imagine it being a very long time.
CALL FUNCTION 'ENQUEUE_EZPIPHYINVREF'
EXPORTING
MODE_ZPIPHYINVREF = 'E'
MANDT = SY-MANDT
_WAIT = 'X'.
Regards,
Rich Heilman
‎2005 Apr 21 12:10 AM
Set the wait parameter = 'X'. These means that if it encounters a lock, then it will wait a certain time for the lock to be released. This certain time is a system value set by your basis team. I don't imagine it being a very long time.
CALL FUNCTION 'ENQUEUE_EZPIPHYINVREF'
EXPORTING
MODE_ZPIPHYINVREF = 'E'
MANDT = SY-MANDT
_WAIT = 'X'.
Regards,
Rich Heilman
‎2005 Apr 21 10:01 AM
Hi Vik,
How much time the system has to wait before re-trying to obtain the lock is something that you cannot control.
However, you can specify how many times the re-trial should be made. The profile parameter for that is <b>enque/delay_max</b>.
I inderstand the maximum number of re-trials is set to 5 by default. You can change it to a more tolerable value for your scenario.
Regards,
Anand Mandalika.