cancel
Showing results for 
Search instead for 
Did you mean: 

How to Lock

Former Member
0 Kudos

Hi

I have created a sales order through BAPI_SALESORDER_CREATEFROMDAT2 through my program

I am also using the BAPI_SALESORDER_CHANGE to change the order, when I get the updateflag as "U" through BAPI header.

Here I need to lock the Order, if I am going to change the Order. So that no one can manually change it through the VA02 transaction. Please let me know what I should I do for this?

Thanks Alot for all your help

Accepted Solutions (0)

Answers (1)

Answers (1)

bi7kiran
Active Participant
0 Kudos

Hi

BAPI_SALESORDER_CHANGE is the bapi which you can use to add new line items in the existing sales order. You have got a flag field in the line item structure which tells you whether that line item has to be added or deleted or changed.

Your BAPI is perfectly fine, you just need to check out the fields in the line item structure to achieve your requirement.

try

COMMIT WORK AND WAIT.

after bapi call

also

use the following fm

FM ENQUEUE_READ

many thanks

kiran

Former Member
0 Kudos

Thanks for the Reply Kiran.

Can you elaborate it plz

My Question is:

If I get an update flag as "U", I need to lock the Order.

So that no one can manually change that order through the VA02 transaction as long as I complete the Order through my program.

Once I overwrite all the data with the changed data and save, then it may allow to change thru VA02.

Please let me know how shud I do this?