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

Button for browse option

Former Member
0 Likes
443

Hi

I need to have a "Browse" button with a input/output field. On clicking the button , a pop up window opens with navigation to the Users local computer . So this would enable the user to click on the file and the Path of the file is copied to the input / output field. How can this be achieved ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
424

Hi,

Please try this.


PARAMETERS: p_file LIKE rlgrap-filename OBLIGATORY LOWER CASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
 
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
      static        = 'X'
    CHANGING
      file_name     = p_file
    EXCEPTIONS
      mask_too_long = 1
      OTHERS        = 2.  

Regards,

Ferry Lianto

Hi

I need to have a "Browse" button with a input/output field. On clicking the button , a pop up window opens with navigation to the Users local computer . So this would enable the user to click on the file and the Path of the file is copied to the input / output field. How can this be achieved ?

2 REPLIES 2
Read only

Former Member
0 Likes
424

hELLO,

Try to call the class for files handling, there is no need to put any button, it will be enough to create a matchcode.

Something like this:

PARAMETERS:

p_desti(128) TYPE c OBLIGATORY.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_desti.

CALL METHOD cl_gui_frontend_services=>directory_browse

CHANGING

selected_folder = dest.

p_desti = dest.

That´s all

hope this helps

Gabriel

Message was edited by:

Gabriel Fernando Pulido V.

Read only

Former Member
0 Likes
425

Hi,

Please try this.


PARAMETERS: p_file LIKE rlgrap-filename OBLIGATORY LOWER CASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
 
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
      static        = 'X'
    CHANGING
      file_name     = p_file
    EXCEPTIONS
      mask_too_long = 1
      OTHERS        = 2.  

Regards,

Ferry Lianto