cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI - GR against PO with BOM

Former Member
0 Kudos

Hello,

I am trying to use BAPI_GOODSMVT_CREATE to post a good receipt against a PO (movement type 101) where one of the items is a BOM (i.e. a material with sub-components). The problem I am running into is that I need to be able to change the default quantities of the sub-components in the GR. However, I have not been able to find a way to use BAPI_GOODSMVT_CREATE to handle the sub-components. No matter how I try to put the sub-components into the structure GOODSMVT_ITEM, the system does not seem to like it. It works fine if I put just the base item in that table and leave out the sub-components. In this case, the system explodes the BOM in the background and posts the default quantities for the sub-components (based on the BOM definition) in the GR document. However, <u>I need to be able to override these default quantities.</u>

Does anybody have experience using BAPI_GOODSMVT_CREATE with items that contain sub-components (and changing data pertaining to those sub-components)? Can it be made to work? (by reading the answer to question 8 in OSS note 520813, I'm led to believe that what I want to do is not possible with BAPI_GOODSMVT_CREATE)

My alternative at this point seems to be resorting to writing batch input for transaction MB01 (MIGO looks too complicated for batch input). Also, I have thought about trying to use MB_CREATE_GOODS_MOVEMENT directly, but it is not an RFC or BAPI function, so I'm not too keen on that idea.

I'm on release 4.6C.

Regards,

Lee

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Lee,

Actually you give yourself a part of the solution.

The function module MB_CREATE_GOODS_MOVEMENT is actually called within BAPI_GOODSMVT_CREATE for posting a goods receipt.

Therefore your fear of using MB_CREATE_GOODS_MOVEMENT directly should be less.

If a function module with RFC capabillities is required, write your own wrapper function module to do the trick.

Regards,

Rob.