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

browse button

Former Member
0 Likes
625

Hi all,

How can I add browse button next to parameters filed to insert file from local directory.

please help...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
586

Hi

When you write the code under

<b> AT SELECTION-SCREEN ON VALUE-REQUEST for p_file.</b>

<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.</b>

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

                          • Diplaying the dialog box for opening the file ************

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

mask = '.,..'

IMPORTING

filename = p_file.

Regards

Raj

4 REPLIES 4
Read only

Former Member
0 Likes
586

Hello sapsudha,

instead u cna use

CALL FUNCTION 'F4_FILENAME'

IMPORTING

FILE_NAME = PATH

where PATH TYPE RLGRAP-FILENAME,

Regards,

Neelambari.

.

Read only

Former Member
0 Likes
587

Hi

When you write the code under

<b> AT SELECTION-SCREEN ON VALUE-REQUEST for p_file.</b>

<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.</b>

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

                          • Diplaying the dialog box for opening the file ************

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

mask = '.,..'

IMPORTING

filename = p_file.

Regards

Raj

Read only

0 Likes
586

hI,

At selection screen on value-request for p_filenm.

then call method cl_gui_frontend_services=>file_open_dialog

exporting

window_title = 'Select Input File'

  • default_extension = '*'

default_filename = '*.txt'

initial_directory = 'C:\'

multiselection = ''

changing

file_table = g_file

rc = g_rc

exceptions

file_open_dialog_failed = 1

cntl_error = 2

error_no_gui = 3

not_supported_by_gui = 4

others = 5

Thanks

arun.

Read only

Former Member
0 Likes
586

hi,

use this

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = ''

IMPORTING

file_name = p_file1.