How to create dynamic nested internal table

Hi Experts,
Pleae tell me or give sample code, how to create dynamic nested internal table ?
I have seen threads saying creation of dynamic internal tables using some table structure only. But now the requirement is to create dynamic nested internal table.
For example the internal table contains two fields viz., one is field1 of dynamic internal table and other is normal field2 and values as shown below:
Nested internal table:
field1                     |     field2 ...
<table content1>     |     value2..
<table content1>     |     value2..
Here the [table content] should also a dynamic internal table.
Let me know if you need any other info.
regards
Saravanan R

see the complete code..i am currently working in ECC6.0 EHP4. just check which version you are using..
REPORT  yst_test_000.
DATA:
      lt_comptab         TYPE cl_abap_structdescr=>component_table,
      ls_comp            LIKE LINE OF lt_comptab,
      lref_newstr        TYPE REF TO cl_abap_structdescr,
      lref_tab_type      TYPE REF TO cl_abap_tabledescr,
      lt_fcat            TYPE lvc_t_fcat,
      ls_fcat            TYPE lvc_s_fcat,
      ls_dd03p           TYPE dd03p,
      lt_data            type ref to data.
field-symbols: <fs_table> type standard table.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
  EXPORTING
    i_structure_name       = 'SCARR'
  CHANGING
    ct_fieldcat            = lt_fcat
  EXCEPTIONS
    inconsistent_interface = 1
    program_error          = 2
    OTHERS                 = 3.
IF sy-subrc NE 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT lt_fcat INTO ls_fcat.
  IF ls_fcat-ref_table IS NOT INITIAL.
    CLEAR ls_dd03p.
    CALL FUNCTION 'BUS_DDFIELD_GET'
      EXPORTING
        i_tabnm         = ls_fcat-ref_table
        i_fldnm         = ls_fcat-fieldname
      IMPORTING
        e_dd03p         = ls_dd03p
      EXCEPTIONS
        field_not_found = 1
        OTHERS          = 2.
    IF sy-subrc EQ 0.
      ls_comp-name = ls_fcat-fieldname.
      ls_comp-type ?= cl_abap_datadescr=>describe_by_name( ls_dd03p-rollname ).
      APPEND ls_comp TO lt_comptab.
      CLEAR ls_comp.
    ENDIF.
  ELSE.
    ls_comp-name = ls_fcat-fieldname.
    ls_comp-type ?= cl_abap_datadescr=>describe_by_name( ls_fcat-rollname ).
    APPEND ls_comp TO lt_comptab.
    CLEAR ls_comp.
  ENDIF.
ENDLOOP.
*Now for the Field which you want deep table then you can do like this
ls_fcat-fieldname  = 'NESTED_TABLE'.
ls_fcat-inttype    = 'C'.
ls_fcat-intlen     = '000006'.
ls_fcat-rollname   = 'SFLIGHT_TAB1'. "For SFLIGHT
APPEND ls_fcat TO lt_fcat.
ls_comp-name = ls_fcat-fieldname.
ls_comp-type ?= cl_abap_datadescr=>describe_by_name( ls_fcat-rollname ).
APPEND ls_comp TO lt_comptab.
CLEAR ls_comp.
lref_newstr = cl_abap_structdescr=>create( lt_comptab ).
lref_tab_type = cl_abap_tabledescr=>create( lref_newstr ).
create data lt_data type handle lref_tab_type.
assign lt_data->* to <fs_table>.
break-point.
Edited by: Vijay Babu Dudla on Apr 28, 2009 8:05 AM

