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.

Similar Messages

  • 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

  • Single source to create multiple target nodes

    Hi Guys,
    I need to create multiple target node as many occurrence of source node. how should i achieve it?
    Source node (1...999999)  to Target node(1..1)
    please suggest.
    Regards
    Swapnil

    Hi Nutan,
    Sorry formatting got messed up so posting again.
    Sorry for the confusion. Target structure is 0..unbounded.
    Source structure ...................................... Target structure
    Message 1 ...................................................Message 1
    ZHRMD_A07 (1...1)..........................................MT_EMPLOYEE (0....unbounded)
         E1PLOG1(1...unbounded)................................ Field1
                                                                                    I need to create MT_EMPLOYEE multiple times depend upon occurences of E1PLOG1.
    Regards
    Swapnil
    Edited by: Swapnil Bhalerao on Mar 3, 2010 12:41 PM
    Edited by: Swapnil Bhalerao on Mar 3, 2010 12:47 PM

  • 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;

  • [Solved] How to create multiple target nodes from single input node (XSL)

    Hello all,
    I have identified what I think is a bug in the visual XSLT mapper (JDev 10.1.3.3). Here is the simplified scenario:
    I have a source XML file that contains a bill-to address and a ship-to address, something like this:
    <header>
    <bill-to-name>My Customer Bill To</bill-to-name>
    <bill-to-address>123 main street</bill-to-address>
    <ship-to-name>My Customer Ship To</ship-to-name>
    <ship-to-address>567 first avenue</ship-to-address>
    </header>I want to translate it to a target XML file that looks like this:
    <addresses>
    <address>
    <address-type>BILLTO</address-type>
    <name>My Customer Bill To</name>
    <street-address>123 main street</street-address>
    </address>
    <address>
    <address-type>SHIPTO</address-type>
    <name>My Customer Ship To</name>
    <street-address>567 first avenue</street-address>
    </address>
    </addresses>Note that what I am trying to do is to create two nodes in the target (something like a for-each), but where there is no repeating node in the source.
    I was able to do this quite simply with a map like this:
    <xsl:template match="/">
      <ns2:addresses>
        </ns2:address>
          <ns2:address-type>
            <xsl:text disable-output-escaping="no">BILLTO</xsl:text>
          </ns2:address-type>
          <ns2:name>
            <xsl:value-of select="/ns1:header/bill_to_name"/>
          </ns2:name>
          <ns2:street-address>
            <xsl:value-of select="/ns1:header/bill_to_address"/>
          </ns2:name>
        </ns2:address>
        </ns2:address>
          <ns2:address-type>
            <xsl:text disable-output-escaping="no">SHIPTO</xsl:text>
          </ns2:address-type>
          <ns2:name>
            <xsl:value-of select="/ns1:header/ship_to_name"/>
          </ns2:name>
          <ns2:street-address>
            <xsl:value-of select="/ns1:header/ship_to_address"/>
          </ns2:name>
        </ns2:address>
      </ns2:addresses>
    </xsl:template>As long as I only use the source view for the xsl file, this works fine and tests just fine. As soon as I switch over to the graphical (design view), the source gets mangled to:
    <xsl:template match="/">
      <ns2:addresses>
        </ns2:address>
          <ns2:address-type>
            <xsl:text disable-output-escaping="no">BILLTOSHIPTO</xsl:text>
          </ns2:address-type>
          <ns2:name>
            <xsl:value-of select="/ns1:header/bill_to_name"/>
            <xsl:value-of select="/ns1:header/ship_to_name"/>
          </ns2:name>
          <ns2:street-address>
            <xsl:value-of select="/ns1:header/bill_to_address"/>
            <xsl:value-of select="/ns1:header/ship_to_address"/>
          </ns2:name>
        </ns2:address>
      </ns2:addresses>
    </xsl:template>which obviously does not work.
    So:
    1). Should my original map work? If not, what is the correct way to do it?
    2). If the map should work (it does), this looks like a bug in the design view.
    3). If my map should work, is there a way to do this in the design view?
    Kind regards,
    John

    John,
    GUI has limited functionality and hence it does not support all the constructs. If you want to implement soln that is visible in gui follow this steps.
    for-each(bill-to-name)
         create <address>tag
         map concat(BILLTO) to <address-type>
         map value of <bill-to-name> to <name>
         map value of <bill-to-address> to <street-address>
    select the for-each you created - right click -> add xsl node ->clone for-each
         repeat similar steps for mapping <ship-to_name>...etc
    If you still unsure send me the source & target xsd and I will send the xsl your way. You can email me at [email protected]
    Dipal

  • 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

  • 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

  • Target node creation on condition

    Hi I have a requirement where i have to create a target node based on a requiremnt.
    the source is                                         The target is
    Line                                                     Tar
      a1                                                         C1
      b1                                                         C2
    c1
    Line
    a1
    b1
    c2
    Line                                                    Tar
    a2                                                          C3
    b2
    c3
    I have achieved creating Tar based on a b values . now i have to map the C target so that it is created for every c value . but if a,b values are same then C has to be in the same Tar element.
    How can i achieve this . Any help is greatly appriciated.
    Note: i just need the mapping for C node. not the Tar node.
    Thank you

    Hi ,
    in my input i have,
    <Name>
    <FirstName>demo</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>Testdemo</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>Test</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>demo data</FirstName>
    <LastName>test</LastName>
    </Name
    So i have to create Name node in target whenever FirstName is  starts with demo with other values in the corrspoinding Name node.
    So my target will be
    <Name>
    <FirstName>demo</FirstName>
    <LastName>test</LastName>
    </Name>
    <Name>
    <FirstName>demo data</FirstName>
    <LastName>test</LastName>
    </Name
    Please tell me how to get this
    Thanks
    Archanaa

  • 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.

  • Duplicate Messages created on target with Multimapping(No BPM)

    Hi
    I am working on PI7.1 .
    My sceniro
    IDOC to JMS using message split
    Receiving IDOC with Header and Items, PI splitting IDOC and sending to Multiple JMS queues, Header segment data to header queue, Item segment data to Item queue
    PI Successfully Posting data to Queues, but duplicate messages creating on target sys(One IDOC with one header and one item date, PI sending 2 header messages , two item messages to target sys) .
    I did following steps
    ESR
    1. Created two target messages
    2. Created Two target inbound interfaces
    3. Created Message mapping using with multiple target messages, changed signature occurrence to 0 : unbounded , and mapped to source node to target nodes
    4. Created operation mapping with one source to two target interfaces
    EB
    1. Created one business components and assigned one sender and two receiver service interfaces
    2. Created Two receiver communication channel
    3. Created One receiver determination
    4. Created One interface determination , added two inbound interfaces with one operation mapping (Multiplicity is blank )
    5. Created two receiver agreement
    Please help .

    Thanks Gouri ,
    My IDOC structure (Source Message Type)
      HEADER_SEG Node (0:9999) -
    > MT_HEADER ( 0:unbounded) (this one of target message type)
                                                                    HEADER_FLDS  (Element - Main hierarchy)
             FLDS----
    >  FLDS
    ITEM_SEG Node (0:9999)  -
    >MT_ITEM(0:unbounded ) (this is another message type)
                                                                    ITEM_FLDS (Element - Main hierarchy)
             FLDS----
    >  FLDS
    I tried with the below mappings
                    HEADER_SEG Node -
    >MT_HEADER
                    HEADER_SEG Node -
    > HEADER_FLDS (element )
                    ITEM_SEG Node -
    >MT_HEADER
                    ITEM_SEG Node -
    > ITEM_FLDS (element )
    2. method
                    HEADER_SEG Node -
    >MT_HEADER
                                                           HEADER_FLDS (element )(not mapped)
                    ITEM_SEG Node -
    >MT_HEADER
                    ITEM_SEG Node   ITEM_FLDS (element )(not mapped)

  • ** Is it possible to move back and generate the target node in Message Map

    Hi,
    We are doing EDI to IDoc scenario. In our scenario the source XML comes like
    XML Instance
    G_SPOC       (Node) 0..unbounded
       D_670       (Field)
       S_SDQ      (Node)
         D_67
         D_380
         D_67_2
         D_380_2
    G_SPOC
       D_670
       S_CTP
         D_212
    G_SPOC
       D_670
       S_SDQ
         D_67
         D_380
         D_67_2
         D_380_2
    Target Strcutre
    E1EDP01    0..unbounded
      For this instance we have to create E1EDP01 node for how much times D_67,D_67_2..... will come.
    By using 'CreateIf' function we check the existance of D_67,D_67_2 ... and create the target structure E1EDP01. This is working fine if S_SDQ node will come in source XML. Basically D_67,D_67_2 represents Store Nos and D_380,D_380_2 represents Qty.
    In the customer given EDI file, Price change also comes for Line items. It may comes in the file middle also. When Price Change come, the node S_SDQ will not come in G_SPOC but where as S_CTP will come. This contains Price Change in the field D_212.
    The indicator whether QD (Qty Discount), QI (Qty Increase), PC (Price change), AI (Additonal Increase) is stored in the fild D_670.
    In our logic in mapping, we create E1EDP01 based on the existance of D_67,D_67_2... . But, for PC (Price Change) we created special node E1EDP01 at the end (after all D_67,D_67_2 ) by checking the condition whether D_670 = 'PC'. This is also working fine when 'PC' comes in last G_POC of source XML. But, when it will come in middle of G_SPOC, mapping is only executed  for first 3 GPOC (for Example, QD,QI,PC) and it ignored the last one AI. (Because this is generated based on D_67 under S_SDQ again).
    The problem is we think that the system does not go back and execute the mapping for AI based on D_67.
    It executes mapping only in order.
    So, How will we solve this problem, friends? The requirements is  we have to do this thru Graphical Mapping only.
    We tried sever possibilites, but not worked out.
    Kindly help me friends to solve this issue.
    Thanking you.
    Kind Regards,
    Jeg P

    Friends,
    Any help to solve the above issue ?

  • 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

  • RMAN duplicate target database for standby from active fails to create newname for system tablespace/datafile

    When executing 'duplicate target database for standby from active'  the system tablespace/datafile (datafile 1)  is not cloned.  All other datafiles clone successfully.  The RMAN process aborts with the following errors while attempting to clone the system tablespace/datafile.
    ORA-19558: error de-allocating device
    ORA-19557: device error, device type: DISK, device name:
    ORA-17627: ORA-01041: internal error. hostdef extension doesn't exist
    ORA-17627: ORA-01041: internal error. hostdef extension doesn't exist
    ORA-03135: connection lost contact
    Here are the details:
    Primary is 11.2.0.2 RAC database  on an Exadata platform
    Standby is 11.2.0.2 Single Instance database (same patch level as primary) on a Red Hat Linux box
    This is an ASM to ASM duplication.
    This is not unique to this database.  We tried another database and go the same behavior - all datafiles clone successfully with the exception of the system tablespace/datafile.
    We have traced the RMAN execution and it seems to fail when it is trying to assign a NEWNAME to the system tablespace/datafile.
    We even issued an explicit SET NEWNAME command but RMAN ignored it.
    We also shutdown the primary and started is up in mount mode thinking that something had ahold of the System Tablespace/datafile.
    We also opened up the network firewall to allow permit any,any traffic.
    We increased the max_server_processes
    and added TCP.NODELAY=yes to the sqlnet.ora file.
    There seems to be some artifact present in our Primary System tablespace/data file that is preventing it form being cloned.
    checked all alert files grid, asm,  and dbhome - no abnormal messages.
    We are in the process of restoring the database from a backup but we would prefer to get this working using the 'Active Database' methodology

    I successfully created the standby database using RMAN backup and recovery.
    I started the managed recovery.  Archive logs are being sent from the primary to the standby ( I can see them in ASM), but the standby is not applying them.
    I get the following messages in the standby alert log...
    Fetching gap sequence in thread 2, gap sequence 154158-154257
    Tue Nov 26 16:19:58 2013
    Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
    Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
    Tue Nov 26 16:20:01 2013
    Fetching gap sequence in thread 2, gap sequence 154158-154257
    Tue Nov 26 16:20:11 2013
    Fetching gap sequence in thread 2, gap sequence 154158-154257
    Tue Nov 26 16:20:22 2013
    Fetching gap sequence in thread 2, gap sequence 154158-154257
    Tue Nov 26 16:20:32 2013
    Fetching gap sequence in thread 2, gap sequence 154158-154257
    I don't see any MRP processes:
    select process,
    status,
        thread#,
        sequence#,
       block#,
      blocks
      7     from v$managed_standby;
    PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
    ARCH      CLOSING               2     154363          1        132
    ARCH      CONNECTED             0          0          0          0
    ARCH      CONNECTED             0          0          0          0
    ARCH      CONNECTED             0          0          0          0
    ARCH      CONNECTED             0          0          0          0
    ARCH      CONNECTED             0          0          0          0
    ARCH      CONNECTED             0          0          0          0
    ARCH      CONNECTED             0          0          0          0
    RFS       IDLE                  0          0          0          0
    RFS       IDLE                  1     145418        121          1
    RFS       IDLE                  0          0          0          0
    PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
    RFS       IDLE                  0          0          0          0
    12 rows selected.
    SQL>  SELECT THREAD#, SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG;
       THREAD#  SEQUENCE# APPLIED
             2     154356 NO
             2     154357 NO
             1     145411 NO
             2     154358 NO
             2     154360 NO
             2     154361 NO
             1     145414 NO
             1     145415 NO
             2     154362 NO
             2     154363 NO
             1     145416 NO
    11 rows selected.
    I do have the archive logs that cover sequences 154158-154257
    Crosschecked 38 objects
    Crosschecked 62 objects
    Finished implicit crosscheck backup at 26-NOV-13
    Starting implicit crosscheck copy at 26-NOV-13
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    Crosschecked 2 objects
    archived log file name=+RECO_XORA/nmuasb00/archivelog/2013_11_26/thread_2_seq_154377.344.832521989 RECID=29 STAMP=832521990
    validation succeeded for archived log
    archived log file name=+RECO_XORA/nmuasb00/archivelog/2013_11_26/thread_2_seq_154378.346.832521991 RECID=31 STAMP=832521993
    Crosschecked 31 objects

  • 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

  • Biztalk Map: Repeated node

    Hi,
    Please find below Input file
    <Vin_Decoder>
    <Process>
    <Risk>
    <Line>
    <Exposer>
    <Type>VIN</type>
    <Svalue>123456789123456789</Svalue>
    </Exposer>
    <Exposer>
    <Type>Year</type>
    <Svalue>2014</Svalue>
    </Exposer>
    <Exposer>
    <Type>MAKE</type>
    <Svalue>2546</Svalue>
    </Exposer>
    <Exposer>
    <Type>Discripttion</type>
    <Svalue></Svalue>
    </Exposer>
    </line>
    </risk>
    <Risk>
    <Line>
    <Exposer>
    <Type>VIN</type>
    <Svalue>123456789987654321</Svalue>
    </Exposer>
    <Exposer>
    <Type>Year</type>
    <Svalue>2013</Svalue>
    </Exposer>
    <Exposer>
    <Type>MAKE</type>
    <Svalue>6789</Svalue>
    </Exposer>
    <Exposer>
    <Type>Discripttion</type>
    <Svalue>kfjdklf</Svalue>
    </Exposer>
    </line>
    </risk>
    </Process>
    </Vin_Decoder>
    and i am expecting the out put format
    <Vin_Decoder>
    <Decoder>
    <VIN>123456789123456789</VIN>
    <Year>2014</Year>
    <Make>2546</Make>
    <Description></Description>
    </Decoder>
    <Decoder>
    <VIN>123456789987654321</VIN>
    <Year>2013</Year>
    <Make>7896</Make>
    <Description>kfjdklf</Description>
    </Decoder>
    </Vin_Decoder>
    please suggest me how to do this in biztalk map..
    Thanks..

    Hi,
    In the Vin_Decoder schema create a "Decoder" Child Record and make it optional. Inside the Decoder" Record create the all the Field Elements like VIN, Year, etc. Create a map where the source and destination is the Vin_Decoder schema. Map to the field
    elements inside the Decoder" Record.
    Kind regards,
    Tomasso Groenendijk
    Blog 
    |  Twitter
    MCTS BizTalk Server 2006, 2010
    If this answers your question please mark it accordingly

Maybe you are looking for

  • What is the correct way to start Samba?

    Currently I start/enable Samba with systemctl with separate three commands - smbd, nmbd and winbindd. If 'systemctl start samba' is used, it fails due to incorrectly configured "server role". The 'samba.service' file relies on conf options in the '/e

  • Some sites ask for adobe flash player. My IPad doesn't support it. How can I get over it?

    Some sites ask for adobe flash player. My IPad doesn't support it. How can I get over it?

  • Web User Input Form - in terms for DQ & DI

    Hi All, Thanks a lot for your excellent contribution on these topics. I have one question Is there a web user input form available for Business SMEs or User to input their rules/metadata which will get converted to equivalent code snippets into DI or

  • Select pcs based on IP

    Hi guys Can i create a GPO that select pc's based on their ip adress and assign certain WSUS Server settings to them - is this possible? If so, where would i start? Thanks in advance

  • Prime Infrastructure 2 - API rate limit change?

    Good day - The Prime API is pretty sweet, and can give you JSON data back easily with a call like this: https://prime/webacs/api/v1/data/Clients.json?.full=true It is, however, limited to 100 results. We'd like to see more than that. How do I change