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

Similar Messages

  • 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

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

  • Load hierarchy through flat file

    I am trying to load a hierarchy through a flat file and followed the SDN blog mentioned below.
    Hierarchy Upload from Flat files
    However, I get this runtime error while loading.
    Runtime Error          ASSIGN_LENGTH_0
    Information on where terminated                                           
         The termination occurred in the ABAP program "SAPLRRSV" in            
          "RRSV_INT_CHA_VAL_SPLIT".                                            
         The main program was "RSABW_START_NEW ".                                                                               
    The termination occurred in line 42 of the source code of the (Include)
          program "LRRSVU10"                                                   
         of the source code of program "LRRSVU10" (when calling the editor 420).
                                                                                    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    12 *"     VALUE(E_CHAVL_EXT) TYPE  RSD_CHAVL_EXT                       
        13 *"     VALUE(E_T_DEP) TYPE  RRSV_T_DEP                              
        14 *"  EXCEPTIONS                                                      
        15 *"      UNKNOWN_CHANM                                               
        16 *"      UNKNOWN_INFOCUBE        
       17 *"----
       18                                                                    
       19   DATA: l_s_cob_pro  TYPE rsd_s_cob_pro.                           
       20   DATA: l_t_cob_pro_cmp TYPE rsd_t_cob_pro.                        
       21   DATA: l_subrc      LIKE sy-subrc.                                
       22   DATA: l_offset     TYPE i.                                       
       23   DATA: l_s_dep      TYPE rrsv_s_dep.                              
       24                                                                    
       25   FIELD-SYMBOLS: <chavl>.                                          
       26                                                                    
       27   IF i_very_internal = rs_c_true. "SB                              
       28     i_with_const = rs_c_true.     "SB                              
       29   ENDIF.                          "SB                              
       30                                                                    
       31   PERFORM cob_pro_cmp_get USING i_infocube i_chanm                 
       32                        CHANGING l_t_cob_pro_cmp                    
       33                                 l_subrc.                           
       34   IF NOT l_subrc IS INITIAL.                                       
       35     PERFORM raise USING rs_c_false l_subrc i_chanm space.          
       36   ENDIF.                                                           
       37                                                                    
       38   l_offset = 0.                                                    
       39                                                                    
       40   LOOP AT l_t_cob_pro_cmp INTO l_s_cob_pro.                        
       41     IF i_with_const = rs_c_true OR l_s_cob_pro-chaconst IS INITIAL.
    >>>>>       ASSIGN i_chavl_int+l_offset(l_s_cob_pro-intlen) TO <chavl>.  
       43       IF l_s_cob_pro-iobjnm = i_chanm.                             
       44         IF     <chavl> IS INITIAL                                  
       45             OR <chavl> EQ rsd_c_initial.                           
       46           IF i_very_internal = rs_c_true.

    Hi,
      This is Thilak. For loading Data To hierarchy from flat file u should follow the below steps.
    1. Create info objects as per ur hierarchy structure. i.e., ZH_CNO( for cno), ZH_SRGN (for region) .
    2. find the highest node level info object. i.e., ZH_CNO.
    3. go to that info object (highest node level info object) and select "with hierarchy" chk box.
    4. click on " MAINTAIN HIERARCHY" button and move the external characteristics info objects to rt. side pannel.i.e., ZH_SRGN.
    (Hint : other than first and last node level characteristics)
    5. Activate the info object.
    6. Create the info source (ZH_IS) of " DIrect Update Type".
    7. Assign Hierarchy Data source( ZH_CNO_HIER) to that info source.
    8. Schedule the info package to load the hierachy data from flat file.
    Note: If u have any doubts regarding flat file format and hierarchy structure plz call to +91 9600015640 or mail to thilak.oggn@gmail. bcz i am unable to draw that hier strtr ana table.
    Edited by: thilak. neelam on Oct 24, 2008 1:44 PM
    Edited by: thilak. neelam on Oct 24, 2008 1:52 PM

  • Message Mapping  Multi Level Hierarchy To Flat

    HI
    I have the following Message Structures
    <HRMD_A05>
       <IDOC BEGIN="1">
          <EDI_DC40 SEGMENT="1">
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>100</MANDT>
             <DOCNUM>0000000000462483</DOCNUM>
             <DOCREL>700</DOCREL>
             <STATUS>30</STATUS>
             <DIRECT>1</DIRECT>
             <OUTMOD>2</OUTMOD>
             <IDOCTYP>HRMD_A05</IDOCTYP>
             <MESTYP>HRMD_A</MESTYP>
             <SNDPOR>SAPPH1</SNDPOR>
             <SNDPRT>LS</SNDPRT>
             <SNDPRN>PH1100</SNDPRN>
             <RCVPOR>A000000015</RCVPOR>
             <RCVPRT>LS</RCVPRT>
             <RCVPRN>GD_XIB_P</RCVPRN>
             <CREDAT>20110130</CREDAT>
             <CRETIM>200709</CRETIM>
             <SERIAL>20110130200628</SERIAL>
          </EDI_DC40>
          <E1PLOGI SEGMENT="1">
             <PLVAR>01</PLVAR>
             <OTYPE>P</OTYPE>
             <OBJID>00000021</OBJID>
             <OPERA>I</OPERA>
             <E1PITYP SEGMENT="1">
                <PLVAR>01</PLVAR>
                <OTYPE>P</OTYPE>
                <OBJID>00000021</OBJID>
                <INFTY>0001</INFTY>
                <BEGDA>20110130</BEGDA>
                <ENDDA>20110130</ENDDA>
                <E1P0001 SEGMENT="1">
                   <PERNR>00000021</PERNR>
                   <INFTY>0001</INFTY>
                   <ENDDA>99991231</ENDDA>
                   <BEGDA>20110101</BEGDA>
                   <SEQNR>000</SEQNR>
                   <AEDTM>20110110</AEDTM>
                   <UNAME>CHEHROUTSDT</UNAME>
                   <BUKRS>0116</BUKRS>
                   <WERKS>UK01</WERKS>
                   <PERSG>1</PERSG>
                   <PERSK>M2</PERSK>
                   <KOSTL>0000005000</KOSTL>
                   <ORGEH>51004895</ORGEH>
                   <PLANS>60006175</PLANS>
                   <STELL>70000004</STELL>
                   <SNAME>Financial Control</SNAME>
                   <ENAME>Financial Controller &amp; Bus Tra Officer</ENAME>
                </E1P0001>
                <E1P0001 SEGMENT="1">
                   <PERNR>00000021</PERNR>
                   <INFTY>0001</INFTY>
                   <SUBTY>GDP1</SUBTY>
                   <ENDDA>99991231</ENDDA>
                   <BEGDA>20110101</BEGDA>
                   <SEQNR>000</SEQNR>
                   <AEDTM>20110110</AEDTM>
                   <UNAME>CHEHROUTSDT</UNAME>
                   <WERKS>GB</WERKS>
                   <PERSG>X</PERSG>
                   <ORGEH>00000000</ORGEH>
                   <PLANS>00000000</PLANS>
                   <STELL>00000000</STELL>
                   <MSTBR>00035657</MSTBR>
                   <SNAME>TETRA PAK LTD.</SNAME>
                   <ENAME>TP Tetra Pak Ltd.</ENAME>
                   <FISTL>Wrexham</FISTL>
                   <GEBER>GB0001</GEBER>
                </E1P0001>
                <E1P0001 SEGMENT="1">
                   <PERNR>00000021</PERNR>
                   <INFTY>0001</INFTY>
                   <SUBTY>GDP2</SUBTY>
                   <ENDDA>99991231</ENDDA>
                   <BEGDA>20110101</BEGDA>
                   <SEQNR>000</SEQNR>
                   <AEDTM>20110110</AEDTM>
                   <UNAME>CHEHROUTSDT</UNAME>
                   <ORGEH>00000000</ORGEH>
                   <PLANS>00000000</PLANS>
                   <STELL>00000000</STELL>
                   <SNAME>FI Accounting Leader</SNAME>
                   <ENAME>Finance &amp; Business Transformation</ENAME>
                </E1P0001>
             </E1PITYP>
             </E1PLOGI>
       </IDOC>
    </HRMD_A05>
    in the above structure  <HRMD_A05>/<IDOC>/<E1PLOGI><E1PITYP> has a segment <E1P0001> which gets repeated 3 with different Qualifers("",GD1,GD2) base on the Qualifer the <Smane> has to be mapped to 3 different fields in the target Structure
    The Target Structure is a Flat Structure As shown Below
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="urn:xibprototype:source:to:target" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xibprototype:source:to:target">
       <xsd:element name="HRPlanningAndMasterData" type="HRPlanningAndMasterData"/>
       <xsd:complexType name="HRPlanningAndMasterData">
          <xsd:annotation>
             <xsd:appinfo source="http://sap.com/xi/VersionID">154335859c8011e0ac8a0000022ca112</xsd:appinfo>
          </xsd:annotation>
          <xsd:sequence>
             <xsd:element name="LineItems" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>
                      <xsd:element name="tpjobtype" type="xsd:string" minOccurs="0"/>
                      <xsd:element name="tpposition" type="xsd:string" minOccurs="0"/>
                      <xsd:element name="tpfunctionalarea" type="xsd:string" minOccurs="0"/>
                   </xsd:sequence>
                </xsd:complexType>
             </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    I did the graphical Mapping  the As Below
    ns0:HRPlanningAndMasterData/LineItems/tpjobtype=mapWithDefault(SplitByValue(removeContexts(ifWithoutElse(stringEquals(/HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0001/SUBTY, const(value=GDP2)), /HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0001/SNAME, keepss=true)), type=0), default_value=, result)
    If i load the Instance XMl file and See the Context Queues .. the Number of the Context Changes in the Queue in more than the Context Changes that are to be produced
    eg.. I feed 2 records as input then i see 6 context Changes
    eg..
    SUPPRESS
    SUPPRESS
    <ActualValue>
    SUPPRESS
    SUPPRESS
    <ACTUAL VALUE>
    I am expecting only 2 context changes with the actual Values... (if the second record does not have a value an empty value is expected)
    Can Some help me in solving these Values... Some How i need to remove the SUPPRESS/false Values
    Note: The Contects for the Source Elements are not changed
    Regards
    Edited by: aalla renukumar on Jun 27, 2011 12:18 PM

    Hi aalla
    Try setting property keepss of ifWithoutElse block to false.
    Regards,
    Giuseppe

  • How to built a hierarchy with flat file?

    Hi Experts,
    for a better representation of the report, i need to built a hierarchy with flat file.
    The Data load is via Flat file.
    Do you have some documentation about that?
    Thanks
    Cheers
    Gilo

    Hi Gilo,
       Check these docs...
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb">How to… Download a Hierarchy to a Flat File</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/content.htm">Uploading Hierarchies from Flat Files</a>
    <a href="http://sapbwneelam.blogspot.com">More Docs...</a>
    Hope it Helps
    Srini

  • 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

  • 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

  • Upload hierarchy from flat file to BPC

    Hello SAP Guru,
    I have download customer / material  hierarchy in flat flie from BI/BW  and now I want to upload hierarchy from flat file to BPC
    Please can any one give me step by step method to load hierarchy from Flat file to SAP - BPC.
    Thanks in advance.
    With regards,
    Anand Kumar

    Hi Saida Reddy,
    why you resurrect a 5 years old thread? Surely he solved in the meanwhile his issue, see please dr Frankenstein.
    Regards
        Roberto

  • 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

  • How to Create Hierarchy From Flat file Structure

    Hi Gurus,
    There is a scenario for me regarding the Hierarchy.
    Required Hierarchy structure - Region>Director>Manager-->Sales id
    I have flat file which gives the info like user id , sales id , manager id, director id.
    But the transaction data Flat file has structure with sales id, region id, sales amt, sales qty.
    Note : Region id is another Master Data.
    How i can create hierarchy from the first flat file which doesnot have region info in that but it is available in the transaction data Flat file.
    Is there anyway we can create hierarchy based on the first Flat file structure which contains more that 1,00,000 records.
    Try to Suggest me in this regard .
    This is urgent.
    Regards,
    Mano

    Hi Mano,
                    Defining the source system from which to load data
    Choose the source system tree File  ® Create.
           2.      Defining the InfoSource for which you want to load data
    Optional: choose InfoSource Tree ® Root (InfoSources) ® Create Application Components.
    Choose InfoSource Tree ® Your Application Component ® Other Functions  ® Create InfoSource 3.x ® Direct Update.
    Choose an InfoObject from the proposal list, and specify a name and a description.
           3.      Assigning the source system to the InfoSource
    Choose InfoSource Tree ® Your Application Component ® Your InfoSource ® Assign Source System. The transfer structure maintenance screen appears.
    The system automatically generates DataSources for the three different data types to which you can load data.
    &#9675;       Attributes
    &#9675;       Texts
    &#9675;       Hierarchies (if the InfoObject has access to hierarchies)
    The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
           4.      Maintaining the transfer structure / transfer rules
    Select the DataSource for uploading hierarchies.
    IDoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject for which hierarchies are loaded. With this transfer method, the structure is converted to the structure of the PSA during loading, which affects performance.
    PSA transfer method: The transfer methods and the communication structure are also generated here.
           5.      Maintaining the hierarchy
    Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy
    Hope this helps
    Regards
    Karthik
    Assign points if Helpful