Similar Messages

  • [Updated] How to create copies of internal table?

    Dis is the detailed description of a problem i have and i
    tried all i can to solve it without satisfied results.
    I want to copy an internal table of a type defined in the
    ABAP program itself, not dictionary. I have a function
    that is supposed to accept the internal table as a
    parameter of type 'any table'. The function should create
    the new internal table using the field catalog of the
    passed 'any table' and then create a new internal table
    using "create_dynamic_table" and return the DATA pointer.
    If anyone knows how it is done pls help me out.
    I would like to get the field catalog of the following
    internal table automatically by using some sap function..
    TYPES:
    BEGIN OF MYTYPE,
      NAME TYPE SOMEZTABLE-NAME,
      AGE TYPE SOMEZTABLE-AGE,
    END OF MYTYPE.
    DATA:
    IT_TABLE TYPE TABLE OF MYTABLE INITIAL SIZE 0.
    DATA:
    COPY_OF_IT_TABLE TYPE REF TO DATA.
    SELECT NAME AGE INTO TABLE IT_TABLE FROM S0MEZTABLE.
    PERFORM CREATECOPY USING IT_TABLE CHANGING COPY_OF_IT_TABLE.
    <b><i>[I have used FORM 4 understanding purpose only. I
    actually want to put the code in the form in a seperate
    global class method. So, its not possible to define
    field symbols in the main pgm and assign value to it
    from within the FORM. Also we cant CREATE DATA of the
    type 'mytype' within the FORM.]</i></b>
    FORM CREATECOPY
      USING
        IT_TABLE <b>TYPE ANY TABLE</b>
      CHANGING
        COPY_OF_IT_TABLE TYPE REF TO DATA.
    <i><b>[ Here i would like to create a copy the passed
    internal table and return a reference to it. I donot want
    to refer to the same table passed. I guess the use of
    function CREATE_DYNAMIC_TABLE in the CL_ALV_TABLE_CREATE
    clss is required. ]</b></i>
    ENDFORM.

    Ravikumar,
    All the example code i have got wil not work when i put the code in a method of a class..
    The problem is not as simple as it sounds...
    Pls try if u can and u will understand the basic problem..
    If u can pls giv me ur email id as i can mail u the detailed description of the problem..

  • HOW TO CREATE A FINAL INTERNAL TABLE FROM 8 OTHER INTERNAL TABLES

    I have around 8 internal tables and I need to merge all of them into one final internal table so that I need to pass the new internal table for ALV Grid display

    Hi Balram,
    Assuming that there are logical links (ie foreign key relationships) between each of these internal tables, on way is to do several loops controlled by a binary search.
    eg. we have 2 tables:
    types: begin of ty_makt,
                matnr  type matnr,
                maktx  type maktx,
              end of ty_makt.
    types: begin of ty_mara,
                matnr  type matnr,
                bismt  type bismt,
              end fo ty_mara.
    types: begin of ty_output,
                matnr  type matnr,
                bismt  type bismt,
                maktx  type maktx,
              end of ty_output.
    data: tbl_mara type table of ty_mara with header line,
            tbl_makt type table of ty_makt with header line,
            tbl_putput type table of ty_output with header line.
    sort tbl_makt by matnr.
    loop at tbl_mara.
      read table tbl_makt with key matnr = tbl_mara-matnr binary search.
      if sy-subrc eq 0.
    * build tbl_output here
      endif.
    endloop.
    Hope this helps.
    Cheers,
    Pat.

  • How to Create Dynamic form using table data

    Dear All,
    I have one Table called PRODUCT_MASTER where product details are stored. Say product A,B,C,D are stored in the table. Another table called SUB_PRODUCT_MASTER, which contains sub product details.Say A1,A1,B1,B2, B3,C1, C2, C3, D1,D2,D3.
    Now, I want to create a dynamic form based on product,sub product. for a whole month. For better under standing here is the format.
    PRODUCT A B C D
    SUB_PROD A1 A2 B1 B2 B3 C1 C2 C3 D1 D2 D3
    Days
    1 x x x x x x x x
    2
    3
    4
    5
    6
    7
    Now whenever I add one row in the PRODUCT)MASTER table and SUB_PRODUCT_MASTER table, Form should add one column in the form automatically. e.g. If I add Product E with two Sub product E1 and E2 then form should add ptoduct E column in the form with sub products E1 and E2 as per above format. Here days are fixed to 31. This forms should accept product wise daily despatch entry. For
    storing despatch entry another table is created.
    Please help to create this type od forms.

    You want I believe to create Croos-Table(Matrix) form. Visit Cross-table (matrix) forms layout and add "Please Send me too".

  • How to create checkbox group and table dynamically?

    HI All
    How to create checkbox group and table dynamically?
    Regards
    Ravi

    hi
    check this links for creating  tables dnamically
    How to Create a table dynamically?
    Re: how to create a table dynamically in webdynpro
    and for checkboxgroup
    IWDTransparentContainer rootContainer =
    (IWDTransparentContainer)view.getElement("RootUIElementContainer");
    IWDCheckBox check = (IWDCheckBox)view.createElement(IWDCheckBox.class,"Check"+k);
    //Here "check"+k k represents a unique value every time u create so that u wont get a duplicate instance
    check.setChecked(false);
    rootContainer.addChild(check);
    or Re: adding checkboxes dynamically

  • How to create Dynamic Table Control

    Hi
    How to create Dynamic Table control , The field names and values to be displayed in table control are to be fetched from Add-on Tables.
    Regards
    Prasath

    Hi Jonathan,
    Actually the columns to be displayed are not constant . It will be increased based on the database values, Anyhow it will not exceed 100.
    Please confirm my understanding.
    1. In this case I have to create 100 custom columns and make it visible / invisible based on my requirement and I can set the title at runtime.
    2. How can i assosicate / reassociate the datadictionary reference for the columns that i use. Because I need to show the search help values for the
    dynamic columns.
    Your opinion on this will be helpful.
    Regards
    Prasath

  • Want to create dynamic SQL with table join

    I want to create a dynamic SQL query so that the user can enter any two table names on the selection screen and two field names that he wants to join. After which i should be able to dynamically generate the SQL (native or open) and show the result as report. I have already read the forum threads and know how to create dynamic SQL for single table, what i m struggling with is how to do inner join. I know i can use nested select but that will make the query very slow because i want to extend it to more than 2 tables later.
    Will give points to useful answer for sure, thanks for reading.

    Hi,
    Following is a piece of code which I have used in my program.
    DATA: ws_flds(72)   TYPE c.
    DATA: ftab  LIKE TABLE OF ws_flds.
    ws_flds = 'rbukrs rprctr racct ryear '.
      APPEND ws_flds TO ftab.
       SELECT (ftab)
        INTO CORRESPONDING FIELDS OF TABLE it_grp_glpca
        FROM glpca FOR ALL ENTRIES IN i_cert_item
        WHERE kokrs = c_kokrs
            AND rldnr = '8A'
            AND rrcty IN ('0','2')
            AND rvers  = '000'
            AND rbukrs = i_cert_item-bukrs
            AND ryear  = p_ryear
            AND rprctr = i_cert_item-prctr
            AND racct  = i_cert_item-saknr
            AND ( poper BETWEEN '001' AND ws_poper )
            AND aufnr IN s_aufnr
            AND kostl IN s_kostl
            AND rfarea IN s_fkber
            AND rmvct IN s_rmvct
            AND sprctr IN s_sprctr
            AND ( racct BETWEEN c_low AND c_high ).
    You can now pass your table name as (p_table) or append fieldnames to the internal table (ftab). if it is join then you can append this table like abukrs asaknr..etc.
    Regards
    Subramanian

  • Dynamically changing internal table in 'gui_download'

    Hi Experts,
                     i have to download 4 internal tables, each with different structures, to the presentation server using 'gui_download', based on which radio-button is selected in the selection screen. I am hoping to use a single 'form' and 4 'perform' calls. how can I dynamically change the tables in the 'gui_download' function modules.
    plz help.....................

    Hi ,
    Build the field catalog dynamically based on the internal table structure based on the radio button selected.Use the dynamic internal table generated from the filedcatalog and use in GUI_DOWNLOAD.
    See the below code:
    *& Report  ZRAJESH02
    REPORT  zrajesh02.
    Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                  <dyn_wa>.
    DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
          it_fldcat TYPE lvc_t_fcat.
    DATA: lv_monate TYPE f,
          lv_months TYPE i,
          lv_date TYPE sy-datum,
          p_check1 type n value '1'.
    lv_date = sy-datum + 360.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_check TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis   = lv_date
          i_datum_von   = sy-datum
          i_kz_incl_bis = ' '
        IMPORTING
          e_monate      = lv_monate.
      lv_months = lv_monate.
      PERFORM f_fcat USING 'AUFNR' 'CHAR' '12'.
      PERFORM f_fcat USING 'POSNR' 'CHAR' '06'.
      while p_check1 LE p_check.
      PERFORM f_fcat USING p_check1 'CHAR' '1'.
      p_check1 = p_check1 + 1.
      endwhile.
      PERFORM build_dyn_itab.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        WRITE:/ <dyn_wa>.
      ENDLOOP.
    FORM f_fcat USING fieldname dattyp length.
      DATA:wa_it_fldcat TYPE lvc_s_fcat.
      CLEAR wa_it_fldcat.
      wa_it_fldcat-fieldname = fieldname.
      wa_it_fldcat-datatype = dattyp.
      wa_it_fldcat-intlen = length.
      APPEND wa_it_fldcat TO it_fldcat .
    ENDFORM.                    "f_fcat
    *&      Form  build_dyn_itab
          text
    FORM build_dyn_itab.
      DATA: new_table TYPE REF TO data,
      new_line TYPE REF TO data.
    wa_it_fldcat TYPE lvc_s_fcat.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'AUFNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 12.
    APPEND wa_it_fldcat TO it_fldcat .
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'POSNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    APPEND wa_it_fldcat TO it_fldcat .
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    ENDFORM.                    "build_dyn_itab
    Thanks,
    Rajesh.

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • Create dynmic deep internal table

    Dear all,
    is it possible to create a dynamic internal table which has a deep structure. The catch here is that component tables of the main internal table will determined dynamically.
    thanks a lot!!!
    Navjot

    Hi Navjot,
    Dyanmic internal table with deep structure is specially useful when we have to create an ALV with Colors or Style etc. Since we have CL_ABAP_TABLEDESCR class from RTTS, it is also possible to create a dynamic internal table with the deep structure. To create an internal table with deep structure, we need to first get the object definition of the table type. Than we have to add that as a component of our table definition and that's it.
    Try this :
    *& Report ZNP_DYNAMIC_DEEP_TABLE.
    *& Shows how to create dynamic internal table with deep strcuture
    *&   which can be used in the ALV to have Sytle table, Color table
    * 2.1 Creating the Deep strcuture field
      DATA:  lo_tab TYPE REF TO cl_abap_tabledescr.
      lo_tab ?= cl_abap_typedescr=>describe_by_name( 'LVC_T_SCOL' ).
      la_comp-name = 'COLOR_TAB'.
      la_comp-type = lo_tab.
      APPEND la_comp TO lt_tot_comp.
      CLEAR: la_comp.
    Regards
    Abhinab Mishra

  • Passing Nested internal table to GUI_DOWNLOAD

    Hi All
    I have got a nested internal table, I want this whole report in excel format, I tried using GUI_DOWNLOAD , it gives error. Does any body have any idea how can I solve this.
    regards
    AJ

    Hi,
    I think nested and deep structure internal tables will not work with gui_download.
    you need to convert before giving it to gui_download
    aRs

  • *How can we use the internal table in module pool programming? Clarify plz*

    If we creating a screen using the table having four fields(for e.g.). The screen has the functions of display, modify, delete, save, exit etc for the fields. The front-end of the screen having I/O fields of the table using internal table. How can we declare the internal table in the screen?

    HI,
    Create one WA for your Internal table and then map it to your fields.
    For Example,
    Data : begin of wa,
              name(10),
              age type i,
               end of wa.
    data : it like table of wa with header line.
    Then in screen create input fields with the name, age and ***.
    Then the user entered values are stored in name age and ***.
    then you can manipulate with that values using wa.
    Thanks.

  • How to create a tree in table?

    How to create a tree in table?

    Hi,
    check these links,
    Tree Structure:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/de59f7c2-0401-0010-f08d-8659cef543ce
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#31
    /people/paolo.romano2/blog/2007/11/09/dynamic-tree-in-abap-webdynpro
    Regards,
    Muneesh Gitta.

  • Nested Internal Table Tables and REUSE_ALV_GRID_DISPLAY

    Can you display entries from a nested internal table in the using the call function 'REUSE_ALV_GRID_DISPLAY'?
    Types and internal tables are below.  I have skimmed the code for the function module below, assume field category built, etc.. The table is in the tables portion of the function module, the nested internal table is inside of int_output defined as data: int_tlines type t_tline occurs 0.
    TYPES:
    BEGIN OF t_tline,
    tdformat type tline-tdformat,
    tdline type tline-tdline,
    END OF t_tline.
    DATA:
    BEGIN OF int_output occurs 0,
      qmnum       TYPE qmnum,
      sys_stat    TYPE j_stext,
      kunum       TYPE qkunum,
      sting       TYPE string,
      numr        TYPE vbeln,
      bstnk       TYPE bstkd,
      vbeln       TYPE kdauf,
      erdat(10)   TYPE c,
      aufnr       TYPE aufnr,
      werks       TYPE werks_d,
      idat2(10)   TYPE c,
      otgrp       TYPE otgrp,
      oteil       TYPE oteil,
      fd_text     TYPE qtxt_code,
      fegrp       TYPE fegrp,
      fecod       TYPE fecod,
      pb_text     TYPE qtxt_code,
      fetxt       TYPE fetxt.
      data: int_tlines type t_tline occurs 0.
      data: QMTXT TYPE QMEL-QMTXT,
      NOTIF_TXT   TYPE STRING,
      bautl       TYPE bautl,
      bautx       TYPE bautx,
    END OF int_output.
    DATA: i_output      LIKE STANDARD TABLE OF int_output,
    w_output      LIKE LINE OF int_output.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
        TABLES
          t_outtab                 = int_output
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.

    Hi
    I dont think this requirement is possible. Even if we pass the data through the nested internal table the FM may not give a dump. The main problem will be with field catalog. How can we build field catalog for the fields inside the nested internal table.
    Field catalog for this FM REUSE_ALV_GRID_DISPLAY should be of type SLIS_FIELDCAT_ALV and this is a standard one.

  • Problem reading data from nested internal table.

    Hi,
    Below is my code;
    *********SAP Code********
    TYPES: BEGIN OF v54a0_scdd,
             fknum  LIKE vfkk-fknum,
             change LIKE vfkkd-updkz,
             x      TYPE v54a0_scd,
             y      TYPE v54a0_scd,
             tvtf   LIKE tvtf,
           END OF v54a0_scdd.
    SCD table for dialog
    TYPES: v54a0_scdd_tab TYPE v54a0_scdd OCCURS 1.
    *********SAP Code********
    *Custom declaration*****
    data: wa_freight_costs type v54a0_scdd_tab.
    data: it_freight_costs type v54a0_scdd_tab occurs 0.
    *****Here data is getting appended to it_freight_costs. P_frieght_costs is coming from standard program.
         move p_freight_costs TO wa_FREIGHT_COSTS.
         append wa_freight_costs to it_freight_costs.
         clear wa_freight_costs.
    ***Now the problem is here. I am not able to read the data from the nested internal table x-item.
    if i use <fs_f_costs> to move data from it_freight_costs in the outer loop, i get a syntax error; <i> "the line type of the table it_freight_costs is not compatible with field symbol type <fs_f_costs>" </i>
         FIELD-SYMBOLS: <fs_f_costs> type line of v54a0_scdd_tab.
          LOOP AT it_freight_costs assigning <fs_f_costs>.
              LOOP AT <fs_f_costs>-x-item ASSIGNING <fs_freight_item>.        
                  <b> I want to read <fs_freight_item>-vfkp-netwr.</b> 
             ENDLOOP.
    Can anyone guide me?

    A quick look at how I would do this. Note I haven't checked if this compiles just done a quick brain-dump.
      DATA: lr_f_costs TYPE REF TO v54a0_scdd_tab,
            lr_f_cost TYPE REF TO v54a0_scdd.
      LOOP AT it_freight_costs REFERENCE INTO lr_f_costs.
        LOOP AT lr_f_costs->* REFERENCE INTO lr_f_cost.
        ENDLOOP.
      ENDLOOP.
    As you can see I personally prefer pointers to field symbols - I don't believe there is any performance differences and because of my background in other languages pointers make more sense to me.
    Cheers
    Graham Robbo

