Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

PI Mapping problem - Repeating target nodes

$
0
0

Hello PI buddies!

 

My PI mapping problem is as follows:

 

I have a source IDoc which I wish to map to a JDBC Message Type.

 

In the Idoc I have 2 repeating sections that I wish to combine to create a new node in the target for each combination of the 2 repeating sections.  The source and desired target message structures are pasted below.  In summary for every combination of "sales_org" and "relationship" I want to create an "Access" node.  In my example there are 2 "sales_org" and 5 "relationship".  I would therefore like to generate 10 "Access" nodes.

 

I want to achieve this if possible using PI mapping and its standard functions.  Please help!

 

SOURCE MESSAGE TYPE:

 

<?xml version="1.0" encoding="UTF-8" ?><Z_CRMXIF_PARTNER_SAVE_M01><IDOC BEGIN="1">  <EDI_DC40 SEGMENT="1">   <TABNAM>EDI_DC40</TABNAM>  </EDI_DC40>  <E101CRMXIF_PARTNER_COMPLEX SEGMENT="1">   <APPL_SNAME>CRMXIF_PARTNER_COMPLEX</APPL_SNAME>   <E101CRMXIF_PARTNER_HEADER SEGMENT="1">   </E101CRMXIF_PARTNER_HEADER>   <E101BUS_EI_CENTRAL_DATA SEGMENT="1">    <E101BUS_EI_ROLES SEGMENT="1">     <APPL_SNAME>BUS_EI_ROLES</APPL_SNAME>     <CURRENT_STATE>X</CURRENT_STATE>     <E101BUS_EI_BUPA_ROLES SEGMENT="1">      <APPL_SNAME>BUS_EI_BUPA_ROLES</APPL_SNAME>      <DATA_KEY>ZBUP02</DATA_KEY>     </E101BUS_EI_BUPA_ROLES>     <E101BUS_EI_BUPA_ROLES SEGMENT="1">      <APPL_SNAME>BUS_EI_BUPA_ROLES</APPL_SNAME>      <DATA_KEY>ZCRM01</DATA_KEY>     </E101BUS_EI_BUPA_ROLES>     <E101BUS_EI_BUPA_ROLES SEGMENT="1">      <APPL_SNAME>BUS_EI_BUPA_ROLES</APPL_SNAME>      <DATA_KEY>ZCRM02</DATA_KEY>     </E101BUS_EI_BUPA_ROLES>     <E101BUS_EI_BUPA_ROLES SEGMENT="1">      <APPL_SNAME>BUS_EI_BUPA_ROLES</APPL_SNAME>      <DATA_KEY>ZCRM03</DATA_KEY>     </E101BUS_EI_BUPA_ROLES>     <E101BUS_EI_BUPA_ROLES SEGMENT="1">      <APPL_SNAME>BUS_EI_BUPA_ROLES</APPL_SNAME>      <DATA_KEY>ZCRM04</DATA_KEY>     </E101BUS_EI_BUPA_ROLES>    </E101BUS_EI_ROLES>   </E101BUS_EI_CENTRAL_DATA>   <E101CRMT_BUS_EI_DATA SEGMENT="1">    <Z101RMT_BUS_EI_R3_SALESAREA SEGMENT="1">     <APPL_SNAME>ZCRMT_BUS_EI_R3_SALESAREA</APPL_SNAME>     <Z101ZCRMT_BUS_R3_SALES_AREA SEGMENT="1">      <APPL_SNAME>ZCRMT_BUS_R3_SALES_AREA</APPL_SNAME>      <ZZSALES_ORG>1000</ZZSALES_ORG>      <ZZCHANNEL>01</ZZCHANNEL>      <ZZDIVISION>00</ZZDIVISION>     </Z101ZCRMT_BUS_R3_SALES_AREA>     <Z101ZCRMT_BUS_R3_SALES_AREA SEGMENT="1">      <APPL_SNAME>ZCRMT_BUS_R3_SALES_AREA</APPL_SNAME>      <ZZSALES_ORG>2000</ZZSALES_ORG>      <ZZCHANNEL>01</ZZCHANNEL>      <ZZDIVISION>00</ZZDIVISION>     </Z101ZCRMT_BUS_R3_SALES_AREA>    </Z101RMT_BUS_EI_R3_SALESAREA>   </E101CRMT_BUS_EI_DATA>  </E101CRMXIF_PARTNER_COMPLEX></IDOC></Z_CRMXIF_PARTNER_SAVE_M01>

 

 

DESIRED TARGET MESSAGE TYPE:

 

<?xml version="1.0" encoding="UTF-8"?><ns0:MT_CTX001_JDBC_In xmlns:ns0="http://mycompany.co.uk/pi/CTXIN001"><SQLStatement1>  <dbTable Action="INSERT">   <Table>customer_relationship</Table>   <Access>    <sales_org>1000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZBUP02</relationship>   </Access>   <Access>    <sales_org>2000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZBUP02</relationship>   </Access>   <Access>    <sales_org>1000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM01</relationship>   </Access>   <Access>    <sales_org>2000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM01</relationship>   </Access>   <Access>    <sales_org>1000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM02</relationship>   </Access>   <Access>    <sales_org>2000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM02</relationship>   </Access>   <Access>    <sales_org>1000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM03</relationship>   </Access>   <Access>    <sales_org>2000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM03</relationship>   </Access>   <Access>    <sales_org>1000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM04</relationship>   </Access>   <Access>    <sales_org>2000</sales_org>    <dist_channel>01</dist_channel>    <division>00</division>    <relationship>ZCRM04</relationship>   </Access>  </dbTable></SQLStatement1></ns0:MT_CTX001_JDBC_In>

Edited by: Jim Kendall on Apr 22, 2010 12:48 PM

 

Edited by: Jim Kendall on Apr 22, 2010 12:50 PM


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>