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 · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Populate GOODSMVT_HEADER: set PSTNG_DATE (posting date in YYYYMMDD), DOC_DATE (document date), and REF_DOC_NO (production order number).
  2. Populate GOODSMVT_CODE with GM_CODE = '02' which corresponds to goods receipt for a production order.
  3. 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.
  4. 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.
  5. 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.
  6. For serial/lot-managed materials, additionally populate GOODSMVT_SERIALNUMBER (for serial numbers) or pass the batch number in the BATCH field of GOODSMVT_ITEM.

Known gotchas

Related routes

Call a BAPI over RFC and commit the transaction correctly using BAPI_TRANSACTION_COMMIT
sap-s4hana · 5 steps · unrated
Read production order status and confirm a goods receipt for a production order in SAP S/4HANA using the OData v2 API (API_PRODUCTION_ORDER_2_SRV)
api.sap.com · 6 steps · unrated
Inject a third-party delivery order into a merchant's Clover POS using the Clover REST API
clover-pos-order-injection · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans