Inputs for BAPI – BAPI_GOODSMVT_CREATE both GR and GI

Introduction

In this blog we can get the list of inputs that we need to pass to the BAPI  – BAPI_GOODSMVT_CREATE  to do the Goods Receipt and Goods Issue.

As a PP Functional consultant you may face some specific requirements from the customer. I faced a requirement like below. i.e

The Client was asking us to automate the Goods issue and Goods receipt for serial managed production orders in CO11N screen.

Basically we could not able to do auto GI and GR for serial managed materials in CO11N screen. And this made it difficult for the users to do the manual posting of GI and GR for serial managed materials.

Since we have gone through the standard BAPI which are all available for do auto Goods issue and Goods receipt and we got the BAPI – BAPI_GOODSMVT_CREATE.

On Internet we have searched inputs for this BAPI. But mostly if got the inputs on technical point of view. As a functional consultant I could not able to grab it. Since I am writing this to share the knowledge which we have gathered.

Before that we took the data from necessary data from RESB reservation table by passing the order AUFNR


Main Part:

  • Go to SE37 tcode
  • Give the Function module BAPI_GOODSMVT_CREATE
  • Click execute
  • Give the input parameters as below to get the output.

If we need to do the goods receipt follow the below one.

Inputs for Goods Receipt:

Structure: GOODSMVT_HEADER PSTNG_DATE = SY_DATUM - (System Date)
DOC_DATE = SY_DATUM - (System Date)
GR_GI_SLIP_NO = 3 as default REF_DOC_NO = AUFNR - (Production Order) You can maintian any as per your convenience Structure: GOODSMVT_CODE GM_CODE = 02 as default - (For foods Receipt) Structure: GOODSMVT_ITEM MATERIAL = AFPO-MATNR - (Header material of the Production order)
PLANT = AFPO-PWERK - (Plant)
STGE_LOC = AFPO-LGORT - (Storage location)
MOVE_TYPE = 101 as default - (Movement Type for Goods Receipt)
ENTRY_QNT = AFPO-PSMNG - (Yield Quantity to be posted to unrectricted)
ENTRY_UOM = AFPO-MEINS - (Unit Of Measure)
ORDERPR_UN_ISO = AFPO-MEINS in T006 as MSEHI to get the ISOCODE - (ISO code)
ORDERID = AFPO-AUFNR - (Production/Purchase/Sales order for reference)
ORDER_ITNO = 0001 as default - (Item Number of the order)
RESERV_NO = RESB-RSNUM - (Pass the reservation number if you need to clear reservation)
RES_ITEM = RESB-RSPOS - (Pass reservation item number if you need to clear reservation)
MVT_IND = F as default Table: GOODSMVT_SERIALNUMBER MATDOC_ITM = 0001 as default - (Document item)
SERIALNO = Pass AUFNR in SER05 as PPAUFNR to get the OBKNR and then pass OBKNR in OBJK to get the list of SERNR - (if Serial number is necessary)

If you need to add multiple serial numbers then click add line button in serial number screen to add more.


If we need to do the goods issue follow the below one.

Inputs for Goods Issue

Structure: GOODSMVT_HEADER PSTNG_DATE = SY_DATUM - (System Date)
DOC_DATE = SY_DATUM - (System Date)
GR_GI_SLIP_NO = 3 as default REF_DOC_NO = AUFNR (Production Order Or any value for your reference) Structure: GOODSMVT_CODE GM_CODE = 03 as default - (For Goods Issue) Structure: GOODSMVT_ITEM MATERIAL = RESB-MATNR - (Components which need to be issued)
PLANT = RESB-PWERK - (Components plant from RESB table)
STGE_LOC = RESB-LGORT - (Components Storage location from RESB table)
MOVE_TYPE = 261 as default - (Movement Type for doing goods issue)
ENTRY_QNT = RESB-BDMNG - (Quantity to be issued) Also check RESB-ENMNG. If ENMNG NE 0, then BDMNG = BDMNG-ENMNG ENTRY_UOM = RESB-MEINS - (Components Unit of Measure)
ORDERPR_UN_ISO = Pass MEINS in T006 as MSEHI to get the ISOCODE ORDERID = AUFNR - (Production/Purchase/Sales order or any for reference)
ORDER_ITNO = 0001 as default - (Item number of order)
RESERV_NO = RESB-RSNUM - (Pass Reservation number if you need to clear it)
RES_ITEM = RESB-RSPOS - (Pass Reservation item number if you need to clear it)
MVT_IND = Empty Table: GOODSMVT_SERIALNUMBER – N number of Iteration based on QTY MATDOC_ITM = 0001 as default - (Document item)
SERIALNO = Pass AUFNR in SER05 as PPAUFNR to get the OBKNR and then pass OBKNR in OBJK to get the list of SERNR - (if Serial number is necessary)

Note:

Keep the remaining values in the Function module empty to get the output.

Conclusion

I hope this may help a much

Use BAPI_TRANSACTION_COMMIT in test sequence to get the BAPI work.

Would like you guys to see more relevant things using the link:

https://blogs.sap.com/tags/9aaa6d7b-e017-4ddc-805d-9bbd02a6c46d/),

We would very much appreciate your comments and suggestions below.