Why don't you use documented and released BAPI_GOODSMVT_CREATE?
Regards,
Raymond
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:
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."
Add comment