Maybe you are looking for

  • ChaRM. Release Transport Request

    Hello colleagues! I need your advice about background user for releasing of requests. I've found information in help that request may be released by [bg.user|http://help.sap.com/saphelp_sm32/helpdata/en/35/613542e454b104e10000000a1550b0/content.htm].

  • Oracle 10g installation in an SPARC 64 bit Solaris 10 server

    Good morning, I'm trying to install Oracle 10g Enterprise Edition in a server with Solaris 10 as operating system. When I run the oui, the prerequisites part is passed but the installation gives me an error telling that the installer can't write in t

  • Call EJB from a thread , pb with lookup

    Hello, I have seen taht it is possible to call an EJB within a thread that can act as a client. But in my case when the thread calls the EJB method the lookup failed. I do exactly the same like if I call the ejb from an external client. In my case I

  • Connect a 6280 to a palm t3

    Hi, I have unsuccessfully been trying to connect my brand new 6280 to my tungsten t3 palm via bluetooth The phonelink application does not recognize this model... Would you have a hint? Do you know which initialization string to use? Thanks in advanc

  • I cannot view video clips in iphoto. quicktime used to open automatically but no longer

    I cannot view video clips I created and syncd from my iphone into iphoto.  Quicktime used to open automatically.  Now it wont for some reason.