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: 

Locking Issue

Former Member
0 Kudos

Hi Techies,

I have a requirement as follows:

1st user : Executes a T-code say 'ZTEST', In initial screen Batch Number is the Input(ex:BATCH), after that user presses enter and goes to next screen. In next screen user has to enter Order No (ORDER01)from where list of materials will be displayed. suppose theer are 3 line items in Order than 3 new batches will be created with numbers(BATCH01,BATCH02,BATCH03). when User clicks on "SAVE" button, in background confirmation is done and GR's are done.

2nd User: Repeats same as 1st user , only with different order(ORDER02). The issue is theer same batches(BATCH01,BATCH02,BATCH03) are going through 2 confirmations each.

The requirement is to lock the second user if once BATCH is in process by other user.

Any help in this regard would be appreciable.

Thanks& Regards,

Vinit

2 REPLIES 2

former_member189779
Active Contributor
0 Kudos

Hello,

Try creating lock object for you field. Check out

http://help.sap.com/saphelp_nw70ehp2/helpdata/EN/41/7af4c8a79e11d1950f0000e82de14a/content.htm

Hope this helps.

vijaymanikandan
Contributor
0 Kudos

Hi

If this is purely custom code then use the lock object for the batch. Check in SM12 which object is locked when you execute this activity so that you can do enqueue and dequeue function modules of the lock objects. In case if you are using standard SAP transaction inside the custom code then SAP must have handled this or else SAP is allowing the same since there might not be any issue on that. Check out exactly your requirement and use lock objects.

Br

Vijay V