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>

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>

  • 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

  • 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

  • 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

  • How can I get the XML structure from a flat structure?

    Hi all,
    in my XI SP 12 I use a JMS adapter to read information using the WebSphereMQ transport protocol.
    The structure that I receive have this format:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value>
    <NumberRecordType_B><NumberRecordType_c>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    the problem is that in this structure each line is not separated by a carriage return or a comma, I have all the information in a single line:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value><NumberRecordType_B><NumberRecordType_c><Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>...<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value><Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>...<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    and the customer don't want to insert a line separator.
    Then, the question is:
    How can I get the XML structure from this structure?
    If possible, I don't want to develop new Module and add it in the JMS Module Sequence.
    PS I have already read the article "How to Use the Content Conversion Module with the XI 3 J2EE JMS Adapter.pdf" and it doesn't seem to help me.
    Best Regards,
    Paolo

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • Flat structure,deep structure, and info structure

    hi,
    What is meant by flat ,deep ,info structures what is difference among them?

    Flat structure:
    If you have a structure with list of fields on it and You can have a structure with in the structure included
    Deep structure:
    If you have tabletype(internal table) included in the
    structure
    Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings).
    The term deep structure can apply regardless of whether the structure is nested or not
    The technical difference between deep structures and all others is as follows.
    When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information.
    When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures

  • Convert IDOC XML structure to flat file - and now?

    Hi,
    we are working with input message ORDERS05 and want to convert it to flat file.
    So we used the implementation description from "how to convert an IDOC-XML structure to a flat file....".
    Looks like this is a standard procedure described here fitting for all IDOCs.
    We followed the guide, making XI ready for Abap-Mapping, implemented the Abap class like described, added an interface mapping with source ORDERS05 to a mess.type dummy destination, added with type Abap-class the class implemented from the guide and completed the Int.Dir. implementation.
    For comparism purpose we have two systems as receiver, one with a standard flat file with regular graph.mapping in XI, one with the Abap mapping.
    Result:
    Error description in SXMB_MONI:
    Didn´t expect something like that! The IDOC was delivered successfully to the other simple flat file receiver.
    Any idea what we made wrong (we are on SP17) or if there is a standard mistake you can do when following the guide?
    Best regards
    Dirk

    Hi,
    I've got the same problem. He the solution in my case:
    The problem is:
    My IDOC has no element <STDMES>, but the method IF_MAPPING~EXECUTE from the 'HOW-TO Guide' does not check this situation:
    el_element = idocument->find_from_name('STDMES').
    ls_edidc-stdmes = el_element->get_value().
    thows the exception.
    Solution:
    make shure that the field STDMESis set or change the method to:
    el_element = idocument->find_from_name('STDMES').
    if not el_element is initial.
        ls_edidc-stdmes = el_element->get_value().
    endif.
    Best regards
    Dieter

  • Mapping Query: Flat Structure to Hierarchical Structure.

    I have a scenario which uses the sender file adapter. Therefore my source message has a flat structure. The requirement is that the target message will have a hierarchical structure as shown below.
    Source Message Type
    MT_Acc_Out    1..1
    …fileHeader   1..1
    …docHeader    1..unbounded
    …docItem      1..unbounded
    …fileTrailer  1..1
    Target Message Type
    MT_Acc_In     1..1
    …batchHeader  1..1
    …docHeader    1..unbounded
    ……docItem     1..unbounded
    …fileTrailer  1..1
    The source structures docHeader and docItem both contain a field called seqNo which is used to link the items to the header.
    The requirement is that in the target message the docItems are children of the corresponding docHeader.
    I am having difficulty mapping the target docItem node. Does this require a user defined function or can it be achieved using standard functions?
    Any assistance would be appreciated.

    You can use standard or user-defined functions, see this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/59/f6ae42e0fac911e10000000a1550b0/frameset.htm
    see the part of flat structure_2_nested tables part.

  • Mapping hierarchy structure to flat one

    Hi,
    I have incoming hierarchical structure:
    Node(0...3)
       Field1
       Field2
    Outcoming flat structure:
    Field1 from Node no.1
    Field2 from Node no.1
    Field1 from Node no.2
    Field2 from Node no.2
    Field1 from Node no.3
    Field2 from Node no.3
    Have any idea how to do this.
    Thanks,
    Regards,
    Natalia.

    Hello,
    You can try using the copyValue function and then specify the position to be copied e.g
    Field1 --> removeContext --> copyValue[0] --> Node no. 1
    Field2 --> removeContext --> copyValue[0] --> Node no. 1
    Field1 --> removeContext --> copyValue[2] --> Node no. 3
    Field2 --> removeContext --> copyValue[2] --> Node no. 3
    Hope this helps,
    Mark

  • 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

  • Move a flat structure into a large character field.

    I have a flat structure that has a total length of 700, and a table of type c(700).
    I would like to move my structure into a work area of the table and then append it. I do not want to condense the fields, or add separators.
    I could write function to go through each element and write them one at a time, but I'm hoping that this is an existing function in a utility somewhere. I've been looking but have not found one as of yet.
    Thanks.
    +===============================================+
    Update: Found one:
    CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

    Not sure if such function module exists or not..
    In 3.1H Version or even in 4.6C version, this could have been a simple issues...
    we used to do a assignment directly to the structure...
    Structure = Char String.
    This used to assign the values of the Char string to the Structure fields by taking into consideration the length of the structure fields.. But from 4.7 onwards, we cannot use such assign statements directly (if field has other than char fields).. hope this helps you

  • Error generating test frame - smartform -flat structure

    When i run the smartform,its giving an error message saying "Error generating test frame".When i run through driver program it gives dump saying "zmbook must be flat structure".
    Now the problem is in smartform -> form interface -> tables it_test like zmbook
    its saying zmbook must be flat structure.
    here zmbook is transparent table.but says use flat structure.
    i tried it through structure also but says use flat structure.
    i tried it through table type of tructure also but says use flat structure.
    can anyone help me out
    regards sajid

    Hi shaik,
    Create the table type for zmbook in se11 and include this table  type in the form interface.
    Goto se11 : datatype-->yy_book
                      select table type
    In the line type : Zmbook.
    Goto smartforms and in the form interface include this yy_book.
    Regards,
    Sravanthi

  • Declare flat structure as a internal table

    hi,
    i wrote the following code to declare structure as a internal table ....
    TYPES: BEGIN OF internalltdoclinks.
    include structure CRMT_DOC_FLOW_DB_WRKT.
    types: END OF internalltdoclinks.
    DATA: it_table TYPE STANDARD TABLE OF internalltdoclinks,
    wa_bkpf TYPE internalltdoclinks.
    it give me error as CRMT_DOC_FLOW_DB_WRKT
    "CRMT_DOC_FLOW_DB_WRKT" must be a flat structure. You cannot use   internal tables,strings ,references ,or structure as a component.
    THANKS.

    Hi,
    You can declare as below if you want to declare a internal table
    DATA: LT_DATA TYPE TABLE OF CRMT_DOC_FLOW_DB_WRKT.
    So that there would be any error.

  • Nested Abap Type 1 structure

    Could anybody provide an example of existing nested Abap Type 1 structure?
    Update: The structure should already exists and used as a parameter type for the remotely enabled function module. I could only access the function, not to write abap code.

    Sam,
    I am not sure of what TYPE 1 is, but here is a example of nested structures.
    Begin of itab1 occurs 0,
    field1 type c
    field2 type c
    end of itab1.
    Begine of itab2 occurs 0
    field3 type c
    table1 type itab1.
    end of itab2.
    ITAB2 is a nested internal table structure.
    Regards,
    Ravi
    Note : Please mark the helpful answers.

Maybe you are looking for

  • Photoshop doesn't save metadata

    I try to write meta data to psd file. i add resource block (as in photoshop file format.pdf) with custom number (4000 for example). all data saved and photoshop correctly open file. but when I click save, all my data disappear and are not saved. Is t

  • Help!!! XFi-2 loses or hides my music

    I got this player a few months ago. My first music transfer was a complete disaster - most artist files were empty, albums disappeared. Not having time to sit down and figure out the problem, I made do with what i could access. I finally got round to

  • Forms Services availability checking for BIGIP Load Balancer

    We are load balancing across a number of 10.1.2.2 Forms servers using a BIGIP load balancer. Currently our load balancing is done based on which server has the "least connections" to the BIGIP. So far we have been using the following test URL to allo

  • UPDATE/INSERT

    Hi All, My target table has two columns table_id and status. table_id is the primary key. I am doing an UPDATE/INSERT type of loading and match by constraint - "all constraints". The records should be updated by matching my primary key column - table

  • Flash drive help PLEASE

    i have a 1gb godisk flash drive and for some reason it has made two disk images. it use to be where one of the images was the actual flash drive memory and the other for some reason was named "no name" and only had the size of 1.4mb. well yesterday t