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

FilePath Selection

Former Member
0 Likes
635

Hello,

I would like to know if is there a FM that helps to get a directory path, but only just the path I don´t need to select a file, I need it because the user has to select a directory for file output.

Thanks

Gabriel

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
605

Hi

See the method DIRECTORY_BROWSE of class CL_GUI_FRONTEND_SERVICES.

Max

3 REPLIES 3
Read only

Former Member
0 Likes
605

try this......

TH_SELECT_SERVER

Read only

Former Member
0 Likes
606

Hi

See the method DIRECTORY_BROWSE of class CL_GUI_FRONTEND_SERVICES.

Max

Read only

0 Likes
605

Here is a sample program.



report zrich_0004.


data: str_path type string.
parameters: p_path type localfile.


at selection-screen on value-request for p_path.


  call method cl_gui_frontend_services=>directory_browse
    exporting
      window_title    = 'Please select file path'
      initial_folder  = 'C:'
    changing
      selected_folder = str_path
    exceptions
      cntl_error      = 1
      error_no_gui    = 2
      others          = 3.

  call method cl_gui_cfw=>flush.

  p_path = str_path.

Regards,

Rich Heilman