Application Development 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: 

Submitting job in background with lock mechanism

Former Member
0 Kudos

Hi,

I'm obtaining a lock before submitting the job and releasing it after submitting...as explained below

I want to know whether the lock will get released immediately after submitting the job or it will be released only after the finish of the job. Can you explain with any documentation if possible...

CALL FUNCTION 'ENQUEUE_EXXXX'

SUBMIT rvv50r10c USING SELECTION-SET w_variant

TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

VIA JOB name NUMBER number

AND RETURN.

CALL FUNCTION 'DEQUEUE_EXXXX'

Regards

Jiku

4 REPLIES 4

Former Member
0 Kudos

Hi,

This is depends on the lock mode, if you put the lock mode as X then the lock will be deleted after the DEQUEUE function module exists

Regards

Sudheer

Former Member
0 Kudos

Hi,

If you are locking a table, then it depends on the code written inside the submitted program and the underlying database. For certain databases, commit work statement inside the program if any, will releases the locks. however after the job is finished the locks will be released.

thanks,

sksingh

0 Kudos

Hi,

Thanx, but I want to know whether the DEQUEUE will be called immediately after submitting the job (Like the job is Not finished) or only after finishing the job, it will execute the DEQUEUE statement in this case..

Regards

Jiku

Former Member
0 Kudos

Hi jiku,

1. The lock will get released imediately after the statement

CALL FUNCTION 'DEQUEUE_EXXXX'

2. It will not have any effect on the background job.

regards,

amit m.