Biztalk Map: Map repeating structures into a single node

Simple one for the experts. I have the following two samples. Can somebody please guide me on how to achieve my output? Just a caveat. The Errorlist may or may not have errors in which case just an empty tag should suffice.
Input
<Detail Att1="a">
<Value1>Test</Value1>
<Value2>Test2</Value2>
<ErrorList>
<Error>Error_0</Error>
<Error>Error_1</Error>
<Error>Error_2</Error>
</ErrorList>
</Detail>
Output1: Could be one or more xmls depending on the number of errors
<Detail Att1="a">
<Value1>Test</Value1>
<Value2>Test2</Value2>
<Error>Error_0</Error>
</Detail>
<Detail Att1="a">
<Value1>Test</Value1>
<Value2>Test2</Value2>
<Error>Error_1</Error>
</Detail>
<Detail Att1="a">
<Value1>Test</Value1>
<Value2>Test2</Value2>
<Error>Error_2</Error>
</Detail>
Output 2: Concatenation of errors using a suitable delimiter (I used pipe..pls suggest)
<Detail Att1="a">
<Value1>Test</Value1>
<Value2>Test2</Value2>
<Error>Error_0 | Error_1 | Error_2</Error>
</Detail>
Thanks

Hello ZIntegrator,
for your second output case, you can build map like below . since error can occur zero or more times, make sure you set the "Error" element  max occurs property to unbounded and Min occurs to 0 in the input schema.
so just drop String concatenation and cumulative concatenation functiods like above.
and for String concatenation, supply second parameter as the character pipe  "|".  that's it, it should work.
And coming to your first output case, as per your input you have 3 error cases. so do you want to create 3 different xml messages?
please note that a map can only output one message (of course we can create more than one using transform shape in orchestration, that is different case).
if you want seperate xml documents to be generated for each error, then normal mapping cannot work. 
Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Problem in work flow of PE while mapping 2 source structure into 1 target

    We have scenario in BPM where in we have to mapp 2 source structure's into target.
    To be more specific one structure occurance is 0 to unbounded and other one is of single occurance.
    We have done the mapping with target structure and tested it manually in mapping . its working fine..
    While testing it in Configuration scenario, In the workflow process i.e PE process flow, we were not able to get one of the source message structure as the input Message. Instead of two source messages, it is seen only one. Please guide us in this issue.

    actually we are receiving only one message, henece we do not need a correleation. But once we receive this message we are splitting into multiple messages in the transformation step. and we use these split messages in different transformation steps. but in one of the transformation steps we are unable see one of the split messages in the transformation step(though we have used the proper container element.). Please let me know if any ideas on this.

  • How can I map last of the repeating records into a single record?

    I have a following input schema, I need to take only one of the <Student> records and map that to a single record in output. Doesn't matter if the first, second or last one of the records get mapped, I only need one in the output. Any idea how can
    this be accomplished?
    Input:
      <Students>
        <Student id="1">
            <Name>
              A
            </Name>
            <Roll>
              1
            </Roll>
        </Student>
          <Student id="2">
            <Name>
              A
            </Name>
            <Roll>
              1
            </Roll>
        </Student>
        <Student id="3">
            <Name>
              A
            </Name>
            <Roll>
              1
            </Roll>
        </Student>
      </Students>
    Expected Output:
    <Candidate>
      <Student>
        <Name>
           A
        </Name>
      </Student>
    </Candidate>

    Sounds rather complex for something that could be done very simple in custom XSLT like this:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="Students">
    <Candidate>
    <Student>
    <Name>
    <xsl:value-of select="Student/Name" />
    </Name>
    </Student>
    </Candidate>
    </xsl:template>
    </xsl:stylesheet>
    Morten la Cour

  • 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

  • Mapping 2 source structures to a single target database

    Hi Experts, My scenario is a Proxy to JDBC in which I need to send data from 2 source structures to 1 target table.
    Source structures :                                           Target:
    ABC                                                                 XYZ
      row1                                                                 InsertStatement
        Item1                                                                  DBTable
                                                                        Action
       (Fields)                                                     Table
                                                                                    acess
    DEF                                                                              -
      row2                                                                          -
       item2                                                                         -
      (Fields)
    (Fields)
    Please let me know how to map the 2 source nodes to the target access node to transfer data from the source tables to target database.
    Regards,
    Krishna

    You should make use of BPM to collect the two source structures.
    One of the BPM examples mentioned in IR --> SAP BASIS ---> SystemPatterns can be referred for this purpose.
    Once the messages are collected, perform a 2:1 mapping (two Proxies as source message and one JDBC message as target).
    If you want the mapping logic then please provide a proper format of both your Source and Target messages and the expected mapping, so that someone from SDN can help you out.
    The target structure provided is a bit confusing.
    Are you going to receive two different proxy messages (i.e. two different calls) or just one Proxy call and there you will have two different nodes within the same message??? ...... me confused
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Sep 25, 2009 11:51 AM

  • Mapping of repeating structure to nested structure

    Hi I have a mapping issue.
    My Data type look like this
    MT_RcicRecords
    -TRNH  1-1
    -RECH  0-Unb
    -RECL  0-Unb
    -ENDT  0-Unb
    -TRLR  1-1
    In above structure pattern of RECH, RECL and ENDT can occur multiple type.
    My output after File content conversion look like
    <ns:MT_RcicRecords xmlns:ns="urn:amgen-com:pts:rcic">
         <TRNH>
              <RECORD_ID>TRNH</RECORD_ID>
         </TRNH>
         <RECH>
              <RECORD_ID>RECH</RECORD_ID>
              <ACTION>C</ACTION>
         </RECH>
         <RECL>
              <RECORD_ID>RECL</RECORD_ID>
              <ACTION>C</ACTION>
         </RECL>
         <ENDT>
              <RECORD_ID>ENDT</RECORD_ID>
              <COMP_CODE>EL</COMP_CODE>
         </ENDT>
         <RECH>
              <RECORD_ID>RECH</RECORD_ID>
              <ACTION>C</ACTION>
         </RECH>
         <RECL>
              <RECORD_ID>RECL</RECORD_ID>
              <ACTION>C</ACTION>
         </RECL>
         <ENDT>
              <RECORD_ID>ENDT</RECORD_ID>
              <COMP_CODE>EL</COMP_CODE>
         </ENDT>
         <TRLR>
              <RECORD_ID>TRLR</RECORD_ID>
         </TRLR>
    </ns:MT_RcicRecords>
    Now i want to map this to another data type whose structure is as follows
    MT_RcicRecords_temp
    -TRNH  1-1
    -RCIC  0-Unb
    --RECH  0-Unb
    --RECL  0-Unb
    --ENDT  0-Unb
    -TRLR  1-1
    I want to map earlier data in such way that for each pattern of RECH,RECL and ENDT there should be corresponding RCIC node created in target structure.
    Any help

    Hi,
    You can use the graphical node function useOneAsMany to solve this. The node, <RCIC> need to occur atleast once in the source.
    This function, generates a particular number of nodes n number of times, depending on the inputs you give to the function.
    If this node is not present in the source and you need to create it in the target, you would have to use xslt mapping.
    Regards,
    Smitha.

  • Message mapping - Map 2 source contexts into one target context

    Hi,
    I have an issue as follows:
    Source context 1 (defined as 1.....unbounded)
    Source context 2 (defined as 1.....unbounded)
    Target context 1 (defined as 1.....unbounded)
    I need to map both source contexts into the single target contexts.
    For example....
    Source context 1 has 3 entries
    Source context 2 has 2 entries
    Target context would have 5 entries in total (Source context 1 and Source context 2)
    I have only limited knowledge of working with multiple contexts so need a bit of advice.
    Can someone provide an easy way to do this ? I'm sure there is.
    Cheers
    Colin.

    The answer is quite simple.
    Right-click on the target node in the mapping editor and select the option "duplicate subtree".
    You will then have two destination nodes.
    Now you can map source1 to target1 and source2 to target2

  • BizTalk Mapper - Looping multiple nodes to map to a single node in a single row (flat file)

    Hi everybody,
    I'm still new in developing BizTalk app and require some help in this one problem. Appreciate your time and input to help me on this.
    Basically I have an XML document as input and a flat file as output. Example for input is as per below. The "Contact" node's maxOccurs here is set to unbounded and could be multiple. (phone, fax, website, telex ...)
    <root>
    <CustomerName>Company A</CustomerName>
    <Contact>
    <Type>Phone</Type>
    <Locator>03566789</Locator>
    <Type>Phone</Type>
    <Locator>03566790</Locator>
    <Type>Fax</Type>
    <Locator>03566795</Locator>
    <Type>Telex</Type>
    <Locator>03566798</Locator>
    <Type>Website</Type>
    <Locator>www.companyA.com</Locator>
    </Contact>
    </root>
    The expected output in XML would look like below. The final outcome would be a csv file. Strictly Phone 1, phone 2, fax and telex, the rest would be ignored.
    <root>
    <CustomerName>Company A</CustomerName>
    <Phone1>03566789</Phone1>
    <Phone2>03566790</Phone2>
    <Fax>03566795</Fax>
    <Telex>03566798</Telex>
    </root>
    Example of expected output result (csv file): CompanyName;Phone1;Phone2;Fax;Telex;
    In our case here: Company A;03566789;03566790;03566795;03566798;
    Another example could be: Company B;036778911;;036778912;; if only 1 phone number and 1 fax number provided.
    I've used Table Looping and Table Extractor and nearly got the desired result except that it is represented in multiple rows instead of one: Example:
    Company A;03566789;;;
    Company A;;03566790;;;
    Company A;;;03566795;;
    Company A;;;;03566798;
    Any idea how to do the mapping? I'm kind of stuck here and it sounds like an easy problem but i could not find any example to the solution that I need here. Table looping and table extractor is ok to map from single node flat file to multiple nodes but not
    the reverse like in this example.
    rgds,
    sportivo

    Hi,
    Please refer to below links where similar issue has been answered.
    http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecdff241-6795-4a95-bad7-48fca4410dfb
    http://www.epinaki.com/2011/05/other-options-to-using-biztalk-table-looping-functoid-par-i/
    I hope this helps you.
    Thanks With Regards,
    Shailesh Kawade
    MCTS BizTalk Server
    Please Mark This As Answer If This Helps You.
    http://shaileshbiztalk.blogspot.com/

  • How to map multiple source structures to single target structure

    Hi all,
    I have the scenario of 2 input files so i am using BPM for it. I have created the message types of the 3 input files. I have to finally generate an XML file which will contain the data of all the 2 files. That is i have to do 3:1 mapping.
    Source Structure of File 1:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>CUSTOMER</u>
       <i><b>REF_NO</b></i>
       <i><b>CUSTOMER_NO</b></i>
    Source Structure of File 2:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>METER</u>
       <i><b>REF_NO
       METER_NO</b></i>
    Target Structure of Final Output File:
    <b>DT_PWC_CustomerMeterData</b>
    <i>RECORDSET</i>
      <u>CUSTOMER_METER</u>
       <i><b>REF_NO
       CUSTOMER_NO
       METER_NO</b></i>
    Above nodes i have shown in a heirarchical order..nodes with same indentation are at same level.
    Can anybody tell me how to do this mapping in IR in graphical editor.
    RAJEEV GUPTA

    Hi,
    To elaborate my requirement, I want to tell that since i will be having 2 input files- one for Customer & one for Meter. I want to finally generate one XML file which will have data from both these 2 input files. That is, if Customer file has 3 records(3 REF_NO, 3 CUSTOMER_NO) and Meter file has 4 records(4 REF_NO, 4 METER_NO), the final output XML file  will   have 7 records(7 REF_NO, 3 CUSTOMER_NO,4 METER_NO).
    Thanks,
    Rajeev Gupta

  • Message mapping---1 source structure and n target structures

    I would like to know how many message mappings we need if we are mapping one source structure to 3 different target structures of a single receiver. I am assuming its just one message mapping.
    Depending on the above answer how many interface mappings do we need.

    Kalyan,
    you need multi-mapping that maps one source structure to multiple target structures. Just search multi mapping in SDN and you will find many good posts.
    Basically, in MM editor, go to signature tab and in the target messages add additional message types. Simple.  --> Only one MM and one IM
    Jayson

  • Mapping from repeating header to unique headers.

    Dear experts,
    I would like to map a repeating segment of an Idoc structure to 5 segments with each different names of the target structure. The underlying fieldnames are identical. Ofcourse the number of segments in the source structure is 1, with cardinality 0...9999. Can you please advice on how to do this. (The other way around I could just use "duplicate subtree" to match the number of segments.)
    Example:
    <headerA>
    <item>.....</item>
    <item2>.....</item2>
    </headerA>
    <headerA>
    <item>.....</item>
    <item2>.....</item2>
    </headerA>
    <headerA>
    <item>.....</item>
    <item2>.....</item2>
    </headerA>
    Target structure:
    <headerA>
    <item>.....</item>
    <item2>.....</item2>
    </headerA>
    <headerB>
    <item>.....</item>
    <item2>.....</item2>
    </headerB>
    <headerC>
    <item>.....</item>
    <item2>.....</item2>
    </headerC>
    Thanks in advance!
    Will reward points!

    Hi,
    You can do this only with JAVA or ABAP-mapping.
    Regards Mario
    Sample with dom4j:
    results = document.selectNodes("//header");
              int i = 0;
              for (Iterator iter = results.iterator(); iter.hasNext();) {
                   Node node = (Node) iter.next();
                   node.setName("header"+i);
                   i++;
                   System.out.println(node.getName());

  • Mapping of enterprise structure

    Dear Experts,
                 Right now i am doing implementation project in aluminium metal plant.Now we are in the 2nd phase of the project.So i have to map the enterprise structure of the plant.
               There are main 5 departments in the plant GAP,BAKE OVEN,RODDING,POTROOM,CASTING.Here all the departments finished products are interrelated,like GAP finished goods will go to BAKE OVEN. BAKE OVEN finished goods will go to RODDING.RODDING finihed goods will move to POTROOM.POTROOM molten metal will move to CASTHOUSE,and finally metal from CASTHOUSE will go to customers.
             So here how can i map this scenario, like i have to create 5 plants for 5 departments or 5 sections?
    Regards,
    Prashantha

    Greetings Prashantha,
    You need to approach this from a functional perspective. Define what is the Plant in SAP. A Plant is a location, which has an address, a language, time zone etc. and for this Plant the maintenance is planned as a whole on some level. Many configurations in PM are done on Plant level. Also, note that the Material Master data is maintained on Plant level.
    So taking this all into account, consider whether those elements are different for the 5 Departments you mention? I would venture a guess "no". Your departments will have distinct Functional Location hierarchy branches, distinct Planner Groups, their own Work Centres, perhaps their own Storage Locations, but I assume they will have the same processes, the same Company Code, the same high-level Maintenance Planning Plant, the same Order Types. So it is probably reasonable to use Plant Sections, Planner Groups etc. to differentiate below the Plant level.
    But of course, this is dependent on your business and how it is organised.

  • How do I import Map Info Tab files into Spatial for a map of europe?

    How do I import Map Info Tab files into Spatial for a map of europe via FME and have oracle spatial draw the map without problems?
    So far I've got to the stage where I can import the data, spatially index it (in oracle 9i) and get my SVG (scaleable vector graphics) application to view the map.
    The problem is that countries that have more than one polygon (more than one row in the database) do not draw properly.
    When I view the Map Info tab file in the FME viewer I can see that the data is fine, but I can also see that some of the polygons used to draw a country are donugts and some aren't.
    This seems to cause a problem when I import the data into oracle spatial as I don't know if a row in the table needs to be inserted as an independent SDO_GEOMETRY or if it should form part of a larger SDO_GEOMETRY (as in 2 or more rows make up the polygon shape for a country).
    I have a feeling that I'm not using FME correctly, because at the moment I have to import the tab file into Oracle then re-insert the data into a spatially formatted table (one with a spatial index) - I get the impression that FME should do that for me but as I'm new to this I don't really know.
    Any Help welcome :|
    Tim

    Tim,
    MapInfo has a free utility called EasyLoader that allows you to upload a table directly to Oracle. EasyLoader creates the geometries and spatial index. You can download it free from http://www.mapinfo.com/products/download.cfm?ProductID=1044
    Andy Greis
    CompuTech Inc.

  • How to enhance the length of standard UI element which maps to DDIC structure?

    Dear Webdynpro Expert,
    I got a requirement to enhance the length of UI element which maps to DDIC structure attribute. I have tried by using
    View Enhancement by hiding the standard UI element,
    Adding the required field in the standard structure through append structure,
    mapping the appended structure field to the UI element.
    But it shows error as data compatibility.
    Can you please share some light on it.
    Thanks.

    Hi Mohsin,
    When and where are you getting this data compatibility error???
    Try to create a new context attribute and add your new DE.
    BR,
    RAM.

  • Graphical mapping issue, repeated lines are not populating

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

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

Maybe you are looking for

  • Need to run 2 diffrent payrolls at a time

    Hi, We have an interesting scenario in which we need to run 2 different payrolls at a time, As this project is  for an Government organization we were till now running only one payroll which was 4th pay commission, but now the client wants the payrol

  • How to move all or partial data from Mac to an external hard disk?

    Hei, I need to learn how to move the movies/projects/events from mac hard drive to another external hard drive. So basically, I have always imported all events from my video camera (the original clips) to iMovie located in my MacBook Pro hard drive.

  • Copy and pasting Arabic script

    Hi there.. I have a pdf file which contains Arabic script. When I copy and paste the Arabic script I get boxes with alien faces in them. the file can be found here http://www.kalamullah.com/Books/ArabicTutor-VolumeOne.pdf Any help will be much much a

  • Spell checking English and French documents

    Hello I have Pages 3.0.2 I write in English and in French and I was not able to find where you can specify the language used in the document so it is spelled correctly Thanks in advance for your help Best Cyril

  • Wikis Webclip icon

    I use a profilemanager to create a Webclip of my Wikis, changes the icon according the my needs. When the profile pushed to ipads, the icon is fine. But after i entered the webclip to see the web, then it changes to Wikis icon. I want to know why and