‎2007 Feb 02 5:53 AM
Hi Experts,
i'm new to abap.
on selection screen there is a select-option for field city of LFA1 table.
the user wants that all city starting with (A* or a) till (H or h*) should be displayed.
how should i go about it.
plz help.
‎2007 Feb 02 5:55 AM
select-options : s_city for LFA1-CITY.
INITIALIZATION.
s_city-sign = 'I'.
s_city-option = 'CP'.
s_city-low = 'A*'.
s_city-high = 'H*'.
append s_city.
clear s_city.
s_city-sign = 'I'.
s_city-option = 'CP'.
s_city-low = 'a*.
s_city-high = 'h*.
append s_city.
clear s_city.Message was edited by:
Chandrasekhar Jagarlamudi
‎2007 Feb 02 6:01 AM
try this
Initialization.
s_city-sign = 'I'.
s_city-option = 'CP'.
s_city-low = 'A'.
s_city-high = 'HZ'.
append s_city.
clear s_city.
‎2007 Feb 02 6:01 AM
hi,
you can initialize the value by giving the range in INITIALIZATION events.
like city-low = 'a'
city-high = ' h'. and city is your select-options name.
‎2007 Feb 02 6:04 AM
Hi,
do like this
data : it_lfa1 type standard table of lfa1.
select-options : s_ort01 for lfa1-ort01.
select * from lfa1
into corresponding fields of
table it_lfa1
where ort01 in s_ort01.
you can enter A*
Regards
Shiva
‎2007 Feb 02 6:06 AM
Hello Annie,
This link gives all the possible patterns:
http://help.sap.com/saphelp_46c/helpdata/en/34/8e72da6df74873e10000009b38f9b8/frameset.htm
In particular:
Example
TABLES SBOOK.
SELECT-OPTIONS FL_DATE FOR SBOOK-FLDATE.
INITIALIZATION.
MOVE: 'I' TO FL_DATE-SIGN,
'EQ' TO FL_DATE-OPTION,
<b>SY-DATUM TO FL_DATE-LOW.</b>
APPEND FL_DATE.
MOVE: 'BT' TO FL_DATE-OPTION,
<b>'19960101' TO FL_DATE-LOW,
'19960630' TO FL_DATE-HIGH.</b>
APPEND FL_DATE.
When the selection screen is displayed, FL_DATE already contains the selection by the single value SY-DATUM (current date) and the interval from January 1 to June 30, 1996.
Regards,
Beejal
**Reward if this helps
‎2007 Feb 02 6:06 AM
Can't i do it without hardcoding the values.
As the requirement can be starting with (J* or j) upto (R or r*).
the requirement may change.
how should i go about it.
plz help.
‎2007 Feb 02 6:08 AM
‎2007 Feb 02 6:13 AM
Hi,
Try simply in the selection screen j* and rzzzz(maximum z as suggested).
In the coding as usual,
select * from db into table itab where field in s_field.
Here s_field is a select-option.
Message was edited by:
Jayanthi Jayaraman
‎2007 Feb 02 6:33 AM
Dear Try With Serch Help Option
you can get your requirment esely
1.use list box (combo box) and add most resanly option like (a-h, a-c, p-s ....)
2.use it to your serch help option
add rewards if helpful
‎2007 Feb 02 6:10 AM
the user has to enter the values manually.
if he need A to H, then have to enter A to HZ (in selection screen)
J to R ---> J to RZ