Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

parameter or select-option

Former Member
0 Likes
972

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

8 REPLIES 8
Read only

Former Member
0 Likes
919

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

Read only

aris_hidalgo
Contributor
0 Likes
919

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.

Read only

Former Member
0 Likes
919

Define like below.

data: test(30).

SELECT-OPTIONS diviv FOR test.

Thanks,

Amit

Read only

Former Member
0 Likes
919

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.

Read only

Former Member
0 Likes
919

hi,

select-options: s_matnr for mara-matnr NO-EXTENSION.

i hope it will works

Regards.

Read only

Former Member
0 Likes
919

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.

Read only

Former Member
0 Likes
919

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.

Read only

Former Member
0 Likes
919

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