2008 May 20 10:03 AM
select option: matnr for mara-matnr.
i need to delete from itab value(char 254) in matnr(char
18)
i made delete itab where value in matnr.
but it's not right.
2008 May 20 10:08 AM
select-options : s_matnr for mara-matnr.
sort itab by matnr.
delete itab where matnr not in s_matnr.
Regards,
madan.
2008 May 20 10:08 AM
Hi,
Try the below code:
Loop at itab.
l_matnr = itab-value(18).
If l_matnr = matnr.
Delete itab.
Endif.
Endloop.
Thanks and Regards,
Lakshmi.
2008 May 20 10:32 AM
my matnr is in s.option , mean table how i can make = to a table.
or "read table itab with key value+0(18) in matnr"
2008 May 20 10:37 AM
Hi,
Move itab-value to any variable of length 18.
l_matnr = itab-value(18).
Then you can compare as given below:
If l_matnr in Matnr
Delete itab.
Endif.
This will work.
Thanks and Regards,
Lakshmi.
2008 May 20 10:10 AM
2008 May 20 10:12 AM
Hi,
Try like this
lv_matnr = itab-fieldname.
if matnr = lv_matnr.
delete from itab where matnr = matnr.
endif.
if its useful reward points
2008 May 20 10:29 AM
hi ,
try this code:
loop at itab.
condense itab-value.
read matnr with key matnr-low eq itab-value(18).
if sy-subrc eq 0.
delete itab.
endif.
endloop.
If the user gives range than u need to add some more logic to this..depending on how u get the materials of the range.
Regs,
Saurabh