2022 Jul 13 10:32 AM
Hello experts,
i want to delete rows from a z table when it matches rows from an internal table at a speficic row count.
so basicallly this
"delete from ztab where ztab-column = itab[ row_count ]-column."
exept it doesn't work.
If that makes any sense.
Thank you.
2022 Jul 13 10:55 AM
LOOP AT itab into wa_itab.
DELETE FROM ZTAB WHERE COL1 = WA_ITAB-COL1.
ENDLOOP.
2022 Jul 14 8:16 AM
data(column) = itab[ row_count ]-column.
delete from ztab where column = column.
or with Host Expression (rewritten as minimal reproducible example):
DATA itab TYPE TABLE OF sflight.
DATA(row_count) = 1.
DELETE FROM sflight WHERE carrid = @( itab[ row_count ]-carrid ).