{"audience":"Warehouse and goods receiving teams, MM and integration teams of companies that use an external warehouse system.","authorization_objects":[{"note":"Goods movement authorization by movement type","object":"M_MSEG_BWA"},{"note":"Goods movement authorization by plant","object":"M_MSEG_WWA"}],"components":[],"countries":[],"effort_days_max":6,"effort_days_min":4,"effort_size":"M","faq":[{"a":"Yes. By adding a stock type column to the file, the receipt can be directed to unrestricted, quality inspection or blocked stock; for materials with active inspection the stock type comes from the material setting.","q":"Can receipts be posted to quality inspection or blocked stock?"},{"a":"Yes. With an optional column, rows marked as final delivery send the delivery completed indicator to the BAPI and the order item is closed.","q":"Can the delivery completed flag be set from the file?"},{"a":"Yes. BAPI_GOODSMVT_CREATE is also supported on S/4HANA and writes the document to MATDOC; the MKPF and MSEG reads work through compatibility views.","q":"Does the program work on S/4HANA?"}],"features":[{"code":"test_run","label":"Test mode (check without posting)","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"error_file","label":"Download failed lines as a separate file","note":"Failed rows can be corrected and uploaded again with the same template."},{"code":"background","label":"Runs as a background job","note":"Files dropped by the warehouse system are processed automatically by an hourly or nightly job."}],"functions":[{"name":"BAPI_GOODSMVT_CREATE","role":"Posts the goods receipt for the order (101) as one document per delivery note"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves successful goods receipts permanently"},{"name":"BAPI_TRANSACTION_ROLLBACK","role":"Rolls back changes in test mode or on error"}],"gap":"MIGO posts each goods receipt on screen one at a time; MB01 in ECC also works one document at a time. There is no standard transaction that reads confirmed receipt rows from a file sent by an external warehouse system or handheld terminal, checks them against the open order quantity, prevents duplicate postings and runs as a nightly job. Busy warehouses therefore spend hours on manual MIGO entry.","id":"mm-goods-receipt-upload","industries":[],"input_columns":[{"derived":false,"label":"Purchase order","required":true,"rule":"","target_field":"EBELN","target_table":"MSEG"},{"derived":false,"label":"Item","required":true,"rule":"","target_field":"EBELP","target_table":"MSEG"},{"derived":false,"label":"Quantity","required":true,"rule":"","target_field":"ERFMG","target_table":"MSEG"},{"derived":false,"label":"Unit","required":false,"rule":"","target_field":"ERFME","target_table":"MSEG"},{"derived":false,"label":"Storage location","required":false,"rule":"","target_field":"LGORT","target_table":"MSEG"},{"derived":false,"label":"Batch","required":false,"rule":"","target_field":"CHARG","target_table":"MSEG"},{"derived":false,"label":"Posting date","required":true,"rule":"","target_field":"BUDAT","target_table":"MKPF"},{"derived":false,"label":"Document date","required":false,"rule":"","target_field":"BLDAT","target_table":"MKPF"},{"derived":false,"label":"Delivery note","required":true,"rule":"","target_field":"XBLNR","target_table":"MKPF"},{"derived":false,"label":"Header text","required":false,"rule":"","target_field":"BKTXT","target_table":"MKPF"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The file is read from the user's PC or, in a background job, from a folder on the application server; each row carries order, item, quantity, unit, storage location, batch, posting date, document date, delivery note number and header text.\n2. Checks: the EKPO item must exist, must not be deleted (LOEKZ) or delivery-completed (ELIKZ); open quantity = EKPO-MENGE − Σ EKBE goods receipts (VGABE = 1); the quantity must not exceed the over-delivery tolerance; batch-managed materials need a batch.\n3. Duplicate check: if a non-reversed (MSEG-SMBLN) 101 movement already exists for the same delivery note (MKPF-XBLNR), order and item, the row is skipped.\n4. Rows are grouped by delivery note, and for each delivery note BAPI_GOODSMVT_CREATE is called with movement code 01, movement type 101 and the order reference; in test mode it runs with the BAPI test flag and BAPI_TRANSACTION_ROLLBACK follows.\n5. In a real run BAPI_TRANSACTION_COMMIT is done per delivery note; the material document and year (MBLNR, MJAHR) are written to the result list. The processed file is moved to an archive folder and failed rows are written to a separate file.","module":"MM","object_type":"interface","output_columns":[{"calculated":true,"formula":"Row number in the file","label":"Row","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Purchase order","source_field":"EBELN","source_table":"MSEG"},{"calculated":false,"formula":"","label":"Item","source_field":"EBELP","source_table":"MSEG"},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"MSEG"},{"calculated":false,"formula":"","label":"Quantity","source_field":"ERFMG","source_table":"MSEG"},{"calculated":false,"formula":"","label":"Delivery note","source_field":"XBLNR","source_table":"MKPF"},{"calculated":false,"formula":"","label":"Material document","source_field":"MBLNR","source_table":"MKPF"},{"calculated":false,"formula":"","label":"Document year","source_field":"MJAHR","source_table":"MKPF"},{"calculated":true,"formula":"Posted, skipped (duplicate) or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"First error or success message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"/interface/mm/goods_receipt/","kind":"parameter","label":"File or server folder","name":"P_FILE","ref_field":"","required":true},{"example":"X","kind":"checkbox","label":"Read from application server","name":"P_SERVER","ref_field":"","required":false},{"example":"101","kind":"parameter","label":"Movement type","name":"P_BWART","ref_field":"MSEG-BWART","required":false},{"example":"X","kind":"checkbox","label":"Test mode (check without posting)","name":"P_TEST","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Skip delivery notes already posted","name":"P_SKIPD","ref_field":"","required":false}],"part_of":[],"performance":"Because all items of a delivery note are posted in one material document, daily files of a few thousand rows are processed in minutes. If the same order is locked by another user, the row fails and is retried in the next run.","process":"P2P","quote_url":"https://nekuhub.com/en/request-a-quote/?report=mm-goods-receipt-upload","related":["mm-goods-received-not-invoiced","mm-purchase-order-mass-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Posts a goods receipt on screen as one document; does not read a file and does not prevent duplicates.","tcode":"MIGO"},{"note":"Posts goods receipts for orders one at a time in ECC; replaced by MIGO in S/4HANA.","tcode":"MB01"}],"summary":"A custom interface program that posts order, item, quantity, storage location, batch and delivery note rows from a warehouse system, a supplier delivery note file or Excel as goods receipts (101) for purchase orders in bulk. It never posts the same delivery note twice, checks in test mode first and lists the material document number of every row.","tables":[{"access":"write","join_on":"","role":"Material document header: posting date, delivery note; also read for the duplicate check","table":"MKPF","variant":"both"},{"access":"write","join_on":"MSEG-MBLNR = MKPF-MBLNR AND MSEG-MJAHR = MKPF-MJAHR","role":"Material document item: order reference, quantity, storage location, batch","table":"MSEG","variant":"both"},{"access":"write","join_on":"EKBE-EBELN = MSEG-EBELN AND EKBE-EBELP = MSEG-EBELP","role":"Order history: earlier receipts (open quantity) and the new receipt entry","table":"EKBE","variant":"both"},{"access":"read","join_on":"EKPO-EBELN = MSEG-EBELN AND EKPO-EBELP = MSEG-EBELP","role":"Order item: quantity, tolerance, deletion and delivery completed flags","table":"EKPO","variant":"both"}],"title":"Purchase Order Goods Receipt Upload from File Program","url":"https://nekuhub.com/en/programs/purchase-order-goods-receipt-upload-from-file-program/","vendor_id":"nekudos"}