Можно ли объединить 2 структуры с вложенными полями таблицы с помощью одной инструкции в ABAP? Я пытался с MOVE-CORRESPONDING, но мне не удалось его получить.
Ниже я написал упрощенную версию того, что мне нужно сделать, моя реальная структура имеет больше таблиц, а также некоторые отдельные поля, но сейчасЯ только прошу упростить код ниже
TYPES: BEGIN OF ty_nested_tables,
table1 TYPE STANDARD TABLE OF ty_table1,
table2 TYPE STANDARD TABLE OF ty_table2,
END OF ty_nested_tables.
DATA: nested1 TYPE ty_nested_tables,
nested2 TYPE ty_nested_tables,
nested3 TYPE ty_nested_tables.
"I know this could be grouped in a single VALUE for the full nested3 variable
"but the part I want to simplify is the need for specifying table1 and table2
"when they are same name and type than the target
nested3-table1 = VALUE #( ( LINES OF nested1-table1 )
( LINES OF nested2-table1 ) ).
nested3-table2 = VALUE #( ( LINES OF nested1-table2 )
( LINES OF nested2-table2 ) ).