Skip to Content

How to convert an internal table into dynamic internal table.

Hello,

I've created an internal table in following way :

go_struc ?= cl_abap_structdescr=>describe_by_data( <all_struc1> ).
gt_comp1 = go_struc->get_components( ).
CLEAR go_struc.
* * * Get the fields of the 2nd structure
go_struc ?= cl_abap_structdescr=>describe_by_data( <gs_struc2> ).
gt_comp2 = go_struc->get_components( ).
CLEAR go_struc.
* * Merge the fields of the 2 structures
APPEND LINES OF gt_comp2 TO gt_comp1.

<all_struc1> - This structure has few fields

<gs_struc2> - This structure has few fields

So i have one final table GT_COMP1 with all the fields from both structure. Now i want to create a dynamic table out of this internal table. Please do remember that both <Struc1> and <Struc2> can have N number of fields . So GT_COMP1 will have N number of fields during run time.

So how to create dynamic internal table from GT_COMP1 .

Thanks,

Vimal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 31, 2017 at 09:14 AM
    Add comment
    10|10000 characters needed characters exceeded