‎2021 Aug 02 12:48 PM
I always wonder is there any solution for this.
DATA(lt_table1) = VALUE tt_table1( FOR <fs_struct> IN lt_table WHERE( field1 EQ 'TEST' ) ( CORRESPONDING #( <fs_struct> ) ) ).
DATA(lt_table2) = VALUE tt_table2( FOR <fs_struct> IN lt_final WHERE( field1 EQ 'TEST1' ) ( CORRESPONDING #( <fs_struct> ) ) ).
Here, we will be getting an error stating <FS_STRUCT> used in the 2nd expression is not compatible since LT_FINAL is of a different structure compared to Lt_table.
Is there any way to unassign <FS_STRUCT> after the 1st statement? So that, it can be used in the next forthcoming FOR statements for different tables.
The normal UNASSIGN statement can't be used to unassign <fs_struct> since it won't have scope outside the FOR loop.
‎2021 Aug 02 1:03 PM
‎2021 Aug 02 3:18 PM
FYI this question was asked in Stack Overflow and answered there in details.