Hello Experts,
I want to test multi mapping concept in SAP PI.
Source fields structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_SENDER_MULTI_MAP xmlns:ns1="http://sopra.com/po/test/multi_mapping">
<EMPDETAILS>
<ID/>
<FIRSTNAME/>
<LASTNAME/>
<DEPT/>
<LOCATION/>
</EMPDETAILS>
</ns1:MT_SENDER_MULTI_MAP>
</ns0:Message1>
</ns0:Messages>
Target field1 structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_RECEIVER_FILE_MULTI_MAP xmlns:ns1="http://sopra.com/po/test/multi_mapping">
<EMPLOYEEDETAILS>
<EMPID/>
<EMPFIRSTNAME/>
<EMPLASTNAME/>
<EMPLOCATION>noida</EMPLOCATION>
</EMPLOYEEDETAILS>
</ns1:MT_RECEIVER_FILE_MULTI_MAP>
</ns0:Message1>
<ns0:Message2/>
</ns0:Messages>
Target Field2 Structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1/>
<ns0:Message2>
<ns1:MT_RECEIVER_JDBC_MULTI_MAP xmlns:ns1="http://sopra.com/po/test/multi_mapping">
<EMPLOYEEDETAILS>
<EMPID/>
<EMPFIRSTNAME/>
<EMPLASTNAME/>
<EMPDEPT/>
</EMPLOYEEDETAILS>
</ns1:MT_RECEIVER_JDBC_MULTI_MAP>
</ns0:Message2>
</ns0:Messages>
Requirement:
If Source "Location" = "INDIA" then populate Target filed1
If Source "Location"!= "INDIA" then Polulate Target field2.
Logic:
Please find logic and other details in PFA.
I have checked for Location with IfWithoutElse boolean function and given source and target fileds as accordingly but since "ns1:MT_SENDER_MULTI_MAP" itself don't contain any value so target filed is coming as "".
Please help.
Regards,
Vishnu