Application Development and Automation 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: 
Read only

Material locked after using IDOC_INPUT_MATMAS

Former Member
0 Likes
803

Hi All

I have a program which uses function IDOC_INPUT_MATMAS for creating/changing material. After that it also tries to update "Legal Control" using a BDC on MM02 but then I get message M3 022 (Group data for material xxx locked by xxx). It looks like the function is not unlocking tables MARA and MBEW (I can see this on SM12).

I have already searched over the internet, SDN and services.sap but no luck so far.

Anyone has an idea about what could be wrong?

Best Regards,

Douglas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
692

Before the BDC, use the ENQUEUE function (with _WAIT = 'X') to try to lock the entry that is causing problems. After that FM completes, dequeue the same entry.

Rob

Hi All

I have a program which uses function IDOC_INPUT_MATMAS for creating/changing material. After that it also tries to update "Legal Control" using a BDC on MM02 but then I get message M3 022 (Group data for material xxx locked by xxx). It looks like the function is not unlocking tables MARA and MBEW (I can see this on SM12).

I have already searched over the internet, SDN and services.sap but no luck so far.

Anyone has an idea about what could be wrong?

Best Regards,

Douglas

3 REPLIES 3
Read only

Former Member
0 Likes
692

Hi

I can see that are locks for 4 tables:

MARA

MBEW

MARC

MVKE

Messages can be M3 022 (for MBEW) and M3 897 (for MARC).

Best Regards,

Douglas

Read only

Former Member
0 Likes
693

Before the BDC, use the ENQUEUE function (with _WAIT = 'X') to try to lock the entry that is causing problems. After that FM completes, dequeue the same entry.

Rob

Read only

0 Likes
692

Hi Rob

I have done this before as workaround. Actually I just used DEQUEUE after calling the IDOC function.

I just would like to know why the IDOC function is not dequeuing the entries.

Best Regards

Douglas