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

Error for St. Location while using BAPI BAPI_GOODSMVT_CREATE for non stock PO

Former Member
0 Likes
2,087

Hi,

Can anyone please confirm if BAPI_GOODSMVT_CREATE can be used for posting goods receipt for non stock purchase orders, if not will FM "MB_CREATE_GOODS_MOVEMENT" can be used. Please need urgent help.

This BAPI is working fine with GR for Stock Materials but when used for non stock it asks to enter storage location.

"Error during posting Material document: M7 018 Enter Stor. location"

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,275

Do you get the same message with MIGO

  • No - correct your call of the BAPI
  • Yes - Check material type with MM03, then qty/value update with OMS2 (is your PO actualy a non-stock PO...)
Read only

0 Likes
1,275

MIGO is working fine.

Material is with qty/value update but PO is made using account assignment K, so material will be be directly consumed at the time of Goods Receipt however the BAPI is asking to enter Storage Location.

Read only

0 Likes
1,275

So, as written, correct your call of the BAPI, you are not trying to post a movement code 101 but for a K a movement code 161 would be more 'compliant', so check your parameters carefully and the T158* tables that handle the BAPI.

Read only

JL23
Active Contributor
0 Likes
1,275

a K in account assignment of a PO is not a guarantee that SAP must not ask for a storage location. The account assignment just controls whether the value is posted to a stock account or to a consumption account.

The storage location is depending on the customizing of the material type at the time of PO creation.If for example the material type is customized like a UNBW (quantity update yes, value update no) then it will create inventory with the receipt and hence needs a storage location.