on 02-05-2016 8:05 AM
Hello Everyone,
Please guide me about following message mapping :
Source msg format :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:wbsedcl.test.employeeCountTestSource" targetNamespace="urn:wbsedcl.test.employeeCountTestSource">
<xsd:element name="MT_Emp_Count_OB" type="DT_Emp_Count_OB" />
<xsd:complexType name="DT_Emp_Count_OB">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
22fd3a60cbdd11e5bca6001517f85c58
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Data1">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d0cb3111e5c6604437e6708e76
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d1cb3111e589004437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Address1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d2cb3111e5a9fa4437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_Id1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d3cb3111e593454437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_join_date1" type="xsd:date">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d4cb3111e583184437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Data2">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d5cb3111e581d04437e6708e76
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name2" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d6cb3111e5c44b4437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Address2" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d7cb3111e59cf44437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_Id2" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d8cb3111e584c04437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_join_date2" type="xsd:date">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29d9cb3111e598064437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Data3">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29dacb3111e58adf4437e6708e76
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name3" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29dbcb3111e586544437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Address3" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29dccb3111e580184437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_Id3" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29ddcb3111e5c8094437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_join_date3" type="xsd:date">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
ee3d29decb3111e5bf2a4437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Destination msg format :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:wbsedcl.test.employeeCountTestDest" targetNamespace="urn:wbsedcl.test.employeeCountTestDest">
<xsd:element name="MT_Emp_Count_IB" type="DT_Emp_Count_IB" />
<xsd:complexType name="DT_Emp_Count_IB">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
230306c0cbdd11e5b876001517f85c58
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Name" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
cd127390cb3211e5c4404437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Address" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
cd127391cb3211e5c3634437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_Id" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
cd129aa0cb3211e5bdca4437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Emp_joining_date" type="xsd:date">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
cd129aa1cb3211e5b02b4437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Count" type="xsd:integer">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
cd129aa2cb3211e5a27c4437e6708e76
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
mapping logic :
1. At least two occurrences of same characters among emp id1, emp id 2 and emp id 3 fields in source message, then populate name (concat), address(concat) and empid (concat), joining_date(whose joining date is earlier), count (occurrence count of common character) in target message.
2. If only one of set of data found in source message, name and address won't be populated but this single set data will be populated for other fields in target message.
regards,
Murari
HI.
please change the MT_Emp_Count_IB occurrence as 0 to outbound. and make a duplicate sub-tree.
place condition in MT_Emp_Count_IB accordingly.
Regards
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Murari,
So examples will be
1.If 3 names are present(X,Y and X)
Then XYZ.The same rule for addess and other fields?
2.No need to populate name.is this correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghuraman,
Examples like below :
If
Source :
------------
<Data1><Murari><Kolkata><AB><15/07/2010></Data1>
<Data2><Suman><Mumbai><BC><11/07/2012></Data2>
<Data3><Raghu><Bangalore><BD><13/07/2013></Data3>
then destination :
------------------------
<MurariSumanRaghu><KolkataMumbaiBangalore><ABBCBD><15/07/2010><3>
here B is occurring common in three times, so count populated as 3
If
Source :
------------
<Data1><Murari><Kolkata><AB><15/07/2010></Data1>
<Data2></Data2>
<Data3></Data3>
then destination :
------------------------
<AB><15/07/2010><1>
Please advise.
Regards,
Murari
Hello Raghu,
I have a source message with data1, data2 and data3 element and each element having subelement of name,address,emp id and joining date.
The destination message structure is main element name, address, emp id, joining date and count.
The basic logic of mapping is the occurrence of same character in emp id. If same character occurs twice or more among the source data elements then destination message will be populated like concat of name in name field, concat of address in address field, joining date will be the first joining date among three, count is no of occurrence.
If only one data elements are present, then name and address will not be populated and joining date will be the same joining date and count will be 1.
Plz help.
Regards,
Murari
I have done as per above image but getting below error while IR testing :
15:58:54 Start of test
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.