Join differend source node structures to one destination node

Hello world,
I am currently struggling with a mapping where I try to create destination structures from different source structures. In the following xml I tried to illustrate my target:
<sourceMessage>
<part1>
<struct1>
<key>1</key>
<value>hello</value>
</struct1>
<struct1>
<key>2</key>
<value>hello</value>
</struct1>
<struct1>
<key>3</key>
<value>hello</value>
</struct1>
</part1>
<part2>
<struct2>
<id>4</id>
<content>world</content>
</struct2>
<struct2>
<id>5</id>
<content>world</content>
</struct2>
</part2>
</sourceMessage>
<destinationMessage>
<struct>
<key>1</key>
<value>hello</value>
<source>struct1</source>
</struct>
<struct>
<key>2</key>
<value>hello</value>
<source>struct1</source>
</struct>
<struct>
<key>3</key>
<value>hello</value>
<source>struct1</source>
</struct>
<struct>
<key>4</key>
<value>world</value>
<source>struct2</source>
</struct>
<struct>
<key>5</key>
<value>world</value>
<source>struct2</source>
</struct>
</destinationMessage>
I tried to solve this by using a Table Loop Functoid: First input is <Struct1>, second is the number of lines I need, namely 3, next input values are <key> and <value> of <Struct1> ,<Struct2> , <id> and <content>
and constant values for the destination message to declare the <source> value, "struct1" and "struct2"
next I declared the table looping grid:
first row: key, value, "struct1", second row: id, content, "struct2"
When extracting the result with a Table Extractor Funtoid to the destination schema I am facing the problem that I always get a pair of <struct1> and <struct2> depending on the count of <struct1> in the source message. the values from <struct1>
are correct, the values from <struct2> are always repeating the first <struct2>...
so this is what I get as result:
<destinationMessage>
<struct>
<key>1</key>
<value>hello</value>
<source>struct1</source>
</struct>
<struct>
<key>4</key>
<value>world</value>
<source>struct2</source>
</struct>
<struct>
<key>2</key>
<value>hello</value>
<source>struct1</source>
</struct>
<struct>
<key>4</key>
<value>world</value>
<source>struct2</source>
</struct>
<struct>
<key>3</key>
<value>hello</value>
<source>struct1</source>
</struct>
<struct>
<key>4</key>
<value>world</value>
<source>struct2</source>
</struct>
</destinationMessage>
Any ideas of what I am doing wrong here? Any other ideas how to solve this?
Thanks in advance

Hi,
You can just use the Looping Functoid with the first parameter as "struct1" and second parameter as "struct2" and the output mapped to "struct". Rest of the links mapped one to one.
Map the struct1 node & struct2 node one by one to source in the destination schema with Source Link property as "Copy Name" for both links.
Hope this will help.
HTH,
Sumit
Sumit Verma - MCTS BizTalk 2006/2010 - Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