Maybe you are looking for

  • Photoshop CS4 and CC/CS6 crashing for no apparent reason (Windows 7)

    I’m currently having a serious problem with my Photoshop CS4 where it continuously crashes, for no apparent reason, since July 16, 2013.   I have done everything recommended via Adobe forum to try and fix this problem though it still persists.    It

  • Dyslexia font not working in all incoming emails

    Dear Mozilla Support, Monday 5-5th-2014 I have Dyslexia and recently started using fonts for the disorder on my PC and e-reader. This increased my reading speed dramatically with better retention. Kind of a big deal for me as I use the PC & web lot.

  • PDV Personalization

    Hi, I'm using the generic MSS Query iView, which in turn uses PDV to show the query result. If I use the personalization button in the top right hand corner of the PDV (not the iView) I'm amongst other things, able to hide columns. But after a while

  • Not modfying ithe infotype while using FM HR_INFOTYPE_OPERATION

    Hi Experts, When i am using this FM HR_INFOTYPE_OPERATION its not modifying the infotype 14.Can you please suggest me. Please see my below code. Can please let me know if i am wrong.. form INSERT_DATA_0014 .     loop at pa_0014. CALL FUNCTION 'BAPI_E

  • How to use wmode="transparent" on Quicktime

    Hi! I use tag <embed> with wmode="transparent" inside the <embed> tag to make the vdo file (.mp4 , .mov) to be transparent display behind other div on Firefox, but it doesn't work and quick time play and vdo disappear. I have check Apple QuickTime Tu