Mapping challenge !! Generate target for unique combination of source field

Hi,
I/P:
<Segement1>
<Article>1</Article>
</Segement1>
<Segement1>
<Article>2</Article>
</Segement1>
<Segement2>
<StoreNum>12</StoreNum>
<StoreNum>13</StoreNum>
<StoreNum>14</StoreNum>
</Segement2>
and the output should be like for every unique combination of Article and StoreNum I have to create a target node and the corresponding values in that node: (So in this case the o/p node will come 6 times)
<Detail>
<Article>1</Article>
<StoreNum>12</StoreNum>
</Detail>
<Detail>
<Article>1</Article>
<StoreNum>13</StoreNum>
</Detail>
<Detail>
<Article>2</Article>
<StoreNum>14</StoreNum>
</Detail>
Can anybody please suggest a solution ?

articleremovecontext-sortsplibyvalue(valuechange)-collapsecontext
UDF---details
storenumsort-splitbyvalue(valuechange)--collapsecontext
mapping of the elements inside details node can be achieved using UDF or standard function also.
UDF2
for(int i=0;i<var1.length;i++)
for(int j=0;j<var2.length;j++)
result.addValue(var1<i>);
result.addContextchange();
repeat the same mapping for Article(target filed) using udf2 as mentioned above for details...
UDF3:
for(int i=0;i<var1.length;i++)
for(int j=0;j<var2.length;j++)
result.addValue(var2<i>);
result.addContextchange();
repeat the same mapping for Storenum(target filed) using udf3 as mentioned above for details...
Note: check for syntax errors.....

