‎2007 Dec 18 10:02 AM
how to read two values from same field?
how to represent following statement?
READ TABLE it_komv WITH KEY kschl = ('ZPRN' , 'ZPRV').
‎2007 Dec 18 10:05 AM
Hi,
READ TABLE it_komv WITH KEY kschl = 'ZPRN' or kschl = 'ZPRV'.
Plzz reward points if it helps.
‎2007 Dec 18 10:07 AM
With in single READ statement you can't read muptiple values....
instead you can use LOOP AT ...
LOOP AT it_komv WHERE kschl = 'ZPRN' OR kschl = 'ZPRV' .
-
-
ENDLOOP.
‎2007 Dec 18 10:07 AM
‎2007 Dec 18 10:10 AM
Hi
You can use statement like this
READ TABLE it_komv WITH KEY kschl = 'ZPRN'
kschl = 'ZPRV'.
Regards
Shibin
‎2007 Dec 18 10:11 AM
Hi Prachi,
Use READ TABLE it_komv WITH KEY kschl in('ZPRN' , 'ZPRV').
Rgds,
Pankaj
‎2007 Dec 18 10:30 AM
Hi,
You can do as below :
Create a range.
data : gr_kschl for table-fieldname.
gr_kschl-sign = 'I'.
gr_kschl-option = 'EQ'.
gr_kschl-low = 'ZPRN'.
append gr_kschl.
gr_kschl-sign = 'I'.
gr_kschl-option = 'EQ'.
gr_kschl-low = 'ZPRV'.
append gr_kschl.
then read the table as below :
loop at it_komv.
read table gr_kschl with low = it_komv-kschl-low.
if sy-subrc eq 0.
"Your necessary coding.
endif.
endloop.
Thanks,
Sriram Ponna.