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

entering multiple values on selection screen

Former Member
0 Likes
14,677

how can i enter multiple values (not ranges )in parameters or select options, i want one functionality on selection screen to enter multiple material numbers like 1, 3 , 5 , 100,....infinite this functionality can possible with select options but how can i give to end user,

12 REPLIES 12
Read only

Former Member
0 Likes
7,271

Hi Mahendra,

you can use select-options here.

Select-options : so_matnr for mara-matnr NO INTERVALS.

press on the extensions and u can enter multiple material numbers.

I hope this will help you.

Regards,

Phani.

Read only

GauthamV
Active Contributor
0 Likes
7,271

hi,

WELCOME TO SDN.

you can do the same with select-options also.

Use the multiple selection button given at last of the select-options.

Read only

Former Member
0 Likes
7,271

Hi Mahendra,

Select-options has the option for your requirement.

On the selection screen, just go to multiple selection button.

There you will find a tab SELECT SINGLE VALUES.

Give all your values there and execute your code.

Regards,

Nitin.

Read only

Former Member
0 Likes
7,271

Hi,

Use FM SELECT_OPTIONS_RESTRICT. Pl. check the sample code:

&----


*& Report Z_TEST_JG

*&

&----


*&

*&

&----


REPORT Z_TEST_JG.

tables: vbak.

TYPE-POOLS: sscr.

DATA:

v_restrict TYPE sscr_restrict,

v_opt_list TYPE sscr_opt_list,

v_asn TYPE sscr_ass.

select-options: s_vbeln for vbak-vbeln no intervals.

INITIALIZATION.

PERFORM sub_restrict_option.

FORM sub_restrict_option .

CHECK v_restrict-opt_list_tab[] IS INITIAL.

CLEAR v_opt_list.

v_opt_list-name = 'EQ'.

v_opt_list-options-eq = 'X'.

APPEND v_opt_list TO v_restrict-opt_list_tab.

CLEAR v_asn.

v_asn-kind = 'S'.

v_asn-name = 'S_VBELN'.

v_asn-sg_main = 'I'.

v_asn-sg_addy = space.

v_asn-op_main = 'EQ'.

v_asn-op_addy = 'EQ'.

APPEND v_asn TO v_restrict-ass_tab.

CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'

EXPORTING

restriction = v_restrict

EXCEPTIONS

too_late = 0

repeated = 0

selopt_without_options = 0

selopt_without_signs = 0

invalid_sign = 0

empty_option_list = 0

invalid_kind = 0

repeated_kind_a = 0

OTHERS = 0.

ENDFORM. " sub_restrict_option

Read only

Former Member
0 Likes
7,271

Hi Mahindra,

This can be achieved using simple Select-Options statement.

SELECT-OPTIONS : s_aufnr FOR aufk-aufnr.

In the selection screen, click on Arrow Button which will allow you to enter multiple values for AUFNR

Hope this will solve your problem.

Best Regards,

Deepa Kulkarni

Read only

Former Member
0 Likes
7,271

Hi,

Use no intervals in ur select-option.

select-OPTIONS: s_mblnr for mseg-mblnr no INTERVALS.

Hope this will help u.

Thanks.

Read only

Former Member
0 Likes
7,271

Hi Mahendra,

Welcome to SCN.

I am not very clear with your requirement, but if you want enter multiple values in your selection screen than use SELECT-OPTIONS and then in selection screen you will get the functionality of entering multiple values on clicking on Multiple selection which will be in the right of your field & in that you will get the option of Select Single Values in the first tab.

With luck,

Pritam.

Read only

faisalatsap
Active Contributor
0 Likes
7,271

Hi, Mahendra,

Use Select Options like the following and from the extension button you can give multiple values for including or excluding,

Like using the extension button you will see the window on this window there are two column Heading Select Single Value OR Exclude Single Value.

SELECT-OPTIONS: sokunnr FOR kna1-kunnr NO INTERVALS OBLIGATORY .

if you will give 1, 2, 3 in the single value and give 4, 5 in the Exclude then the following code will select all the records having kunnr = 1, 2, 3 and not select 4, 5..

DATA: it_kna1 LIKE STANDARD TABLE OF kna1 WITH HEADER LINE.

SELECT * FROM kna1
  INTO CORRESPONDING FIELDS OF TABLE it_kna1
  WHERE kunnr IN sokunnr.

Reply if any Problem,

Kind Regards,

Faisal

Read only

Former Member
0 Likes
7,271

Hello everyone,

i have a similar inquiry. I read the thread saying that you can click in the selection screen and a dialog comes up where you can enter your multiple values. but can you set multiple default values with code?

maybe something like select-options s_matnr for mara-matnr default 00112233, 00223344, 00335566. or similar?

thanks,

Alejandro

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
7,271

Hi,

>

> how can i enter multiple values (not ranges )in parameters or select options, i want one functionality on selection screen to enter multiple material numbers like 1, 3 , 5 , 100,....infinite this functionality can possible with select options but how can i give to end user,

Use like:-


SELECT-OPTIONS : matnr TYPE matnr.

Now click on the button next to the higher value box, and use INCLUDE SINGLE VALUES to include multiple single values.

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
7,271

hi mahendra,

it is sipmle there is no confusion ..

use .

select-options matnr for mara-matnr ..

it will work even for user also..

~linganna

Read only

Former Member
0 Likes
7,271

hi,

use 'RANGES' for your problem.

Regards,

R K.