‎2007 May 30 2:15 PM
hi all,
Please tell me if this statement is wrong:
delete t_mat where matnr in r_matnr[].
presently, r_matnr ( defined as range) is empty but still t_mat is getting deleted.
Thanks.
‎2007 May 30 2:17 PM
If there is nothing in the range then all records will be deleted.
You need to do a
CHECK NOT R_MATNR[] IS INITIAL
‎2007 May 30 2:17 PM
If there is nothing in the range then all records will be deleted.
You need to do a
CHECK NOT R_MATNR[] IS INITIAL
‎2007 May 30 2:18 PM
Hello,
because the range-table is empty every record is deleted. An empty range table is used as "all".
Best regards
Frank
‎2007 May 30 2:19 PM
try this..
if not r_matnr[] is initial.
delete t_mat where matnr in r_matnr[].
endif.
‎2007 May 30 2:23 PM
the funcionnality is like that.
so try like this..
ranges: r_matnr for mara-matnr.
data:
t_mara type table of mara with header line.
select *
from mara
up to 5 rows
into table t_mara.
if not r_matnr[] is initial.
delete t_mara where matnr in r_matnr.
endif.
write: 'test'.