Similar Messages

  • Combining two source fields in Import Manager

    Hi,
    I am trying to combine two source fields say fld1 with 5 digit and Fld2 with 3 digit so that combined fld3 of 8 digit can be mapped to a 8 digit field in destination MDM side.
    Any suggestion how to do this is highly appreciated
    Thanks,
    -reo

    Hi Reo,
    I am just adding details to how to combine fields in the import manager.
    To combine two or more existing partitions for a destination node steps are as follows:
    <b>1. </b>In the appropriate source hierarchy tree, select the node whose partitions you want to combine.
    <b>2.</b> click on the Partition Field/Value tab to make it the active tab.
    <b>3.</b> In the appropriate Partition list, select the two or more partition items you want to combine into a single partition.
    <b>4.</b> Click on the Combine button, or right-click on one of the items and choose Combine Partitions from the context menu.
    <b>5.</b> MDM combines the selected partition items.
    <b>6.</b> Now you can map this partition directly to the destination field.
    But as ur requirement seems ,u do not need to set delimiter.
    Hope it will help you and let me know the results. please remark .
    Thanks,
    <b>Shiv Prashant Dixit</b>

  • Message mapping not generating target fields

    hi
    iam doing jdbc--->rfc (bpm) created a one2one message mapping to import rfc table.
    thanks in advance
    sri

    Hi Sri Rao,
    Since you have created a one to one mapping, it would be required to map all the fields in your target message to ur source fields. In case there r some target fields which do not relate to your source field, map it onto a constant. This is all that is required to be done from what i understand from your query. In case there r further problems send the source n target data structure n i will be able to help you out better.
    Cheers,
    Christina

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

  • Message Mapping : content based target structure generation

    Hi Team,
    As per my requirement , mapping should generate target structure based on one "field" value in source srtucture.i.e target structure should generate for some of the custid values  , not for all cust id's . also I dont want empty files .
    Source:
    MT_SOURCE
    -Custid
    -CustName
    Target:
    MT_TARGET
    -Custid
    -CustName
    But I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
    Thanks.
    Drumi

    But I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
    might be it is helpful for ur requirement:
    Custid + constant(001) +equals ->(first) if
    Custid->then                                                 
    Custid + constant(002) +equals-> else
    First if ending -> Second if
    Custid->then
    Custid + constant(003) +equals-> Second else ->target Custid

  • To create 5 different files in target for each record in the sender file

    Hi SapAll,
    i have got a a requirement where pi need to create 5 different files with data of each record from the sender side.
    Its an file to file scenario
    suppose there are 5 rows in a file , then in target side i need to create 5 diff with each one record in it.
    Can we do it without using 3 comm channels
    Thanks&regards,
    Sai

    Hey,
    As a more generic solution, can you try using MultiMapping. It is supposed to generate multiple instances of messages on receiver side.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    You just need to put a simple logic in Message Mapping to generate new Node for every occurence of source field.
    Thanks
    Aamir

  • Generating target-type xsd with element names in camelCase

    Env: ODSI 10gR3, Workshop 10gR3, Oracle DB 10gR3
    We are developing logical data services following a bottom up approach. The source physical data services that we use to build the logical ds have xsd definitions in which element names are in CAPS_CAPS naming convention (following the same names as the database tables). For example, FIRST_NAME, LAST_NAME, etc.
    When we use Query Map to generate xsd for the target types of the logical ds, it generates element names that are also in the CAPS_CAPS convention. Is there a way to generate the target type xsd in which CAPS_CAPS names are converted to camelCase, e.g. FIRST_NAME becomes firstName.
    Thank you in advance.

    mixed-case with underscores removed vs. upper case is only one variation. Someone might like to rename SSN to SocialSecurityNumber, someone might like to rename LAST_NAME to Surname or FamilyName etc.
    You can do any renaming etc. with a Logical Data Service. See the "Best Practices" which is posted as an Announcement in this forum.
    Typically customers put their Physical (i.e. generated) data services in a Physical folder, and then create a parallel Logical folder (including the schemas folder). Then you would create new schemas in Logical/schemas with the new names, create new Logical data services to match the physical ones, then create a 'read' function that uses the physical read function and map the elements of the physical read function to the logical schema (with the new names). Then you can generate the create/delete/update procedures in the Logical data services.
    Getting back to your original question - the answer is No. There is no feature with in ODSI to automatically transform element names to something else.
    - Mike

  • For Each Combination of Two Cols Create a Record

    How do I PL/SQL creating a new record in table B for each combination of two columns in table A? Do I need to create a cursor?
    my_cursor IS
    SELECT col1, col2 FROM tableA
    and then with a FOR loop somehow write SELECT FROM INSERT INTO?
    Thanks,

    For unique combination you have to do more than just distinct:
    SQL> ed
    Wrote file afiedt.buf
      1  select distinct least(x.id1, y.id2) as num1, greatest(x.id1, y.id2) as num2
      2  from t x, t y
      3* order by 1
    SQL> /
          NUM1       NUM2
             1          2
             1          3
             1          4
             2          2
             2          3
             2          4
             3          3
             3          4
    8 rows selected.
    SQL>Which, as you can see strips out the 3,2 because we already have a 2,3
    We have to use the greatest and least functions here so that the 3,2 combination was turned around to become 2,3 thus causing a duplicate which was stipped out using the distinct. There are other techniques too, but it depends on your data and what you want to achieve.

  • Want to generate target structure based on the comparing of records source

    Hi Experts
    i hava an issue here
    I want to generate target sturecture
    My requirement is
    Source                                                   Target
    LPLRecordset                                        PurchaseRecordset
    a                                                             a
    b                                                             b
    c                                                             c
    d                                                             d
    Tax(Subrecordset                                 1
      1                                                            2
      2
    If LPL data is coming it need to populate Purchase Record fields... if tax is coming then it need to populate with LPL with Tax ,
    If tax Recordset is coming twice it need to populate Purchase Recordset ..
    Plz hep me in this
    how to populate the target , If possible with eg

    Source                                                 
    LPLRecordset                                       
    a                                                            
    b                                                           
    c                                                            
    d                                                            
    Tax(Subrecordset                                
      1                                                           
      2
    Target
    PurchaseRecordset
    a
    b
    c
    d
    1
    2
    If LPL data is coming just it should populate a,b,c,d
    If Tax data is coming it need to populate whole purchase record but only 1,2
    if tax data is repeating 2 times it should populate whole purchase record twice with only tax data populate in the target
    How to map from source to target
    Reply me back if you have any queies

  • Two source fields in one target idoc structure

    Hi Experts!
    I have a problem.
    I have a flat file with two fields desc1 and desc2. They have to be put into the field MAKTX of the table structure E1MAKTM. But not via concat or useOneAsMandy!
    I need a new E1MAKTM structure for each desc1 and desc2 . So that i get following target structure:
    <recordset>
    -E1MAKTM
      - MAKTX = "content of desc1"
    -E1MAKTM
      - MAKTX = "content of desc2"
    </recordset>
    I hope you understand what I am trying to do.
    How can i solve this problem?
    Thanks for your answers in advance.

    Hi,
    >>Is there a possibility to dynamically duplicate the structures?
    >>So that i get automatically a duplicated target structure for each content filled source field?
    The solution that has give above would only do this.
    Even though you are duplicating the segement in the design time, you are mapping the desc1 and desc2 to the E1MAKTM root node(for MAKTX).
    During the runtime the node E1MAKTM will only be generated based on the number of occurance of the desc1 and desc2 in the source message.
    For example if there are 2 desc1 and 1 desc2 field then 3 E1MAKTM node will be generated.
    But make sure that the occurance of E1MAKTM is 0 to unbounded to achieve this.
    Thanks
    SaNv...

  • 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

  • Message mapping challenge for a newbie

    Dear PI message mapping experts,
    I'm a newbie in PI and facing a mapping problem using graphical message mapping.
    I'm in an IDOC (INVOIC.INVOICE02) to FILE (EDI) scenario.
    Here after is the mapping i need to perform :
    Source structure IDOC :
    <E1EDKA1> (0..99)
       <NAME1> A </NAME1>  (0..1)
       <NAME2> B </NAME2>  (0..1)
       <NAME3> C </NAME3>  (0..1)
       <NAME4> D </NAME4>  (0..1)
    </E1EDKA1>
    Target structure :
    <AccountingCustomerParty>  (1..1)
       <Party> (0..1)
          <PartyName> (0..unbounded)
              <Name>A</Name> (1..1)
          </PartyName>
          <PartyName>
              <Name>B</Name>
          </PartyName>
          <PartyName>
              <Name>C</Name>
          </PartyName>
          <PartyName>
              <Name>D</Name>
          </PartyName>
       </Party>
    </AccountingCustomerParty>
    I know i have to play with context and queues with stanard function or UDF but cannot succeed to do it.
    Could you please help me ?
    Thanks in advance,
    Alysee

    Hi,
    Please try as below:
    1. Create a source structure
    <AccountingCustomerParty>  (1..1)
       <Party> (0..1)
           <PartyName> (0..unbounded)
                <Name>A</Name> (1..1)
           </PartyName>
       </Party>
    </AccountingCustomerParty>
    2. When in message mapping, duplicate the node 'PartyName' 4 times. Right click on the 'PartyName' Node and you would find Duplicate Subtree.
    3. Map 'Name1' field in the source to the first 'PartyName' node in the target. Similarly, map Name2, Name3 and Name4 fields to their respective 'PartyName' nodes.
    4. Map the 'Name1' field in the source structure to first 'Name' field in the first 'PartyName' Node. Similarly, follow the same process for Name2, Name3 and Name4 fields. By doing so, your requirement would be met.
    Thank  you.
    Regards,
    Subbu

  • Query: Missing tablename in generated SQL for vertical mapped classes

    Hi,
    I am playing with Kodo 3.1.4 / Postgres 7.4 and could not find any
    solution for this problem:
    I have one class calles "Clipfragment" which represents video clips and
    has a long - field named "lengthInMinutes". It extends a baseclass
    called "Categorizablefragment", which has a field "id" and some others.
    I use vertical mapping, thus having one table per class. The identity
    type is 'application'. The table for the class "Categorizablefragment"
    contains fields for jdoclass and jdoversion and IMHO correct entries.
    Everything works really fine except for Querys against subclass fields
    with aggregate functions. E.g. counting all clips works:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("count(id)");
    Number count = (Number) q.execute ();
    But: Querying for the sum of the field 'lengthInMinutes' fails:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("sum(lengthInMinutes)");
    Number count = (Number) q.execute ();
    The exception is:
    kodo.util.UserException: com.solarmetric.jdbc.ReportingSQLException:
    ERROR: syntax error at or near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: syntax error at or
    near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:865)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:728)
    atde.jk.buvas.model.impl.DefaultClipManager.getTotalTime(DefaultClipManager.java:43)
    And the SQL - Trace:
    5766 TRACE [main] kodo.jdbc.SQL - <t 17089909, conn 31908613 (1
    errors)> [0 ms] executing prepstmnt 17226426 SELECT
    SUM(t0.lengthinminutes) FROM WHERE t1.jdoclass = ? [params=(String)
    de.jk.buvas.model.fragments.ClipFragment] [reused=0]
    I tried both 'base-tables' and 'per-subclass' for the property
    kodo.jdbc.VerticalQueryMode, without any results.
    Any ideas?
    Thanks,
    Jochen

    Hi Stephen,
    here are the excerpts from the .jdo and the .mapping files. The .jdo
    file was generated by XDoclet.
    ..jdo
    <class name="ClipFragment"
    identity-type="application"
    objectid-class="CategorizableFragment$Id"
    persistence-capable-superclass="CategorizableFragment"
    > <!-- end class tag -->
    <extension vendor-name="kodo"
    key="jdbc-class-map-name"
    value="vertical">
    <extension vendor-name="kodo" key="table" value="Clip"/>
    </extension>
    <field name="title"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-size"
    value="100">
    </extension>
    </field>
    <field name="lengthInMinutes"
    > <!-- end field tag -->
    </field>
    <field name="description"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-size"
    value="3000">
    </extension>
    </field>
    <field name="recordingDate"
    > <!-- end field tag -->
    </field>
    <field name="actors"
    > <!-- end field tag -->
    <collection
    element-type="de.jk.buvas.model.fragments.ActorFragment"
    > <!-- end collection tag -->
    </collection>
    <extension vendor-name="kodo"
    key="jdbc-element-delete-action"
    value="exception-deferred">
    </extension>
    <extension vendor-name="kodo"
    key="inverse-owner"
    value="clips">
    </extension>
    </field>
    <field name="media"
    > <!-- end field tag -->
    <collection
    element-type="de.jk.buvas.model.fragments.MediumFragment"
    > <!-- end collection tag -->
    </collection>
    <extension vendor-name="kodo"
    key="jdbc-element-delete-action"
    value="exception-deferred">
    </extension>
    </field>
    </class>
    <class name="CategorizableFragment"
    identity-type="application"
    objectid-class="CategorizableFragment$Id"
    > <!-- end class tag -->
    <extension vendor-name="kodo"
    key="jdbc-class-map-name"
    value="base">
    <extension vendor-name="kodo" key="table" value="Categorizable"/>
    </extension>
    <field name="id"
    primary-key="true"
    > <!-- end field tag -->
    </field>
    <field name="category"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-delete-action"
    value="exception-deferred">
    </extension>
    </field>
    </class>
    ..mapping
    <class name="ClipFragment">
    <jdbc-class-map type="vertical" ref-column.ID="ID" table="CLIPFRAGMENT"/>
    <field name="actors">
    <jdbc-field-map type="many-many" element-column.ID="ID"
    ref-column.ID="CLIPS_ID" table="ACTOR_CLIPS"/>
    </field>
    <field name="description">
    <jdbc-field-map type="value" column="DESCRIPTION"/>
    </field>
    <field name="lengthInMinutes">
    <jdbc-field-map type="value" column="LENGTHINMINUTES"/>
    </field>
    <field name="media">
    <jdbc-field-map type="many-many" element-column.ID="MEDIA_ID"
    order-column="MEDIA_ORDER" ref-column.ID="ID" table="CLIPF_MEDIA"/>
    </field>
    <field name="recordingDate">
    <jdbc-field-map type="value" column="RECORDINGDATE"/>
    </field>
    <field name="title">
    <jdbc-field-map type="value" column="TITLE"/>
    </field>
    </class>
    <class name="CategorizableFragment">
    <jdbc-class-map type="base" table="CATEGORIZABLEFRAGMENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="category">
    <jdbc-field-map type="one-one" column.ID="CATEGORY_ID"/>
    </field>
    <field name="id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    </class>
    Thanks,
    Jochen
    Stephen Kim wrote:
    Can you post the mapping/metadata files for the two classes?
    Jochen Kressin wrote:
    Hi,
    I am playing with Kodo 3.1.4 / Postgres 7.4 and could not find any
    solution for this problem:
    I have one class calles "Clipfragment" which represents video clips
    and has a long - field named "lengthInMinutes". It extends a baseclass
    called "Categorizablefragment", which has a field "id" and some
    others. I use vertical mapping, thus having one table per class. The
    identity type is 'application'. The table for the class
    "Categorizablefragment" contains fields for jdoclass and jdoversion
    and IMHO correct entries.
    Everything works really fine except for Querys against subclass fields
    with aggregate functions. E.g. counting all clips works:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("count(id)");
    Number count = (Number) q.execute ();
    But: Querying for the sum of the field 'lengthInMinutes' fails:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("sum(lengthInMinutes)");
    Number count = (Number) q.execute ();
    The exception is:
    kodo.util.UserException: com.solarmetric.jdbc.ReportingSQLException:
    ERROR: syntax error at or near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: syntax error at or
    near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:865)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:728)
    atde.jk.buvas.model.impl.DefaultClipManager.getTotalTime(DefaultClipManager.java:43)
    And the SQL - Trace:
    5766 TRACE [main] kodo.jdbc.SQL - <t 17089909, conn 31908613 (1
    errors)> [0 ms] executing prepstmnt 17226426 SELECT
    SUM(t0.lengthinminutes) FROM WHERE t1.jdoclass = ? [params=(String)
    de.jk.buvas.model.fragments.ClipFragment] [reused=0]
    I tried both 'base-tables' and 'per-subclass' for the property
    kodo.jdbc.VerticalQueryMode, without any results.
    Any ideas?
    Thanks,
    Jochen

  • Query to find unique combinations in a record set

    I need to build a SQL to identify unique combinations
    I have the following data structure -
    I have a table to capture characteristics. Each characteristic can be associated with one or more attributes. Each attribute can be assigned one or more values
    Characteristics are grouped under Characteristic set. A Family set is the highest level of grouping and is a group of characteristic sets.
    I need to find the unique combinations within each family set
    Ex.
    Family Set - F1
    contains Characteristic Set - S1 and S2
    S1 contains characteristics - C1, C2.
    S2 contains characteristics C3
    C1 contains 1 attribute a1 which can have two values v1 and v2
    C2 has 2 attributes a2 and a3 each of which can have one value say v2 and v3 respectively
    c3 has 1 attribute a4 which can take 4 values say v4, v5, v6, v7
    There is no pattern in terms of the number of values that can be assigned to an attribute, number of attributes for a characteristic, no of characteristics present in a set and number of set that can be associated with a family.
    Need to know the max no of unique combinations in a family. One combination for the above ex would be F1S1C1A1V1+F1S1C2A2V2+F1S1C2A3V3+F1S2C3A4V4
    Appreciate your help.
    Thanks
    Gopal

    Hi David,
    Thanks for you analysis
    But these are not the combinations I am looking for. The details below may explain my requirement -
    I am trying to build out a repository of flows supported by a product application.
    Characteristics are features in the application. Each feature can have one or more input parameters or attributes. Each parameter can support multiple values
    For ex. one characteristic could be
    Define Item
    Input parameters/attributes for item could be item class, item type etc. These attributes can take different values.
    Item Source could support values like Manufactured, Procured etc
    Item Type could support values like Raw Component, Finished Goods, Intermediates etc
    Characteristics are stored in a table with ID and name ; Attributes stored in attributes table with ID and named joined with characteristics id .. Values are stored in values table with value id and value and joined with the attribute id
    Based on the above ex., some of the supported combinations are Manufactured Component, Procured Component, Manufactured FG, Procured FG etc
    Characteristic set is a group of related characteristics or features.
    To take the above example further .. we can group Define Item + Define Product Structure as a characteristic set - Define Product
    Define product structure say has one attribute stucture type which takes two values complex and simple
    Characteristic set is stored in a set table with columns setid, setname, stepno, characteristic_id
    Now the combinations become - Manufactured Component with Complex Structure, Manufactured Component with Simple Structure, Manufactured FG with Complex Structure etc ...
    Family set are the supported flows in the application which groups the features to be executed.
    For ex. a Product Definition flow will comprise of
    Step 10 - Define Product (characteristic set)
    Step 20 - Cost the Product (another characteristic set with say one characteristic - cost method which supports value standard and average)
    Family set is stored in a family set table with column familyid, familyname, stepno, chstepid
    Based on the above ex, the product definition flow will have several combinations such as
    Combination 1 -
    Step 10 - Define Mfg Component with Complex Structure
    Step 20 - Cost the Component with Standard Costing
    Combination 2 -
    Step 10 - Define Mfg Component with Complex Structure
    Step 20 - Cost the Component with Average Costing
    and so on ...
    I need to derive the total number of unique combinations for each family set / flow
    Family Set > Step No > Characteristic Set (one characteristic set per step) > Step No > Characteristics (one characteristic per step) > Attributes (many attributes per characteristic) > Attribute value (many values per attribute)
    The complexity is quite large as the product supports several flows which can be executed through many combinations. We need to build out the combinations as a product footprint and I am trying to have it mapped through an apex application.
    Appreciate any help to map this information out.
    Thanks
    Gopal

  • Dataflow targets for SAP BW Datasource have different names in Dev/QA/PRD

    I am using BODI to load from flat file into a SAP BW Datasource.
    All is working fine in Development and I have transported my BW development to the QA environment.
    In QA my loads don't work anymore.
    The reason is that BODI refers to the 'Transfer Structure' of my data sources in BW.
    These Transfer Structures have a different suffix in each SAP system (DEV, QA, PROD).
    To have different suffixes for Transfer Structures is a standard SAP BW behaviour.
    I was expecting SAP would use the unique combination Source System / Datasource as identifier for the target of a dataflow, not transfer structure.
    I assume there is a work around for this, but I can not think of anything except either
    - reconfigure the SAP BW implementation or
    - re-develop my BODI DF's for each environment
    Both options are high risk and will take a lot of extra work.
    I have raised a SAP service message, because I think this is not working correctly, but I was wondering if anybody has dealt with this and knows an easy work-around?
    Many thanks for your suggestions,
    Jan.

    THe only tricky thing is the configuration of the BW publisher. But you can find enough information about this in the referenced posting. The rest of the installation configuration is the same as when integrating a single SAP BW system with BOBJ. Ingo has created the following blo, which can guide you through this:
    Install Part #1
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-1-of-4
    Install Part #2
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-2-of-4
    Install Part #3
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-3-of-4
    Install Part #4
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-4-of-4
    SAP Authentication
    /people/ingo.hilgefort/blog/2008/09/19/businessobjects-and-sap--configure-sap-authentication
    Publishing part 1
    /people/ingo.hilgefort/blog/2008/09/23/businessobjects-and-sap--publishing-of-crystal-reports-part-1-of-3
    Publishing part 2
    /people/ingo.hilgefort/blog/2008/09/24/businessobjects-and-sap--publishing-of-crystal-reports-part-2-of-3
    Publishing part 3
    /people/ingo.hilgefort/blog/2008/09/24/businessobjects-and-sap--publishing-of-crystal-reports-part-3-of-3
    Regards,
    Stratos

