Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Configuring profile parameter for a table lock object

Former Member
0 Likes
1,596

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.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
828

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

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
829

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

Read only

Former Member
0 Likes
828

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.