Skip to Content


Jan 23, 2017 at 03:49 PM


avatar image
Former Member

Hi Experts,
I want to post a GR in MIGO.
and i am using the FM "MB_CREATE_GOODS_MOVEMENT " to post it.
But i am not sure what to pass.
IMSEG structure some how i can fill; but i am little confused what to pass in the T_MS1INT & T&MS2INT, because of which the FM to not posting the GR.
It is urgent and i seek your help in this regard.

Thanks & Regards,

S Dee

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Jan 24, 2017 at 06:54 AM

Why don't you use documented and released BAPI_GOODSMVT_CREATE?


Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Even initially i had thought of using it .Since i am working on IS-Oil based requirement, So i used

BAPI_GOODSMVT_CREATE_OIL, but i does not handle the Quantity in Delivery notes.. i passed in Extension , still it is not updating the MIGO transaction.
So finally i thought of using the MB_CREATE_GOODS_MOVEMENT , now the problem is how to fill the MS1INT and MS2INT tables, without which the FM is not updating MIGO. :(


I second the opninion of Raymond, as there is good documentation and samples on the BAPI (like this Wiki and this Wiki) ...

Former Member
Nic Teunckens

My requirement is to update MIGO with Quantity in Delivery Notes hile posting a GR , which i am not able to handle with this BAPI now even with BAPI-OIL ..

Kindly help me out ..

Nic Teunckens Jan 24, 2017 at 02:05 PM

I did not try this myself, but I found this recent post, indicating that you could create an Enhancement Point in FM 'MAP2I_B2017_GM_ITEM_TO_IMSEG' which is used in the BAPI ... See the post : link

You could try setting up a BREAK-POINT to research that claim, possibily also for your BAPI "BAPI_GOODSMVT_CREATE_OIL"? I don't know whether it is adviseable to use this type of logic because ...

Other than that, you are right. There's SAP KBA 1883262 ("Fields MSEG-LSMNG - 'Quantity in unit of measure from delivery note' and MSEG-LSMEH - 'Unit of Measure From Delivery Note' can not be filled with BAPI_GOODSMVT_CREATE") indicating this BAPI was not intended to update these fields ...

However, see SAP KBA 1901224 ('BAPI_GOODSMVT_CREATE: GR for Inbound Delivery: Document flow.') :

"It was not intended that the BAPI BAPI_GOODSMVT_CREATE updated the Inbound Delivery. ...

So that the Inbound Delivery is updated 3 steps are needed:

  1. In the Item Table complete the fields DELIV_NUMB_TO_SEARCH and DELIV_ITEM_TO_SEARCH with the Inbound Delivery Number and Item. Leave the fields for the Purchase Order Number and Purchase Order Item empty.
  2. Set the "Document Flow Update" Indicator under the customizing path: Logistics Execution → Shipping → Basic Shipping Functions → Configure Global Shipping Data.
  3. Complete the Material Number (MATERIAL) in the Table GOODSMVT_ITEM.

The BAPI BAPI_GOODSMVT_CREATE does not really perform a goods receipt in reference to the inbound delivery, this is only really used to find the correct purchase order item.
A posting with the BAPI when this flag is set will also update the document flow but you need to enter some more data in the BAPI, namely the material number.

If the calling program is not able to pass over the material number then you could also consider using the BAdI MB_BAPI_GOODSMVT_CREATE in the BAPI to read the material number from table LIPS and fill T_IMSEG-MATNR."

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Nic,
Thank you for your analysis.
The posting now is happening with the same FM.
It is just that we have to pass " I_OIB_CALCULATE = 'X' ' .. It internally calculates the QIC parameters and we don't need to fill the T_MS1INT and T_MS2INT explicitly .
As the FM takes the mseg structure we can pass the Quantity in Delivery Note for update.

Thank you all.


OK, glad to see some hints and self-research pays off.

Please close this Post if resolved.