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: 

BAPI_GOODSMVT_CREATE with Movement type 551 - Error M7 - 021

Former Member
0 Kudos

Hi Experts,

I am developing a report. My requirement is once the material is set to inactive, i have to reduce the freely usable stock count by one count. I am using the BAPI_GOODSMVT_CREATE, with movement code = '06' (for Tcode: MB11) and i am passing the below parameters.

LWA_ITEM-MATERIAL = '000000000000000059'.

LWA_ITEM-PLANT = '002L'.

LWA_ITEM-STGE_LOC = '999'.

LWA_ITEM-MOVE_TYPE = '551'.

LWA_ITEM-STCK_TYPE = 'ST'.

LWA_ITEM-COSTCENTER = '0000858001'.

LWA_ITEM-ENTRY_QNT = '1'.

In the header, i am passing the posting date and document date as '21.01.2011' as the posting is open only from Dec'10 to Jan'11.

I am getting the error as:

E M7 021 Deficit of SL Unrestr. prev. 1 ST : 59 002L 999.

But when i check the number of stock availabe for the material in MMBE transaction, stock count is more than 9000.

I have made some research in SDN and made some check. But still coundnt solve it.

Please help.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Movement type 551 is used to move the unrestricted stock. Please make sure the stock in MMBE is in unrestricted area. Also in your code I see the following lines:

LWA_ITEM-STCK_TYPE = 'ST'.

In the BAPI, structure BAPI2017_GM_ITEM_CREATE-STCK_TYPE is CHAR 1 field. You can't pass more than 1 character in it. Also this value should be blank. You code seems to be right to me, try blanking the field "STCK_TYPE".

Cheers,

5 REPLIES 5

Former Member
0 Kudos

Hi,

Movement type 551 is used to move the unrestricted stock. Please make sure the stock in MMBE is in unrestricted area. Also in your code I see the following lines:

LWA_ITEM-STCK_TYPE = 'ST'.

In the BAPI, structure BAPI2017_GM_ITEM_CREATE-STCK_TYPE is CHAR 1 field. You can't pass more than 1 character in it. Also this value should be blank. You code seems to be right to me, try blanking the field "STCK_TYPE".

Cheers,

Former Member
0 Kudos

Hi,

MMBE will show you the stock for different categories like restricted, unrestricted, reserved. Make sure you have required stock available for given material, storage location and batch ( If material is bach managed ), in UNRESTRICTED category.

Hope it helps.

Thanks & Regards

Tejaswini Khante

madhu_vadlamani
Active Contributor
0 Kudos

Hi Rajesh,

Did you shown this error to functional people.

Regards,

Madhu.

Former Member
0 Kudos

Hi Himanshu/ Tejaswini Khante / Madhu,

Thank you all for your kind reply.

@Himanshu....I have tried with LWA_ITEM-STCK_TYPE = BLANK, Still it didnt work.

@Tejaswini Khante ...I checked the MMBE tcode, all the stocks are in 'Unrestricted use' only. The quality inspection, reserved fields are all blank. The materials are not Batch managed.

@Madhu...Yes, i discussed with the Functional, yet to find a possible solution.

Thanks & Regards

Rajesh

Former Member
0 Kudos

Hi all,

Solved the issue. I tried posting with different dates and it worked for 2011 and not for 2010. I changed the year in the posting document date and the document date from 2010 to 2011.

Thanks a lot for ur valuable suggestions and inputs.

Regards

Rajesh