Symptom
- When a supplier creates an invoice on SAP Business Network and the invoice is transferred to SAP S/4HANA Cloud Public Edition via Commerce Automation, the system automatically populates the BKTXT (Document Header Text) field with the tag ARIBA_INVOICE.
- In implementations where the standard XBLNR (Reference Document Number) field cannot be used for invoice references because XBLNR has a hard 16-character limit BKTXT is used as the alternative field to store long invoice references (exceeding 16 characters). The automatic population of BKTXT with the ARIBA_INVOICE tag by the Commerce Automation integration creates a field conflict, as one field is required to serve two purposes simultaneously.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Configure Commerce Automation between SAP Business Network and SAP S/4HANA Cloud Public Edition.
- Create a supplier invoice on SAP Business Network with an invoice reference number exceeding 16 characters.
- Transmit the invoice to SAP S/4HANA Cloud Public Edition via Commerce Automation.
- Open the resulting supplier invoice document in SAP S/4HANA Cloud Public Edition.
- Observe the BKTXT (Document Header Text) field.
Result: The BKTXT field is automatically populated with the tag ARIBA_INVOICE by the Commerce Automation integration. When BKTXT is also configured to store long invoice references, a field conflict arises and the intended invoice reference cannot be stored correctly.
Cause
- This is a known product constraint resulting from the standard behavior of the Commerce Automation integration.
- The ARIBA_INVOICE tag is automatically written to the BKTXT field by the system during invoice transfer from SAP Business Network.
- The standard XBLNR field has a hard character limit of 16 characters and cannot be used for longer invoice references. SAP recommends BKTXT as the alternative field for invoice references exceeding 16 characters in SAP S/4HANA Cloud Public Edition, which directly conflicts with the automatic population of the same field by the integration.
- Note: The BAdI LOG_EDI_MM_INVOICE_CE_MAP is only triggered when the Commerce Automation integration uses the InvoiceRequest_In service interface (Communication Scenario SAP_COM_0222). If the integration uses the supplierinvoices4request_in API interface instead, this BAdI will not be triggered. Verify the interface and Communication Arrangement in use before implementing Option 1.
Resolution
If the Commerce Automation integration uses the InvoiceRequest_In service interface (Communication Scenario SAP_COM_0222), implement the BAdI LOG_EDI_MM_INVOICE_CE_MAP using the Custom Logic Fiori application:
- Open the Custom Logic application from the Fiori Launchpad.
- Create a new implementation for BAdI LOG_EDI_MM_INVOICE_CE_MAP.
- In the custom implementation, add logic to intercept the invoice field mapping before the document is parked or posted.
- Clear the ARIBA_INVOICE tag from BKTXT or redirect it to an alternative field.
- Ensure BKTXT is available to receive the long invoice reference as intended.
- Activate and test the implementation in a non-production system before deploying to production.
Expected outcome: The ARIBA_INVOICE tag is moved to a different field, freeing BKTXT for the long invoice reference without conflict.
For further details on this BAdI and its triggering conditions, refer to SAP KBA 3731107 – LOG_EDI_MM_INVOICE_CE_MAP Does Not Trigger for Custom API Calls for Supplier Invoices in SAP S/4HANA Cloud Public Edition.
See Also
KBA 3731107 - BAdI LOG_EDI_MM_INVOICE_CE_MAP does not run for certain custom API calls
Keywords
BKTXT, ARIBA_INVOICE, business network, commerce automation, supplier invoice, document header text, LOG_EDI_MM_INVOICE_CE_MAP, InvoiceRequest_In, SAP_COM_0222, SGTXT, custom fields and logic, duplicate invoice check, XBLNR limit, long invoice reference, mapping , KBA , MM-FIO-IV-2CL , Fiori UI for Invoice Verification (Public Cloud) , How To
SAP Knowledge Base Article - Public