PI Mapping problem - Repeating target nodes

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

SOURCE MESSAGE TYPE:
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;Z_CRMXIF_PARTNER_SAVE_M01&gt;
&lt;IDOC BEGIN="1"&gt;
  &lt;EDI_DC40 SEGMENT="1"&gt;
   &lt;TABNAM&gt;EDI_DC40&lt;/TABNAM&gt;
  &lt;/EDI_DC40&gt;
  &lt;E101CRMXIF_PARTNER_COMPLEX SEGMENT="1"&gt;
   &lt;APPL_SNAME&gt;CRMXIF_PARTNER_COMPLEX&lt;/APPL_SNAME&gt;
   &lt;E101CRMXIF_PARTNER_HEADER SEGMENT="1"&gt;
   &lt;/E101CRMXIF_PARTNER_HEADER&gt;
   &lt;E101BUS_EI_CENTRAL_DATA SEGMENT="1"&gt;
    &lt;E101BUS_EI_ROLES SEGMENT="1"&gt;
     &lt;APPL_SNAME&gt;BUS_EI_ROLES&lt;/APPL_SNAME&gt;
     &lt;CURRENT_STATE&gt;X&lt;/CURRENT_STATE&gt;
     &lt;E101BUS_EI_BUPA_ROLES SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;BUS_EI_BUPA_ROLES&lt;/APPL_SNAME&gt;
      &lt;DATA_KEY&gt;ZBUP02&lt;/DATA_KEY&gt;
     &lt;/E101BUS_EI_BUPA_ROLES&gt;
     &lt;E101BUS_EI_BUPA_ROLES SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;BUS_EI_BUPA_ROLES&lt;/APPL_SNAME&gt;
      &lt;DATA_KEY&gt;ZCRM01&lt;/DATA_KEY&gt;
     &lt;/E101BUS_EI_BUPA_ROLES&gt;
     &lt;E101BUS_EI_BUPA_ROLES SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;BUS_EI_BUPA_ROLES&lt;/APPL_SNAME&gt;
      &lt;DATA_KEY&gt;ZCRM02&lt;/DATA_KEY&gt;
     &lt;/E101BUS_EI_BUPA_ROLES&gt;
     &lt;E101BUS_EI_BUPA_ROLES SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;BUS_EI_BUPA_ROLES&lt;/APPL_SNAME&gt;
      &lt;DATA_KEY&gt;ZCRM03&lt;/DATA_KEY&gt;
     &lt;/E101BUS_EI_BUPA_ROLES&gt;
     &lt;E101BUS_EI_BUPA_ROLES SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;BUS_EI_BUPA_ROLES&lt;/APPL_SNAME&gt;
      &lt;DATA_KEY&gt;ZCRM04&lt;/DATA_KEY&gt;
     &lt;/E101BUS_EI_BUPA_ROLES&gt;
    &lt;/E101BUS_EI_ROLES&gt;
   &lt;/E101BUS_EI_CENTRAL_DATA&gt;
   &lt;E101CRMT_BUS_EI_DATA SEGMENT="1"&gt;
    &lt;Z101RMT_BUS_EI_R3_SALESAREA SEGMENT="1"&gt;
     &lt;APPL_SNAME&gt;ZCRMT_BUS_EI_R3_SALESAREA&lt;/APPL_SNAME&gt;
     &lt;Z101ZCRMT_BUS_R3_SALES_AREA SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;ZCRMT_BUS_R3_SALES_AREA&lt;/APPL_SNAME&gt;
      &lt;ZZSALES_ORG&gt;1000&lt;/ZZSALES_ORG&gt;
      &lt;ZZCHANNEL&gt;01&lt;/ZZCHANNEL&gt;
      &lt;ZZDIVISION&gt;00&lt;/ZZDIVISION&gt;
     &lt;/Z101ZCRMT_BUS_R3_SALES_AREA&gt;
     &lt;Z101ZCRMT_BUS_R3_SALES_AREA SEGMENT="1"&gt;
      &lt;APPL_SNAME&gt;ZCRMT_BUS_R3_SALES_AREA&lt;/APPL_SNAME&gt;
      &lt;ZZSALES_ORG&gt;2000&lt;/ZZSALES_ORG&gt;
      &lt;ZZCHANNEL&gt;01&lt;/ZZCHANNEL&gt;
      &lt;ZZDIVISION&gt;00&lt;/ZZDIVISION&gt;
     &lt;/Z101ZCRMT_BUS_R3_SALES_AREA&gt;
    &lt;/Z101RMT_BUS_EI_R3_SALESAREA&gt;
   &lt;/E101CRMT_BUS_EI_DATA&gt;
  &lt;/E101CRMXIF_PARTNER_COMPLEX&gt;
