{"audience":"Warehouse staff, project warehouses, inventory control teams and manufacturing and construction companies that need traceability.","authorization_objects":[{"note":"Movement type authorization for barcode movements","object":"M_MSEG_BWA"},{"note":"Goods movement authorization by plant","object":"M_MSEG_WWA"},{"note":"Goods movement authorization by storage location","object":"M_MSEG_LGO"}],"components":[],"countries":[],"effort_days_max":22,"effort_days_min":15,"effort_size":"L","faq":[{"a":"HU management requires the storage location to become HU-managed and changes delivery and packing processes. This program adds a barcode breakdown without changing existing IM processes; barcode data can be carried over if you later move to HU or EWM.","q":"Why this solution instead of handling unit management (HU)?"},{"a":"Standard stock changes but the barcode table does not. The nightly reconciliation lists the difference by material, batch and storage location, and the warehouse team corrects the barcodes. If preferred, movements without a barcode can be blocked for selected storage locations during installation.","q":"What if someone posts a movement in MIGO without a barcode?"},{"a":"No. A split only changes the barcode breakdown; the total stays the same and no goods movement is posted. A new label is printed for the split barcode.","q":"Does splitting a barcode change stock?"}],"features":[{"code":"alv","label":"ALV list (sort, filter, subtotals)","note":""},{"code":"drilldown","label":"Double-click drill-down to the document","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"background","label":"Runs as a background job","note":"Reconciliation of barcodes and standard stock runs as a nightly job."}],"functions":[{"name":"BAPI_GOODSMVT_CREATE","role":"Posts transfers, issues and project assignments made by scanning a barcode"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves the goods movement together with the barcode update"},{"name":"SSF_FUNCTION_MODULE_NAME","role":"Calls the barcode label form"}],"gap":"Standard inventory management (IM) keeps stock at material, storage location and batch level; it does not tell apart ten cartons of the same batch. Carton-level tracking needs handling unit management (HU) or EWM, which means a large change to warehouse processes. Serial numbers are meant for single pieces and cannot be used for cartons with quantities. As a result many warehouses keep barcodes in Excel and drift away from SAP stock.","id":"mm-barcode-unit-tracking","industries":[],"input_columns":[],"kind":"program","language":"en","lastmod":"2026-11-18","logic":"1. At goods receipt (MIGO or handheld terminal) a unique barcode is generated per carton and written to a custom barcode table with material, batch, plant, storage location, quantity, unit, material document and status; the label is printed with Smart Forms.\n2. Barcode split: part of a barcode's quantity is moved to a new barcode (for example a 100 m roll into 60 + 40). The parent barcode's quantity goes down, the new barcode is created with the same material, batch and location, and the link is kept; standard stock does not change, only the barcode breakdown does.\n3. Storage location transfers and issues to consumption done by scanning a barcode are posted as standard goods movements with BAPI_GOODSMVT_CREATE, and the barcode's location or status is updated in the same step; the material document is added to the barcode history.\n4. Project assignment: when a barcode is scanned and a WBS element selected, a transfer from unrestricted stock to project stock (movement type 415 Q) is posted; the barcode is flagged as project stock and matches the project stock in MSPR.\n5. A reconciliation job compares barcode totals with standard stock (MARD, MCHB, MSPR) by material, batch and storage location and lists the differences; movements made outside the program become visible this way.\n6. The barcode report shows the current location, quantity, project assignment and movement history of every barcode. In S/4HANA goods movements are written to MATDOC; because the program only uses the BAPI, it does not change. If the warehouse moves to EWM later, barcodes can be converted into handling units.","module":"MM","object_type":"fiori_app","output_columns":[{"calculated":true,"formula":"Custom barcode number","label":"Barcode","source_field":null,"source_table":null},{"calculated":true,"formula":"Source barcode if split","label":"Parent barcode","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"MARA"},{"calculated":false,"formula":"","label":"Description","source_field":"MAKTX","source_table":"MAKT"},{"calculated":false,"formula":"","label":"Batch","source_field":"CHARG","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Storage location","source_field":"LGORT","source_table":"MARD"},{"calculated":true,"formula":"Current quantity of the barcode","label":"Quantity","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"WBS element","source_field":"POSID","source_table":"PRPS"},{"calculated":false,"formula":"","label":"Last document","source_field":"MBLNR","source_table":"MSEG"},{"calculated":true,"formula":"In stock, in project, consumed, split","label":"Status","source_field":null,"source_table":null}],"parameters":[{"example":"","kind":"select_option","label":"Barcode","name":"S_BARCODE","ref_field":"","required":false},{"example":"KB-11030","kind":"select_option","label":"Material","name":"S_MATNR","ref_field":"MARD-MATNR","required":false},{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERKS","ref_field":"MARD-WERKS","required":true},{"example":"","kind":"select_option","label":"Storage location","name":"S_LGORT","ref_field":"MARD-LGORT","required":false},{"example":"","kind":"select_option","label":"WBS element","name":"S_PSPNR","ref_field":"PRPS-POSID","required":false},{"example":"","kind":"checkbox","label":"Only differences to standard stock","name":"P_DIFF","ref_field":"","required":false}],"part_of":[],"performance":"Define a secondary index on material + plant + storage location + batch in the barcode table; the reconciliation job aggregates by this key. On the scanning screen read only the scanned barcode's row and post the goods movement in the same LUW as the barcode update.","process":"INV","quote_url":"https://nekuhub.com/en/request-a-quote/?report=mm-barcode-unit-tracking","related":["mm-goods-receipt-label","mm-rf-mobile-warehouse","ps-project-stock-on-completed-wbs"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Shows stock by material, storage location and batch; no carton or barcode breakdown.","tcode":"MMBE"},{"note":"Lists warehouse stock; no barcode level.","tcode":"MB52"},{"note":"Posts goods movements; does not create or track barcodes.","tcode":"MIGO"}],"summary":"A program that tracks every carton or piece with its own barcode in warehouses that do not use handling unit management. A barcode is created at goods receipt, can be split and assigned to a project (WBS), and the location, quantity and movement history of every barcode are reported; barcode movements stay in step with standard stock.","tables":[{"access":"read","join_on":"","role":"Material document items linked to barcodes (ECC)","table":"MSEG","variant":"ecc"},{"access":"read","join_on":"","role":"Material documents linked to barcodes (S/4HANA)","table":"MATDOC","variant":"s4"},{"access":"read","join_on":"","role":"Storage location stock (reconciliation)","table":"MARD","variant":"both"},{"access":"read","join_on":"","role":"Batch stock (reconciliation)","table":"MCHB","variant":"both"},{"access":"read","join_on":"","role":"Project stock (reconciliation of WBS-assigned barcodes)","table":"MSPR","variant":"both"},{"access":"read","join_on":"","role":"WBS element validity and description","table":"PRPS","variant":"both"},{"access":"read","join_on":"","role":"Material and batch management flag","table":"MARA","variant":"both"},{"access":"read","join_on":"MAKT-MATNR = MARA-MATNR","role":"Material description on label and report","table":"MAKT","variant":"both"}],"title":"Barcode-Level Stock Tracking: Split, Project Assignment and Barcode Report","url":"https://nekuhub.com/en/programs/barcode-level-stock-tracking-split-and-project-assignment/","vendor_id":"nekudos"}