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

SELECTION SCREEN

Former Member
0 Likes
1,311

HI FRIENDS,

I NEED TO CHOOSE MORE THAN ONE VALUE FOR A SELECTION. PLEASE GIVE ME IDEA TO DEVELOP.

EX : : Ability to filter out certain delivery block codes.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,280

Hai Murugan Arumugam ,

First declare the variable on selection screen in select-options.

Then in your code filter the data using a select statement ny putting the range in the selected options(range).

Here is the code:

TABLES TABLE_NAME. " The table in which the field is present .Of this

" type the select options variable is defined.

<b> SELECT-OPTIONS:

S_FIELD_NAME FOR TABLE_NAME-FIELDNAME.</b>

*Press the arrow to set different range values

" Select query

SELECT NEEDED FIELDS

FROM TABLE

INTO TABLE ITAB

<b> WHERE FIELD_VALUE IN S_S_FIELD_NAME.</b>

Regards,

Rama chary.Pammi

14 REPLIES 14
Read only

Former Member
0 Likes
1,280

Hi,

Select-option : s_matnr for mara-matnr.

Best regards,

Prashant

Read only

Sougata
Active Contributor
0 Likes
1,280

How about using SELECT-OPTIONS?

Read only

Former Member
0 Likes
1,280

Hi,

Try using

TABLES mara.

SELECT-OPTIONS : so_matnr FOR matnr.

This will give you a range on the screen, you press the button next to this range and choose to include/exclude ranges or single values

Hope this helps

Read only

Former Member
0 Likes
1,280

Hi

Declare select-options for delivery block like this

select-options:s_bukrs for t001-bukrs no intervals obligatory,

s_vkorg for tvko-vkorg no intervals no-extension.

you can enter more than one value for that field, instead of range of values.

reward if useful

regards

Anji

Read only

Former Member
0 Likes
1,280

Hi,

Use

SELECT-OPTIONS : s_kunnr like kna1-kunnr.

Read only

Former Member
0 Likes
1,280

Hi...

you might be using parameters to get your selection parameters now...

try to use select-option .... this is for ranges .. it will also work fine if you give a single value and also if you want ot give several individual valual for filtering out your selection .....

Ragards,

jayant

Read only

Former Member
0 Likes
1,280

Hi

You may give

Selection screen begin of screen <screen number>

select-options s_ebeln for ebeln

<any other options>

end of screen.

regards

Dinesh

Read only

Former Member
0 Likes
1,280

Hi Murugan,

go through this links which ll give you detail idea about the SELECT-OPTIONS

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select_o.htmhttp://help.sap.com/saphelp_nw2004s/h...

Read only

aris_hidalgo
Contributor
0 Likes
1,280

Hi,

As others have said, you can try to use SELECT-OPTIONS in a selection-screen so in that way you can enter multiple values or FROM - TO.To help you further, I have included an example below.


REPORT  z_aris_test_12.

TABLES: vbak.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS: s_spart FOR vbak-spart,
                s_vbeln FOR vbak-vbeln.
PARAMETERS: p_freeg AS CHECKBOX,
            p_prod  AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.

Hope it helps...

P.S. Please award points if it helps...

Read only

0 Likes
1,280

TABLES statement is obsolete and should be avoided. Better way of doing this would be:

REPORT zxyz.

DATA: wa_vbak TYPE vbak.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS: s_spart FOR wa_vbak-spart,
                s_vbeln FOR wa_vbak-vbeln.
PARAMETERS: p_freeg AS CHECKBOX,
            p_prod  AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.

I'm sure you would not want any more suggestions on this issue!

Read only

Former Member
0 Likes
1,280

hi,

check this one

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS : S_LIFNR FOR LFA1-LIFNR,

SELECTION-SCREEN END OF BLOCK B1.

by using this you can specify range .

Read only

Former Member
0 Likes
1,280

Hi,

Use select-options to meet your requirement.

then u will get '=> ' besides the paremeter on selection screen.

if you make a click on that, you will get a window with different options liuke

'single' 'range' with red and green symbols.

green symbol is to include those values which are mentioned in that window in the selection criteria.

red symbol is to exclude those values which are mentioned in that window in the selection criteria.

Try this, hope you will meet your requirement.

Read only

Former Member
0 Likes
1,281

Hai Murugan Arumugam ,

First declare the variable on selection screen in select-options.

Then in your code filter the data using a select statement ny putting the range in the selected options(range).

Here is the code:

TABLES TABLE_NAME. " The table in which the field is present .Of this

" type the select options variable is defined.

<b> SELECT-OPTIONS:

S_FIELD_NAME FOR TABLE_NAME-FIELDNAME.</b>

*Press the arrow to set different range values

" Select query

SELECT NEEDED FIELDS

FROM TABLE

INTO TABLE ITAB

<b> WHERE FIELD_VALUE IN S_S_FIELD_NAME.</b>

Regards,

Rama chary.Pammi

Read only

Former Member
0 Likes
1,280

thanks all