Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Don' t take values from internal table

1190_5939_439
Active Participant
0 Kudos
838

I will take value from an internal table to the other internal table. But it failed . Can you help me ?

 lt_LVORM-matnr = lt_up-matnr.
 LOOP.
     SELECT * INTO CORRESPONDING FIELDS OF TABLE  lt_LVORM
    FROM MARA WHERE matnr = lt_LVORM-matnr.
     SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_LVORM
    FROM MARC WHERE matnr = lt_LVORM-matnr.
    MODIFY  lt_LVORM.
  ENDLOOP.


1 ACCEPTED SOLUTION
Read only

Szczerbowski
Contributor
776

Hi,

Please read about headers in tables and why to avoid them, it is ancient tech.
It seems that your internal table has one entry and a table header, but it's not pointing to anything yet, and you use the header row (row 0), to fill in the other header row.

lt_table -> header row
lt_table[] -> body of the table

Regards,
Michał

3 REPLIES 3
Read only

Szczerbowski
Contributor
777

Hi,

Please read about headers in tables and why to avoid them, it is ancient tech.
It seems that your internal table has one entry and a table header, but it's not pointing to anything yet, and you use the header row (row 0), to fill in the other header row.

lt_table -> header row
lt_table[] -> body of the table

Regards,
Michał

Read only

Sandra_Rossi
Active Contributor
776

LOOP alone is for "Extracts", it's an obsolete technology.

Instead, use:

LOOP AT itab ...
...
ENDLOOP.
Read only

1190_5939_439
Active Participant
0 Kudos
776

Thanks. I know it .