‎2013 Nov 28 10:25 AM
Hi Experts,
Why is the following statement not supported in abap ? is there any workaround for ?
Delete <table> where (lv_property_name) not in lt_select_options.
I know it is possible to write :
delete table <tbl> with table key (lc_fieldname) = lv_property_value.--> But this is not what i m looking for.
I have the work arround :
loop at <table> assigning <fs_table>.
ASSIGN component lf_property OF STRUCTURE <fs_table> TO <field>.
if <field> not in lt_sel_options.
delete <table> index sy-tabix.
unassign <field>.
endif.
endloop.
.
is there any better solution , so wthout looping the table ???
Thanks
‎2013 Nov 28 10:30 AM
Delete <table> where (lv_condition_syntax)
is possible, if that's of any help. See ABAP documentation for DELETE statement for all details.
Thomas
‎2013 Nov 28 10:30 AM
Delete <table> where (lv_condition_syntax)
is possible, if that's of any help. See ABAP documentation for DELETE statement for all details.
Thomas
‎2013 Nov 28 10:41 AM
Hi,
Your solution is good enough. It is easy to read and it does its thing efficiently.
Personally I wouldn't wast too much time on internal table operations, nowadays these operations are executed extremely fast, the only thing that I would worry about is, is this understandable for someone else.
Kind regards, Rob Dielemans