07-02-2007 4:35 AM
Dear Expert,
Example:
SELECT-OPTIONS so_klart for kssk-klart.
and I have an internal table it_kssk , which i want to filter by the selection range above.
since it_kssk already populated with data with the previous SQL statements, and I dont want to execute another SQL statement for the filtering. I am trying to avoid selecting it again using SQL because this is a heavy table...
I would like to find a way to read it_kssk with something like this
" read table it_kssk with key kssk-klart <b>IN SO_KLART</b> " ....
Or any function module to do this?
Or any suggestions?
using this way below is kind of tiresome...
LOOP at so_klart .
IF so_klart -option = "EQ"
read table xxxxx.....
elseif so_klart-option = "NE"
read table XXX...
else if ...
.....
Endloop...
Thank you.
Message was edited by:
Kokwei Wong
Message was edited by:
Kokwei Wong
Message was edited by:
Kokwei Wong
null
07-02-2007 4:47 AM
REPORT YARRANGE.
TABLES YTXLFA1.
RANGES: VENDOR FOR YTXFLA1-LIFNR.
- - - -
- - - --
- - - -
SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB
WHERE LIFNR IN VENDOR.
Here with RANGES user has to design an internal table with fields -
SIGN,OPTION,LOW and HIGH EXPLICITLY.
reward points if it isuse full ...
Girish
07-02-2007 4:48 AM
take a itab like
data : begin of imatnr occurs 0,
matnr like mara-matnr,
end of imatnr.
select matnr into table imatnr where matnr in so_matnr.
loop at it_mara.
read table imatnr with key matnr = it_mara-matnr.
if sy-subrc ne 0.
delete it_mara.
endif.
endloop.
regards
shiba dutta
07-02-2007 5:03 AM