10-24-2007 6:46 AM
Hi all,
I want to read only those two records given in lower limit and upperlimit of select-options.
pls help me ....points will be rewarded..
ThankYou,
Prashanth.
10-24-2007 6:48 AM
Declare your select option with "NO-EXTENSION" clause. This will make sure that you will be able to enter only LOW and HIGH value in select option.
ashish
10-24-2007 6:48 AM
HI,
tables:mara.
select-options:mat for mara-matnr no-extension.
data:itab like mara occurs 0 with header line.
select * from mara into table itab where matnr = mat-low or matnr = mat-high.
loop at itab.
write:/ itab-matnr,itab-ernam,itab-ersda.
endloop.
rgds,
bharat.
10-24-2007 6:50 AM
hi,
write the query like this..
<b>consider SELOPT is ur select options for MATNR</b>
SELECT *
FROM MARA INTO TABLE ITAB
WHERE
<b> MATNR EQ SELOPT-LOW OR
MATNR EQ SELOPT-HIGH.</b>
With Rgds,
S.Barani
10-24-2007 6:51 AM
10-24-2007 7:10 AM
hi prashanth,
use :
SELECT * FROM TABLENAME
INTO TABLE ITAB
WHERE FIELD EQ SEL_OPTLOW OR FIELD EQ SEL_OPTHIGH.
Hope this helps u.
regards,
sohi
10-24-2007 7:41 AM
can i get the solution using/Creating the <b>"RANGES"</b>tables....
Message was edited by:
Prashanth Polsani
10-24-2007 7:42 AM
The Low value and high Value itself gives u a range.
regards,
Vimal
10-24-2007 7:45 AM
Hi,
use IN operator in the select query.
Select * from MARA
into table itab
where matnr IN s_matnr.
This will include low & high values of S_MATNR.
Best regards,
Prashant
10-24-2007 7:51 AM
Hi Prashanth,
You can use either of these:
Eg :1
select-options:s_matnr for mara-matnr no-extension.
data:itab like mara occurs 0 with header line.
Select * from MARA
into table itab
where matnr IN s_matnr.
eg :2
select-options:s_matnr for mara-matnr no-extension.
data:itab like mara occurs 0 with header line.
select * from mara into table itab where matnr = mat-low or matnr = mat-high.
Reward if useful.
Regards,
Chitra Parameswaran
10-24-2007 7:54 AM
Hi Prasanth,
Use the below logic
data v_num type i.
select-options: s_num for v_num.
at selection-screen.
delete s_num where not option = 'BT'.
10-24-2007 8:13 AM
Hi Prashanth,
Suppose you have created the select option named s_matnr.
then you can write the query,
select single * from mara where matnr between s_matnr-low and s_matnr-high.
reward if useful,
regards,
Supriya
10-24-2007 9:34 AM
Hi
One more way of doing this if you dont want to use No Extension :
SELECT *
FROM MARA INTO TABLE ITAB
WHERE
MATNR IN s_matnr.
describe table itab lines lin .
After this
DELETE ITAB from 2 to (lin-1) .
Itab will always have 2 records with low and high value .
Praveen.
Message was edited by:
praveen parasiya
10-24-2007 9:44 AM
Hi,
You can use the ranges or select statement as below :
select-options : so_bukrs for bsis-bukrs.
First Option
ranges : gr_bukrs for bsis-bukrs.
initialization.
gr_bukrs-option = 'BT'.
gr_bukrs-sign = 'I'.
gr_burks-low = so_bukrs-low.
gr_bukrs-high = so_bukrs-low.
append gr_bukrs.
gr_bukrs-option = 'BT'.
gr_bukrs-sign = 'I'.
gr_burks-low = so_bukrs-high.
gr_bukrs-high = so_bukrs-high.
append gr_bukrs.
start-of-selection.
select field1 field2 from <tablename> into table itab where bukrs in gr_bukrs.
or
Second option.
select field1 field2 from <tablename> into table itab
where bukrs eq so_bukrs-low
or bukrs eq so_bukrs-high.
Thanks,
Sriram Ponna.
10-24-2007 9:52 AM
Why don't you use select_option-low and select_option-high values for selection.