Skip to Content
avatar image
Former Member

Dynamic internal table

hi,

can anybody explain me how to create the dynamic internal table with an example? It's a bit urgent.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 19, 2008 at 07:00 AM

    Hi,

    Pls go through the sample program.

    report z_dynamic.

    type-pools : abap.

    field-symbols: <dyn_table> type standard table,

    <dyn_wa>,

    <dyn_field>.

    data: dy_table type ref to data,

    dy_line type ref to data,

    xfc type lvc_s_fcat,

    ifc type lvc_t_fcat.

    selection-screen begin of block b1 with frame.

    parameters: p_table(30) type c default 'T001'.

    selection-screen end of block b1.

    start-of-selection.

    perform get_structure.

    perform create_dynamic_itab.

    perform get_data.

    perform write_out.

    form create_dynamic_itab.

    • Create dynamic internal table and assign to FS

    call method cl_alv_table_create=>create_dynamic_table

    exporting

    it_fieldcatalog = ifc

    importing

    ep_table = dy_table.

    assign dy_table->* to <dyn_table>.

    • Create dynamic work area and assign to FS

    create data dy_line like line of <dyn_table>.

    assign dy_line->* to <dyn_wa>.

    endform.

    pls refer this link

    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap

    If it is useful reward points

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 15, 2008 at 01:11 PM

    this question pops up every other day. Just use the search function.

    only a trip to the loo is urgent.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 15, 2008 at 07:07 PM

    Hi Khadeer,

    Check the below blog, it shows step by step procedure to create dynamic internal tables.

    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap

    Rewards if useful.

    Cheers,

    Chaith.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 15, 2008 at 09:28 PM

    Hello Khadeer

    You may want to have a look at [Creating Flat and Complex Internal Tables Dynamically using RTTI|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/creating%2bflat%2band%2bcomplex%2binternal%2btables%2bdynamically%2busing%2brtti]

    Regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 20, 2008 at 05:13 AM

    HI,

    you can use this function module to create interna table dynamically

    DB_CREATE_TABLE

    hope it is useful.

    regards,

    sreelakshmi

    Add comment
    10|10000 characters needed characters exceeded