{"audience":"Cost accounting, inventory valuation and period-end closing teams, project controlling teams.","authorization_objects":[{"note":"Authorization to change prices in the material ledger","object":"K_ML_VA"},{"note":"Accounting posting authorization in the company code","object":"F_BKPF_BUK"}],"components":[],"countries":[],"effort_days_max":9,"effort_days_min":6,"effort_size":"M","faq":[{"a":"For standard price materials a price change is only possible under the conditions allowed in the period, and the difference goes to the revaluation account. The program flags an operation that the price control does not allow as an error before posting.","q":"What happens with standard price materials?"},{"a":"On S/4HANA the material ledger is always active; a price change creates a material ledger document and inventory value is written to ACDOCA. The program reads the period price from CKMLCR in the preview; the posting path stays the same.","q":"What is different on S/4HANA?"}],"features":[{"code":"test_run","label":"Test mode (check without posting)","note":"Test mode shows the value impact of all rows without posting."},{"code":"error_file","label":"Download failed lines as a separate file","note":""},{"code":"excel","label":"Export to Excel","note":""},{"code":"log","label":"Line-by-line result and error log","note":""}],"functions":[],"gap":"MR21 price changes and MR22 inventory debits/credits are entered material by material; for a correction of hundreds of materials the lines are typed by hand and no control list showing the value impact is available before posting. For project stock (valuated WBS stock) the same work is repeated in separate lines. CKM3N shows the result per material but does not correct in bulk. The custom program checks the file, shows the impact in advance and posts in bulk.","id":"co-material-price-change-debit-credit-upload","industries":[],"input_columns":[{"derived":false,"label":"Plant","required":true,"rule":"","target_field":"BWKEY","target_table":"MBEW"},{"derived":false,"label":"Material","required":true,"rule":"","target_field":"MATNR","target_table":"MBEW"},{"derived":false,"label":"Valuation type","required":false,"rule":"","target_field":"BWTAR","target_table":"MBEW"},{"derived":false,"label":"WBS element (project stock)","required":false,"rule":"","target_field":"PSPNR","target_table":"QBEW"},{"derived":true,"label":"Operation","required":true,"rule":"F = price change, B = debit, A = credit","target_field":null,"target_table":null},{"derived":true,"label":"New price","required":false,"rule":"Required for operation F","target_field":null,"target_table":null},{"derived":false,"label":"Price unit","required":false,"rule":"","target_field":"PEINH","target_table":"MBEW"},{"derived":true,"label":"Debit/credit amount","required":false,"rule":"Required for operation B or A","target_field":null,"target_table":null},{"derived":true,"label":"Reason","required":false,"rule":"Written to the document header text","target_field":null,"target_table":null}],"kind":"program","language":"en","lastmod":"2026-11-18","logic":"1. The file contains plant (valuation area), material, valuation type, optional WBS element (project stock), operation (price change, debit, credit), new price and price unit or debit/credit amount, posting date and reason.\n2. Checks: does valuation data exist in MBEW, or in QBEW for project stock; does the price control (VPRSV) fit the operation; is the posting period open; if the new price differs from the current price by more than the percentage set during setup, the row is flagged.\n3. Preview: old price, new price, stock quantity (LBKUM), old value (SALK3), new value and the difference are calculated. If the material ledger is active, the period price is read from CKMLHD/CKMLCR.\n4. Price changes are posted with BAPI_MATVAL_PRICE_CHANGE; for valuated project stock the WBS element is passed as the special stock key. Debits/credits are posted as batch input of the MR22 transaction; if stock is zero, the amount goes to the price difference account as in standard and this is shown on the row.\n5. Price and stock value are updated in MBEW or QBEW and the accounting document is created in standard. For every row the material ledger or accounting document number is written to the list.\n6. In test mode only the preview runs; faulty rows go to an error file.","module":"CO","object_type":"upload","output_columns":[{"calculated":true,"formula":"File row number","label":"Row","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Plant","source_field":"BWKEY","source_table":"MBEW"},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"MBEW"},{"calculated":false,"formula":"","label":"WBS","source_field":"PSPNR","source_table":"QBEW"},{"calculated":false,"formula":"","label":"Price control","source_field":"VPRSV","source_table":"MBEW"},{"calculated":false,"formula":"","label":"Stock","source_field":"LBKUM","source_table":"MBEW"},{"calculated":true,"formula":"MBEW/QBEW-VERPR or STPRS (by VPRSV)","label":"Old price","source_field":null,"source_table":null},{"calculated":true,"formula":"Price from the file or average after debit/credit","label":"New price","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Old value","source_field":"SALK3","source_table":"MBEW"},{"calculated":true,"formula":"New value − old value","label":"Value difference","source_field":null,"source_table":null},{"calculated":true,"formula":"Price change or accounting document number","label":"Document no.","source_field":null,"source_table":null},{"calculated":true,"formula":"Check, BAPI or batch input message","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"C:\\temp\\fiyat_duzeltme_2026_10.xlsx","kind":"parameter","label":"Price correction file","name":"P_FILE","ref_field":"","required":true},{"example":"31.10.2026","kind":"parameter","label":"Posting date (if empty in file)","name":"P_BUDAT","ref_field":"","required":false},{"example":"20","kind":"parameter","label":"Price deviation threshold to flag (%)","name":"P_DEVPR","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Test mode (preview only)","name":"P_TEST","ref_field":"","required":false}],"part_of":[],"performance":"Read MBEW and QBEW in one query with the list of materials and valuation areas in the file. Package postings per valuation area and issue COMMIT WORK after each package; process batch input sessions in the background for thousands of rows.","process":"INV","quote_url":"https://nekuhub.com/en/request-a-quote/?report=co-material-price-change-debit-credit-upload","related":["co-material-ledger-price-differences","co-material-quantity-reconciliation","ps-project-stock-on-completed-wbs"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Enters price changes material by material; no bulk preview or control list.","tcode":"MR21"},{"note":"Enters debits/credits to inventory value one by one.","tcode":"MR22"},{"note":"Shows the material price analysis; does not correct in bulk.","tcode":"CKM3N"}],"summary":"A custom program that posts moving average or standard price corrections and debits/credits to inventory value from a file, for company and project stock. Before posting it shows old and new price, stock quantity and value difference for every material; after posting a control list with document numbers remains.","tables":[{"access":"read_write","join_on":"","role":"Material valuation: price control, price, stock and value","table":"MBEW","variant":"both"},{"access":"read_write","join_on":"QBEW-MATNR = MBEW-MATNR AND QBEW-BWKEY = MBEW-BWKEY","role":"Valuated project stock: price and value per WBS","table":"QBEW","variant":"both"},{"access":"read","join_on":"MARA-MATNR = MBEW-MATNR","role":"Material and base unit","table":"MARA","variant":"both"},{"access":"read","join_on":"T001K-BWKEY = MBEW-BWKEY","role":"Valuation area to company code","table":"T001K","variant":"both"},{"access":"read","join_on":"CKMLHD-KALNR = MBEW-KALNR","role":"Material ledger header (costing run unit)","table":"CKMLHD","variant":"both"},{"access":"read","join_on":"CKMLCR-KALNR = CKMLHD-KALNR","role":"Material ledger period price and value","table":"CKMLCR","variant":"both"},{"access":"write","join_on":"","role":"Accounting documents created","table":"BKPF","variant":"both"}],"title":"Mass Material Price Change and Inventory Debit/Credit Posting","url":"https://nekuhub.com/en/programs/mass-material-price-change-and-inventory-debit-credit-posting/","vendor_id":"nekudos"}