How to map a deep xml structure to flat structure

Hi, I'm trying to map a deep xml structure to a flat file structure. See this:
<SalesPoint>
         <header>
              <idTx></idTx>
              <opCode></opCode>
         </header>
         <body>
          <DataSet>
               <codOperacion></codOperacion>
               <codCanalDeVenta></codCanalDeVenta>
               <cuitDeposito>
               <docMinorista>
               <fechaOperacion>
               <codCC>
               <Details>
                     <Dato>
                                    <nroSerieEquipo></nroSerieEquipo>
                        <codNMU></codNMU>
                        <codOrigenEquipo></codOrigenEquipo>
                        <codConcepto></codConcepto>
                         <codSegmento></codSegmento>
                        <motivoSiniestro></motivoSiniestro>
                     </Dato>
               </Details>
          </DataSet>
         </body>
</SalesPoint>
to:
<SalesPoint>
        <idTx></idTx>
        <opCode></opCode>
     <codOperacion></codOperacion>
     <codCanalDeVenta></codCanalDeVenta>
     <cuitDeposito></cuitDeposito>
     <docMinorista></docMinorista>
     <fechaOperacion></fechaOperacion>
     <codCC></codCC>
        <nroSerieEquipo></nroSerieEquipo>
        <codNMU></codNMU>
     <codOrigenEquipo></codOrigenEquipo>
     <codConcepto></codConcepto>
     <codSegmento></codSegmento>
     <motivoSiniestro></motivoSiniestro>
</SalesPoint>
Thanks in advance!!!!

I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
VJ

