11-23-2011 3:25 PM
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
11-24-2011 5:50 AM
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,
11-24-2011 5:50 AM
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,
11-24-2011 6:50 AM
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
11-24-2011 6:54 AM
Hi Rajesh,
Did you shown this error to functional people.
Regards,
Madhu.
11-24-2011 8:03 AM
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
11-24-2011 10:07 AM
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