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

F4 help (browse)

Former Member
0 Likes
319

PARAMETERS : p_file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .

    • to provide f4 help

CALL FUNCTION 'F4_FILENAME'

IMPORTING

FILE_NAME = p_file.

This will povide F4 help (browse) for the input file. But I want my input file to be restricted only to text file. How I will do that.

PARAMETERS : p_file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .

    • to provide f4 help

CALL FUNCTION 'F4_FILENAME'

IMPORTING

FILE_NAME = p_file.

This will povide F4 help (browse) for the input file. But I want my input file to be restricted only to text file. How I will do that.

1 REPLY 1
Read only

Former Member
0 Likes
297

HI abhay,

u can use oop concepts for this..

data: it_tab type filetable,

gd_subrc type i.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG

EXPORTING

WINDOW_TITLE = 'Select File'

DEFAULT_FILENAME = '*.txt'

MULTISELECTION = 'X'

CHANGING

FILE_TABLE = it_tab

RC = gd_subrc.

here only the text files might be displayed...

i have never tried it but pls chck it once...

hope this helps u a bit,

all the best,

regards,

sampath

  • mark helpful answers