FCC for deep structures

Hi
I have a flat file like this.
I am not able to create sender and receiver data types. can anyone tell me how to do.
Here For one plant there are many materials.
=====================================================================
Werks  MATNR               ERSDA           ERNAM                    MTART    MATKL        MAKTX
====================================================================
0001     CP-12                  20020719     PREMKE               KMAT                      CP-12
0001     CP12                   20020717     PREMKE                   HAWA     015           CP12
0001     CPH_3001             20050802           D035495                 ROH                       Aqua
005     T-EC0201               20060327      WILHELMH             HAWA     009          Cycle shorts
0005     T-FC0101               20060327      WILHELMH             FERT                   Lady`s 24'' Street Bike
0006     NGL-OS-FILE         20060316         LCHAMDONDOG      NLAG     006           File
0007     NGL-OS-FILE         20060316        LCHAMDONDOG      NLAG     006           File
0008     NGL-OS-FILE          20060316     LCHAMDONDOG              NLAG     006           File
I want XML file should be like this
<MT_Sender>
<record>
<plant>
       <werks>0001</werks>
</plant>
<matinfo>
<matnr>cp-12></matnr>
<ersda>20020719</ersda>
</matinfo>
<matinfo>
<matnr>cp-12</matnr>
<ersda>20020717</ersda>
</matinfo>
</record>
<record>
like this..I want to connvert tht into flat file-xml file.
I looked some deep struture blogs..but I couldnot understand.
Reagrds
Vijay
Edited by: vijay reddy on Apr 10, 2009 4:10 PM

Hi Vijay,
Using FCC it is not posible.You can acheive it using two message mapping.
Steps:
STEP1:
Do the normal content conversion and get each Line as separate Record. say the message type you created is MT_FCC_Outbound
STEP 2:
First Mapping: 
Outbound Mesage type : MT_FCC_Outbound
Inbound Mesage type : MT_FCC_Outbound
Here in  this mapping you group the records on the basis of werks.
STEP3:
Second mapping:
Outbound Mesage type : MT_FCC_Outbound
                          Inbound Mesage type : MT_FCC_Inbound
Do the actual maaping
STEP 4:
Interface mapping: Outbound Mesage  :
MI_FCC_Outbound    (message interface)
                       Inbound Mesage  : MI_FCC_Inbound
first give mapping1 then in second row mapping 2.
Ritu

Similar Messages

  • Reciever file adapter configuration for Deep structure

    Hi Experts,
                     I have a idoc to file scenario in which i used a data type for file in below format:
    DT_Test
    -->Recordset(0.unbounded)
    >E21DPU1(0.unbounded)
    >field1
    >field2
    >E21DPU5(0.unbounded)
    >filed 3
    >filed 4
    >E21DP03(0.unbounded)
    >filed 5
    >filed 6
    Here DT_test is datatype name,Recordset is a structure name which contain E21DPU1, E21DPU5,E21DPO3 stucture inside it.Now,E21DPU5 and E21DPO3 structures are under E21DPU1.
    I am confused in creating content conversion parameters i.e what we have to mention in Recordset Stucture .
    I used E21DPU1,,E21DPU5,,E21DP03,* .should it work for deep structure.
    Thanks
    Deepak

    Hi,
    file adapter does not handle 2 level deep structures
    the easiest way to do it now is to go for abap or java mapping
    and create a line for each of the output lines and handle this in the file adapter
    so like <line> </line>
    <line>E21DPU1(0.unbounded) with fields </line>
    <line>E21DPU5(0.unbounded) with fields </line>
    <line> etc. </line>
    Regards,
    Michal Krawczyk

  • XSLT transformation for deep structure .....

    Hello,
            I am trying to do an XSLT transformation for a deep structure HAP_S_PDF_DOCUMENT (see it in SE11), I have managed to achieve this. but not with perfection. i still get some redundant data and data have been experiencing Data duplication. I was hoping if you people point out the what is wrong in the transfromation. The data repeats for every once under node DATA and then under node of the refered structure name. Besides it also create a blank row even if the record is 0. I am mostly facing problem with nodes T_ELEMENTS. T_COL_CELL and T_FIELD. These are the nested structures, Can anybody help / guide me to achieve these transforamtion?
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="HAP_DOCUMENT">
    <xsl:element name="HAP_DOCUMENT" namespace="">
    <xsl:apply-templates select="MAIN_HEADER"/>
    <xsl:apply-templates select="T_ELEMENTS"/>
    <xsl:apply-templates select="T_STAT_CHG_BUTTONS"/>
    <xsl:apply-templates select="S_APPRAISAL_ID"/>
    <xsl:apply-templates select="S_HEADER"/>
    <xsl:apply-templates select="POSITIONS"/>
    <xsl:element name="STAT_CHG_BUTTON">
    <xsl:value-of select="../STAT_CHG_BUTTON"/>
    </xsl:element>
    <xsl:element name="OFFLINE_ID">
    <xsl:value-of select="OFFLINE_ID"/>
    </xsl:element>
    <xsl:element name="BSP_FLAG">
    <xsl:value-of select="BSP_FLAG"/>
    </xsl:element>
    <xsl:element name="ROLE">
    <xsl:value-of select="ROLE"/>
    </xsl:element>
    <xsl:element name="APPRAISAL_YEAR">
    <xsl:value-of select="APPRAISAL_YEAR"/>
    </xsl:element>
    </xsl:element>
    </xsl:template>
    <xsl:template match="MAIN_HEADER">
    <xsl:element name="MAIN_HEADER">
    <xsl:for-each select="ZBGAPR_FORM_HEADER">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_ELEMENTS">
    <xsl:element name="T_ELEMENTS">
    <xsl:for-each select="ZHAP_S_PDF_ELEMENTS">
    <xsl:element name="DATA">
    <xsl:apply-templates select="T_COL_CELL"/>
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_COL_CELL">
    <xsl:element name="T_COL_CELL">
    <xsl:for-each select="ZHAP_S_PDF_COL_CELL">
    <xsl:element name="DATA">
    <xsl:apply-templates select="T_FIELD"/>
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_FIELD">
    <xsl:element name="T_FIELD">
    <xsl:for-each select="ZHAP_S_PDF_FIELD">
    <xsl:element name="DATA">
    <xsl:apply-templates select="T_VAL_VALUES"/>
    <xsl:apply-templates select="T_VAL_RANGES"/>
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_VAL_VALUES">
    <xsl:element name="T_VAL_VALUES">
    <xsl:for-each select="HAP_S_BODY_CELL_VAL_VALUES">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_VAL_RANGES">
    <xsl:element name="T_VAL_RANGES">
    <xsl:for-each select="HAP_S_BODY_CELL_VAL_RANGES">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_STAT_CHG_BUTTONS">
    <xsl:element name="T_STAT_CHG_BUTTONS">
    <xsl:for-each select="HAP_S_BODY_CELL_VAL_RANGES">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_APPRAISAL_ID">
    <xsl:element name="S_APPRAISAL_ID">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_HEADER">
    <xsl:element name="S_HEADER">
    <xsl:apply-templates select="S_TEXTS"/>
    <xsl:apply-templates select="T_APPRAISER"/>
    <xsl:apply-templates select="T_APPRAISEE"/>
    <xsl:apply-templates select="T_PART_APPRAISER"/>
    <xsl:apply-templates select="T_OTHERS"/>
    <xsl:apply-templates select="S_STATUS"/>
    <xsl:apply-templates select="S_DATES"/>
    <xsl:apply-templates select="S_DISPLAY"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="POSITIONS">
    <xsl:element name="POSITION">
    <xsl:for-each select="ZBGHR_APR_POSITION_DET">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_TEXTS">
    <xsl:element name="S_TEXTS">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_APPRAISER">
    <xsl:element name="T_APPRAISER">
    <xsl:for-each select="HAP_S_PDF_APPRAISER">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_APPRAISEE">
    <xsl:element name="T_APPRAISEE">
    <xsl:for-each select="HAP_S_PDF_APPRAISEE">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_OTHERS">
    <xsl:element name="T_OTHERS">
    <xsl:for-each select="HAP_S_PDF_OTHERS">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_PART_APPRAISER">
    <xsl:element name="T_PART_APPRAISER">
    <xsl:for-each select="HAP_S_PDF_PART_APPRAISERS">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_PART_APPRAISER">
    <xsl:element name="T_PART_APPRAISER">
    <xsl:for-each select="HAP_S_PDF_PART_APPRAISERS">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_STATUS">
    <xsl:element name="S_STATUS">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_DATES">
    <xsl:element name="S_DATES">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_DISPLAY">
    <xsl:element name="S_DISPLAY">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="STAT_CHG_BUTTON">
    </xsl:template>
      <xsl:template match="OFFLINE_ID">
    </xsl:template>
      <xsl:template match="BSP_FLAG">
    </xsl:template>
      <xsl:template match="ROLE">
    </xsl:template>
      <xsl:template match="APPRAISAL_YEAR">
    </xsl:template>
    </xsl:transform>
    Regards,
    Shishir.P

    "XSLT transformation for a deep structure"
    which way abap to xml or xml to abap?
    you may want to check this thread
    Re: Problem converting XML back to structure using XSLT

  • Query on Receiver FCC for nested structure

    Hi Friends,
    I want to  configure the Receiver side FCC for the below nested structure.
    Can you guide me how can i achicve it? or its not possible for nested structure?
    Seg100,Seg200.Seg300 and Seg400 are nested one below the other.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Test xmlns:ns0="http://hello.com">
    --<Seg100>
    --<field1>0000564.30</field1>
    --<field2>KG</field2>
    --<Seg200>
    ---<field3>1070</field3>
    ---<Seg300>
    <field4>5</field4>
    <Seg400>
    <field4>5</field4>
    </Seg400>
    ---</Seg300>
    --</Seg200>
    -</Seg100>
    </ns0:Test>
    Regards
    Venkatesh

    Hi,
      For nested structure we cont do the File content conversion.
      so that we need to convert it a flat structure in the mapping level and then we can go for FCC.
    Regards,
    Prakasu

  • Unable to configure file adapter using FCC  for Multilevel hierarchy

    Hi Experts,
    Can anyone help me in configuring the Receiver file adapter with FCC for the structure given below
    <Root>
    <Level1>
         <Ele1>
         <Ele2>
         <Level2>
                <Ele2_1>
                <Ele2_2>
                <Level2a>
                        <Ele2a_1>
                        <Ele2a_2>
                </Level2a>
         </Level2>
    </Level1>

    Hi dineshmale,
    I have do this Multilevel hierarchy before. FCC can directly configure this scenario. But I don't know you output format. What my format shown below(here i use '#' instead of space):
    Level1_Field1##Level1_Field2##Level1_Field3##Level2_Field1##Level2_Field2##Level3_Field1##Level1_Field2
    #################################################################Level3_Field1##Level1_Field2
    #######################################Level2_Field1##Level2_Field2##Level3_Field1##Level1_Field2
    #################################################################Level3_Field1##Level1_Field2
    Level1_Field1##Level1_Field2##Level1_Field3##Level2_Field1##Level2_Field2##Level3_Field1##Level1_Field2
    #################################################################Level3_Field1##Level1_Field2
    #######################################Level2_Field1##Level2_Field2##Level3_Field1##Level1_Field2
    #################################################################Level3_Field1##Level1_Field2
    #################################################################Level3_Field1##Level1_Field2
    FCC Parameter:
    Recordset Structure: Level1,Level2,Level3
    Level1.fieldSeparator = (2 spaces)
    Level2.beginSeparator = (some spaces according to the length of the fields in Level1)
    Level2.fieldSeparator = (2 spaces)
    Level3.beginSeparator = (some spaces according to the length of the fields in Level1and Level2)
    Level3.fieldSeparator = (2 spaces)
    Level3.endSeparator = \n
    There are some points:
    1. the endSeparator for Level1 and Level2 doesn't work.
    2. the first begin separator in Level2 and Level3 doesn't work.
    3. The last field of super node and the first field of child node is separated by the (child).fieldSeparator.
    4. ....
    What's more, I have write a blog of FCC For Hierarchical Structure in Receiver Channel just now. So it need two days for Approval. Let me know for any issues.
    Edited by: guKidd on Dec 14, 2010 7:52 AM
    Edited by: guKidd on Dec 14, 2010 7:54 AM

  • How to read  xml with deep  structure into intarnal table.

    Hi,
    Could you pls any body provide xslt code for deep structure  convert into internal table.
    sample xml file:
    - <ns0:CREATIONOFCONTRACT xmlns:ns0="http://BPCreationXSD.CreationOfContract">
    - <CREATIONOFCONTRACTDATA>
      <RequestType>L0011</RequestType>
      <ApplicationId>AN-12</ApplicationId>
      <LoanId>QO-22</LoanId>
    - <Borrowerguarantorinfo>
      <Borrowerbpno>101020</Borrowerbpno>
      <Co-borrower1BPNo>101021</Co-borrower1BPNo>
      <Co-borrower2BPNo>101022</Co-borrower2BPNo>
      <Guarantor1BPNo>101023</Guarantor1BPNo>
      <Guarantor2BPNo>101024</Guarantor2BPNo>
      <Branch>New Delhi</Branch>
      </Borrowerguarantorinfo>
    - <Loaninfo>
      <Applicationtype>Fresh</Applicationtype>
      <Purposeofloan>Home Purchase</Purposeofloan>
      <Securedunsecuredflag>Secured</Securedunsecuredflag>
      <Loantype>HL with MRTA</Loantype>
      <Loancurrency>INR</Loancurrency>
      <Loanproduct>MaxiHome Loan Package</Loanproduct>
      <Loanscheme>MaxiHome ZEC</Loanscheme>
      <Loanamount>1500000.00</Loanamount>
      <Loantenure>60</Loantenure>
      <Tiered>No</Tiered>
      </Loaninfo>
      <Periodfrom>01/07/2009</Periodfrom>
      <Periodto>16/09/2019</Periodto>
      <RateType>Fixed</RateType>
      <Ratecode>10.25</Ratecode>
      </CREATIONOFCONTRACTDATA>
      </ns0:CREATIONOFCONTRACT>

    Hi Ramesh,
    Thanks for the info,but I found lot of tables unfortunately I am not getting the value for radio buttons. Also I found a FM FIELD_SELECTION_CUSTOMIZE , IMPORT_DYNPRO etc which will call that screen based on profile but it will not store data any where. I found several tables like TCATS, TFAWC, TFAWF, TFAWT etc.But I am not getting the value for raduio buttons.
    Thanks & Regards,
    Nagaraj Kalbavi

  • How to do Content Conversion for this structure?

    Hi,
       Urgent required. I have the following structure as below. There is a headerData, itemData and textData. The data that wll come into headerData could be more than one, and the same applies to the itemData and textData. The File adapter is not able to pick this file structure. It is a fixed length file at the receiver end. Could any one tell me how to do the File Content Conversion (FCC) for the structure without using the FCC module. Points to be awarded to best answer. Thaanks in advance.
    The structure :
    <headerData>
    aaaaa
    bbbb
    cccc
    </headerData>
    <headerData>
    aaaaa
    bbbb
    cccc
    </headerData>
    <headerData>
    aaaaa
    bbbb
    cccc
    </headerData>
    <itemData>
    fff
    ggg
    hhh
    </itemData>
    <itemData>
    fff
    ggg
    hhh
    </itemData>
    <itemData>
    fff
    ggg
    hhh
    </itemData>
    <textData>
    fff
    ggg
    hhh
    </textData>
    <textData>
    fff
    ggg
    hhh
    </textData>
    <textData>
    fff
    ggg
    hhh
    </textData>

    HI,
    Use the following content conversion:
    I assume the data coming in the file is of below format:
    Here the key field name is K for 01,02 and 03
    01,aa,bb,cc
    01,aa,bb,cc
    02,ff,gg,hh
    02,ff,gg,hh
    03,hh,ff,hh
    03,hh,ff,hh
    If you data in the file is coming in the above way then your FCC will be
    Recordse strucutre: headerData,,temData,,textData,*
    Keyfield Name: K
    headerData.fieldNames: a,b,c
    headerData.fieldSeparator: ,
    headerData.endSeparator: 'nl'
    headerData.keyFieldValue: 01
    Similarly for itemData and text Data
    Refer the below weblog for the same:
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    Thnx
    Chirag Gohil

  • Create a deep structure for dynamic internal table

    Hi All,
    I am creating a dynamic table using method cl_alv_table_create=>create_dynamic_table.
    The normal structure gets created. but now I want to creat a Deep structure for having information of colors also for each column. So I want to add a COLTAB type LVC_T_SCOL for colors information .
    How should I create this using above method?
    Rgds,
    Madhuri

    I created a zcelltab structure as below. But while creating dynamic internal table, I received the error  with
    'Type "ZCELLTAB" is unknown 68 ZCELLTAB-CELLTAB
    Here is the code.
    DATA: BEGIN OF ZCELLTAB,
             CELLTAB LIKE LVC_S_STYL,
         END OF ZCELLTAB.
    FIELD-SYMBOLS <T_CELLTAB> TYPE LVC_T_STYL.
    DATA : LT_CELLTAB TYPE LVC_T_STYL.
    DATA:  WA_CELLTAB TYPE LINE OF LVC_T_STYL.
    DATA: GT_FCAT1 TYPE LVC_T_FCAT,
               GW_FCAT1 TYPE LVC_S_FCAT,
                GT_FCAT2 TYPE LVC_T_FCAT,
                GW_FCAT2  TYPE LVC_S_FCAT.
    After filling the FCAT1, I added the field in FCAT2  like below
      GT_FCAT2[ ] = GT_FCAT1[ ].
      G_TABIX = G_TABIX + 1.
      GW_FCAT2-INTTYPE = 'C'.
      MOVE G_TABIX TO GW_FCAT2-COL_POS.
      GW_FCAT2-OUTPUTLEN = '10'.
      GW_FCAT2-FIELDNAME = 'T_CELLTAB'.
      GW_FCAT2-TABNAME = 'ZCELLTAB'.
      GW_FCAT2-REF_FIELD = 'CELLTAB'.
      GW_FCAT2-REF_TABLE = 'ZCELLTAB'.
      APPEND GW_FCAT2 TO GT_FCAT2
      CLEAR GW_FCAT2.
    While calling the below method, the error with
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
         EXPORTING
          IT_FIELDCATALOG = GT_FCAT2
        IMPORTING
          EP_TABLE        = GT_REQ.
      ASSIGN GT_REQ->* TO <F_TAB>.
      CREATE DATA GWA_REQ LIKE LINE OF <F_TAB>.
      ASSIGN GWA_REQ->* TO <F_WA>.
    LOOP AT ITAB.
    ASSIGN COMPONENT 'MATNR'  OF STRUCTURE <F_WA> TO <F_VAL>
    <F_VAL> = ITAB-MATNR.
    IF ITAB-MATNR IS INITIAL.
    ASSIGN COMPONENT 'T_CELLTAB' OF STRUCTURE <F_WA> TO <T_CELLTAB>
            CLEAR WA_CELLTAB.
            WA_CELLTAB-FIELDNAME = 'MATNR'.
            WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
            INSERT WA_CELLTAB INTO TABLE <T_CELLTAB>.
    ENDIF.
    APPEND <F_WA> TO <F_TAB>
    ENDLOOP.
    CALL METHOD GR_GRID->SET_TABLE_FOR_FIRST_DISPLAY
            EXPORTING
              I_CONSISTENCY_CHECK  = G_CONSISTENCY_CHECK
              IT_TOOLBAR_EXCLUDING = G_EXCLUDE
              I_SAVE               = G_SAVE
           I_DEFAULT            = 'X'
              IS_LAYOUT            = G_LAYOUT
            CHANGING
              IT_OUTTAB            = <F_TAB>
              IT_FIELDCATALOG      = F_CAT1.
    Please let me know where I was wrong.
    Should I remove the T_CELLTAB as the field name is not mentioned in the structure 'ZCELLTAB'.
    Thanks,
    Kumar.
    Edited by: venn e on May 7, 2010 4:10 PM

  • To create a deep structure for dynamic internal table.

    Hello
    My ALV has fields which are defined dynamically during execution.
    so, i did it in the following way,
    Declared Field symbolds, DREF and fieldcatalog as,
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
                  <fs_dyntable>.
    DATA:   dref_dyntab    TYPE REF TO data,
            dref_dynwa     TYPE REF TO data.
    DATA: ts_fieldcatalog TYPE lvc_t_fcat.
    DATA: wa_fieldcatalog TYPE lvc_s_fcat.
    Updated Fieldcatalog dynamically as,
    *function module to read segment structure
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp           = v_segment_name
          TABLES
            segmentstructure     = ts_seg_structure
          EXCEPTIONS
            no_authority         = 1
            segment_not_existing = 2
            OTHERS               = 3.
        IF sy-subrc <> 0.
          CASE sy-subrc.
            WHEN '1'.
              MESSAGE e024.
              STOP.
            WHEN '2'.
              MESSAGE e025 WITH v_segment_name.
              STOP.
            WHEN OTHERS.
              MESSAGE e023.
          ENDCASE.
        ENDIF.
    *FETCH FIELDS FROM STRUCTURE OF SEGMENT AND CREATE FIELDCATALOG FOR
    EACH FIELD OF SEGMENT (DYNAMIC FIELD CATALOG)
        LOOP AT ts_seg_structure INTO wa_seg_structure.
          ADD 1 TO v_counter.
          wa_fieldcatalog-fieldname = wa_seg_structure-fieldname.
          wa_fieldcatalog-col_pos   = v_counter.
          wa_fieldcatalog-ref_table = wa_seg_structure-segtyp.
          APPEND wa_fieldcatalog TO ts_fieldcatalog.
          CLEAR wa_fieldcatalog.
        ENDLOOP.
    and generated dynamic internal table using fieldcatalog as,
    *--Method to get the structure of table using fieldcatalog.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ts_fieldcatalog
        IMPORTING
    *--Variable of type REF TO DATA.
          ep_table        = dref_dyntab.
      IF sy-subrc <> 0.
        MESSAGE e023.
      ENDIF.
    *--Dynamic internal tables required when show segments selected
      IF p_selseg IS NOT INITIAL.
        ASSIGN dref_dyntab->* TO <t_dyntable>.
    *--Create dynamic work area and assign to FS
      CREATE DATA dref_dynwa LIKE LINE OF <t_dyntable>.
        ASSIGN dref_dynwa->* TO <fs_dyntable>.
    And then i populated this <t_dyntable> which is being passed as data-table to method
    CL_GUI_ALV_GRID => SET_TABLE_FOR_FIRST_DISPLAY
    for ALV grid Display along with above used filedcatalog ts_fieldcatalog.
    Things are fine till here, but now i have the requirement to edit selected rows of the ALV display..
    As you might be aware, we need a field
            TS_STYLEROW  TYPE lvc_t_styl, (i.e, a field of type 'h' and we can say as an internal table inside an internal table or else as a deep structure)
    in the output internal table <t_dyntable> to meet our requirement.
    My issue is about declaring one such field of type 'h' in this dynamically created internal table ''<t_dyntable>".
    I tried in the following way by adding one such field to fieldcatalog :
    *Field for Styling
      ADD 1 TO v_counter.
      wa_fieldcatalog-fieldname   = 'TS_STYLEROW'.
      wa_fieldcatalog-tabname     = 'TS_STYLE'.
      wa_fieldcatalog-col_pos     = v_counter.
      wa_fieldcatalog-no_out      = 'X'.
      wa_fieldcatalog-inttype     = 'h'.      " I even mentioned this
      APPEND wa_fieldcatalog TO ts_fieldcatalog.
      CLEAR  wa_fieldcatalog.
    But this is creating a field of type 'C' in the table <t_dyntable> instead of what i was expecting
    Guyz and respected,
    Please advice me with the solution or ur ideas....
    Note : The overall requirement is create a deep structure for dynamically generated internal table.
    Your help is highly appreciated and unforgettable..!!!!!!!

    hi,
    Dynamic append
    Dynamic internal table
    Dynamic internal table
    dynamic columns in ALV
    Variant for dynamic selection
    thanks

  • How can i map a file with different structures to several deep structures?

    Hey experts,
    here is my situation. I have to build a file2file scenario. The file has a flat structure without any separators. Depending on the value of the keyfield, i have to determinate, which kind of structure in the current sequence there is. Like i wrote, there isn't any fieldseparator, but for every possible structure (overall 4 types) i know the type by the length of every field in the structure.
    My task is:
    1. Read the file into PI and transform to XML
    2. Map the flat structure depending on the keyvalue to the deep structure
    3. Transform several fields in the different structures like the requirement
    4. Write back the file via FTP as the same flat structure as before
    Do you have any approach to solve the item number 2 (the other steps are clear for me)?
    Do i need several mapping-programs? If so, how can i determinate the right mapping-program, deping on the keyvalue?
    Thanks in advance
    Tobi

    Here the inbound payload:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_MULTI_TYPES xmlns:ns="namespace">
    - <VORSATZ>
      <ZSATA>0</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZLIEF>T</ZLIEF>
      <START>20080905</START>
      <ZFILL />
      <ZENDE>E</ZENDE>
      </VORSATZ>
    - <KOPFSATZ>
      <ZSATA>1</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <BUDAT>20080904</BUDAT>
      <BLDAT>20080904</BLDAT>
      <XBLNR />
      <WAERS />
      <HWAE2>EUR</HWAE2>
      <HWAE3 />
      <KURS2>000000000</KURS2>
      <KURS3>000000000</KURS3>
      <BKTXT />
      <ZFILK />
      <ZENDE>E</ZENDE>
      </KOPFSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>001</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>30611102</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000057576</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>009</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000021070</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AA</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000009796</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4027V63RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <NACHSATZ>
      <ZSATA>9</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZZSOL>000000000359502</ZZSOL>
      <ZZHAB>000000000359502</ZZHAB>
      <ZZBEL>0000001</ZZBEL>
      <ZZPOS>000000010</ZZPOS>
      <ZFILN />
      <ZENDE>E</ZENDE>
      </NACHSATZ>
    - <VORSATZ>
      <ZSATA>0</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZLIEF>T</ZLIEF>
      <START>20080905</START>
      <ZFILL />
      <ZENDE>E</ZENDE>
      </VORSATZ>
    - <KOPFSATZ>
      <ZSATA>1</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <BUDAT>20080904</BUDAT>
      <BLDAT>20080904</BLDAT>
      <XBLNR />
      <WAERS />
      <HWAE2>EUR</HWAE2>
      <HWAE3 />
      <KURS2>000000000</KURS2>
      <KURS3>000000000</KURS3>
      <BKTXT />
      <ZFILK />
      <ZENDE>E</ZENDE>
      </KOPFSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>001</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>30611102</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000057576</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>009</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000021070</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AA</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000009796</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4027V63RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <NACHSATZ>
      <ZSATA>9</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZZSOL>000000000359502</ZZSOL>
      <ZZHAB>000000000359502</ZZHAB>
      <ZZBEL>0000001</ZZBEL>
      <ZZPOS>000000010</ZZPOS>
      <ZFILN />
      <ZENDE>E</ZENDE>
      </NACHSATZ>
      </ns:MT_MULTI_TYPES>
    And here the outbound payload:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_MULTI_TYPES xmlns:ns0="namespace">
    - <VORSATZ>
      <ZSATA>0</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZLIEF>T</ZLIEF>
      <START>20080905</START>
      <ZFILL />
      <ZENDE>E</ZENDE>
      </VORSATZ>
    - <VORSATZ>
      <ZSATA>0</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZLIEF>T</ZLIEF>
      <START>20080905</START>
      <ZFILL />
      <ZENDE>E</ZENDE>
      </VORSATZ>
    - <KOPFSATZ>
      <ZSATA>1</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <BUDAT>20080904</BUDAT>
      <BLDAT>20080904</BLDAT>
      <XBLNR />
      <WAERS />
      <HWAE2>EUR</HWAE2>
      <HWAE3 />
      <KURS2>000000000</KURS2>
      <KURS3>000000000</KURS3>
      <BKTXT />
      <ZFILK />
      <ZENDE>E</ZENDE>
      </KOPFSATZ>
    - <KOPFSATZ>
      <ZSATA>1</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>000</BUZEI>
      <BUDAT>20080904</BUDAT>
      <BLDAT>20080904</BLDAT>
      <XBLNR />
      <WAERS />
      <HWAE2>EUR</HWAE2>
      <HWAE3 />
      <KURS2>000000000</KURS2>
      <KURS3>000000000</KURS3>
      <BKTXT />
      <ZFILK />
      <ZENDE>E</ZENDE>
      </KOPFSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>001</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>30611102</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000057576</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>009</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000021070</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AA</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000009796</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4027V63RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>001</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>30611102</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000057576</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>009</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AB</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000021070</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4025V64RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <POSITIONSSATZ>
      <ZSATA>4</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <KOART>S</KOART>
      <SHKZG>S</SHKZG>
      <NEWKO>20519109</NEWKO>
      <GSBER>17AA</GSBER>
      <ZUBUK />
      <VBUND />
      <WRBTR>0000000000000</WRBTR>
      <ZBTR1>0000000009796</ZBTR1>
      <ZBTR2>0000000000000</ZBTR2>
      <ZSTEU />
      <VALUT>20080904</VALUT>
      <KOSTL />
      <AUFNR />
      <ZUONR>X4027V63RE460XXXXX</ZUONR>
      <SGTXT>REX</SGTXT>
      <BEWAR />
      <ZFPOS />
      <ZENDE>E</ZENDE>
      </POSITIONSSATZ>
    - <NACHSATZ>
      <ZSATA>9</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZZSOL>000000000359502</ZZSOL>
      <ZZHAB>000000000359502</ZZHAB>
      <ZZBEL>0000001</ZZBEL>
      <ZZPOS>000000010</ZZPOS>
      <ZFILN />
      <ZENDE>E</ZENDE>
      </NACHSATZ>
    - <NACHSATZ>
      <ZSATA>9</ZSATA>
      <MANDT>001</MANDT>
      <BUKRS>0560</BUKRS>
      <BLART>8F</BLART>
      <BELNR>1816008128</BELNR>
      <BUZEI>010</BUZEI>
      <ERDAT>20080905</ERDAT>
      <UZEIT>000549</UZEIT>
      <ZPROG>PGRR3010</ZPROG>
      <ZZSOL>000000000359502</ZZSOL>
      <ZZHAB>000000000359502</ZZHAB>
      <ZZBEL>0000001</ZZBEL>
      <ZZPOS>000000010</ZZPOS>
      <ZFILN />
      <ZENDE>E</ZENDE>
      </NACHSATZ>
      </ns0:MT_MULTI_TYPES>

  • Regarding creation of dynamic deep structure

    Hi all,
    I have to construct the dynamic deep structure.
    for example,
    With the help of information about address and t_table, i have to create the deep structure on runtime.
    In one case i need to create the deep strcuture with address alone and in another case i need to create the deep structure with address and t_table.
    DATA : begin of address ,
        address type string ,
        end of address.
    data : begin of t_tab  ,
      name(10) type c,
      age type i,
      address like address,
      end of t_tab,
      t_table like Table of t_tab.
    data: BEGIN OF wa_vig,
       details1 like address,
       details2 like t_table,
       END OF wa_vig.
    data: BEGIN OF wa_vig,
       details1 like address,
       END OF wa_vig.
    Please guide me, how should i acheive this with the help of dynamic declarion .
    regards
    Vignesh

    Hi All,
    I will be happy if i can acheive this using RTTS concept.
    Regards
    Vignesh

  • How can i point to a specific field in DEEP structure and populate it?

    Hello,
    I have declared a internal table as below,
    DATA: BEGIN OF wa_data,
                  vkorg TYPE vkorg
                  vtweg TYPE vtweg
                  spartTYPE spart
                  field_name TYPE CHAR30
                   value TYPE CHAR50
                END OF wa_data
    DATA: ls_data TYPE wa_data,
                lt_data TYPE STANDARD TABLE OF wa_data.
    The lt_data is populated as below,
    VKORG-------VTWEG-------SPART-------FIELD_NAME-------VALUE
    1000-----------10-------------01------------KALKS---------------ZP00 "Pricing procedure
    1000-----------10-------------01------------ZTERM---------------15 days "Payment terms
    1000-----------10-------------01------------MAHNA---------------09 "Dunning
    Fine.
    Now, i have a DEEP DEEP DEEP structure as belowm
    DATA: ls_deep TYPE cmds_ei_extern. "Pls. see this deep structure 'cmds_ei_extern' in SAP DDIC / SE11
    This deep structure is part of Customer master creation. Now, i would like to POPULATE this deep structure from my lt_data itab DYNAMICALLy, i mean, with out mentioning the field names (like, ZTERM, KALKS, MAHNA etc etc), bcz its these i am pulling this lt_data from a custom table, so going further business may also ADD a new record / field like BUSAB (Accouting clerk) with a value of AL (Allen Christi), hence i want to hv dynamic and its less tediuos also bcz,
    We can LOOP lt_data INTO ls_data (for example, the ls_data-field_name = KALKS)
    Now, point the KALKS in the deep deep deep structure and populate it with a value of ls_data-value (= 15 days)
    ENDLLOOP.
    Pls. let me know How can i do this, i guess, we need to use field symbols, pls. let me know the code to achieve my requirement
    Thank you

    Hi,
    Please refer below code.This will populate field kunnr of the deep structure. Once you select the data as per your requirement,you can write similar code to populate rest of the fields in the deep strucure.
    TYPES : BEGIN OF ty_data,
                 kunnr TYPE kunnr,
                 END OF ty_data.
    FIELD-SYMBOLS : <lfs_cmds_ei_header>   TYPE cmds_ei_header,
                    <lfs_cmds_ei_instance>              TYPE cmds_ei_instance,
                    <lfs_kunnr>                                   TYPE kunnr.
    DATA:  lfs_cmds_ei_extern  TYPE cmds_ei_extern,
                 lr_dytable                  TYPE REF TO data,
                 lr_dytable_wa           TYPE REF TO data,
                 lt_data                       TYPE STANDARD TABLE of ty_data ,
                 wa_data                   TYPE ty_data.
      SELECT kunnr
      FROM yalb_kunde
      UP TO 1 ROWS
      INTO TABLE lt_data.
      IF sy-subrc = 0.
        LOOP AT lt_data INTO lwa_data.
          ASSIGN COMPONENT 'HEADER' OF STRUCTURE lfs_cmds_ei_extern TO <lfs_cmds_ei_header>.
          IF sy-subrc = 0.
            ASSIGN COMPONENT 'OBJECT_INSTANCE' OF STRUCTURE <lfs_cmds_ei_header> TO <lfs_cmds_ei_instance>.
            IF sy-subrc = 0.
              ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <lfs_cmds_ei_instance> TO <lfs_kunnr>.
              IF sy-subrc = 0.
                <lfs_kunnr> = lwa_data-kunnr.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Thanks,
    Priya

  • Problem with deep structure in Adobe Forms

    Hi ,
    I am converting smartform into adobe forms. While converting the program code in the code initialization of the smart forms also get transformed to adobe forms the problem is my internal table is of type deep structure while passing it through the tables parameter i am getting error in adobe forms .But while passing the internal table through import parameter its not giving error.The same code works fine with smartforms. I dont know why its not taking the structure of internal table in adobe forms properly .It happens only for deep strucure formal normal tables it works fine in table parameters .If any one has come across this scenario please share your ideas.
    Best Regards,
    Sreeram

    If I were you, I would never do this through any program. The only secure, reliable way is to rewrite everything by your own hands. Even if we could argue, your way works as well (and could be faster at the beginning), at the firt moment you will be asked to perform any tiny change in this "imported" thing, you will cry your eyes out (and understand why it is the only useful way to rewrite everything manually).
    regards Otto

  • XSLT and ABAP Transformation Deep Structure

    Hello Everyone,
    While I've read the forums and the links of a number of folks doing the same thing. I am stuck in that I cannot figure out how to populate a deep structure via XSLT.  Not sure what is going wrong, but I suspect it is obvious. The simple problem is that my structure is not getting populated. It is blank.  The transformation works in testing STRANS (and in Stylus Studio). 
    I cannot figure out what is wrong that makes the t_pexr2002 table blank.  Thanks for any insight. 
    Greg
    The simple program is:
    TYPES: BEGIN OF ty_head,
              sndprn TYPE string,
              bgmref TYPE string,
              moabetrh TYPE string,
              create_date TYPE string,
              settlement_date TYPE string,
              no_lines TYPE string,
           END OF ty_head.
    TYPES: BEGIN OF ty_pricing,
            moabetr TYPE string,
           END OF ty_pricing.
    TYPES: BEGIN OF ty_item,
              docname TYPE string,
              docnummr TYPE string,
              pricing TYPE ty_pricing,
            END OF ty_item.
    TYPES: BEGIN OF ty_summary,
              status_message TYPE string,
           END OF ty_summary.
    TYPES: BEGIN OF ty_mn,
            header_data  TYPE ty_head,
            item_data    TYPE ty_item,
            summary_data TYPE ty_summary,
           END OF ty_mn.
    DATA: t_pexr2002 TYPE STANDARD TABLE OF ty_mn.
    DATA: xml_doc TYPE REF TO cl_xml_document, xml TYPE string.
    CREATE OBJECT xml_doc.
    CALL METHOD xml_doc->import_from_file
      EXPORTING
        filename = 'C:\temp\2640273.xml'.
    CALL METHOD xml_doc->render_2_string
      EXPORTING
        pretty_print = 'X'
      IMPORTING
        stream       = xml.
    CALL TRANSFORMATION zusl_pexr2002_v1
    SOURCE XML xml
    RESULT output = t_pexr2002.
    Edited by: Thomas Zloch on Jun 9, 2010 6:05 PM

    Here is my XSLT:
    Here is the transformation: Also pretty simple...
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... >
      <xsl:strip-space elements="*"/>
      <xsl:template match="/PEXR2002/IDOC">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTPUT>
                <HEADER_DATA>
                  <SNDPRN>
                    <xsl:value-of select="EDI_DC40/SNDPRN"/>
                  </SNDPRN>
                  <BGMREF>
                    <xsl:value-of select="E1IDKU1/BGMREF"/>
                  </BGMREF>
                  <MOABETRH>
                    <xsl:value-of select="E1IDKU5/MOABETR"/>
                  </MOABETRH>
                  <CREATE_DATE>
                    <xsl:value-of select="EDI_DC40/CREDAT"/>
                  </CREATE_DATE>
                  <SETTLEMENT_DATE>
                    <xsl:value-of select="E1EDK03/DATUM"/>
                  </SETTLEMENT_DATE>
                  <NO_LINES>
                    <xsl:value-of select="count(E1IDPU1)"/>
                  </NO_LINES>
                </HEADER_DATA>
                <ITEM_DATA>
                  <xsl:for-each select="E1IDPU1">
                    <DOCNAME>
                      <xsl:value-of select="DOCNAME"/>
                    </DOCNAME>
                    <DOCNUMMR>
                      <xsl:value-of select="DOCNUMMR"/>
                    </DOCNUMMR>
                    <PRICING_DATA>
                      <xsl:for-each select="E1IDPU5[MOAQUAL = '006']">
                        <MOABETR>
                          <xsl:value-of select="MOABETR"/>
                        </MOABETR>
                      </xsl:for-each>
                    </PRICING_DATA>
                  </xsl:for-each>
                </ITEM_DATA>
                <SUMMARY_DATA>
                  <xsl:for-each select="EDI_DS40">
                    <STATUS_MESSAGE>
                      <xsl:value-of select="STAPA1"/>
                    </STATUS_MESSAGE>
                  </xsl:for-each>
                </SUMMARY_DATA>
            </OUTPUT>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    Edited by: Thomas Zloch on Jun 9, 2010 6:05 PM

  • How to use STRANS to translate XML to ABAP with deep structure

    every experts, I want to use Tcode: STRANS to translate XML to ABAP, But it does not work well,
    here is XML code,I want to translate this XML into an an Inter table gt_orders with deep structure of oeb, and colum oeb is also and intertable,how can I do this.
    <?xml version="1.0" encoding="gb2312" ?><axmt410><ObjectID>setSalesOrder</ObjectID><azp01>000000</azp01><oea00>1</oea00><ta_oeaecn>SO-140227-3041</ta_oeaecn><oea03>25325017</oea03><oea02>2014-02-27 17:44:44.0</oea02><ta_oea002>2763.0</ta_oea002><ta_oea001>0.0</ta_oea001><oea14></oea14><oea15>25325017</oea15><oea23>RMB</oea23><oeaconf>S3</oeaconf><oea10></oea10><oeaud01>null</oeaud01><ta_oea007></ta_oea007><oea25>101</oea25><ta_oea008>0</ta_oea008><ta_oea009>null</ta_oea009><oeauser>Hanjingya</oeauser><ta_oeanday>2014-02-27 17:44:44.991</ta_oeanday><ta_oeamday>2014-02-28 08:30:14.866</ta_oeamday><ta_oeacday>2014-02-28 08:30:14.866</ta_oeacday><oeaud02>0</oeaud02><ta_oea030>null</ta_oea030><oeb><oeb03>1</oeb03><oeb04>7400208249</oeb04><oeb05>PCS</oeb05><oeb17>921.0</oeb17><oeb13>921.0</oeb13><oeb15></oeb15><oeb12>5</oeb12><oeb09>990001</oeb09><ta_oeb001></ta_oeb001><ta_oeb002>Yunnan</ta_oeb002><ta_oeb003>address1</ta_oeb003><ta_oeb004>zhangdagui、zhanglan</ta_oeb004><ta_oeb005>15974749998、15987782008</ta_oeb005><ta_oeb006>address and street</ta_oeb006><oebud01></oebud01></oeb><oeb><oeb03>2</oeb03><oeb04>7400208250</oeb04><oeb05>PCS</oeb05><oeb17>921.0</oeb17><oeb13>921.0</oeb13><oeb15></oeb15><oeb12>5</oeb12><oeb09>990001</oeb09><ta_oeb001></ta_oeb001><ta_oeb002>Yunnan</ta_oeb002><ta_oeb003>address2</ta_oeb003><ta_oeb004>zhangdagui、chenlan</ta_oeb004><ta_oeb005>15974749998、15987782008</ta_oeb005><ta_oeb006>address and street</ta_oeb006><oebud01></oebud01></oeb></axmt410>
    I write these codes in SAP XSLT  editor
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
       <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
       <xsl:strip-space elements="*"/>
       <xsl:strip-space elements="*"/>
       <xsl:template match="/">
         <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
           <asx:values>
             <ORDERS>
               <xsl:apply-templates select="//axmt410"/>
             </ORDERS>
           </asx:values>
         </asx:abap>
       </xsl:template>
       <xsl:template match="axmt410">
         <OBJECTID>
           <xsl:value-of select="ObjectID"/>
         </OBJECTID>
         <AZP01>
           <xsl:value-of select="azp01"/>
         </AZP01>
         <OEA00>
           <xsl:value-of select="oea00"/>
         </OEA00>
         <TA_OEAECN>
           <xsl:value-of select="ta_oeaecn"/>
         </TA_OEAECN>
         <OEA03>
           <xsl:value-of select="oea03"/>
         </OEA03>
         <OEA05>
           <xsl:value-of select="oea05"/>
         </OEA05>
         <OEA02>
           <xsl:value-of select="oea02"/>
         </OEA02>
         <TA_OEA002>
           <xsl:value-of select="ta_oea002"/>
         </TA_OEA002>
         <TA_OEA001>
           <xsl:value-of select="ta_oea001"/>
         </TA_OEA001>
         <OEA14>
           <xsl:value-of select="ora14"/>
         </OEA14>
         <OEA15>
           <xsl:value-of select="ora15"/>
         </OEA15>
         <OEA23>
           <xsl:value-of select="ora23"/>
         </OEA23>
         <OEACONF>
           <xsl:value-of select="oeaconf"/>
         </OEACONF>
         <OEA10>
           <xsl:value-of select="ora10"/>
         </OEA10>
         <OEAUD01>
           <xsl:value-of select="oeaud01"/>
         </OEAUD01>
         <TA_OEA007>
           <xsl:value-of select="ta_oea007"/>
         </TA_OEA007>
         <OEA25>
           <xsl:value-of select="ora25"/>
         </OEA25>
         <TA_OEA008>
           <xsl:value-of select="ta_oea008"/>
         </TA_OEA008>
         <TA_OEA009>
           <xsl:value-of select="ta_oea009"/>
         </TA_OEA009>
         <TA_OEA013>
           <xsl:value-of select="ta_oea013"/>
         </TA_OEA013>
         <TA_OEA014>
           <xsl:value-of select="ta_oea014"/>
         </TA_OEA014>
         <TA_OEA015>
           <xsl:value-of select="ta_oea015"/>
         </TA_OEA015>
         <TA_OEA016>
           <xsl:value-of select="ta_oea016"/>
         </TA_OEA016>
         <TA_OEA017>
           <xsl:value-of select="ta_oea017"/>
         </TA_OEA017>
         <TA_OEA018>
           <xsl:value-of select="ta_oea018"/>
         </TA_OEA018>
         <TA_OEA019>
           <xsl:value-of select="ta_oea019"/>
         </TA_OEA019>
         <TA_OEA020>
           <xsl:value-of select="ta_oea020"/>
         </TA_OEA020>
         <TA_OEA021>
           <xsl:value-of select="ta_oea021"/>
         </TA_OEA021>
         <TA_OEA022>
           <xsl:value-of select="ta_oea022"/>
         </TA_OEA022>
         <TA_OEA028>
           <xsl:value-of select="ta_oea028"/>
         </TA_OEA028>
         <OEAUSER>
           <xsl:value-of select="oeauser"/>
         </OEAUSER>
         <TA_OEANDAY>
           <xsl:value-of select="ta_oeanday"/>
         </TA_OEANDAY>
         <TA_OEAMDAY>
           <xsl:value-of select="ta_oeamday"/>
         </TA_OEAMDAY>
         <TA_OEACDAY>
           <xsl:value-of select="ta_oeacday"/>
         </TA_OEACDAY>
         <OEAUD02>
           <xsl:value-of select="oeaud02"/>
         </OEAUD02>
         <TA_OEA030>
           <xsl:value-of select="ta_oea030"/>
         </TA_OEA030>
         <OEB>
           <xsl:for-each select="oeb">
             <OEB03>
               <xsl:value-of select="oeb03"/>
             </OEB03>
             <OEB04>
               <xsl:value-of select="oeb04"/>
             </OEB04>
             <OEB05>
               <xsl:value-of select="oeb05"/>
             </OEB05>
             <OEB17>
               <xsl:value-of select="oeb17"/>
             </OEB17>
             <OEB13>
               <xsl:value-of select="oeb13"/>
             </OEB13>
             <OEB15>
               <xsl:value-of select="oeb15"/>
             </OEB15>
             <OEB12>
               <xsl:value-of select="oeb12"/>
             </OEB12>
             <OEB09>
               <xsl:value-of select="oeb09"/>
             </OEB09>
             <TA_OEB001>
               <xsl:value-of select="ta_oeb001"/>
             </TA_OEB001>
             <TA_OEB002>
               <xsl:value-of select="ta_oeb002"/>
             </TA_OEB002>
             <TA_OEB003>
               <xsl:value-of select="ta_oeb003"/>
             </TA_OEB003>
             <TA_OEB004>
               <xsl:value-of select="ta_oeb004"/>
             </TA_OEB004>
             <TA_OEB005>
               <xsl:value-of select="ta_oeb005"/>
             </TA_OEB005>
             <TA_OEB006>
               <xsl:value-of select="ta_oeb006"/>
             </TA_OEB006>
             <OEBUD01>
               <xsl:value-of select="oebud01"/>
             </OEBUD01>
           </xsl:for-each>
         </OEB>
       </xsl:template>
    </xsl:transform>
    and I use below ABAP program for a test, but the items from XML can not translate into Interner table gt_orders-oeb[]
    TYPE-POOLS abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\temp\order02.xml'.
    * This is the structure for the data from the XML file
    TYPES:
       BEGIN OF typ_s_oeb,
         oeb03     TYPE string,    "
         oeb04     TYPE string,    "
         oeb05     TYPE string,    "
         oeb17     TYPE string,    "
         oeb13     TYPE string,   
         oeb15     TYPE string,   
         oeb12     TYPE string,    "
         oeb09     TYPE string,    "
         ta_oeb001 TYPE string,    "
         ta_oeb002 TYPE string,    "
         ta_oeb003 TYPE string,    "
         ta_oeb004 TYPE string,    "
         ta_oeb005 TYPE string,    "
         ta_oeb006 TYPE string,    "
         ta_oeb013 TYPE string,    "
         ta_oeb014 TYPE string,    "
         ta_oeb015 TYPE string,    "
         ta_oeb016 TYPE string,    "
         ta_oeb017 TYPE string,    "
         ta_oeb018 TYPE string,    "
         ta_oeb019 TYPE string,    "
         ta_oeb020 TYPE string,    "
         ta_oeb021 TYPE string,    "
         ta_oeb022 TYPE string,    "
         oebud01   TYPE string,    "
       END OF typ_s_oeb.
    TYPES: typ_t_oeb TYPE TABLE OF typ_s_oeb WITH KEY oeb03.
    TYPES:
       BEGIN OF typ_s_order,
         objectid   TYPE string,   "
         azp01      TYPE string,   "
         oea00      TYPE string,   "
         ta_oeaecn  TYPE string,   "
         oea03      TYPE string,   "
         oea02      TYPE string,   "
         ta_oea002  TYPE string,   "
         ta_oea001  TYPE string,   "
         oea14      TYPE string,   "
         oea15      TYPE string,  
         oea23      TYPE string,   "
         oeaconf    TYPE string,   "
         oea10      TYPE string,   "
         oeaud01    TYPE string,   "
         ta_oea007  TYPE string,   "
         oea25      TYPE string,   "
         ta_oea008  TYPE string,   "
         ta_oea009  TYPE string,   "
         oeauser    TYPE string,   "
         ta_oeanday TYPE string,   "
         ta_oeamday TYPE string,   "
         ta_oeacday TYPE string,   "
         oeaud02    TYPE string,   "
         ta_oea030  TYPE string,   "
         ta_oea013  TYPE string,
         ta_oea014  TYPE string,
         ta_oea015  TYPE string,
         ta_oea016  TYPE string,
         ta_oea017  TYPE string,
         ta_oea018  TYPE string,
         ta_oea019  TYPE string,
         ta_oea020  TYPE string,
         ta_oea021  TYPE string,
         ta_oea022  TYPE string,
         ta_oea025  TYPE string,
         oeb        TYPE typ_t_oeb,
        END OF typ_s_order.
    * Table for the XML content
    DATA: gt_itab       TYPE STANDARD TABLE OF char2048,
           gs_itab       LIKE LINE OF gt_itab.
    * Table and work ares for the data from the XML file
    DATA: gt_orders     TYPE STANDARD TABLE OF typ_s_order,
           gs_orders     TYPE typ_s_order.
    * Result table that contains references
    * of the internal tables to be filled
    DATA: gt_result_xml TYPE abap_trans_resbind_tab,
           gs_result_xml TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex     TYPE REF TO cx_root,
           gs_var_text   TYPE string.
    * Get the XML file from your client
    CALL METHOD cl_gui_frontend_services=>gui_upload
       EXPORTING
         filename                = gs_file
       CHANGING
         data_tab                = gt_itab
       EXCEPTIONS
         file_open_error         = 1
         file_read_error         = 2
         no_batch                = 3
         gui_refuse_filetransfer = 4
         invalid_type            = 5
         no_authority            = 6
         unknown_error           = 7
         bad_data_format         = 8
         header_not_allowed      = 9
         separator_not_allowed   = 10
         header_too_long         = 11
         unknown_dp_error        = 12
         access_denied           = 13
         dp_out_of_memory        = 14
         disk_full               = 15
         dp_timeout              = 16
         not_supported_by_gui    = 17
         error_no_gui            = 18
         OTHERS                  = 19.
    IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_orders INTO gs_result_xml-value.
    gs_result_xml-name = 'ORDERS'.
    APPEND gs_result_xml TO gt_result_xml.
    * Perform the XSLT styleshee
    TRY.
         CALL TRANSFORMATION zfx_so_xml_to_abap
         SOURCE XML gt_itab
         RESULT (gt_result_xml).
       CATCH cx_root INTO gs_rif_ex.
         gs_var_text = gs_rif_ex->get_text( ).
         MESSAGE gs_var_text TYPE 'S'.
    ENDTRY.
    LOOP AT gt_orders INTO gs_orders.
    ENDLOOP.

    The simplest way seems to me is to use a XSL file for that. The <xsl:output> attributes doctype-system and doctype-public generate the DTD declaration <!DOCTYPE YOUR_ROOT SYSTEM "yourDTDfile.dtd"> and <!DOCTYPE YOUR_ROOT PUBLIC "yourDTDfile.dtd">, respectively.
    When calling transformerInstance.transform() the XSLT processor performs the identity transformation - it just copies elements, attributes, content, processing instructions and comments to the result stream.
    If you're using an xsl file for your transformation already, simply add <xsl:output doctype-system="yourDTDfile.dtd"/> to your existing XSL file.
    If you're only using the identity transformation you'd need to change the line of code where you obtain the transformer instance from the TransformerFactory to:
    t_factory.newTransformer(new StreamSource("test.xsl"));
    and use this as test.xsl:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:output doctype-system="yourDTDfile.dtd"/>
       <!-- this is the identity transformation -->
       <xsl:template match="*|@*|comment()|processing-instruction()|text()">
          <xsl:copy>
             <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
          </xsl:copy>
       </xsl:template>
    </xsl:stylesheet>Good luck.

Maybe you are looking for

  • My external hard drive has been used for Time Machine, now it doesn't work on my TV?

    I bought a new external HD 3TB, I used it as a back for Time machine and also wanted to use it for watching my movies etc on my TV. The TV won't recognise any video's on the HD. Is there some reason this would happen due to using it for Time Machine?

  • Win 8.1 Connector issue

    Hello folks, I have been having this annoying issue trying to Join my windows 8.1 desktop pc to my company domain, whenever I run through the connector software (Windows server 2012 essentials) it fails with "an unexpected error has occured" just aft

  • Jdeveloper Library setting

    I have a general Jdeveloper setting question. I have a comm-library folder. But I have to manually add to each and every project. Is there a way I can have it set up, that when I create a new project, automatically it picks up the comm-librar folder.

  • AppleWorks documents are being saved automatically as Unix files. How?

    Working on a G3 iBook with OS X (10.3), all AppleWorks documents are being saved as Unix Executable Files by the program despite the dialogue box saying they will be saved as Appleworks documents complete with ".cwk". After a while of successfully op

  • How to Scale Text?

    Is there any way in Keynote '09 to scale text in concert with other items? For example, if you select a text box and a square and resize (scale) up, the font size of the text remains constant. The desired behavior is for the font size to scale up app