Skip to Content
0
Former Member
Feb 28, 2009 at 08:19 AM

Sales document locked by some user.

858 Views

Hi friends,

I have a problem with locking issues.

I have used BAPI_SALESORDER_CHANGE for updating the details. Before this BAPI i have used the FM with the following details,

CALL FUNCTION 'SD_SALES_DOCUMENT_ENQUEUE'

EXPORTING

vbeln = t_idoc-vbeln

EXCEPTIONS

foreign_lock = 2

system_failure = 3

no_change = 4.

after the BAPI i have used the FM.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'.

The BAPI_SALESORDER_CHANGE proceeds only after the successfull enqueue. if the sy-subrc is not equal to 0 then it will not reach this bapi.

Actually, the problem is even after passing to the FM 'SD_SALES_DOCUMENT_ENQUEUE' it has reached the BAPI for changing and displayed a message saying "Sales document XXXXXXXXX is currently being processed (by user XXXXXXX)".

Wat could be the problem? please guide me.

Thanks in advance.