Spend Management Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
DevPalanimuthu
Product and Topic Expert
Product and Topic Expert
581

Thanks @jay_rajagopal2 for co-authoring with me on this topic.

Many customers rise the question why Ariba and SAP ERP including S/4 HANA Field Lengths are different while both solutions are from SAP.  While it is true that both from SAP, however Ariba is offered as ERP agnostic standalone procurement solution to be integrated with different ERP solutions catering their requirements, helps customers continue to operate with minimal or no disruption to the ERP footprint leveraging open framework of customer choice.

SAP Ariba and SAP ERP including S/4HANA are powerful solutions on their own but when integrated effectively, they can deliver seamless procurement and supply chain processes that are agile, automated, and highly efficient. The Cloud Integration Gateway (CIG) acts as the bridge between these two systems, facilitating the flow of documents like Requisitions (PR), Purchase Orders (POs) and Invoices.

While the integration architecture is robust, one common raising concern during the integration process - especially in the early phases of deployment or testing is handling field length difference. This blog post focuses on how to understand, identify, and resolve these differences when integrating SAP Ariba with SAP ERP including S/4HANA via CIG.

Where to Find Field Length Definitions

Before addressing field length differences, it's important to know where to find the actual field length definitions in both SAP Ariba and SAP ERP including S/4HANA . This helps in confirming the difference of subject field in question and building effective transformation rules during integration.

In SAP Ariba: Use the Data Dictionary

SAP Ariba provides a Data Dictionary that defines the structure, data types, and field lengths of the standard integration documents (like PR, PO, and Invoices, etc.)

To access the Ariba Data Dictionary:

  • Log in to the Ariba Buying & Invoicing tenant.
  • Navigate to:
    • Core AdministrationIntegration Manager → Data Definition
    • Click link ‘Download data dictionary’

DD.png

  • Choose the relevant event (e.g., Export Purchase Order to ERP).
  • Search for the field (e.g., CompanyCode.UniqueName, Item Category) to view:
    • Field length
    • Data type
    • Optional/Required status

DD2.png

In CIG: Download the Mapping Document

The SAP Cloud Integration Gateway (CIG) allows you to download the Mapping Document which contains detailed mapping between SAP ERP and Ariba, including:

  • Source and target field names
  • Field lengths (currently it shows only S/4 field length)
  • Data types
  • Transformation logic

To download the Mapping Document from CIG:

  1. Log in to the Ariba Buying & Invoicing tenant.
  2. Navigate to:
    • Core AdministrationIntegration Manager →   Managed Gateway for Spend&Network
    • In CIG, Resources Implementation guides Mapping Specs   Ariba Buyer
  1. Click on the relevant integration flow (e.g., cXML_PurchaseOrderExportRequest_AddOn_PurchaseOrderExportRequest for POs).
  2. Open the Excel document to review:
    • Ariba Source Field name (column A)
    • SAP ERP target field name and lengths (Column D and E)
    • CIG1.png

By using both data dictionary and CIG mapping document, customer will be able to find out mapping between Source and target systems and its field length.

Understanding Field Length Differences

Field length difference causes issues when the data structure between the source (e.g., SAP Ariba) and the target (e.g., SAP ERP) have different field definitions. These can lead to:

  • Truncation of data
  • Interface failures during runtime
  • Data mismatches causing business disruptions

Here are examples of fields where length differences frequently cause issues during SAP Ariba – SAP ERP integration via CIG when not addressed pro-actively during deployment.

Field Name

SAP ERP Length

Ariba Length

Notes

Invoice Number

16 characters

50 characters

Ariba may allow longer invoice numbers

Serial Number

18 characters

50 characters

Variations in encoding format (e.g., alphanumeric) may occur

Why These Fields Matter

  • Invoice Number mismatches can cause rejection or duplication errors in SAP ERP if the field is truncated or not unique after conversion.
  • Serial Number issues may lead to material tracking failures if the number is cut off or padded inconsistently.

 Strategies to Handle Field Length Differences

Let us continue with Invoice Number and Serial Number examples.

Invoice Number:

 SAP does not recommend changing the length of BKPF-XBLNR at the database level due to:

  • Core data model integrity
  • Compatibility across modules and applications

As a workaround a different field can be used if the required length is longer than 16 characters (for example BKPF-BKTXT).

To implement the solution:

Enhance BADI to store Invoice number in BKPF-BKTXT. Refer SAP Note: https://me.sap.com/notes/2064426

Serial Number:

SAP prevents extending the GERNR field beyond 18 characters for system-wide consistency and stability.

As a workaround you may consider using functionality IUID Item Unique Identification to meet your requirements. Refer SAP Note: https://me.sap.com/notes/0002479304

Conclusion

Integration between SAP Ariba and SAP ERP using CIG is a powerful enabler for streamlined procurement, but it's not without its technical nuances. Field length differences are a common concern in deployment - but one that can be handled effectively with careful planning, system configuration, and data governance.

By leveraging CIG’s mapping capabilities, enhancing data formatting logic in SAP ERP, and ensuring consistent master data, businesses can achieve a seamless and error-free integration.

2 Comments