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

FM for presentation server path F4 help

Former Member
0 Likes
3,952

hi

I am loking for FM for presentaion server file path F4 help

Amit

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,740

this should do it


PARAMETERS: zfile              LIKE rlgrap-filename.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR zfile.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            def_filename     = ' '
            def_path         = zfile
            mask             = ',*.*,*.*.'
            mode             = '0'
            title            = 'Download path'
       IMPORTING
            filename         = zfile
       EXCEPTIONS
            inv_winsys       = 1
            no_batch         = 08
            selection_cancel = 12
            selection_error  = 16.
*
  IF sy-subrc NE 0.
    MESSAGE i028(pc).
  ENDIF.

hi

I am loking for FM for presentaion server file path F4 help

Amit

7 REPLIES 7
Read only

Former Member
0 Likes
1,741

this should do it


PARAMETERS: zfile              LIKE rlgrap-filename.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR zfile.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            def_filename     = ' '
            def_path         = zfile
            mask             = ',*.*,*.*.'
            mode             = '0'
            title            = 'Download path'
       IMPORTING
            filename         = zfile
       EXCEPTIONS
            inv_winsys       = 1
            no_batch         = 08
            selection_cancel = 12
            selection_error  = 16.
*
  IF sy-subrc NE 0.
    MESSAGE i028(pc).
  ENDIF.

Read only

sachin_mathapati
Contributor
0 Likes
1,740

Hi Amit ,

Try this method..

PARAMETER : pa_dsktp TYPE rlgrap-filename.

DATA : wf_path TYPE string.

    • object creation for F4 help.

INITIALIZATION.

CREATE OBJECT cl_guid TYPE cl_gui_frontend_services.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_dsktp.

CALL METHOD cl_guid->directory_browse

EXPORTING window_title = 'Test'

CHANGING selected_folder = wf_path.

CALL METHOD cl_gui_cfw=>flush.

pa_dsktp = wf_path .

Reward Points if Helpful.

Regards,

Sachin M M

Read only

Former Member
0 Likes
1,740

Hi

Check this thread

Read only

0 Likes
1,740

this is obsolete 'WS_FILENAME_GET'

any other ??

Amit

Read only

Former Member
0 Likes
1,740

check F4_FILENAME

Read only

0 Likes
1,740

Hi,

F4_FILENAME is best if you need both file and directory.

if you need directory only have a look at the following:

  at selection-screen on value-request for p_direct.
    gv_string = p_direct.
    call method cl_gui_frontend_services=>directory_browse
*  EXPORTING
*    WINDOW_TITLE         =
*    INITIAL_FOLDER       =
      changing
        selected_folder      = gv_string
      exceptions
        others               = 99.
    if sy-subrc <> 0.
      clear p_direct.
    else.
      p_direct = gv_string.
    endif.

kind regards,

HP

Read only

Former Member
0 Likes
1,740

hi....

you can use this function module if you want....

*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .

  • CALL FUNCTION 'F4_FILENAME'

  • EXPORTING

  • program_name = syst-cprog

  • dynpro_number = syst-dynnr

  • field_name = 'C:\'

  • IMPORTING

  • file_name = p_file.

hope this hepls you out...