‎2006 Jul 21 3:36 AM
hello all,
i have requierment in which i am confused.I have to declare a field in selection screen for user input. I have declared the field as parameter.But there is no multiple select option. And user ant to have multiple select option(.i.e interval range).
The problem is the field i have declared in parameter is type c.Like:: Enterprise(30) type c,
divivsion(30) type c.
So this is not having any interval range.If i use select-option i can provide the range. SO plz help how can i define the parameter in select-option if its possible.
Most important thing is is there is no filed for refrence like: s_matnr for mara-matnr. as we can define in select-option.
Plz suggest some thing on this.
Thanks & Regards,
Anu Maheshwari
‎2006 Jul 21 3:39 AM
If you want to have intervals, then you got to use SELECT-OPTIONS
If you want to use select-options then you need to have a reference field from database.
There is not other way.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 Jul 21 3:43 AM
If you want to compare against a range, you can use select-options on your selection-screen other than that, use a parameter. Below is an example:
----
Selection screen *
----
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_bukrs(4) TYPE c OBLIGATORY,
p_budat TYPE bsik-budat OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
get records from BSIK
SELECT bukrs lifnr hkont belnr gjahr shkzg dmbtr sgtxt buzei
FROM bsik
INTO TABLE it_final
WHERE bukrs = p_bukrs
AND budat < p_budat
AND hkont = lv_hkont.
Hope this helps.
P.S. Please award points for useful answers.
‎2006 Jul 21 3:51 AM
Define like below.
data: test(30).
SELECT-OPTIONS diviv FOR test.
Thanks,
Amit
‎2006 Jul 21 5:21 AM
Hi Anu,
Decalare it as
1)If you want your SELECT -OPTIONS to behave like parameters. USe the option.
<b>SELECT-OPTIONS ..... NO INTERVALS NO-EXTENSION</b>
REPORT abc.
DATA : v_enterpr(30) TYPE c,
v_divin(30) TYPE c.
SELECT-OPTIONS : s_enterp FOR v_enterpr NO INTERVALS NO-EXTENSION ,
s_divin FOR v_divin NO INTERVALS NO-EXTENSION .
2)If you want to have it as SELECT-OPTIONS.
Then
REPORT abc.
DATA : v_enterpr(30) TYPE c,
v_divin(30) TYPE c.
SELECT-OPTIONS : s_enterp FOR v_enterpr ,
s_divin FOR v_divin .
Refer to the program I gave in this link for more details.
Regards,
Arun Sambargi.
‎2006 Jul 21 5:22 AM
hi,
select-options: s_matnr for mara-matnr NO-EXTENSION.
i hope it will works
Regards.
‎2006 Jul 21 5:23 AM
Is this the requirement: you should not display the range of the select option but allow multiple input's?
if this is the case use:
SELECT-OPTIONS: S_<name> for <fname> NO-INTERVALS.
this will not display the range. THe user can stil see the range when he clicks on the extension button.
for removing this u have to restrict the select options in the initialization event.
‎2006 Jul 21 5:25 AM
U cannot create a select option without the field, all u may have to do is
Tables: MARA.
select-options: s_matnr for mara-matnr.
‎2006 Jul 21 5:31 AM
Hi,
Yes you can do that, Please check the below code.
Just check this..
REPORT ZTEST.
data: ent(30),div(30).
select-options: s_ent for ent,
s_div for div.Regards
vijay