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: 

Function module for displaying the location

Former Member
0 Kudos

Hi,

Could anyone tell the Function module for displaying the location in our system without a file name while downloading, when the user press f4.

thanks

4 REPLIES 4

former_member189059
Active Contributor
0 Kudos
* read the default pathname on application server
  call function 'FILE_GET_NAME'
       exporting
*           CLIENT                  = SY-MANDT
            logical_filename        = lc_logical_filename_ftappl
            operating_system        = sy-opsys
*           parameter_1             = ' '
*           PARAMETER_2             = ' '
*           USE_PRESENTATION_SERVER = ' '
*           WITH_FILE_EXTENSION     = ' '
*           USE_BUFFER              = ' '
       importing
            emergency_flag          = l_emergency_flag
            file_format             = l_file_format
            file_name               = l_file_name_ftappl
       exceptions
            file_not_found          = 1
            others                  = 2.

Former Member
0 Kudos

Hi,

You can use this:

CALL METHOD cl_gui_frontend_services=>directory_browse

CHANGING

selected_folder = w_path

EXCEPTIONS

cntl_error = 1

error_no_gui = 2

not_supported_by_gui = 3

OTHERS = 4.

Thanks and Best Regards,

Vikas Bittera.

0 Kudos

Thx you all for your prompt replies.

Vikas, Can you tell me the parameter type tobe used for w_path

varma_narayana
Active Contributor
0 Kudos

Hi You can call the method:

CL_gui_FRONTEND_SERVICES=>FILE_SAVE_DIALOG.

Check this class CL_gui_FRONTEND_SERVICES in SE24 tcode. and Check this method.

This method allows the user to selection the location where the file has to be saved.

<b>reward if Helpful</b>