‎2008 Apr 22 9:31 AM
Hi All,
I would like to delete an internal table with changing columns. Could you please suggest what should be done if I have to execute the following code.
DELETE lr_rep->mt_sel_prg_plans WHERE (ls_sel_value-name) <> ls_sel_value-value.
Thanks and Regards,
Varun.
‎2008 Apr 22 9:36 AM
Have a look an Txn ABAPHELP key word "DELETE itab": There it says:
The dynamic specification of components using character-type data objects in parentheses is not supported here.
I would do the following:
LOOP AT lr_rep->mt_sel_prg_plans ASSIGNING <wa>.
ASSIGN COMPONENT ls_sel_value-name TO <fs>.
IF <fs> EQ ls_sel_value-value.
CLEAR <fs>.
ENDIF.
ENDLOOP.
‎2008 Apr 22 9:36 AM
Have a look an Txn ABAPHELP key word "DELETE itab": There it says:
The dynamic specification of components using character-type data objects in parentheses is not supported here.
I would do the following:
LOOP AT lr_rep->mt_sel_prg_plans ASSIGNING <wa>.
ASSIGN COMPONENT ls_sel_value-name TO <fs>.
IF <fs> EQ ls_sel_value-value.
CLEAR <fs>.
ENDIF.
ENDLOOP.
‎2008 Apr 28 2:38 PM
LOOP AT my_table INTO my_work_area. " or ASSIGNING TO <my_work_area>
ASSIGN COMPONENT (variable_containing_column_name) OF STRUCTURE my_work_area INTO <field_symbol>.
CLEAR <field_symbol>.
ENDLOOP.