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

how to do multiple selections for a selection screen object

Former Member
0 Likes
1,516

i need to select material (RMCBC_MATNR) from a selection screen. how do i facilitate for multiple selections.

plz help me out. thanks in advance.

kiran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,206

Hi Kiran,

at the end of the selection screen option you would find a button , please click on it and you can enter all the values you would want to check out for

Hi Kiran,

at the end of the selection screen option you would find a button , please click on it and you can enter all the values you would want to check out for

7 REPLIES 7
Read only

Former Member
0 Likes
1,207

Hi Kiran,

at the end of the selection screen option you would find a button , please click on it and you can enter all the values you would want to check out for

Read only

0 Likes
1,206

but how can i catch all those values and further use them. can u demonstrate that with a piece of sample code, if possible. thank you

Read only

0 Likes
1,206

Kiran,

I am guessing that you have SELECT-OPTIONS in the selection screen. So, once you have entered mutlipel values by clicking on the button, all you have to do is

SELECT * FROM XXX WHEER COLUMN IN S_OPTION.

S_OPTION is your select options on the screen. It will take care of all the values entered.

S_OPTION is a internal table. Take a look at the help for the same.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

Former Member
0 Likes
1,206

Hi Kiran,

You can use the Function Module <b>F4IF_FIELD_VALUE_REQUEST</b>. In that FM, there is a parameter for Multiple selection. You have to set it

as 'X'. Call the FM in this following event

AT SELECTION-SCREEN ON VALUE-REQUEST FOR RMCBC_MATNR .

<b>Whatever values that you have selected will be stored in the table parameter</b>.

Regards,

SP.

Read only

Former Member
0 Likes
1,206

Hi Kiran,

For declaring the material in the prgram use select option.

Example

SELECT-OPTIONS s_mat FOR mara-matnr.

On execution Just right of the field you will get an arroe press on that a box will be opened put all your materials in this box and execute.

For using the select options for fetching the code use it

SELECT matnr FROM mara INTO TABLE p_mara_table

WHERE mtart IN s_mat.

Message was edited by: mukesh kumar

Read only

Former Member
0 Likes
1,206

hi kiran

then why dont you do as below

data: begin of itab

matnr type matnr

end of itab.

Select matnr form mara

into itab

where matnr in (the select-option that you have defined for rmcbc_matnr)

itab will contain all the matnrs that you have defined in your selection screen.

Award Points for helpful answers

Read only

Former Member
0 Likes
1,206

Hi Kiran,

please check this small piece of code.

<u><b>Report</b></u>

tables : mara.

data : begin of itab occurs 0,

matnr type mara-matnr,

end of itab.

select-options : MATNO for mara-matnr.

select matnr from mara

into table itab

where matnr in MATNO.

loop at itab.

write : / itab-matnr.

endloop.

If found helpful, please do reward.