Conversions in Graphical Mapping (XI)

By Yugandhar Kotha, PI Competency Core Team, YASH Technologies

This document focuses on achieving Conversions in Graphical Mapping. 

In general most of the development scenarios work with simple mapping of the source elements of the outbound message to the target elements of the inbound message or otherwise manipulation of the source data and map it to the target XML structure. However, at times we come across some cases which require conversions while mapping the source and target structures for example there might be a set of pre-defined values that come from the source for a particular source element and for each source value there will be pre-defined mapping rule to pick the target value.

For these types of conversions, XI has provided the following concepts:

  • Fix Values at design time
  • Value Mapping at configuration time

Where we could have some pre-defined mapping rules stored in a mapping context and XI during runtime will pick the specific mapping rule for the value in the source structure and get the target value. 

Scenario Demonstrating the usage of Conversions in Graphical Mapping 

 Ø                   The scenario here involves the conversion of a customer format xml file containing the information of the employees in one specific format to another format. The source file is available on the FTP and the Sender file adapter picks it. This file is deleted and archived on a different directory on the FTP. The source xml file is converted into target XML file by the Message mapping and this target file is placed on the FTP again on a different directory. 

Ø       Here is the source XML structure:


Ø       Here is the target XML structure:


Fix Values at design Time 

Find FixValues as the standard function delivered by XI in category “Conversions”. Use this to map the source element to target value and maintain the table with entries by clicking the function to consider key values as source and value as target. 

Here, Fixed values mapping of GENDER element with GENDER element of target

XI during runtime will pick the specific mapping value in the target value based on the source value obtained in the payload.

That is when the source value in the payload comes as ‘M’ for Gender element; it picks ‘Male’, where as if it is ‘F’ it picks ‘Female’ to form the target message.

Value Mapping at Configuration Time 

An object can have different representations, depending on the context in which it is used. 

For example, consider that Mr.Arun has different roles in two different companies (Company A and Company B) to which we need to send his personnel data.

Vendor Mr. Arun has a particular vendor number in a company A and has a particular employee number in a company B, ie., his roles are different as business changes. Hence it should be required to trap the values when we send the information of Mr.Arun to different business units.

We use Value Mapping to send different representations of an object to different business units by defining Mapping rules. 

The mapping rules defined for a specific sender and receiver are stored in the Value mapping table that can be maintained during the configuration time. The value mapping can be used in both the java mapping and the message mapping. 

In this document we will work with Graphical mapping alone. 

From the above, we understand that an object can have its own representation based on the sender and receiver service. So different representations of the object need to be available in the SAP XI and SAP XI during the runtime has to pick up the exact mapping based on the business services participating in the communication. For this, in SAP Exchange Infrastructure, an Issuing Agency and an Identification Scheme define the representation of an object. And the representation of an object is not complete until the Issuing Agency, Identification Scheme and Value are known. 

The value mapping rules are maintained in the value mapping tables in two ways:

  • Manual Input using the user interface of the Integration Directory
  • Replication from external data sources using a specialist interface.

In this document we will work with the Manual Input one.

Issuing agency

Issuing agency is one of the trios needed to identify an object uniquely. It can represent one of the following:

1. To identify unique rules of converting the data from source to target, use either Business Service or Business System

2. You can use Organization or Company as other identifier to produce and manage an identification scheme             

Identification scheme                                           

Identification schemes are produced and managed by issuing agencies. An identification scheme, agency, and value form a key to be recognized as identifier. 

Displaying/Editing the Value Mapping Table  

The display/edit of the contents of value mapping tables is done in the Integration Directory.

For more details refer 

Ø       Here we use fixed value mapping between the GENDER element of the source to the GENDER element of the target, value mapping with senderservice as issuing agency for the mapping of GRADE element to TRAVEL element of the target and value mapping with some arbitrary string as issuing agency for mapping of GRADE element to DESIGNATION element of the target. 

Ø       Here in this document I have presented only the documents related to one scenario i.e. sender service A to receiver service B. we could maintain similar mapping rules w.r.t the service C as receiver and use them in the mapping while service A communicates with service C. 

Ø       In this scenario I take the sender business service as YASH_FTP and the receiver business service as YASH_FTP 

Value mapping of GRADE element with the TRAVEL element of the target using SenderService as issuing agency: 

Click here to continue...


Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image