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: 

Material locked - IDOC

Former Member
0 Kudos

Hi,

We are using Message type u2018MBGMCRu2019 for Goods movement posting.

Each Idoc has few line items (Segment E1BP2017_GM_ITEM_CREATE) with different material numbers. Now if any two consecutive Idocs have common material numbers, the current idoc goes into error without posting the document (Error - Valuation data for material & is locked by the user &). Is there a solution for this (Apart from reprocessing)?

Regards,

Goutham.

1 REPLY 1

former_member404244
Active Contributor
0 Kudos

Hi,

Try this way.. You call the 'ENQUEUE_E_TABLE' and 'DEQUEUE_E_TABLE' function module in program and if you find already the record is locked with the help of SY-subrc then again call the function module in a do-loop unless until the lock is removed.

do.

CALL FUNCTION...'ENQUEUE'.

IF SY-SUBRC EQ 0.

call function..'DEQUEUE'.

exit.

endif.

enddo.

Regards,

Nagaraj