Maybe you are looking for

  • How can i configure an imap e-mail account in Mail 5.0?

    When I open mail 5.0 (in OS X Lion) I don't see the "automatically set-up account" option to be able to clear it, so the only way to configure mail is to do it automatically, and it configures my account as a pop account. Any help? thanks

  • Hi In ALE ,IDOC  HOW  CONTROL DATA IS TRANSFERRED

    Hi Experts,                       Hi In ALE ,IDOC  HOW  CONTROL DATA IS TRANSFERRED . Thanks & Regards Bhaskar Rao.M

  • IMac vs Nikon

    I have just bougth an iMac and the program from Nikon - CaptureNX2. It should be both for Mac and W... When I try to install I get an error message, "dont support power PC". Is there anything to do about this?

  • A 2nd monitor.

    I have an iMac(24") and wish to connect a 2nd monitor.... have had this kind of setup at jobs and find it very useful. Is this possible, and I'm considering a 24" Apple monitor. Appears to have 3 cables to hook up and I'm running out of USB connectio

  • Connection with 3 tables in Entity

    Hello, I have 3 tables in SQL dataBase: Movies, Viewer and Movies_Viewer (= that shows which viewer saw which movie). the client will insert Viewer name and Movie name and with the Entity I want to insert it to the 3 tables I have (with linq for exam