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: 

Sales order is locked by use error

Former Member
0 Kudos

I am gettin return code as 2 for Function module SD_SALES_DOCUMENT_ENQUEUE, what may be the reason.

I am also getting the error as the sales order is locked by user.

2 REPLIES 2

Former Member
0 Kudos

that can be fore two reasons..

1. some user already is in change mode for that sales order

2. in your program itself you are calling that FM in loop and you are passing the same sales order more than once to that FM without DEQUEUE..

check you code and then with users

Former Member
0 Kudos

try SM12 to see if there are any locks corresponding to the sales order.

Sometimes these locks need deleting, if a session has failed somewhere whilst updating the sales order.