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>

Similar Messages

  • 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

  • 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>

  • 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

  • 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

  • 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

  • Hierarchy as Flat Structure through BEx Web

    Hello Gurus
    I want to display a hierarchy as a flat table on the web.
    I want to see KFs against lowest level nodes, the higher level nodes are included soley to give context.
    So if my hierarchy is:
    L1 = A
    L2 = B
    L3 = C
    and my KFs are 1, 2, 3.
    I want this:
    A B C 1 2 3
    Not this:
    A     1 2 3
    ->B  1 2 3
    -->C 1 2 3
    How can I do this?
    Thankyou friends.

    Hi Dear,
    I can give you an alternative...
    Put
    A
    B
    C in rows separately & not as hierarchy(don't use or activate hierachy..most probably your hierarchy was on C)
    Now put KF1/2/3 in column
    If A & B is not in your Infoprivider ,You can use navigational attribute feature in C to get A & B if A& B are coming purely as Master Data of C.
    Now click on query properties & uncheck display repeated rows feature and you can see
    A B C  123
    with hierarchy you can't achieve it ever..
    Regards,
    RK

  • 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 >");

  • 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.

  • 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.

  • 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

  • How to read data from versc flat structure

    I get  result table from FM in that table  flat structure is included (i.e. VERSC) , so i have to read data from versc
    so please guide me.
    Thanks,
    Regards.
    Subodh G.

    hi,
    can u be clear.
    if possible .  paste the code. it vil be very useful to understand.
    Regards,
    Sabari

Maybe you are looking for

  • Image in sap script

    HI experts , I am doing modification to customized sap script which is done by previous abaper. There is a image had been attached in a window like this : BITMAP &Z_SIGN1& OBJECT GRAPHICS ID BMAP TYPE BCOL DPI 150 But when i searched in se78 i dont f

  • Store settings in JNDI tree

    I would like to define a server key that contains a string and be able to read this value at runtime. The key will have a different value in it in our development,qa and production environments. I looked into using the JNDI tree but could NOT see a w

  • Adobe Photoshop CC2014 has stopped working

    keep getting this message after numerous installs?? Not sure why

  • Photoshop CS3 10.0.1 にアップデート出来ない(Mac)

    Photoshop CS3 Extendedを10.0.1にアップデートする際に「OSボリュームの容量が不足しています」と出てアップデート出来ません. アプリケーションのヘルプからのアップデート(Adobe Uodater)及び.http://www.adobe.com/jp/support/downloads/ps1001_mac.htmlからのダウンロードをしてのアップデート両方 共に同じ事でアップデート出来ない様です. ちなみに空き容量は1,5Gぐらいあります. iBook G4 OS 1

  • Click to play one audiobook plays another!

    Hi everyone. I hope someone will be able to help me ... when I click on one audiobook to play, it chooses another audiobook and plays that instead of what I clicked on. For example, I have Girl with the Dragon Tattoo in three parts. When I click on t