07-13-2022 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.
07-13-2022 10:55 AM
LOOP AT itab into wa_itab.
DELETE FROM ZTAB WHERE COL1 = WA_ITAB-COL1.
ENDLOOP.
07-14-2022 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 ).