I have a table with many columns, and I want to fill a table with exactly 1 column from it.
If I define my 1-column table like this:
TYPES: BEGIN OF lty_ordid,
ordid TYPE /scmb/odm_ordid,
END OF lty_ordid.
DATA: lt_ordid TYPE TABLE OF lty_ordid.
Both if those work fine:
MOVE-CORRESPONDING mt_big_table TO lt_ordid.
lt_ordid = CORRESPONDING #( mt_big_table ).
But I dislike that I need 4 lines of code for the declaration, so my question is, what is a simpler way?
(Just using
DATA: lt_ordid TYPE TABLE OF /scmb/odm_ordid.
doesn't work, as the column then is not named "ordid" )