cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_GOODSMVT_CREATE - 101 mvt.

Former Member
0 Kudos

Hi ...

I'm trying to use BAPI_GOODSMVT_CREATE to create a '101' movement for an inbound shipping notification.

I am entering following data in the item table

PLANT

STGE_LOC

BATCH

MOVE_TYPE

ENTRY_QNT

ENTRY_UOM

PO_PR_QNT

ORDERPR_UN

DELIV_NUMB

DELIV_ITEM

I'm getting the error:

No stock posting possible for this material

Trying the same data manually in MIGO/MB01 it works.

Can anyone help???

Preeti

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Preeti,

Please refer to the following code.The below are the fields I used for BAPI

X_GOODSMVT_HEADER-PSTNG_DATE = SY-DATUM.

X_GOODSMVT_HEADER-DOC_DATE = SY-DATUM.

*--Goods Mvt Code is 04

X_GOODSMVT_CODE-GM_CODE = C_05.

*--Fill up Item level values

IT_GOODSMVT_ITEM-MATERIAL = V_MATNR.

IT_GOODSMVT_ITEM-PLANT = IT_INFILE-TO_DEPT. "C_5002.

IT_GOODSMVT_ITEM-STGE_LOC = V_SLGORT.

IT_GOODSMVT_ITEM-BATCH = IT_INFILE-LOT_NBR.

IT_GOODSMVT_ITEM-MOVE_TYPE = P_V_BWLVS.

CONDENSE IT_INFILE-MENGE."TRANS_QTY.

IT_GOODSMVT_ITEM-ENTRY_QNT = IT_INFILE-MENGE. "TRANS_QTY.

IT_GOODSMVT_ITEM-ENTRY_UOM = C_UOM.

IT_GOODSMVT_ITEM-MOVE_MAT = V_MATNR.

IT_GOODSMVT_ITEM-MOVE_PLANT = IT_INFILE-TO_DEPT. "C_5002.

IT_GOODSMVT_ITEM-MOVE_STLOC = V_DLGORT.

IT_GOODSMVT_ITEM-MOVE_BATCH = IT_INFILE-LOT_NBR.

IF NOT IT_INFILE-PICK_LOCN IS INITIAL.

IT_GOODSMVT_ITEM-GR_RCPT = IT_INFILE-PICK_LOCN."_FROM.

ELSE.

IT_GOODSMVT_ITEM-GR_RCPT = IT_INFILE-PICK_LOCN_FROM.

ENDIF.

APPEND IT_GOODSMVT_ITEM.

CLEAR IT_GOODSMVT_ITEM.

*--call Bapi Function module

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

GOODSMVT_HEADER = X_GOODSMVT_HEADER

GOODSMVT_CODE = X_GOODSMVT_CODE

  • TESTRUN = ' '

IMPORTING

GOODSMVT_HEADRET = X_GOODSMVT_HEADRET

  • MATERIALDOCUMENT =

  • MATDOCUMENTYEAR =

TABLES

GOODSMVT_ITEM = IT_GOODSMVT_ITEM

  • GOODSMVT_SERIALNUMBER =

RETURN = IT_RETURN.

Regards,

Savitha

Message was edited by: savitha m

Former Member
0 Kudos

Hai preeti,

Just check this link,if at all it may help you in any way...

http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm

Regards,

Srikanth.

Former Member
0 Kudos

Hi Srikanth,

This is not helpful for me as in this code GR is been done against Purchase Order. I am doing GR for inbound delivery.

Thanks,

Preeti

vinotha_m
Participant
0 Kudos

Hello Preethi....did u solve this error....

I too am facing a similar situation...in case u have some solution can u plz let me know

Vinotha M.

Former Member
0 Kudos

Hi,

You are creating GR against inbound delivery but that inbound delivery may created against a purchase order. So when you give a inbound delivery number in the MIGO it will automatically pick up the PO and it will create a GR against that PO for 101 movement.

So in the BAPI GM_CODE give it as 01 and pass the PO number and delivery number too. It will work i hope

rajkumar abbu