| Home • Tips • Tutorials • Sample Specs • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
Email a FriendWhat's New?
Contribute?What's Hot? |
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:
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:
In this
document we will work with the Manual Input one.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM,
Inc. is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||