Application Development 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: 

Selection of multiple values from F4 help

Former Member
0 Kudos

Hi,

Can anyone plz tell how to select MULTIPLE VALUES from the list of values that pops up when we press F4 for

the particular field in the selection screen.

Ex: say company code field(s_comp(select-options)) in the selection screen: when I press F4

I get 10 company codes say 1,2,3,4,5,6,7,8,9,10, among these 10 values,I need to select

4 values(say 1, 2, 3,4).

Any inputs would be of help.

Thanks & Regds,

Leeza

5 REPLIES 5

Former Member
0 Kudos

Hi Leeza,

You cannot select multiple values from the F4 popup help.

Instead click the <b>EXTENSION</b> button in the select option.

<b>In the popup click Multiple Selection button here it will display the same F4 with checkboxes to select multiple values.</b>

Or in the <b>single vals</b> tab enter the values: 1,2,3.. that you want to select.

Regards,

Wenceslaus.

former_member188685
Active Contributor
0 Kudos

Hi,

if you want to select them and include them in your selection then , you should go for EXTENSION option only. with that you can enter multiple values.

Regards

Vijay

Former Member
0 Kudos

u can go for the extension option

and u can give multiple values or ranges in that

or else

if u want the options less than or greater than equal to a particular value double click on s_field1-low and u can choose any one of the options

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Try this and kindly reward points if it helps.

tables kna1.

data:

begin of t_values occurs 2,

value like kna1-begru,

end of t_values,

t_return like ddshretval occurs 0 with header line,

w_return type ddshretval.

select-options s_begru for kna1-begru.

at selection-screen on value-request for s_begru-low.

refresh t_values.

t_values = 'PAR*'.

append t_values.

t_values = 'UGG'.

append t_values.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'BEGRU'

value_org = 'S'

multiple_choice = 'X'

tables

value_tab = t_values

return_tab = t_return

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

if sy-subrc = 0.

*read table t_return index 1.

endif.

at selection-screen output.

loop at t_return into w_return.

s_begru-low = w_return-fieldval.

s_begru-sign = 'I'.

s_begru-option = 'EQ'.

append s_begru.

endloop.

Former Member
0 Kudos

Hi,

You can do it with CL_GUI_FRONTEND_SERVICE=>FILE_OPEN_DIALOG.

The following sample code works for me, just select multiple files with CTRL key on F4 for the select option and thats it.

REPORT ztest.

TABLES: file_table.

DATA: lt_file_names TYPE FILETABLE,

lwa_file_name TYPE FILE_TABLE,

lv_subrc TYPE i.

SELECT-OPTIONS: so_file FOR file_table NO INTERVALS.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_file-low.

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

  • WINDOW_TITLE =

  • DEFAULT_EXTENSION =

  • DEFAULT_FILENAME =

  • FILE_FILTER =

INITIAL_DIRECTORY = 'C:\Temp\'

MULTISELECTION = 'X'

CHANGING

file_table = lt_file_names[]

rc = lv_subrc

  • USER_ACTION =

EXCEPTIONS

FILE_OPEN_DIALOG_FAILED = 1

CNTL_ERROR = 2

ERROR_NO_GUI = 3

others = 4.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

so_file-sign = 'I'.

so_file-option = 'EQ'.

LOOP AT lt_file_names INTO lwa_file_name.

so_file-low = lwa_file_name.

APPEND so_file.

ENDLOOP.

START-OF-SELECTION.

LOOP AT so_file.

WRITE: / so_file-low.

ENDLOOP.