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

From deep structured to flat

Former Member
0 Likes
597

Hi Gurus!

I could do with some help.

I have a complex nested itab( itab_upload ). Now I need to copy entries which do not match our restrictions to another itab to display them in an alv-report.

Can you explain how I copy these entries (a maximum of the 2 columns out of 5) into a flat itab?

Thanks in advance!

Johann

(Points will be rewarded for useful answers!)

1 ACCEPTED SOLUTION
Read only

rodrigo_paisante3
Active Contributor
0 Likes
481

hi,

in a loop, you can use MOVE itab-field to itab2-field.

Regards.

3 REPLIES 3
Read only

rodrigo_paisante3
Active Contributor
0 Likes
482

hi,

in a loop, you can use MOVE itab-field to itab2-field.

Regards.

Read only

0 Likes
481

Hi again,

LOOP at itab.

IF <condition>.

MOVE itab-field to itab2-field

endif.

endloop.

Use IF to copy only your 2 columns.

Read only

Former Member
0 Likes
481

If you nested itab is something like...

MY_TAB (Main Table)

MY_DEEP_TAB (Deep Table)

You will need to create an Internal Table with the structure of MY_DEEP_TAB and do this....


LOOP AT MY_TAB ASSIGNING <TAB>.
MOVE <TAB>-MY_DEEP_TAB TO NEW_TAB.
APPEND NEW_TAB.
ENDLOOP.

Greetings,

Blag.