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

Continue to lock after COMMIT

Former Member
0 Likes
733

Hi all,

I need help on locking module. I have a program that does many update and commit (some using BAPI_TRANSACTION_COMMIT). How I continue to lock the record after the commit? From what I understand commit will release all locks. I wish to continue locking even after commit. What are the possible ways to do it?

The locking logic:

CALL FUNCTION 'ENQUEUE_ECKSSKXE'

EXPORTING

MODE_KSSKX = 'E'

  • MANDT = SY-MANDT

KLART = '300'

CLASS = GT_ZMM_DEPOT-CLASS

  • MAFID =

  • OBJEK =

  • X_KLART = ' '

  • X_CLASS = ' '

  • X_MAFID = ' '

  • X_OBJEK = ' '

_SCOPE = '1'

  • _WAIT = ' '

  • _COLLECT = ' '

EXCEPTIONS

FOREIGN_LOCK = 1

SYSTEM_FAILURE = 2

OTHERS = 3

.

Thanks thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
640

1) First u create a Lock object in SE11, for the required field/fields that u want to lock.

2) It generates to FMs -- one is for locking and the other is for unlocking.

3)use these FMs in ur program.

Check the below link for the procedure how to create lock object.

http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm

Read only

0 Likes
640

Hi, thanks for your reply. But I am looking at more of how to continue locking the record after commit work instead of creating a lock. I am planning to use a stardard existing lock object.

Read only

philippdoelker
Participant
0 Likes
640

Hi Janet,

I know your question was posted some time ago,but I have the same requirement at the moment. Did you find a solution back then?

Regards