Similar Messages

  • Conversion of hierarchy structure to flat structure

    Hi Gurus,
    I am mapping a multi node XML structure to flat structure to create the JDBC statements to Oracle database. I think JDBC DML statement can have only flat structure.
    Now how to convert the incoming multi node xml file to several flat structures?
    Can I map the multi node XML structure to jdbc structure?
    Please help me this is critical.
    Thanks
    Kalyan

    Chilla,
    Thanks for the post. My source structure is as below. I have to map this one to flat structure for JDBC. For each customer_num, drop_point there are many customer brands. Now with the customer number and drop point, we have to create the flat structure for each customer brand.
    <?xml version="1.0" encoding="UTF-8" ?>
    <record>
    <CUSTOMER_NUM>00140084000</CUSTOMER_NUM>
    <DROP_POINT>00140084000</DROP_POINT>
    <CUSTOMER_BRANDS>
           <BRAND_CODE>23258</BRAND_CODE>
           <BRAND_EFF_DATE>20060617</BRAND_EFF_DATE>
           <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
           <FREIGHT_CODE>2</FREIGHT_CODE>
           <BRAND_STATUS>00</BRAND_STATUS>
           <INVOICE_UOM />
           <CREATION_DATE />
          <TRANS_LOCATION_CD>272</TRANS_LOCATION_CD>
          <TRANS_FAC_TYPE_CD>058</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>23265</BRAND_CODE>
    <BRAND_EFF_DATE>20060617</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>2</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM />
    <CREATION_DATE />
    <TRANS_LOCATION_CD>272</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>058</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>23365</BRAND_CODE>
    <BRAND_EFF_DATE>20010901</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>2</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM />
    <CREATION_DATE />
    <TRANS_LOCATION_CD>272</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>058</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>23531</BRAND_CODE>
    <BRAND_EFF_DATE>20050210</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>2</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM />
    <CREATION_DATE />
    <TRANS_LOCATION_CD>272</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>058</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>97335</BRAND_CODE>
    <BRAND_EFF_DATE>20070217</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>3</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM>01</INVOICE_UOM>
    <CREATION_DATE />
    <TRANS_LOCATION_CD>420</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>New</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>99448</BRAND_CODE>
    <BRAND_EFF_DATE>20070217</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>3</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM>01</INVOICE_UOM>
    <CREATION_DATE />
    <TRANS_LOCATION_CD>4</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>New</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>97337</BRAND_CODE>
    <BRAND_EFF_DATE>20070217</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>3</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM>01</INVOICE_UOM>
    <CREATION_DATE />
    <TRANS_LOCATION_CD>4</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>New</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>99471</BRAND_CODE>
    <BRAND_EFF_DATE>20070217</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>3</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM>01</INVOICE_UOM>
    <CREATION_DATE />
    <TRANS_LOCATION_CD>12</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>New</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>97234</BRAND_CODE>
    <BRAND_EFF_DATE>20070217</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>3</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM>01</INVOICE_UOM>
    <CREATION_DATE />
    <TRANS_LOCATION_CD>11</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>New</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <CUSTOMER_BRANDS>
    <BRAND_CODE>94771</BRAND_CODE>
    <BRAND_EFF_DATE>20070217</BRAND_EFF_DATE>
    <BRAND_CAN_DATE>99991231</BRAND_CAN_DATE>
    <FREIGHT_CODE>3</FREIGHT_CODE>
    <BRAND_STATUS>00</BRAND_STATUS>
    <INVOICE_UOM>01</INVOICE_UOM>
    <CREATION_DATE />
    <TRANS_LOCATION_CD>120</TRANS_LOCATION_CD>
    <TRANS_FAC_TYPE_CD>New</TRANS_FAC_TYPE_CD>
    </CUSTOMER_BRANDS>
    <SALES_TERMS_CODE />
    <ACTION />
    <REC_STATUS />
    </record>

  • Problem Mapping Deep Structure to Flat Structure

    Hello,
    I hope someone can help me.  My scenario is idoc to file.  I am collecting many idocs with a bpm and writing them out to one file.  My bpm is working great, but my mapping program is not working properly.  My source message is a deep structure and my target message is a flat structure. 
    See my example message formats below.
    Source message:
    zmessage (1..1)
    +zidocmessage (0..unbounded)
    ++zidoc       (1..1)
    +++zidocheader (1..1)
    ++++zidocitem  (0..unbounded)
    Target Message:
    zmessage (1..1)
    +zfilemessage   (1..1)
    ++zfilefirstrec (1..1)
    ++zfileheader (1..unbounded)
    ++zfileitem   (1..unbounded)
    I need to map zidocheader to zfileheader and zidocitem to zfileitem. 
    The Source Data:
    <zmessage>
      <zidocmessage>
        <zidoc>
          <zidocheader>
             <hfield1>hf1</hfield1>
             <hfield2>hf2</hfield2>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
          </zidocheader>
        </idoc>
      <zidocmessage>
        <zidoc>
          <zidocheader>
             <hfield1>hf1</hfield1>
             <hfield2>hf2</hfield2>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
          </zidocheader>
        </idoc>
    </zmessage>
    The Target Data:
    <zmessage>
      <zfilemessage>
        <zfilefirstrec>
          <firstrecfield1>ff1</firstrecfield1>
          <firstrecfield2>ff2</firstrecfield2>
        </zfilefirstrec>
        <zfileheader>
          <hfield1>hf1</hfield1>
          <hfield2>hf2</hfield2>
        </zfileheader>
        <zfileitem>
           <ifield1>if1</ifield1>
           <ifield2>if2</ifield2>
        </zfileitem>
        <zfileitem>
           <ifield1>if1</ifield1>
           <ifield2>if2</ifield2>
        </zfileitem>
        <zfileheader>
          <hfield1>hf1</hfield1>
          <hfield2>hf2</hfield2>
        </zfileheader>
        <zfileitem>
          <ifield1>if1</ifield1>
          <ifield2>if2</ifield2>
        </zfileitem>
        <zfileitem>
           <ifield1>if1</ifield1>
           <ifield2>if2</ifield2>
        </zfileitem>
      <zfilemessage>
    </zmessage>
    Can someone advise me on how to map this correctly?
    Thank you,
    Rhonda

    Hello,
    Can someone please help me with this problem?
    I am at the point where all of the records in my source message are being written out, however, all of the header records are together and all of the line item records are together.  So, the target message is not in the proper sequence.  It should contain the header record, then item records, header record, then item records, etc. 
    Is there anyone that can help me with this issue?
    Thank you,
    Rhonda

  • HOW TO MAP IDOC TO XML

    Hi,
      I need to map IDOC to xml but the problem is I have 400 fields in IDOC which  are to be mapped to 20 elements in XML.
          As it a tedious process to go to 400 fields for each xml element.Is their any better way to find correct field in IDOC with very minial time rather going 400 fields for each xml element.
    thanks
    sreeram

    hi,
    >>1)Even SAP it self does not encourage to use ABAP >>MAPPING and
    i dont know where you have read this, but ABAP mapping is one of the most popular/ most efficient and highly recomended by SAP. I have used it in tons of places.
    >>2)More over Iam not ABAP resource.
    you could also do a java mapping.
    there is no other easy way if you are not doing abap/java mapping. you are then left with the only option of using the graphical editor.
    cheers,
    Naveen
    Message was edited by: Naveen Pandrangi

  • How to map array to XML

    Hi
         i am making a Advance data grid with hierarichal data source.its working fine but now i need to use xml instead of that array.i tried alot but can not manage to conver that array to xml.so please convert that so that i can use that in my advance data grid without much change in code.
    private var masterData:Array = [
    {  TableName:"RatingDeductible",
    children:[
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    Waiting fo reply
    Thanks and Regards
      Vineet Osho

    I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
    VJ

  • How to map a complex XML message onto a flattened XSD for multi line insert

    Hi Experts.
    I have a webservice in my composite that takes an xml message that contains repeating complex type elements. The XSD is as follows:
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:XxInt003Stg="http://www.somewhere.co.uk/xxx/integration/int003Stage"
    targetNamespace="http://www.somewhere.co.uk/xxx/integration/int003Stage" elementFormDefault="qualified">
    <xsd:complexType name="InterfaceFileType">
    <xsd:sequence>
    <xsd:element name="FileName" type="xsd:string"/>
    <xsd:element name="FileSource" type="xsd:string"/>
    <xsd:element name="FileIdentifier" type="xsd:integer"/>
    <xsd:element name="InterfaceInvoices" type="XxInt003Stg:InterfaceInvoicesType"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="InterfaceInvoicesType">
    <xsd:sequence>
    <xsd:element name="InterfaceInvoice" type="XxInt003Stg:InterfaceInvoiceType"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="InterfaceInvoiceType">
    <xsd:sequence>
    <xsd:element name="SupplierNumber" type="xsd:string"/>
    <xsd:element name="SupplierSite" type="xsd:string"/>
    <xsd:element name="InvoiceNumber" type="xsd:string"/>
    <xsd:element name="InterfaceInvoiceLines">
    <xsd:complexType>
    <xsd:complexContent>
    <xsd:extension base="XxInt003Stg:InterfaceInvoiceLinesType">
    <xsd:sequence>
    <xsd:element name="InterfaceInvoiceLine"
    type="XxInt003Stg:InterfaceInvoiceLineType"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="InterfaceInvoiceLinesType"/>
    <xsd:complexType name="InterfaceInvoiceLineType">
    <xsd:sequence>
    <xsd:element name="LineAmount" type="xsd:decimal" nillable="false"/>
    <xsd:element name="TaxAmount" type="xsd:decimal"/>
    <xsd:element name="BusinessEntityReference" type="xsd:string"/>
    <xsd:element name="AccountNumber" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="InterfacePayload">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="InterfaceFiles" type="XxInt003Stg:InterfaceFileType"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    When I try to push this through the database adapter after mapping the fields it inserts multiple rows but they are all the same values. I have put a for-each XSLT construct based on the lowest element in the XSD (Invoice Line) and allocated that at various places on the target tree structure but with no success.
    The XSLT is as follows:
    <xsl:template match="/">
    <top:XxInt003InterfaceInvoiceStgCollection>
    <top:XxInt003InterfaceInvoiceStg>
    <top:fileName>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileName"/>
    </top:fileName>
    <top:fileSource>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileSource"/>
    </top:fileSource>
    <top:fileIdentifier>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileIdentifier"/>
    </top:fileIdentifier>
    <top:supplierNumber>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:SupplierNumber"/>
    </top:supplierNumber>
    <top:supplierSite>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:SupplierSite"/>
    </top:supplierSite>
    <top:invoiceNumber>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InvoiceNumber"/>
    </top:invoiceNumber>
    <xsl:for-each select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine">
    <top:lineAmount>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:LineAmount"/>
    </top:lineAmount>
    </xsl:for-each>
    <top:taxAmount>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:TaxAmount"/>
    </top:taxAmount>
    <top:businessEntityReference>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:BusinessEntityReference"/>
    </top:businessEntityReference>
    <top:accountNumber>
    <xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:AccountNumber"/>
    </top:accountNumber>
    </top:XxInt003InterfaceInvoiceStg>
    </top:XxInt003InterfaceInvoiceStgCollection>
    </xsl:template>
    I am sure this is just something fundemantal I am doing, is it something to do with the inp1 bit of the XSLT? I get the feeling this should be looping somehow?
    Thanks
    Keith

    Hi,
    as I understand you try to transform 'InterfacePayload' (your XSD - just easier to read here)
    InterfacePayload (1:1)
    -- InterfaceFiles (1:N)
    ---- FileName (1:1)
    ---- FileSource (1:1)
    ---- FileIdentifier (1:1)
    ---- InterfaceInvoices (1:1)
    ------ InterfaceInvoice (1:N)
    -------- SupplierNumber (1:1)
    -------- SupplierSite (1:1)
    -------- InvoiceNumber (1:1)
    -------- InterfaceInvoiceLines (1:1)
    ---------- InterfaceInvoiceLine (1:N)
    ------------ LineAmount (1:1)
    ------------ TaxAmount (1:1)
    ------------ BusinessEntityReference (1:1)
    ------------ AccountNumber (1:1)
    to 'XxInt003InterfaceInvoiceStgCollection' (extracted from your XSLT)
    XxInt003InterfaceInvoiceStgCollection (1:1)
    -- XxInt003InterfaceInvoiceStg (1:1)
    ---- fileName (1:1)
    ---- fileSource (1:1)
    ---- fileIdentifier (1:1)
    ---- supplierNumber (1:1)
    ---- supplierSite (1:1)
    ---- invoiceNumber (1:1)
    ---- lineAmount (1:N)
    ---- taxAmount (1:1)
    ---- businessEntityReference (1:1)
    ---- accountNumber (1:1)
    In the 'xsl:for-each' construct
    +<xsl:for-each select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine">+
    +<top:lineAmount>+
    +<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:LineAmount" />+
    +</top:lineAmount>+
    +</xsl:for-each>+
    - you are asking to iterate through all available 'inp1:InterfaceInvoiceLine' elements in the input XML document
    - the value of the element 'top:lineAmount' (for each iteration) is being calculated as all values of available 'inp1:LineAmount' elements in the input XML document together
    So, if you have ... lets say
    - 4x 'inp1:InterfaceInvoiceLine' element in the input XML document, each containing one 'inp1:LineAmount' element ... with values {1, 2, 3, 4} respectively
    - the output will be something like this
    <top:lineAmount>1234</top:lineAmount>
    <top:lineAmount>1234</top:lineAmount>
    <top:lineAmount>1234</top:lineAmount>
    <top:lineAmount>1234</top:lineAmount>
    Why are you always querying from +/inp1:InterfacePayload/inp1:InterfaceFiles/...+ ?
    I think ... all Xpath queries in your XSLT are wrong (they query something else than you think).
    e.g.
    - putting all file names together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileName+)
    - putting all file sources together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileSource+)
    - putting all invoice numbers together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InvoiceNumber+)
    Best regards,
    Martin.

  • How to map an large XML document to the XMLType with TopLink in JDev

    Hello!
    We need to map an XML document in the Java String to an XMLType column. If the XML document has less than 4000 characters, we have no problems by using the DirectToField mapping. However, once the XML document has more than 4000 characters, using the DirectToField mapping, we got the error: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column
    Then we have tried to use the "Type Conversion" mapping, to map it to the database type (Clob or NClob --oracle.toplink.oraclespecific). we got:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got CLOB
    Error Code: 932
    Any suggestions?
    Thanks in advance!

    Thanks Matt! It works fine by using DirectToXMLTypeMapping.
    However, to get it work is not smooth. In particularly, we use Jdev in our project and Jdev has not included this feature yet. Therefore, I had to use the TopLink Workbench to create the descriptor file and cut&paste to the description file that generated by JDev. And also xdb.jar has to be part of the classpath.
    Then I come to an question -- how can we take some features that only provided by the TopLink Workbench into the Jdev environment without having to hack around?
    Thanks,
    s.c.

  • How to map data in xml format to BAPIs tructures?

    A webservice call to an external system from XI, is returning data to XI in xml format.
    This needs to be formatted to map to the structure of BAPI from SAP.
    I searched and found several threads pointing to do transformations.
    But I am not sure where to start. So this thread is being posted.
    Please help.
    Thanks,
    Ven

    The thing is my data is being retrieved from webservice call a bit different.
    here is the sample data that I need to map to two structures of BAPI - Housinginfo, Houseresponsersults.
      <?xml version="1.0" encoding="utf-8" ?>
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <soap:Body>
    - <GetResidentsResponse xmlns="http://empur.org/XLSWebSvc/XLS_Interface">
    - <GetResidentsResult>
    - <Residents xmlns="">
    - <Resident LastName="Xyz" FirstName="Abced" MiddleInitial="T" STX="1234567" Houseid="45622" SubDivName="xyz homes">
    - <Houses HousesName="villa ben" HousesId="1550" HousesStatus="P" HousesStatusDate="09/22/2009 15:26:54" HousesScore="90">
      <Street StreetCode="2538" StreetName="Victoria" StreetStatus="c" StreetStatusDate="09/22/2009 12:25:38" />
    - <Street StreetCode="2539" StreetName="Vicotria Ln" StreetStatus="p" StreetStatusDate="09/22/2009 15:26:54" StreetScore="90" ProctorID="3572" OwnerName="DONNA Perl">
      <HomeInteractions HomeNum="25873" ResidentResp="C" LayoutLawn="C" Judged="c" />
      <HomeInteractions HomeNum="25884" ResidentResp="B" LayoutLawn="B" Judged="c" />
      <HomeInteractions HomeNum="25896" ResidentResp="B" LayoutLawn="B" Judged="c" />
      <HomeInteractions HomeNum="25918" ResidentResp="D" LayoutLawn="D" Judged="c" />
      <HomeInteractions HomeNum="25919" ResidentResp="D" LayoutLawn="D" Judged="c" />
      <HomeInteractions HomeNum="25924" ResidentResp="A" LayoutLawn="A" Judged="c" />
      <HomeInteractions HomeNum="25948" ResidentResp="t" LayoutLawn="t" Judged="c" />
      <HomeInteractions HomeNum="25952" ResidentResp="C" LayoutLawn="A" Judged="w" />
      <HomeInteractions HomeNum="25953" ResidentResp="C" LayoutLawn="C" Judged="c" />
      <HomeInteractions HomeNum="25954" ResidentResp="D" LayoutLawn="D" Judged="c" />
      </Street>
      </Houses>
      </Resident>
      </Residents>
      </GetResidentsResult>
      </GetResidentsResponse>
      </soap:Body>
      </soap:Envelope>

  • Hierarchical structure to Flat Structure mapping in Message mapping

    Hi Experts,
       I need to map the below hierarchical segments of SHPMNT03 IDOC XML to  repitative stucture G_SHL of 857 EDI XML.
    Segments from IDoc.
    E1EDT20(Shipment)
    E1EDL20(Delivery)
    E1EDL24(Delivery Line Item)
    E1EDL44(IDoc: Handling Unit Item Delivery) for Pack)
    Required Target Segment:
    SHIPMENT HL (BOL)
    DELIVERY HL (PO NUMBER 1)
    ITEM HL (PART A)                       
    PACK HL (1ST BUNDLE)
    PACK HL (2ND BUNDLE) 
    ITEM HL (PART B)
    PACK HL (1ST BUNDLE)
    DELIVERY HL (PO NUMBER 2)
    ITEM HL (PART A)
    PACK HL (1ST BUNDLE)
    PACT HL (2ND BUNDLE)
    PACK HL (3RD BUNDLE)
    Please let me know how to achive this.
    I tried to achive this by changing the context of the target field, but in that case I am loosing the sequence. I get all delivery together, all Item together..like this.Please tell me how to retain the sequence.
    Please reply ASAP.
    Thanks in advance,
    Shweta.

    Hi Sushama,
    Could you be bit more elaborative on the problem. What exactly is the error ?? what is the source/target structure ? with this information one would be able diagnose the scenario assist you!!!
    Regards
    Manju

  • Nested structure to flat structure in the PI mapping

    Dear friends,
    I've a issue regarding message mapping within PI 7.0
    This is how my source structure looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <stop>
       <stopreference/>
       <action>
          <actionreference>1</actionreference>
          <shipment>
             <shipmentreference>11</shipmentreference>
             <goods>
                <goodsreference>111</goodsreference>
             </goods>
             <goods>
                <goodsreference>111</goodsreference>
             </goods>
          </shipment>
       </action>
       <action>
          <actionreference>2</actionreference>
          <shipment>
             <shipmentreference>22</shipmentreference>
             <goods>
                <goodsreference>222</goodsreference>
             </goods>
          </shipment>
       </action>
    </stop>
    The target structure looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Test>
       <STOPDETAILS>
          <item>
             <EXTERNAL_STOP/>
             <EXTERNAL_ACTION/>
             <EXTERNAL_SHIP/>
              <EXTERNAL_GOOD/>
            </item>
       </STOPDETAILS>
    </Test>
    In the source message the stop is the header and within a stop there can be 0 or more actions, within action there can be 0 or more shipments and within a shipment there can be 0 or more goods...
    My target message is a flat XML structure...
    The customer wants to see an Item target structure for every goods, the shipment, the action and the stop. If the there are no goods, they wants just to see the shipment, the action and the stop...and so on...
    So its look like this:
    stop 1 - action 1 - shipment 1 - good 1
    stop 1 - action 1 - shipment 1 - good 2
    stop 1 - action 1 - shipment 2 - good 1
    stop 1 - action 1 - shipment 2 - good 2
    stop 1 - action 2 - shipment 1 - good 1
    stop 1 - action 2 - shipment 1 - good 2
    And so on...
    I've to solve this issue in the Graphical Mapping...
    Do you have a suggestion how to do that?
    Kind regards,
    Kamran

    <?xml version="1.0" encoding="UTF-8"?>
       <STOPDETAILS>
          <ITEM>
             <MANDT/>
             <EXTERNAL_STOP>0010000020_0006</EXTERNAL_STOP>
             <ADRNZ>0026858089</ADRNZ>
             <TIMESTAMP>20090721121900 </TIMESTAMP>
             <TIMESTAMPSTART>20090721121600 </TIMESTAMPSTART>
             <TIMESTAMPSTOP>20090721121700 </TIMESTAMPSTOP>
             <ID_STOP>40</ID_STOP>
             <DESCR_STOP>Done</DESCR_STOP>
             <EXTERNAL_ACTION>0080004483</EXTERNAL_ACTION>
             <TIMESTAMP_ACTION>20090721121900 </TIMESTAMP_ACTION>
             <ID_ACTION>30</ID_ACTION>
             <DESCR_ACTION>Partly Done</DESCR_ACTION>
             <EXTERNAL_SHIP/>
             <ID_SHIPM/>
             <DESC_SHIPTYPE/>
             <EXTERNAL_GOOD/>
             <ID_GOOD/>
             <DESCR_GOOD/>
          </ITEM>
          <ITEM>
             <MANDT/>
             <EXTERNAL_STOP>0010000020_0006</EXTERNAL_STOP>
             <ADRNZ>0026858089</ADRNZ>
             <TIMESTAMP>20090721121900 </TIMESTAMP>
             <TIMESTAMPSTART>20090721121600 </TIMESTAMPSTART>
             <TIMESTAMPSTOP>20090721121700 </TIMESTAMPSTOP>
             <ID_STOP>40</ID_STOP>
             <DESCR_STOP>Done</DESCR_STOP>
             <EXTERNAL_ACTION>0080004484</EXTERNAL_ACTION>
             <TIMESTAMP_ACTION>20090721121900 </TIMESTAMP_ACTION>
             <ID_ACTION>deelbewerking</ID_ACTION>
             <DESCR_ACTION>Done</DESCR_ACTION>
             <EXTERNAL_SHIP>0080004484</EXTERNAL_SHIP>
             <ID_SHIPM>20</ID_SHIPM>
             <DESC_SHIPTYPE>Planned</DESC_SHIPTYPE>
             <EXTERNAL_GOOD>0080004484_0001</EXTERNAL_GOOD>
             <ID_GOOD>40</ID_GOOD>
             <DESCR_GOOD/>
          </ITEM>
          <ITEM>
             <MANDT/>
             <EXTERNAL_STOP>0010000020_0006</EXTERNAL_STOP>
             <ADRNZ>0026858089</ADRNZ>
             <TIMESTAMP>20090721121900 </TIMESTAMP>
             <TIMESTAMPSTART>20090721121600 </TIMESTAMPSTART>
             <TIMESTAMPSTOP>20090721121700 </TIMESTAMPSTOP>
             <ID_STOP>40</ID_STOP>
             <DESCR_STOP>Done</DESCR_STOP>
             <EXTERNAL_ACTION>0080004484</EXTERNAL_ACTION>
             <TIMESTAMP_ACTION>20090721121900 </TIMESTAMP_ACTION>
             <ID_ACTION>40</ID_ACTION>
             <DESCR_ACTION>Done</DESCR_ACTION>
             <EXTERNAL_SHIP>0080004484</EXTERNAL_SHIP>
             <ID_SHIPM>20</ID_SHIPM>
             <DESC_SHIPTYPE>Planned</DESC_SHIPTYPE>
             <EXTERNAL_GOOD>0080004484_0002</EXTERNAL_GOOD>
             <ID_GOOD>40</ID_GOOD>
             <DESCR_GOOD/>
          </ITEM>
       </STOPDETAILS>

  • URGENT How to map an aggregated result to Target flat-file?**

    All,
    I am trying to map the result of the following query from 'source1' to my target which is a flat file.
    The query result set has 'one row per account' which is unique and record looks like :
    12300,9675,2008,6,11250,$-2095.48
    Questions>>>
    1. what is the proper context ( at what level-- project, global?) should I create the $v_year, $v_period variables.?
    I need the values for this 2 variables to be recognized at the end once I 'package' the mapping
    so user can pass on the values at runtime.
    2. Can this query somehow to be plugged as a 'filter' on top of the 'source1' in the interface? and result then mapped to the target?
    what is the alternative if not? (dump it to another temp table? in SUNOPSIS memory engine?)
    SELECT
    PS_.product,
    PS_.operating_unit,
    $V_YEAR,
    $V_PERIOD,
    PS_.account,
    SUM(PS_.posted_total_amt) TOT_AMT
    FROM psoftdb.ps_ledger PS_
    WHERE
    ((PS_.ledger='ACTUALS')
    AND (PS_.accounting_period <=$V_PERIOD)
    AND (PS_.fiscal_year=$V_YEAR)
    AND ((SUBSTR(PS_.account,1,1)='1' OR
    SUBSTR(PS_.account,1,1)='2' OR
    SUBSTR(PS_.account,1,1)='3')
    GROUP BY
    PS_.product,
    PS_.operating_unit,
    PS_.account

    IN order to do this you will need to declare two variables - at project level, with non-persistent type. You will need to have reverse engineered the source table into a data model. You should also define your flat file as a data model too. If this does not already exist, you will need to manually define it.
    Create a package in which the first steps are to declare the variables.
    then insert an interface which uses your source table as a source and your flat file as a target.
    In the interface select "Staging area different from target" and select the schema of your source from the drop-down.
    In your source, drag all the columns on which you want to filter (including accounting_period and fiscal_year) on to the grey background and fill in the filter details. Use the expression editor to set the filter, selecting the variable from the list, which ensures the correct syntax is used.
    Fill in all the other mapping details.
    On the flow tab select the IKM SQL to File Append as your IKM. This should allow you to create your output in one step.
    Build a scenario from your package, and when you execute it pass in the variables:
    e.g. startscen MYSCEN MYCONTEXT 001 "-MYPROJ.V_YEAR=1999" "-MYPROJ.V_PERIOD=07"

  • Transforming XML File to abap structure

    Hello,
    I am working in a new project for making an input interface.
    The problem to resolv is :
    1>Reading an XML file on a unix Server
    2>Transforming this file in abap structure with the instruction
    call transformation.
    Format of the input file :
    <LISTEART>
    <ART code="A01" label="Designation A01"/>
    <ART code="A02" label="Designation A02"/>
    <ART code="A03" label="Designation A03"/>
    <ART code="A04" label="Designation A04"/>
    <ART code="A05" label="Designation A05"/>
    </LISTEART>
    Format of the abap structure :
    DATA : BEGIN OF ws_art,
      code(4)      TYPE c,
      label(3)  TYPE c,
    END OF ws_art.
    DATA : wt_art LIKE ws_art OCCURS 0 WITH HEADER LINE.
    is it possible to transform the input file to an internal table
    with the call transformation ?
    CALL TRANSFORMATION transfo
       SOURCE XML xml_string
       RESULT para = result.
    Somebody can explain me how to create links between xml file
    and abap structure ?
    with regards 
    JLuc Ledoux
    [email protected]

    Hi,
    try like this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • Conversion of multiple xml idocs to flat file

    Hi,
    I did ABAP mapping to convert xml idoc to flat file by using the reference how to do abap mapping in xi3.0.pdf
    It is working for only one idoc at a time.
    If I have multiple idocs in a single xml file, the above code is not working.
    Please let me know what cchange to be done to work out for this.
    Hope am clear.
    Regards,
    Anil.

    Look For the Occurances of target Field node...It should be 1 to unbounded

  • Hierarchy  to  Flat  Structure

    Hi all..
    I  need to map a Hirarchial Struture to a Flat Structure ...in  my souce node HDR can appear multiple times and below that one sub node STS also can appear multiple times ...
    i need a flat targer stucture of source of same kind ..
    what is the way to do that .. ? i tried doing it with Graphical mapping i am getting a worng output ...plz tell me what to be done  ?...
    <u><b>source Hirarchital Structure</b></u>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:mt_IB_WIP xmlns:ns1="urn:agrp:ib">
       <ROU>
          <Record_Type>ROU</Record_Type>
          <Sender_ID/>
          <Receiver_ID/>
          <Document_Type>OSTRPT</Document_Type>
          <Sender_ID_qualifier/>
          <Receiver_ID_qualifier/>
          <Document_version_number/>
          <Filler/>
            <HDR>
             <Record_Type>HDR</Record_Type>
             <Vendor_ID/>
             <Purchase_order_number/>
             <Customer_order_number/>
             <Article_number/>
             <Transfer_date/>
             <Transfer_time/>
             <WIP_date/>
             <Division/>
             <WIP_date_qualifier/>
             <Client_Number/>
             <LSCD/>
             <Reason_Code>0000</Reason_Code>
             <Filler/>
               <STS>
                <Record_Type>STS</Record_Type>
                <Vendor_id/>
                <Purchase_order_number/>
                <Customer_order_number/>
                <Article_number/>
                <Transfer_date/>
                <Transfer_time/>
                <Free_text_description/>
                <Division/>
                <Filler/>
             </STS>
          </HDR>
          <HDR>
             <Record_Type>HDR</Record_Type>
             <Vendor_ID/>
             <Purchase_order_number/>
             <Customer_order_number/>
             <Article_number/>
             <Transfer_date/>
             <Transfer_time/>
             <WIP_date/>
             <Division/>
             <WIP_date_qualifier/>
             <Client_Number/>
             <LSCD/>
             <Reason_Code>0000</Reason_Code>
             <Filler/>
             <STS>
                <Record_Type>STS</Record_Type>
                <Vendor_id/>
                <Purchase_order_number/>
                <Customer_order_number/>
                <Article_number/>
                <Transfer_date/>
                <Transfer_time/>
                <Free_text_description/>
                <Division/>
                <Filler/>
             </STS>
          </HDR>
       </ROU>
    </ns1:mt_IB_WIP>
    <b><u>Target Flat Structure</u></b>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_IB_WIP1 xmlns:ns0="urn:agrp:ib">
       <ROU>
          <Record_Type/>
          <Sender_ID/>
          <Receiver_ID/>
          <Document_Type/>
          <Sender_ID_qualifier/>
          <Receiver_ID_qualifier/>
          <Document_version_number/>
          <Filler/>
       </ROU>
       <HDR>
          <Record_Type/>
          <Vendor_ID/>
          <Purchase_order_number/>
          <Customer_order_number/>
          <Article_number/>
          <Transfer_date/>
          <Transfer_time/>
          <WIP_date/>
          <Division/>
          <WIP_date_qualifier/>
          <Client_Number/>
          <LSCD/>
          <Reason_Code/>
          <Filler/>
       </HDR>
       <STS>
          <Record_Type/>
          <Vendor_id/>
          <Purchase_order_number/>
          <Customer_order_number/>
          <Article_number/>
          <Transfer_date/>
          <Transfer_time/>
          <Free_text_description/>
          <Division/>
          <Filler/>
       </STS>
    </ns0:mt_IB_WIP1>

    <b><i><u>Source</u></i></b>
    Node HDR is 0 to unbounded
    Node STS is 0 to unbounded
    <b><u>Target</u></b>
    Node HDR is 0 to unbounded
    Node STS is 0 to unbounded

  • How to get the WHOLE xml document inside a string using XSLT mapping

    Hi folks,
    I have a deep xml structure that I want to embed as body, tags included, in a mail message (not as an attachment).
    I'm trying to use Michal's method in this blog
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    However, I can't get it to deliver the entire structure instead of just specific elements.
    Any help is greatly appreciated,
    Thanks,
    Guy

    Ashok,
    I was able to work it out for my case.
    This XSL......
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <inside>
    <namestring>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="outside/name/*"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namestring>
    </inside>
    </xsl:template>
    </xsl:stylesheet>
    ...will transform this input....
    <?xml version="1.0" encoding="UTF-8"?>
    <outside>
    <name>
    <nameone>name1</nameone>
    <nametwo>name2</nametwo>
    <namethree>name3</namethree>
    </name>
    </outside>
    ...and put the whole lot into the CDATA element.
    Hope this helps you,
    Guy

Maybe you are looking for

  • Conditon table missing

    Dear all, While doing PO, we are getting the following error: Condtion table missing: Access 0003 30(Output purchase order) What would be the issue? Please suggest. Thanks & Regards, AR

  • Is resurfacing or recoating the display possible?

    I have a lot of streak marks on my 23" that seem to have come from wiping it. Is there any way to get an LCD monitor resurfaced or recoated? Oddly enough I have always used the correct monitor cloths/solution for his monitor. The streaks are very app

  • 2 Questions about the WRT54G

    My first question is if anyone knows how to configure VOIP equipment through the router instead of from the computer to VOIP equipment. I have to do it that way for work, and I'm not changing any of my home phone lines/numbers over. Second queston is

  • Help required to create GUI for my portal

    Hi All, I have installed weblogic portal 8.1 on my machine. I want to design a page with 2 jsps in one page... Can anyone please tell me how can I do this using weblogic workshop ? Thanks in advance... dgk

  • What happened to my iMovie Projects in iMovie 10.0.6 (Yosemite)?

    They are in my hrd drives but when I load them into the new iMovie they all appear in a clump under today's date, as though they are all one event. I hate this! How can I come to my machine and be productive with this mess?