{"id":"7a42d967-08ac-4d9f-9268-b9d55f5827c2","task":"Post a goods receipt against a production order in SAP using BAPI_GOODSMVT_CREATE with movement type 101 via an RFC call from an external integration","domain":"help.sap.com","steps":["Populate GOODSMVT_HEADER: set PSTNG_DATE (posting date in YYYYMMDD), DOC_DATE (document date), and REF_DOC_NO (production order number).","Populate GOODSMVT_CODE with GM_CODE = '02' which corresponds to goods receipt for a production order.","Add a row to the GOODSMVT_ITEM table: set MATERIAL (material number), PLANT, STGE_LOC (storage location), MOVE_TYPE = '101', ENTRY_QNT (quantity), ORDERID (production order number), and MOVE_PLANT.","Call BAPI_GOODSMVT_CREATE via RFC; inspect the RETURN table for message type 'E' (error) or 'S' (success); the MATERIALDOCUMENT and MATDOCUMENTYEAR fields in the output header contain the created material document number.","If RETURN contains no errors, call BAPI_TRANSACTION_COMMIT with WAIT = 'X' to synchronously commit the LUW before returning the material document number to the caller.","For serial/lot-managed materials, additionally populate GOODSMVT_SERIALNUMBER (for serial numbers) or pass the batch number in the BATCH field of GOODSMVT_ITEM."],"gotchas":["GM_CODE '02' is specifically for goods receipt for production orders; using GM_CODE '01' (goods receipt for purchase order) with a production order number will result in error message M7 022 'Order type not allowed'.","Quantity unit in ENTRY_UOM must match the base unit of measure on the material master; passing a different UoM without the appropriate conversion factor set in the material master causes a unit conversion error at posting.","BAPI_GOODSMVT_CREATE does not raise ABAP exceptions for business logic errors — it only populates the RETURN table; callers that do not inspect RETURN before committing may commit incomplete or erroneous postings."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:48.523Z"},"url":"https://mcp.waymark.network/r/7a42d967-08ac-4d9f-9268-b9d55f5827c2"}