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

Object Lock duration beyond program termination.

kammaje_cis
SAP Mentor
SAP Mentor
0 Likes
562

Hi all,

As I understand the ENQUE_<object> will lock the object only for till the transaction/program terminates. Is there a way to get a lock beyond this?

My requirement is in Workflow, where I need to lock an object till an approval happens. This approval process might take days to happen, and the object should be locked till then. I experimented with the _SCOPE parameter and it did not help. Any ideas?

Thanks

Krishna

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
511

well it sound better to me to use some sort of status. If objects has a certain status, then object can not be edited. Only after approval, you will change the status and editing is allowed.

2 REPLIES 2
Read only

Sm1tje
Active Contributor
0 Likes
512

well it sound better to me to use some sort of status. If objects has a certain status, then object can not be edited. Only after approval, you will change the status and editing is allowed.

Read only

Former Member
0 Likes
511

Hi,

Try this possible solution.

1) create a table which stores the detail workflow approval = YES or NO.

2) create a background job report which locks the object.

In this report ,put the following logic.

do .

select single approval

from new ztable created

into l_status

where.......

if l_status = YES (means approval done).

EXIT.

endif.

enddo.

3) This means the program will not stop untill the approval is done!!!

CHEERS!!!

Regards,

Vimal