Symptom
Multiple goods receipts are posted for a purchase order with a batch-managed, FIFO-relevant material.
A transporter/freight invoice is received after goods receipts; delivery costs cannot be added at purchase order level anymore.
In Create Supplier Invoice (MIRO), the user must manually select each valuation type (batch) and calculate/enter the amounts per batch; the system does not automatically distribute the costs to batches.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Open Create Supplier Invoice (MIRO).
- Enter company code, invoice date, and reference.
- In Details, enter the invoicing party and document currency.
- Go to the Material tab and add the material and plant.
- For each line, manually select the valuation type (batch).
- Manually calculate and enter the freight/delivery cost per batch.
- Observe that the system does not auto-distribute costs across batches.
Cause
The automatic distribution of unplanned delivery costs from a separate freight vendor across batch-valuated items is not supported in this scenario; distribution is based on invoice amounts of relevant items, and with no applicable invoiced item values for the freight vendor, the system cannot determine a distribution basis, resulting in error M8765.
Resolution
Post the freight invoice manually as a Subsequent Debit with purchase order reference:
1 Choose Transaction = Subsequent Debit and reference the purchase order; assign all relevant goods receipt lines (batches).
2 Enter proportional amounts per batch (for example, by quantity share).
3 Enter the Gross Invoice Amount on the General Information tab to match the freight bill.
4 Simulate and post.
For future processes, add a planned delivery cost condition with the freight vendor in the purchase order so freight is allocated automatically at goods receipt.
Consider submitting a feature request for automatic distribution of unplanned costs from a separate freight vendor across batch valuation types via the Customer Influence portal.
See Also
Keywords
MIRO, Subsequent Debit, unplanned delivery costs, freight, transporter invoice, batch valuation, FIFO, batch costing, automatic distribution, goods receipt, PO history, invoice verification, landed cost, GR/IR, purchase order , KBA , MM-FIO-IV-2CL , Fiori UI for Invoice Verification (Public Cloud) , Problem
SAP Knowledge Base Article - Public