&lt;/IDOC&gt;
&lt;/Z_CRMXIF_PARTNER_SAVE_M01&gt;
DESIRED TARGET MESSAGE TYPE:
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ns0:MT_CTX001_JDBC_In xmlns:ns0="http://mycompany.co.uk/pi/CTXIN001"&gt;
&lt;SQLStatement1&gt;
  &lt;dbTable Action="INSERT"&gt;
   &lt;Table&gt;customer_relationship&lt;/Table&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;1000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZBUP02&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;2000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZBUP02&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;1000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM01&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;2000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM01&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;1000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM02&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;2000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM02&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;1000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM03&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;2000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM03&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;1000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM04&lt;/relationship&gt;
   &lt;/Access&gt;
   &lt;Access&gt;
    &lt;sales_org&gt;2000&lt;/sales_org&gt;
    &lt;dist_channel&gt;01&lt;/dist_channel&gt;
    &lt;division&gt;00&lt;/division&gt;
    &lt;relationship&gt;ZCRM04&lt;/relationship&gt;
   &lt;/Access&gt;
  &lt;/dbTable&gt;
&lt;/SQLStatement1&gt;
&lt;/ns0:MT_CTX001_JDBC_In&gt;

Similar Messages

  • Biztalk Map create duplicate target node

    Using biztalk mapper, I need a target node to be duplicated.. I have created a simplified version of my issue. Please see below map
    link for source and destination schema.
    I  need the target Option node to be duplicated for each OptionNotes. The value of OptionNotes is to be split by a pipe ("|"),
    then map to target Code and Description.
    The input is as below:
    <ns0:Source xmlns:ns0="http://Test.SOAP.Source1">
    <Option>
    <OptionID>ID0_NoNotes</OptionID>
    <OptionName>OptionName_0</OptionName>
    </Option>
    <Option>
    <OptionID>ID1_NoNotes</OptionID>
    <OptionName>OptionName_1</OptionName>
    <OptionNotes>NOTE1|BLAH1</OptionNotes>
    <OptionNotes>NOTE2|BLAH2</OptionNotes>
    </Option>
    </ns0:Source>
    The output should be as below:
    <Destination>
    <Options>
    <Option>
    <Code>ID0_NoNotes</Code>
    <Description>OptionName_0</Description>
    </Option>
    <Option>
    <Code>ID1_NoNotes</Code>
    <Description>OptionName_1</Description>
    </Option>
    <Option>
    <Code>NOTE1</Code>
    <Description>BLAH1</Description>
    </Option>
    <Option>
    <Code>NOTE2</Code>
    <Description>BLAH2</Description>
    </Option>
    </Options>
    </Destination>
    Tried to use Looping and combination with Value Mapping, but to no avail. Do I have to resort to inline xslt?
    Thanks.

    Thanks for all your answers.
    @Pi_xel_xar Your suggestion requires a change in the message schema.
    @Nadeem We have already tried the solution on the blog, but it's not quite the scenario we face. The issue is the OptionNote is in the same layer as OptionID and OptionName.
    We have used another tool, which has done this easily. We then get the XSLT and import it as part of Inline XSLT scripting functoid.
    The XSLT produced was as below:
    <xsl:for-each select="ns0:Source/Option">
    <Option>
    <xsl:for-each select="OptionID">
    <Code>
    <xsl:value-of select="string(.)"/>
    </Code>
    </xsl:for-each>
    <xsl:for-each select="OptionName">
    <Description>
    <xsl:value-of select="string(.)"/>
    </Description>
    </xsl:for-each>
    </Option>
    </xsl:for-each>
    <xsl:for-each select="ns0:Source/Option/OptionNotes">
    <xsl:variable name="var1_resultof_cast" select="string(.)"/>
    <Option>
    <Code>
    <xsl:value-of select="substring-before($var1_resultof_cast, '|')"/>
    </Code>
    <Description>
    <xsl:value-of select="substring-after($var1_resultof_cast, '|')"/>
    </Description>
    </Option>
    </xsl:for-each>
    Thanks everyone.

  • Mapping problem of Child Node elements as per Parent Node conditions

    Hi,
    I have an IDOC to SOAP scenario,I have to map the following fields of IDOC,
    E1EDPT1 (0..999..)
    _TDID (0..1)
    _ E1EDPT2 (0..999..)
    _  TDLINE (0..1)
    Whenever I have the element TDID = Z011, I have to map the element TDLINE to the target Message Type AVL_QTY , which is as below (any one)
    ITEM_TEXTS (0..unbounded)
    _ ITEM_TEXT (0..unbounded)
                   |_  AVL_QTY (0..1)
    I have done a graphical mapping where the Node ITEM_TEXTS is created only if the above condition is met, ITEM_TEXT and AVL_QTY are mapped directly to E1EDPT2 and TDLINE.
    This works for only one item, it fails for multiple.
    Please suggest a solution...
    Thanks and Regards,
    Rohit.

    Hello,
    Thanks for the above suggestion!
    But still the problem exits.
    I have currently mapped the field in such a way that it gives proper solution but every item i.e. E1EDP01 segment must have an E1EDPT1 segment with element TDID = Z011.
    Mapping in Text View looks like below:
    /ns0:MT_CONTRACT_DOWNLOAD_MOnline/CONTRACT_ITEM/AVL_QT=addCorresponding(removeContexts(index(ifWithoutElse(stringEquals(/ORDERS05/IDOC/E1EDP01/E1EDPT1/TDID, const(value=Z011)), /ORDERS05/IDOC/E1EDP01/E1EDPT1/E1EDPT2/TDLINE, keepss=false), start=1, inc=1, type=0, result)), removeContexts(ifWithoutElse(stringEquals(/ORDERS05/IDOC/E1EDP01/E1EDPT1/TDID, const(value=Z011)), /ORDERS05/IDOC/E1EDP01/E1EDPT1/E1EDPT2/TDLINE, keepss=false)), result)
    UDF for addCorresponding method:
    int flg=0;
    for (int i=0; i<indexes.length; i++)
        if(! indexes<i>.equals("1"))
                   result.addValue(tdTexts<i>);
         else
              if(flg == 0)
                        result.addValue(tdTexts<i>);
                        flg = 1;
              else
                             result.addContextChange();
                             result.addValue(tdTexts<i>);
    Suppose if there are 3 items, the above condition is met in 1st and 3rd item, and if the 2nd item has TDID = Z008, then in the output i get three item values with the TDLINE values in the first two items itself, it doesnt recognise that 2nd item hasnt matched the condition.
    Thanks and Regards,
    Rohit.

  • Use Message Mapping to repeat top node and split Message

    I am currently using XSLT Messaging to do majority of the mapping. I have two issues that remain, I need to repeat the top node for each or its child elements and split the message.
    <Sensor xmlns="namespace">
      <Observation>
        <XML>Some Data</XML>
    </Observation
    </Sensor>
    1. Can it be done in XSLT? I posted a thread asking for help on this. Where I would need to repeat the Sensor tag for each observation. If this is possible then I will able to split the messages at the HTTP adapter used for the target system.
    2. Can Message Mapping be used. Using the same xsd on both source and target systems, Will sensor repeat if set to 1:n and observation set to 1:1. In source it is Sensor 1:1, Observation 1:n.  If this works then I can use a BPM to shoot out individual messages using a for each.
    Any help is greatly appreciated. I am fairly new to XI as this is my first major project. Thanks

    Source File                                             Target File
    > XI (XSLT) -
    > Each observation as one file  ---> Out via HTTP
    Batch of all orders    
    Source File
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <receipt>
      <manufacturer>Manufacture Name</manufacturer>
      <manufacturer_gln>999999</manufacturer_gln>
      <transfer_recipt>0123456</transfer_recipt>
      <prod>
        <product_GTIN>99999999999999</product_GTIN >
        <product_LOT>123456A</product_LOT >
        <production_date>20090131</production_date>
        <expire_date>20120131</expire_date>
        <carrier>
          <carrier_type>P</carrier_type>
          <carrier_barcode>001</carrier_barcode>
          <carrier_detail>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>01</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089211</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089212</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089213</carrier_barcode></carrier>
                </carrier_detail>
            </carrier>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>02</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089214</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089215</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089216</carrier_barcode></carrier>
                </carrier_detail>
            </carrier>
          </carrier_detail>
        </carrier>
        <carrier>
          <carrier_type>P</carrier_type>
          <carrier_barcode>002</carrier_barcode>
          <carrier_detail>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>03</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089217</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089218</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089219</carrier_barcode></carrier>
              </carrier_detail>
            </carrier>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>04</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089220</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089221</carrier_barcode></carrier>
               </carrier_detail>
            </carrier>
          </carrier_detail>
        </carrier>
      </prod>
    </receipt>
    Target File
    <?xml version="1.0" encoding="UTF-8"?>
    <pmlcore:Sensor xmlns:pmlcore="urn:autoid:specification:interchange:PMLCore:xml:schema:1" xmlns:pmluid="urn:autoid:specification:universal:Identifier:xml:schema:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:autoid:specification:interchange:PMLCore:xml:schema:1 cases.xsd">
      <pmluid:ID>GPO_AI_LU_DC</pmluid:ID>
      <pmlcore:Observation>
        <pmlcore:DateTime>2008-10-13T17:53:00.265+02:00</pmlcore:DateTime>
        <pmlcore:Command>PACK</pmlcore:Command>
        <pmlcore:Tag>
          <pmluid:ID>01</pmluid:ID>
          <pmlcore:Data>
            <pmlcore:XML>
              <Memory>
                <DataField fieldName="EXPIRATION_DATE">20120131</DataField>
                <DataField fieldName="BATCH_ID">123456A</DataField>
                <DataField fieldName="ZMFG_DATE">20090131</DataField>
                <DataField fieldName="ZMFG_GLN">999999</DataField>
                <DataField fieldName="ZMANUFACTURER">Manufacture Name</DataField>
                <DataField fieldName="ZITEM_COUNT">16</DataField>
                <DataField fieldName="ZWORK_ORDER_NUMBER">0123456</DataField>
              </Memory>
            </pmlcore:XML>
          </pmlcore:Data>
        </pmlcore:Tag>
        <pmlcore:Tag>
          <pmluid:ID>0108699547010089211</pmluid:ID>
          <pmlcore:Data>
            <pmlcore:XML>
              <Memory>
                <DataField fieldName="EXPIRATION_DATE">20120131</DataField>
                <DataField fieldName="BATCH_ID">123456A</DataField>
                <DataField fieldName="ZMFG_DATE">20090131</DataField>
                <DataField fieldName="ZMFG_GLN">999999</DataField>
                <DataField fieldName="ZMANUFACTURER">Manufacture Name</DataField>
                <DataField fieldName="ZWORK_ORDER_NUMBER">0123456</DataField>
              </Memory>
            </pmlcore:XML>
          </pmlcore:Data>
        </pmlcore:Tag>
         </pmlcore:Observation>
         </pmlcore:Sensor>
    I have the XSLT Mapping working to transform data from Source file to target File. But my target file has multiple Observations that need to be split into the Sensor, Observation structure.

  • Message Mapping - problem with target sequence

    Hi, I hope somebody can help:
    I have already read lots of blog entries and help articles to find a solution but all the tricks with node functions and special conditions didn't help yet.
    I would like the sequence of A and B nodes just as is. In the source structure they are on the same level and in the target structure B is subnode of A.
    Thank you very much in advance.
    Source structure:
    Node A
    - source fields A
    Node A
    - source fields A
    Node A
    - source fields A
    Node B
    - source fields B
    Node A
    - source fields A
    Node B
    - source fields B
    Node B
    - source fields B
    Target structure (desired):
    A
    - fields A
    A
    - fields A
    A
    - fields A
       B
       - fields B
    A
    - fields A
       B
       - fields B
       B
       - fields B
    However, what I get is:
    A
    - fields A
       B
       - fields B
       B
       - fields B
       B
       - fields B
       B
       - fields B
    A
    - fields A
    A
    - fields A
    A
    - fields A

    Hi,
    Can u try like this.
    Map one to one.
    Dont use  any node function also dont change any conexts also af any node or element.
    But in target,make node B is under node A, and both are 0..unbounded occurence.
    Try with this....
    Let us know the result.
    Babu

  • Generating target nodes dynamically in message mapping

    Hi XI GURUS
    I am trying to generate target node using using more then source node. Is it possible to do this.
    I need this as in source I have 2 different nodes (0 to unbounded) and in target I want to create corresponding number of target nodes. For e.g if I have 2 + 1 nodes in source then I want to create 3 nodes in target
    Source as below
    <FIRSTNAME>
         <Raj>
         <Kum>
    </FIRSTNAME>
    <FIRSTNAME>
         <Naveen>
         <Kumar>
    </FIRSTNAME>
    <CITY>
    <bANGALORE>
    </CITY>
    Desired output in target as below
    <ADDRESS>
    <qwerty1>
    <ADDRESS>
    <ADDRESS>
    <qwerty2>
    <ADDRESS>
    <ADDRESS>
    <qwerty2>
    <ADDRESS>
    Can i follow an alternative approach (using java function) of counting the total number of occurences of  source nodes and generating as many number of the target node
    Thanx

    If you have a condition check for each of the source node to be mapped to the target node,
    use "create if" standard function and pass the boolean result of your Condition check as an input to this standard function. For each "true" a value would be added to the output queue. If you have a simple condition check on some source field value for each correspoding node, use "if without else" or depending on the complexity of the condition you may use a udf to get the boolean outcome.
    And for mapping from more than on type of source node, you may duplicate subtree for target node.
    Regards,
    Suddha

  • Graphical mapping issue, repeated lines are not populating

    Hello All,
    i have mapping where i need to map source node and its coresponding subelements to target node and its subelemtns based on certains condition, which i did using If condition.
    Now my issue is, when mapped source node with condition , conditional field is not in the same node which i am mapping. It is in the parent node of the node which i am mapping. SO when i mapped to target node, only one occurence only its populating in target side even When lines repeated more than once its not populating all lines corespondingly. Please let me know how to populate all line items when i have validation field in parent node and child node and its subelemnts to be mapped to the target node. ( Both parent node and sub node in source and target node are unbounded) .
    Thanks in advance.
    Regards,
    Kalpana

    Thanks for your reply, My source structre looks like below.
    I have to map rows node and its coresponding fields to target node Lines which is unbounded and to its subelements when collection name = 'MATGRP_COLLN'.  I did it using if condition but , only one row tis getting populated in target LIne node. next repeated row values are not populating in target side.
    - <extensions>
    + <collection name="REGION_COLLN" />
    +  <collection name="DIVISION_COLLN" />
    + <collection name="DTL_PRCNG_COLLN" />
    + <collection name="COUNTRY_COLLN">
    - <collection name="MATGRP_COLLN">
    - <row>
    - <fields>
      <OBJECTID>-2147483540</OBJECTID>
      <UNIQUE_DOC_NAME>-21474835401248121690973</UNIQUE_DOC_NAME>
      <DISPLAY_NAME />
      <MATGRP_ITEM_NO>1</MATGRP_ITEM_NO>
      <MATGRP_NAME>10100000</MATGRP_NAME>
      </fields>
      </row>
    - <row>
    - <fields>
      <OBJECTID>-2147483539</OBJECTID>
      <UNIQUE_DOC_NAME>-21474835391248121706160</UNIQUE_DOC_NAME>
      <DISPLAY_NAME />
      <MATGRP_ITEM_NO>2</MATGRP_ITEM_NO>
      <MATGRP_NAME>10101500</MATGRP_NAME>
      </fields>
      </row>
      </collection>
      </extensions>
      </object>
      </objects>
      </fcidataexport>

  • ABAP MAPPING Querry - How to create Different Target NODE NAME as of Source

    Hi,
    In abap Mapping
    <b>DATA READ FROM SOURCE XML NODE into <u>incode</u></b> ******
    data: incode type ref to if_ixml_node_collection.
    incode = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
    <b>CREATE OUTPUT XML NODE WITH SAME NAME AS <u>'BUSINESS_DAY'</u></b> **
    data: outcode type ref to if_ixml_node.
    outcode = incode->get_item( index = 0 ).
    data irc type i.
    irc = msgtype->append_child( outcode ).
    *<b>BUT TO CREATE OUTPUT XML NODE WITH <u>DIFFERENT NAME AS 'BUSS_DAY'</u></b>*
    data: ws_val type string VALUE 'xyz'.
    data: elementsender type ref to if_ixml_element.
    elementsender = odocument->create_simple_element(
    name = 'BUSS_DAY'
    value = ws_val
    parent = msgtype ).
    <b>Please guide me how I can assign <u>incode</u> value to ws_val.
    So that I can generate <u>OUTPUT XML NODE with different name as of SOURCE XML NODE</u></b>
    i.e. How to create Different Target NODE NAME as of
    Source with same Data
    <Note>: I am using "How to... Use ABAP Mapping in XI 3.0 ver.1.00" and to create different NODE name as of source
    is not given in it.
    Thanks & Regards.

    Hi ABAPers,
    Please Guide Me .....
    <u>This is ABAP Mapping problem in XI.</u>
    <b>How can I read data from incode into ws_val.</b>
    data: <b>ws_val</b> type string
    data: <b>incode</b> type ref to if_ixml_node_collection.
    <b>incode</b> = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
    Best Regards

  • Child element of target node in message mapping getting suppressed

    Hello All,
                      I am having  mapping where i am trying  to generate the target node based on some condition of the source structure ,this is working fine ,I am able to generate the target node once the condition gets satisfied ,but the problem is one of the  child elements of the same node is not getting populated,its getting suppressed,i have some condition for the same
    I checked  the  queues its showing value as
    SUPPRESS
    Value
    Value ( in grey )
    But still element is not getting generated..
    I have added a condition used at the node function and apart from other condition of element..
    If some body have the solution for the same,please help me out
    Thanks in advance
    Rajesh

    Hi Rajesh,
    The Error is mostly cause of that the node and your child are in same context.
    You got to remember that the parent node creates the context, and then the child element puts the value in it.
    Try putting your child element to a higher context then mapwithdefault for your supress and then removecontext.
    This Issue, you got to work it out with the node functions,
    I had the same kind of issue in my mapping, it was rectified with the help of node functions as mapwithdefault, removecontext.
    Further unless one sees the mapping of your issue it is a bit difficult to imagine it and answer it.
    For more clarifications please give the full hierarchy, and the condition. As of now try with the node functions.
    Thanks
    Ashmi

  • Mapping problem with compressed key update record (target format)...

    Hi Guys,
    Getting below error while replication from Source to target. Source table is having NOT NULL Column, but on target replicat process giving error about some NULL value ??
    How to overcome this issue, any idea...
    2011-08-04 10:35:04 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK starting.
    2011-08-04 10:35:05 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK started.
    2011-08-04 10:35:06 WARNING OGG-00869 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: OCI Error ORA-01407: cannot update ("INFRA"."CUST"."CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE" = :a4,"ORD_QTY" = :a5,"ORD_PRICE" = :a6,"CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.
    2011-08-04 10:35:06 WARNING OGG-01004 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Aborted grouped transaction on 'INFRA.CUST', Database error 1407 (ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL).
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 *WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: SQL error 1407 mapping INFRA.CUST to INFRA.CUST OCI Error ORA-01407:* *cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE"=:a4,"ORD_QTY"*
    *= :a5,"ORD_PRICE" = :a6,"SCRP_CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.*
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 ERROR OGG-01296 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Error mapping from INFRA.CUST to INFRA.CUST.
    2011-08-04 10:35:06 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: PROCESS ABENDING.
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    *Mapping problem with compressed key update record (target format)...*
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-
    04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    Mapping problem with compressed key update record (target format)...
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Any inputs / help would be appreciated.
    Regards,
    Manish

    The SCRP_CODE column has a NOT NULL constraint. The ORA-01407 error is telling you that you cannot update or set a value for this column to null because of the constraint. This has absolutely nothing to do with an index. You can use a marker/sentinel value in lieu of using NULL. For a numeric field, where everything is positive, a negative value (-1) can be decoded as meaning null. For a character field, a code such as NA can represent NULL.
    This also has nothing to do (directly) with GoldenGate failing because of this error. The underlying SQL statement will fail everywhere, regardless of the tool or application. It is not a case of failing only in GoldenGate.

  • Strange Errors from Import Server on Schema-based maps for repeating nodes

    I have already posted one thread about this, but perhaps some more in-depth information is required:
    We have uploaded our schema into the console, and have mapped the following multi-node file to it:
    CUSTOMER <repeating node>
      MDM_CUST (new Customer number returned)
      CUSTOMER(mapped back from XI for RECORD MATCHING)
      CREATE_DATE (text field)
      CONTACT<repeating node>
        CONTACT_NO (RECORD MATCHING : NON-QUALIFIER)
        CONTACT_SAP_NO (QUALIFIER)
         [NOTE: There are other qualifers for CONTACT, but only this one
    qualifier is being returned and is the only field that would and should be updated.
    The other fields should be left alone. However, it appears to overwrite EVERYthing
    with NULL other than these two fields. The CONTACT_NO is the sole qualifer on
    the table. It is a calculated field that equals the Auto-ID that is also produced on
    the table - but obviously not mapped.]
      PARTNER<repeating node>
        CUSTOMER_NO (RECORD MATCHING : NON-QUALIFER)
        PARTNER_FUNC (NON-QUALIFIER - Code given to lookup from PARTNER_FUNCTION table which has Code and Desc)
        PARTNER_NO     (NON-QUALIFIER)
        DEFAULT_PARTNER_FLAG (QUALIFIER)
    <CLOSE CUSTOMER NODE>
    In the Customer main table, all records are matched on CUSTOMER. The CONTACT_NO non-qualifer is matched to the CONTACT qualified lookup table directly since it is the only available non-qualifier. For the PARTNER table, the three qualifiers are mapped and then a compound field is created to map to the PARTNER table entry.
    We have the Configurations set at:
    Default Multi-Valued Update: Replace
    Default Qualified Update: Replace
    Default Matching Qualifiers: None
    Our record matching is: Create / Update(ALL MAPPED FIELDS) / Update(ALL MAPPED FIELDS)
    When the map is reused, the repeating nodes are all recognized, be it one node or many. However, when the map is reused, it does not automatically map the values for many of the Partner fields (nor the compound field) though the fields are correctly mapped.
    Also, when we attempt to use Import Server to automate the mapping, we use the mdis.ini set to
    Automap Unmapped Value=True
    Unmapped Value Handling=Add
    Always Use Unmapped Value Handling=False
    We get a very strange error saying that :
    [code]Encountered a pre-SP4 map. The map needs to be upgraded to SP4.
    Solution: Please, Launch the Import Manager GUI using the same source file and simply save the map.[code]
    Could it be that our MDM 5.5 SP4 is not compatible with schemas generated with XI v.7 SP9?
    All of our MDM is 5.5 SP4. It makes no sense that we would get THIS kind of error. Also, I am questioning our combination of these and other configurations since it doesn't always seem to do what it should

    Hi Donald,
    this sounds good so far. Just a short hint: you've set "Default Qualified Update: Replace". This explains why Import server "appears to overwrite EVERYthing
    with NULL other than these two fields.". The reason is the replace. A replace means that the old values are completely deleted and only the new incoming ones are stored. I'd suggest to use any of the Update possibilities.
    Note: the definitions you set in in the record matching step are mainly for the new records in the main table! Records in qualified look ups are handled differently! If you open your map in Import Manager, switch to tab "Map Fields/Values". Select a field that is your non qualifier. Right-Click on it and choose "Set qualified update" from the context menu. Now you can define which qualifiers can be used for the qualified look up matching. And you can define as well what should happen with new and/or existing records.
    Regarding the value mapping: do you use keymapping? Or do you use simple values only? Do you save the map everytime you add a new value mapping?
    Regarding the issue "Encountered a pre-SP4 map. The map needs to be upgraded to SP4. Solution: Please, Launch the Import Manager GUI using the same source file and simply save the map". This sounds very likely like a bug in MDIS and should be reported to SAP!
    Hope that helps
    Michael

  • How to remove target node if source field value is empty SAP PI Mapping

    Hello,
    how to remove target node if source field value is empty in graphical Mapping.
    Like if
    MIddle name in source filed is empty, I would like to eliminate target field from out put XML.
    Thank you
    John

    Hi Jhon,
    If you want to remove all empty tags and you dont to complicate your message mapping, you can use a XSL, after the message mapping,  to remove all the empty tags:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="node()|@*">
            <xsl:copy>
                <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="*[not(@*|*|comment()|processing-instruction())
         and normalize-space()='' ]"/>
    </xsl:stylesheet>
    Regards

  • PI Message Mapping One Source to create two of the same Target Nodes.

    Hi,
    I have a source node that contacts the following.
    "1234-5678".
    When there is a "-" in the source node then I need to create two target nodes.
    When there is no "-" in the source node then only create one node.
    Since the source structure is a flat structure by on the target side as you can see I am trying to achieve a diep structure.
    Please can you assist in how to do this with PI message mapping.
    Regards
    Willie Hugo

    Hi,
    "1234-5678" only occurs once in the source. There is no source xml node that will occur more that once. The whole structure only occurs once. But on the target side I need one of the node to occur more than once if a hyphen is found in the source field.
    Source Message                      - Always only one data node.
    ==============
    <root>
    <OnceOnlyNode>1234-5678</OnceOnlyNode>                   [1..1]
    </root>
    Target Message                      - Only two text node when "-" in source, else only one text node.
    =============
    <msg>
    <text>1234</text>
    <text>6789</text>
    </msg>
    How can this be done using standard PI message mapping functions. Can it be done?
    Regards
    Willie Hugo

  • Mapping debug - target node not being created

    Hi Gurus,
    I have an issue in my mapping. Let's say I have a source structure:
    ><body>
    >  <maintag>
    >    <value>1</value>
    >  </maintag>
    >  <maintag>
    >    <value>2</value>
    >  </maintag>
    ><body>
    I need to map maintag->target node but only in case if value eq 2. I used a Ifw/oElse function which creates target queue
    SUPPRESS(grey)
    SUPPRESS(cyan)
    SUPPRESS(grey)
    [] (dark grey)
    which is fine, because only 2nd context matches the condition. But no target node is being created!
    Why? How to resolve this?
    Thnak you!
    Olian

    Hi Olian,
    Changing the context to one level up is working for me.
    Please refer to the following links:
    http://farm4.static.flickr.com/3055/2828227942_e71da4a823_o.jpg
    http://farm4.static.flickr.com/3134/2828228398_92f5ba41e0_o.jpg
    Here the context of value was set to body in the sample DT i created.
    regards,
    venkat.

  • XSLT mapping problem

    Hi
    Im doign xslt mapping in XI bw two structures..while doing htis i have come across a requirment, where i have to map different values to nodes which are repeating in different sub structures.
    Ex: source structure and target structure are same..
      <Flight>
       <Pflight>
         <fltno>
         <fltname>
         <fltcode>
      </Pflight>
       <Wflight>
            <fltno>
            <fltname>
            <fltcode>
        </Wflight>
       <Rflight>
          <fltno>
          <fltname>
          <fltcode>
        </Rflight>
    </Flight>
    In this each <fltno>,<fltname> nodes have seperate values...
    I have mapped 'fltno' under each sub structure using this statement.
    <xsl:value-of select=".//*[local-name() = 'fltno'
    Here problem is in target structure it is getting same 'fltno'  under all structures. it means it will be passing the value of 'fltno' under first structure(Pflight) to all the <fltno> nodes.
    But my requirment is <Pflight>, <Wflight>, <Rflight> have seperate 'fltno' and they should get their own value in target structure.
    Can somebody help me.....Really Appreciated
    Thanks And Regards
    Rajesh

    Use the whole path or a partial path which is unique:
    <xsl:value-of select="/Flight/Pflight/fltno">
    or
    <xsl:value-of select="//Pflight/fltno">

Maybe you are looking for

  • Report for consignment materials

    Hi SAP Gurus, Is there a report for consignment materials that can show us the opening balance, receipts, Usage, and ending balance (of the stock) for a given time frame? thanks Anusha

  • I installed an update and now I can't open App Store or iCal.

    I installed an update, but now when I try to open App Store or iCal, I get this error message: "App Store cannot be opened because of a problem. Check with the developer to make sure App Store works with this version of OS X. You may need to reinstal

  • Can Struts and JSF coexist?

    I have a Struts based application and now I want to build an additional module on top of that using pure JSF. My question is, can Struts and JSF co-exist in the same application? If yes, what are the cons of that approach? What are the places I need

  • Backup disc too small?

    I recently purchased a new MacBook Pro and used a Time Machine backup to transfer all the files from my old MacBook Pro to the new one. Now, I am trying to set up Time Machine on the new laptop with the same external hard drive I was using a Time Mac

  • Lion Mail crashes when clicking on hyperlinks in messages

    since installing LION, mail crashes when I click on any hyperlink in  email messages.  Interestingly it worked fine for a few days then all of a sudden the crashes started. Tried resetting PRAM; un installed a bunch of 3rd party apps that run all the