Similar Messages

  • Import 2 source fields into one destination field (appending entries)

    Dear forum members,
    In MDM Import Manager, is it possible to take 2 fields from the source file structure and map the values to the same destination lookup field, so both values are appended to the table for the same record?
    If so, can you provide detaiuls and considerations?
    I have been looking at partitions, but all I can do is create a single record in the lookup table consisting of both values combined.
    Many thanks,
    Nick

    Hi Alon,
    Yes the field I am testing with is called 'Hyperlink' of type 'Lookup [Qualified Flat] (multi-valued)'
    The field shows as type 'F' in the destination field pane.
    I do acrtually want to load to a different field eventually, but am just testing with this as it seems to be the riight type.
    The table I want to load to is the Hyperlinks table in SRM-MDM. It has the following structure in the console:
    Field Name        Field Type       Non-Qualifier / Qualifier
    Type                 (Lookup[flat])    Non-qualifier
    Mime Type        (Lookup[flat])    Qualifier
    URL                  (Text)              Qualifier
    URL Description (Text)              Qualifier
    In import manager, the fields available are:
    Hyperlink                                F    Lookup [Qualified Flat] (multi-valued)
    Mime Type <Hyperlink>           Q   Lookup [Flat]
    URL <Hyperlink>                     Q  Text[250]
    URL Description <Hyperlink>    Q  Text[250]
    Ultimately I am trying to map:
    1. Hyperlink          - a null source value to a fixed dest value of 'Link'
    2. Mime Type        - a null source value to a null dest value
    3. URL                  - 2 values from 2 fields in the source file to 2 (appended) entries
    4. URL Description - same 2 source values in the source file to 2 (appended) entries
    Unfortunately we cannot modify the hyperlinks table or use a different one as the fields will not be displayed properly in the catalogue view SRM requisitioners will have so I HAVE to use this table and these fields.
    What do you think?
    Thanks a lot,
    Nick

  • Source xml is in one field

    Hi all,
    How to do the mapping since all source xml is in one field. I am on PI 71 ehp1.
    Thanks Janos

    How to do the mapping since all source xml is in one field. I am on PI 71 ehp1
    Is your source structure something like:
    <SRC>
    <Filed1><Name>SAP</Name><Location>Germany</Location></Field>
    </SRC>
    i.e. an XML in one node and now you want to separate it into the relevant message structure in XI?
    If yes then follow the De-serialization logic as mentioned by Udo in this thread:
    Re: Changing XML message into a string
    Regards,
    Abhishek.

  • Query SQL code gets deleted after export to Excel. "Query must have at least one destination field"

    Hi all,
    I'm getting really frustrated by this Access error. It happens when I export the result of a query through an Access macro to Excel, the first time it runs well but the next time, there is a chance that the query won't run and the error "Query
    must have at least one destination field" will be displayed. After that, I try to check the query SQL code and discover the code has vanished. I'm using simple Select query without joins, only "where", "group by" and "order by"
    statements.
    Thank you in advance for your help,
    Jesus 
    Edit:
    One of these queries are like the following (all of them are of this type):
    SELECT Field1, field2, field3, field4, field5, Sum(Field6) AS SumOfField6, Sum(Field7) AS SumOfField7
    FROM Table1
    WHERE Field6 is not null
    GROUP BY Field1, field2, field3, field4, field5
    Order By Sum(Field6) desc

    Hi Peter, 
    Thank you for your response, I updated the original question with one of the codes.
    Thanks,
    Jesus

  • If my backup HD is not large enough, can Time Machine use more than one destination HD?

    Hi, I have about 0,8 Tb on my Mac + 0,9 Tb in an external HD + 2,5 Tb in another external HD.
    I have plenty of other HDs with 1-2 Tb that I could use as backup. Can I use them in Time Machine? Can Time Machine split all the data from my Mac and source HDs in more than one destination HD? I would love it if I could avoid buying large 6-10Tb HDs; they are still expensive... I'll appreciate your kind inputs!

    Technically, you could store parts of your backup on different drives, but it would require you to be constantly changing the items excluded. It is designed to be a single backup, which you can do the entire backup to more than one drive.

  • Mapping an XML structure into one field

    Make use of XSLT mapping (available on SDN...just search with CDATA...i think there is a new feature in PI7.1 (Copy XMl to subtree....something like that).
    Regards,
    Abhishek.

    Hi,
    Chk this:
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Re: Conversion of source XML structure to single string using PI 7.1
    Thanks
    Amit

  • Join two source tables and replicat into a target table with BLOB

    Hi,
    I am working on an integration to source transaction data from legacy application to ESB using GG.
    What I need to do is join two source tables (to de-normalize the area_id) to form the transaction detail, then transform by concatenate the transaction detail fields into a value only CSV, replicate it on the target ESB IN_DATA table's BLOB content field.
    Based on what I had researched, lookup by join two source tables require SQLEXEC, which doesn't support BLOB.
    What alternatives are there and what GG recommend in such use case?
    Any helpful advice is much appreciated.
    thanks,
    Xiaocun

    Xiaocun,
    Not sure what you're data looks like but it's possible the the comma separated value (CSV) requirement may be solved by something like this in your MAP statement:
    colmap (usedefaults,
    my_blob = @STRCAT (col02, ",", col03, ",", col04)
    Since this is not 1:1 you'll be using a sourcedefs file, which is nice because it will do the datatype conversion for you under the covers (also a nice trick when migrating long raws to blobs). So col02 can be varchar2, col03 a number, and col04 a clob and they'll convert in real-time.
    Mapping two tables to one is simple enough with two MAP statements, the harder challenge is joining operations from separate transactions because OGG is operation based and doesn't work on aggregates. It's possible you could end up using a combination of built in parameters and funcations with SQLEXEC and SQL/PL/SQL for more complicated scenarios, all depending on the design of the target table. But you have several scenarios to address.
    For example, is the target table really a history table or are you actually going to delete from it? If just the child is deleted but you don't want to delete the whole row yet, you may want to use NOCOMPRESSDELETES & UPDATEDELETES and COLMAP a new flag column to denote it was deleted. It's likely that the insert on the child may really mean an update to the target (see UPDATEINSERTS).
    If you need to update the LOB by appending or prepending new data then that's going to require some custom work, staging tables and a looping script, or a user exit.
    Some parameters you may want to become familiar with if not already:
    COLS | COLSEXCEPT
    COLMAP
    OVERRIDEDUPS
    INSERTDELETES
    INSERTMISSINGUPDATES
    INSERTUPDATES
    GETDELETES | IGNOREDELETES
    GETINSERTS | IGNOREINSERTS
    GETUPDATES | IGNOREUPDATES
    Good luck,
    -joe

  • XML structure - mapping one Oracle column to many XML attributes

    Hi,
    I need to insert data into EMP table reading from xml file and this is how the file would look like....
    <?xml version='1.0'?>
    <ROWSET>
    <ROW num="1">
    <EMPLOYEE_ID>7369</EMPLOYEE_ID>
    <LAST_NAME>Smith</LAST_NAME>
    <FIRST_NAME>JOHN</FIRST_NAME>
    <PHONE> 905000123</PHONE>
    <PHONE> 905000456</PHONE>
    <PHONE> 905000789</PHONE> ...... n
    (There could be many phone numbers in the xml file and I need to concatenate all the numbers and insert in the PHONE column of emp table)
    <SALARY>800</SALARY>
    </ROW>
    <!-- additional rows ... -->
    </ROWSET>
    I am new to XML and would to know the set of lines required to read the data from xml and insert into EMP table. All this is for Oracle 10g R2.
    Please let me know solution using XSU if possible.

    Hi,
    Chk this:
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Re: Conversion of source XML structure to single string using PI 7.1
    Thanks
    Amit

  • Mergeing files of same structure to one file without BPM

    Hi XI Gurus,
                    I want to merge various xml files having same structures(coming as separate files in source directory) to a one file. I want to do it without using BPM.I need this Final structure as an  input to another scenario to post an idoc.
    e.g -->
    <i>File1</i>:
    <AR_Posting>
         <currency_line_item>1<currency_line_item>
         <tax_line_item>2<tax_line_item>
          <customer_line_item>3<customer_line_item>
    <AR_Posting>
    <i>File 2</i>:
    <AR_Posting>
         <currency_line_item>11<currency_line_item>
         <tax_line_item>22<tax_line_item>
          <customer_line_item>33<customer_line_item>
    <AR_Posting>
    <i>File 3</i> :
    <AR_Posting>
         <currency_line_item>111<currency_line_item>
         <tax_line_item>222<tax_line_item>
          <customer_line_item>333<customer_line_item>
    <AR_Posting>
    Target:
    <Recordset>
          <AR_Posting>
             <currency_line_item>1<currency_line_item>
             <tax_line_item>2<tax_line_item>
             <customer_line_item>3<customer_line_item>
         <AR_Posting>
           <AR_Posting>
               <currency_line_item>11<currency_line_item>
               <tax_line_item>22<tax_line_item>
               <customer_line_item>33<customer_line_item>
          <AR_Posting>
          <AR_Posting>
              <currency_line_item>111<currency_line_item>
              <tax_line_item>222<tax_line_item>
              <customer_line_item>333<customer_line_item>
         <AR_Posting>
    <Recordset>
    Please suggest any solution to achieve this.

    Hi Anurag,,
    I guess what Sumit is aiming for, is that if you don't want to use a BPM you will need a two step solution.
    Step one:
    If the different files have the same structure, read them with a sending file adapter and route the to an receiving file adapter which appends all messages to a new combined file.
    Step two:
    Read the new combined file with a sending file adapter and route the messages to your target interface.
    This approach of-course means that you can not do any correlations as you can in BPM. I.e. you will not "know" when all three files have arrived but just simply read the combined files at certain times and pick-up whatever content it holds.
    rgds Johan

  • How we can import an IDOC structure from one SAP system to another

    Hi Gurus,
    How we can import an IDOC structure from one SAP system to another? If we're using ALE, how can we do that? Please can someone give me the process and necessary t codes.
    Any response will be awarded!
    Thanks a lot.
    Samson

    hi!
    Define the logical system names in both the systems.
    Logical system names :SAP001
    SAP002
    SAP001 FOR 001 CLIENT
    SAP002 FOR 002 CLIENT
    These two logical system definitions should be present in both the systems.
    Assign the logical systems to the client. (in both the systems)
    Assign SAP001 to 001 CLIENT
    Assign SAP002 to 002 CLIENT
    you can See these in transaction SALE.
    After this define the rfc DESTINATION IN sm59. (in both the systems)
    In 001 client create the RFC destination name SAP002
    In the tab log on security, give the user name and password and client of the 002 client and save it.
    Similarly do the reverse in the 002 Client.
    In 001 client create the port.(Transaction WE21)
    Specify the RFC destination name as SAP002.
    Now you can define the ports, (both the systems)
    Create the partner profile for partner(ie gve logical system name of partner) , so give as SAP002.
    partner profile in both the systems.
    Now create the distribution model in BD64 and goto edit>model view>distribute.
    The same model view will be visible n distributed to the partner system also..which in this case is sap002.
    U may trigger the idoc from we19 and chk its status in we05.
    Please let me know if you need further info on this.

  • How to join multiple source tables and do lookup?

    I have a requirement to load a target table by joining 4 source tables. Also I have to do a lookup on a domain table to transform codes and check for nulls. What will be the best approach to load the target table?
    Is it possible to do it in one interface or do I need to build multiple interfaces to achive this?
    My source and target database both are oracle and I am planing to use Oracle Incremental Update Merge.
    Thank you

    You are in the right direction by creating one interface for this transformation.
    You will need to drag drop 4 source tables + the lookup table on the Sources window of Interface and then make appropriate joins.
    Also, check for NULLS in the transformation. Depends what you want to do with the NULLS. If you want to ignore them, use a filter.
    If you want them to error out, use a constraint.
    If you want to convert them, use NVL
    Start with Oracle Incremental Update and once successful, use Oracle Incremental Update MERGE.

  • Compare dates coming form Source system & update higher one in target syste

    hi all,
             Mt reqt is to compare dates coming from source system & update highere one
    Ex--) E1EDP01 has been repeated 3 times in Idoc segemnt E1EDP20 , then date with higher one need to be updated in target system
    like 14/12/08
          15/12/08
          16/12/08
    Here 16/12/08 need to be updated first & then the other ones one by one.
    Anybody guide me in comparing these dates functionality .
    Send me the code !
    Regards
    Chaithanya

    Hi Michael,
                     I was unable to trace the exact issue of how to track  E1EDP01 Dates & compare it.
    I had created UDF to compare dates coming from E1EDP01 Segment
    following is my code --->
    // This UDF return 1 value for highest date and 0 for not highest date.
    DateFormat mydateformat = new SimpleDateFormat("ddMMyyyy");
    Date mydate1 = null;
    Date heightDt = null;
    for (int i=0; i <a.length; i++)
      if (a<i>.equals(ResultList.CC)) continue;
      try{
         mydate1 = mydateformat.parse(a<i>);
         if (i==0)
          heightDt  = mydateformat.parse(a<i>);
         if  (heightDt .before(mydate1))
         heightDt  = mydate1;
    catch(Exception e){}
    //result.addValue(  mydateformat.format(heightDt));
    for (int i=0; i <a.length; i++)
    try{
    mydate1 = mydateformat.parse(a<i>);
    if  (heightDt .equals(mydate1))
    result.addValue( "1");
    else
    result.addValue( "0");
    catch(Exception e){}
    My Problem here is in my Idoc if there are  Multiple E1EDP20 segments & here date would be repeated 4 times . I have to compare highest date out of 4 & send it to the target system.
    which I have done it, but here my problem is  the segment E1EDP01 is repeated & iam unable to find highest date individually to the node level.
    Sorry I should have explained this before only.
    Can Anyone guide me in comparing the date at segment level.
    Regards
    Chaithanya

  • How do I join multiple (short) audio clips into one single long audio clip in Premiere Pro CS5?

    Hello,
    The question is in the title but I'm wondering how I can join multiple (short) audio clips into one single long audio clip in PP CS5.5.  I put all my short clips right next to each other and selected all of them to see what options are available by right clicking and using the toolbar options at the top.  The closest that I got was to nest the sequence, but that's not what I really want.
    I'd like to merge all the short clips into one single (long) audio file to use under the video.
    Thoughts are welcome and  greatly appreciated.
    Thanks,
    -Melvin

    O.K. This is kind of fundamental and you will need to learn up on this fully ...but for now...
    Make sure you have the WAB ( work area bar )covering the length of the audio clips. ( You do not need to select them)
    Go to the File Menu> Export Media
    You will be given all the Export Options.  Choose Wave File
    Select option for Export Work Area.
    Choose where to export the file to ( HD location)
    follow your nose from there....
    http://tv.adobe.com/watch/learn-premiere-pro-cs5/exporting-with-adobe-media-encoder/
    BTW - Why are you taking the audio to Audition anyway? What are you going to do to it.

  • Key Figures in Joined Data Source

    Hello,
    I have created some Key Figures for the Data Source "Sales Order Item". Reports based on this Data Source are working fine and also my Key Figures are displaying the right results.
    Now I want to create a Joined Data Source (Left Outer Join) with the Sales Order Item and Outbound Delivery Detail Line Items. The problem I have here is, that my own Key Figures based on Sales Order Item are not showing up in the list and I cannot select them.
    Does anyone know why? Do I have to create the same Key Figures again and again as soon as I want to join the Sales Order Item Data Source with any other Data Source?
    Thanks for any feedback.

    Key figure are not available in joining Data Sources, Characteristics of same type from different Data Source data element available in joining scenario.
    Regards
    Naveen

  • Multiple 'logical joins' between a fact table and one dimension table

    It appears that one cannot create multiple ‘logical joins’ between a fact table and one dimension table in OBIEE using the Oracle BI Administration Tool. For example, considering a Business Model with a dimension table TIMES and a fact table FACT containing START_TIME and END_TIME, we would like to create separate logical joins from FACT to TIMES for the START_TIMEs and END_TIMEs? Obviously, the underlying foreign keys can be created, but as far as I can tell the Oracle BI Administration Tool doesn’t support this. The workaround would be to replicate the TIMES table, but that’s ugly.
    I seek an alternative approach.

    Try this. Create an two aliases for the TIMES dimension (Start & End) in the Physical Layer and then remove foreign key to the "Parent" Times dimension. Create the Foreign Key in the Physical Layer to the new aliases and then create the complex joins in the BMM Layer to the new aliases as well. This will allow you to present both dates within the same table in the Presentation Layer. Not the most elegant solution but it works.

Maybe you are looking for