Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 

Hello! This is my first blog post on SAP community and it feels great to start sharing 
my knowledge here. I currently work for SAP Ariba CIG team. Often I receive questions
over Buyer Mapping Tool and being an expert in the area, I thought this should be my
first topic.

Audience for this blog post:
You must have access to CIG and know its basic functionality around integration.

CIG : SAP Ariba Cloud Integration Gateway allows you to easily integrate SAP ERP and SAP S/4HANA backend system with your trading partners and SAP Ariba solutions. For more details you can check out the link below.

Buyer mapping tool

Integration using CIG involves transformation from one XML format to another. However Standard transformation cannot suffice the customer requirement always, which leads to customization. Hence, CIG offers a tool to customize the transactions through Buyer mapping tool. Navigation to tool is via CIG portal-> My Configuration ->Mapping


What are the highlights?

  • Easy to understand.

  • Apply various transformation functions.

  • Version management.

  • Flow of transformation steps.

  • Compare Standard and Customization Output.

  • Test the customization.

Can you describe the functions in brief?

String functions   : Concat, Substring, Translate, Normalize, ConvertCase
Format functions : Date , Number

  • Concat : Can be used to concatenate string. This function allows to concatenate up to 3 elements from source. Additionally, you can also specify connecting characters.

  • Substring : Cab be used to truncate the original string to desired length. You need to specify the starting position and the length of characters from that starting position mentioned.

  • Translation : Can be used to translate a value in source into another value before mapping to target.

  • Normalize : Can be used to remove extra spaces.

  • Uppercase / Lowercase : Can be used to convert all the characters in the source value to selected case.

  • Format Date : Can be used to convert the date from one format into another.

  • Format Number : Can be used to convert a number into specified format. Such as, round-up a decimal number value to a scale of 2.

  • Split text : Can be used when a node/element has to be repeated based on a certain length of character. Usually used to divide comments containing large content into multiple splits of item in target with a defined length.

I will create a separate post(s) for usage of these functions with samples soon. Keep yourself updated.

Tips and Tricks:
Most common requirement with customization is to perform line item modifications. This idea may seem complex in mapping tool, but not anymore if you follow the below tips.

  • Tip1: Understand XMLs.
    You must know the source element that contains the data, and the target element where the data must be mapped to. Obtain the pre and post transformation XMLs(You can download most of the payloads from CIG transaction tracker), and you can find the exact path. To get a pictorial idea of complete structure, navigate to Mapping tool from CIG portal and you can find a well designed hierarchy.

  • Tips2: Map data in line items.
    There are two ways to use Target variables. Position and Value.
    Value variables must be used when you can find a unique number to establish a relation between source and target. For example, In PurchaseOrderExportRequest transaction, you may find NumberOnPOString(source) relates to ARIBA_ITEM_NO(target).
    Position variables must be used when you know the Total number of source items nodes and equal to item nodes on target. For example, In ProductActivitymessage transaction, there is no unique number. Hence apply position variable and apply relationshion between ProductActivity(source) with ProductActivityDetails(target).
    Note: Prefer value variables for best results.

  • Tip3: Map data in Split item scenario.
    This is similar to Tip2. However, Split items involves more than 1 level of hierarchy. Buyer mapping tool does provide an option to create multiple Target variables. Consider a Split account scenario. There would be a main line number for each item and corresponding split number for each item under the main line item. For example: To customize GL_ACCOUNT node in PaymentExportRequest, you need to apply multiple target variables.
    First one for main line Payment_PaymentGLAccDet_Item/item/InvoiceReconciliation/LineItems/item/NumberInCollection = GLACCOUNTDATA/item/INVOICE_DOC_ITEM
    Second one for spilt line Payment_PaymentGLAccDet_Item/item/InvoiceReconciliation/LineItems/item/Accountings/SplitAccountings/item/NumberInCollection = GLACCOUNTDATA/item/ARIBA_ITEM_NO

  • Tips4: Usage of Extension segments.
    Usually, standard fields are opted for customization. This holds good if you know the actual purpose of the target element and its usage in the API. When you are not sure about it, map the data into Extension segments provided for each AddOn interface. Before the core API is called in AddOn, there is another level of customization provided. This enhancement provision is also known as BADI. Utilize this BADI to fulfill the customization from Extension.


  • Customer cannot see standard mapping or Engineering provided mappings.

  • Generated standard output cannot be modified directly. It has to be mapped from Source to target again, or apply a constant.


The mapping tool is introduced to enable more self service in CIG and to cope up with huge demand
of custom mappings. The functionalities currently available can suffice most of the customization requirement. Playing around with Target variables will make you achieve even complex requirements.

Follow my profile to get latest updates. Also, check-out this link for QA on SAP Ariba Cloud Integration Gateway

Please provide feedback on the post and any thoughts for improvement. Let's make the content helpful to every reader.