{"audience":"Subcontracting coordinators, purchasing, warehouse and production planning teams.","authorization_objects":[{"note":"Authorization for movement type 541","object":"M_MSEG_BWA"},{"note":"Goods movement authorization by plant","object":"M_MSEG_WMB"},{"note":"Order display authorization by plant","object":"M_BEST_WRK"}],"components":[],"countries":[],"effort_days_max":15,"effort_days_min":10,"effort_size":"L","faq":[{"a":"The dispatch order is an internal document showing which order the goods were sent for. If a legal delivery note or e-delivery note is required, the dispatch material document is passed to the existing delivery note integration; the program can be extended to trigger that step.","q":"Does the dispatch order replace the legal delivery note?"},{"a":"Yes. MSLB keeps the stock at the subcontractor per batch; the tracking view shows sent and consumed quantities by batch. This makes it easier to trace which finished goods a batch-managed raw material went into.","q":"Can the stock at the subcontractor be tracked by batch?"},{"a":"Yes. MSLB and MSEG are read as compatibility views in S/4HANA, the dispatch document is written to MATDOC and BAPI_GOODSMVT_CREATE is used the same way.","q":"Does it 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":"alv","label":"ALV list (sort, filter, subtotals)","note":"The dispatch proposal and tracking view are edited in an ALV."},{"code":"email","label":"Send the result by email","note":"The dispatch order can be emailed to the subcontractor as a PDF."},{"code":"excel","label":"Export to Excel","note":""}],"functions":[{"name":"BAPI_GOODSMVT_CREATE","role":"Transfers the components to the subcontractor with movement 541"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Commits the dispatch document"},{"name":"SSF_FUNCTION_MODULE_NAME","role":"Finds the generated function name of the dispatch order form"}],"gap":"ME2O monitors subcontracting components and can start the 541 transfer, but it does not send the components of several orders in one step with batch selection or print a dispatch order in the company layout; in MIGO every shipment is entered by hand. MBLB shows the stock at the subcontractor but does not show which shipment belongs to which order or the finished goods received back in the same list. The custom program combines dispatch, printout and tracking.","id":"mm-subcontracting-dispatch","industries":[],"input_columns":[],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. Selection: open subcontracting order items (EKPO-PSTYP = 3) are read by subcontractor, plant and delivery date; the component requirements of each item come from RESB via order number and item.\n2. Proposed quantity to send = component requirement − quantity already sent; optionally the stock already at the subcontractor (MSLB) is deducted. The user corrects quantity and batch in the ALV; batches are proposed from unrestricted stock in MCHB.\n3. Posting: the selected lines are posted per subcontractor in one material document with the order-referenced 541 movement via BAPI_GOODSMVT_CREATE.\n4. A dispatch order form is printed for the resulting material document: subcontractor address, order, components, batches, quantities and packaging. Optionally the document is emailed as a PDF to the subcontractor.\n5. Tracking view: per subcontractor and material the quantity sent (541), consumed (543) and returned (542) with the current stock in MSLB; per order the finished quantity received (EKBE) and the open finished quantity.","module":"MM","object_type":"form","output_columns":[{"calculated":false,"formula":"","label":"Subcontractor","source_field":"LIFNR","source_table":"MSLB"},{"calculated":false,"formula":"","label":"Order","source_field":"EBELN","source_table":"EKPO"},{"calculated":false,"formula":"","label":"Item","source_field":"EBELP","source_table":"EKPO"},{"calculated":false,"formula":"","label":"Finished material","source_field":"MATNR","source_table":"EKPO"},{"calculated":false,"formula":"","label":"Component","source_field":"MATNR","source_table":"RESB"},{"calculated":false,"formula":"","label":"Batch","source_field":"CHARG","source_table":"MSEG"},{"calculated":true,"formula":"Σ 541 − Σ 542 quantity","label":"Sent (541)","source_field":null,"source_table":null},{"calculated":true,"formula":"Σ 543 quantity","label":"Consumed (543)","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Stock at subcontractor","source_field":"LBLAB","source_table":"MSLB"},{"calculated":true,"formula":"Σ EKBE goods receipt quantity","label":"Finished received","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Material document","source_field":"MBLNR","source_table":"MSEG"},{"calculated":true,"formula":"Sent, closed or error","label":"Status","source_field":null,"source_table":null}],"parameters":[{"example":"100812","kind":"select_option","label":"Subcontractor","name":"S_LIFNR","ref_field":"EKKO-LIFNR","required":true},{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERKS","ref_field":"EKPO-WERKS","required":true},{"example":"4500021501","kind":"select_option","label":"Subcontracting order","name":"S_EBELN","ref_field":"EKPO-EBELN","required":false},{"example":"16.11.2026 – 30.11.2026","kind":"select_option","label":"Delivery date","name":"S_EINDT","ref_field":"EKET-EINDT","required":false},{"example":"X","kind":"checkbox","label":"Deduct stock at subcontractor from the proposal","name":"P_MSLB","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Test mode (check without posting)","name":"P_TEST","ref_field":"","required":false},{"example":"","kind":"radio","label":"Tracking view","name":"R_TRACK","ref_field":"","required":false}],"part_of":[],"performance":"Read RESB only for the selected order items via order number and item. In the tracking view, aggregate the 541/542/543 movements from MSEG once by subcontractor and date range; in S/4HANA this aggregation runs in the database on MATDOC.","process":"P2P","quote_url":"https://nekuhub.com/en/request-a-quote/?report=mm-subcontracting-dispatch","related":["mm-goods-receipt-upload","mm-open-po-by-vendor","mm-subcontracting-component-reconciliation"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Monitors subcontracting components and starts the transfer; no bulk dispatch across orders and no corporate dispatch order.","tcode":"ME2O"},{"note":"Lists stock at the subcontractor; does not relate shipments to orders or to finished goods received back.","tcode":"MBLB"}],"summary":"A custom program that proposes the components of subcontracting purchase orders, posts the transfer to the subcontractor (541) in bulk, prints a dispatch order for each shipment and tracks, per subcontractor and document, the quantity sent, consumed and still at the subcontractor together with the finished quantity received back. The subcontracting process is run from one screen and period-end reconciliation with the subcontractor becomes easier.","tables":[{"access":"read","join_on":"","role":"Open subcontracting order items (item category 3)","table":"EKPO","variant":"both"},{"access":"read","join_on":"RESB-EBELN = EKPO-EBELN AND RESB-EBELP = EKPO-EBELP","role":"Component requirements of the subcontracting order","table":"RESB","variant":"both"},{"access":"read","join_on":"MSLB-LIFNR = EKKO-LIFNR AND MSLB-MATNR = RESB-MATNR AND MSLB-WERKS = RESB-WERKS","role":"Component stock at the subcontractor","table":"MSLB","variant":"both"},{"access":"read","join_on":"MCHB-MATNR = RESB-MATNR AND MCHB-WERKS = RESB-WERKS","role":"Unrestricted stock of the batches to send","table":"MCHB","variant":"both"},{"access":"write","join_on":"","role":"Dispatch material document header (written via BAPI)","table":"MKPF","variant":"ecc"},{"access":"read_write","join_on":"MSEG-MBLNR = MKPF-MBLNR AND MSEG-MJAHR = MKPF-MJAHR","role":"541 dispatch items; 542 and 543 movements for tracking","table":"MSEG","variant":"ecc"},{"access":"read_write","join_on":"","role":"In S/4HANA the dispatch document is written to this table","table":"MATDOC","variant":"s4"},{"access":"read","join_on":"EKBE-EBELN = EKPO-EBELN AND EKBE-EBELP = EKPO-EBELP","role":"Finished quantity received on the subcontracting order","table":"EKBE","variant":"both"},{"access":"read","join_on":"LFA1-LIFNR = MSLB-LIFNR","role":"Subcontractor name and address (dispatch order)","table":"LFA1","variant":"both"}],"title":"Subcontracting Dispatch, Dispatch Order Printout and Stock at Subcontractor Tracking Program","url":"https://nekuhub.com/en/programs/subcontracting-dispatch-order-and-stock-at-subcontractor-tracking/","vendor_id":"nekudos"}