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 replace ws_filename_get function module to file_open_dialog

Former Member
0 Likes
620

how to replace ws_filename_get function module to file_open_dialog

how to replace ws_filename_get function module to file_open_dialog

2 REPLIES 2
Read only

Former Member
0 Likes
430

HI Raja

Please check if this link helps you:

Kind Regards

Eswar

Read only

Former Member
0 Likes
430

Here it is,

DATA: i_file_name TYPE FILETABLE,

w_file_name TYPE FILE_TABLE,

v_rc TYPE i.

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

INITIAL_DIRECTORY = 'C:\'

CHANGING

file_table = i_file_name

rc = v_rc

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.

READ TABLE i_file_name INTO w_file_name INDEX 1.

No wthe w_file_name will contain the file name.

Regards

Kathirvel