BizTalk Mapping

Home Page Forums BizTalk 2004 – BizTalk 2010 BizTalk Mapping

Viewing 1 reply thread
  • Author
    Posts
    • #26405

      Hi Guys,

       

      Hope everyone is doing good.

      have a question here…I am mapping the flatfile(CSV) to XML. my flat file looks below

      transid transname custname transcode, transamount

      1,trans1,transname1,custname1,A,10.00

      2,trans2,transname2,custname2,B,20.00

      2,trans2,transname2,custname2,C,30.00

      2,trans2,transname2,custname2,D,40.00

       

      If transid is same, have to repeat only transcode and transamount only like below.   So it means,if the transid is same for three rows, transid, transname, custname should come only once and transcode and transamount should be repeating. Please help me in this.

      <transactions>

             <transaction>

                          <1>

                         <trans1>

                         <transname1>

                          <custname1>

                                    <transactiondetails>

                                            <A>

                                            <10.00>

                                    <transactiondetails>

                  <transaction>

                  <transaction>

                           <2>

                            <transname2>

                            <custname2>

                                       <transactiondetails>

                                              <B>

                                              <20.00>

                                      </transactiondetails>

                                      <transactiondetails>

                                              <c>

                                              <30.00>

                                       </transctiondetails>

                                       <transactiondetails>

                                                <c>

                                                 <40.00>

                                        <transactiondetails>

                       <transaction>

      <transactions>

       

      Thanks

      jith

       

       

    • #26406

      This depends on whether the transid is fixed i.e. only ever 1 or 2.

      If this number is variable then the FlatFile disassembler cannot group the records.And you will need disasemble to a flat Xml and then use a map to group transactions.

      • #26407

        TransId is varaible and I am doing the same right now i.e., I have a flat xml schema and I am mapping the flat file to this flat xml. . But I am stuck up in mapping this flat xml to real request and what functiods to use in order to map only certain elements needs to be repeatable…

        • #26408

          The conversion of Flat File to Xml is called disassembly. Mapping is the conversion of one Xml message to another

          In order to produce your desired Xml output you will need to group records based  key. I know of no way to do this using functoids.

          It can be done simply with a custom Xslt using Muenchian grouping

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.