Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Fill dynamic internal table with data from another dynamic table

$
0
0

Hi,

 

I have a huge dynamic table with a few columns and need to fill another dynamic table with some of the columns, that are also existing in the other one. I first know at runtime, which fields the smaller table contains.

 

Until now, I did it that way:

 

  LOOP AT <it_tab_structure> ASSIGNING <wa_tab_structure>.

    LOOP AT lt_comp_full INTO ls_comp_full.

      ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <structure> TO <column>.

      ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <wa_tab_structure> TO <value>.

 

      <column> = <value>.

    ENDLOOP.

    APPEND <structure> TO <table>.

  ENDLOOP.

 

lt_comp_full contains the columns of the second table, that have to be filled.

This is taking a very long time, as there can be a lot of columns in the source table and the source table contains at least 100000 records.

 

Is there therefore any way to fill the other table faster?

 

Thank you & best regards,

 

Michael


Viewing all articles
Browse latest Browse all 8332

Trending Articles