Symptom
- When posting supplier invoices via the Supplier Invoice API, invoice numbers longer than 16 characters are truncated in the Reference field.
- Need to store supplier invoice numbers exceeding 16 characters without losing information.
- No specific error message is displayed.
Environment
- Product: SAP S/4HANA Cloud Public Edition
- Fiori UI for Invoice Verification (Public Cloud)
Reproducing the Issue
- Post a supplier invoice using the Supplier Invoice API in SAP S/4HANA Cloud Public Edition.
- Use an invoice number that exceeds 16 characters.
- Observe that the Reference field stores only part of the invoice number (truncated).
Cause
- The Reference field for supplier invoices is limited by design to a maximum of 16 characters and cannot be enlarged.
- For certain inbound paths (for example, central invoice/Business Network), the system keeps the rightmost 16 characters when the incoming reference exceeds the limit.
Resolution
- If the full invoice number is 25 characters or fewer, use the Document Header Text field to store the complete number (up to 25 characters). Verify whether your inbound route (for example, central invoice/Business Network) already populates this field and adjust that mapping if necessary.
- If invoice numbers can exceed 25 characters, create a custom field for supplier invoices using the Custom Fields tool and enable it for the Supplier Invoice API so the complete number is transferred and visible. Confirm the required length is supported and the field is exposed to the interface.
- Implement a control to continue detecting duplicates, as the standard duplicate check uses the 16-character Reference field. Align your process or validation to also consider the chosen long-number field.
- Do not split the number across multiple fields to avoid search and matching issues.
- Do not repurpose the Assignment field, as it influences payment matching and clearing.
Country-specific option (Poland only): If you post supplier invoices for a Polish company code, SAP delivers a standard "Long Invoice Number" feature through Official Document Numbering, so no custom field is needed. Use the pre-delivered official document number type PLLINV (supports up to 60 characters), configured for the FI Supplier Invoice process with end-user input. This option applies only to Polish company codes and is not a general solution for other countries. Configuration steps: Configuring Long Invoice Number for Supplier Invoices
See Also
- refer to: SAP S/4HANA Cloud Public Edition - Reference Document Number for Different Forms
- refer to: How to store long Supplier Invoice Reference Numbers in SAP S/4HANA ERP Products
- refer to: More than 16 digits in Reference of the App "Create Supplier Invoice"
- refer to: Note 3713167 - Supplier Invoice Number Exhaustion
- refer to: Note 3727353 - Request to increase title field character limit in supplier invoice advance app in s/4hana cloud public edition
Keywords
supplier invoice api, reference field, invoice number length, 16 characters, truncation, xblnr, bkxt, document header text, custom field, duplicate check, ariba business network, central invoice management, posting invoices, s/4hana cloud public edition, long invoice number , KBA , MM-FIO-IV-2CL , Fiori UI for Invoice Verification (Public Cloud) , Problem
SAP Knowledge Base Article - Public