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

F4 help for Aplication server

Former Member
0 Likes
1,098

Hi guyrs,

How to get the file path from the application server.

Thanks,

Gourisankar.

9 REPLIES 9
Read only

Former Member
0 Likes
1,067

Use F4_DXFILENAME_TOPRECURSION function in your reports

Read only

Former Member
0 Likes
1,067

HI,



data : p_pcfn LIKE rlgrap-filename DEFAULT 'C:\'. 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pcfn.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      field_name = 'P_PCFN'
    IMPORTING
      file_name  = p_pcfn.

Read only

Former Member
0 Likes
1,067

Hi Use FM /SAPDMC/LSM_F4_SERVER_FILE in following way



call function '/SAPDMC/LSM_F4_SERVER_FILE'
      exporting
        directory        = zcutover_host-folder_path "folder path on application server
        filemask         = '*.*'
      importing
        serverfile       = p_file
      exceptions
        canceled_by_user = 1
        others           = 2.

Hope it helps,

RJ

Read only

Former Member
0 Likes
1,067

hi,

Use FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'

check this

thanks

Read only

Former Member
0 Likes
1,067

Hi use FM EPS_GET_DIRECTORY_LISTING to get files from applciation server. You can also use FM '/SAPDMC/LSM_F4_FRONTEND_FILE'.

Read only

Former Member
0 Likes
1,067

hi

try this fm F4_DXFILENAME_TOPRECURSION

hope this helps

regards

Aakash Banga

Read only

Former Member
0 Likes
1,067

You can use the FM 'F4_DXFILENAME_4_DYNP'.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

-


-


CALL FUNCTION 'F4_DXFILENAME_4_DYNP'

EXPORTING

dynpfield_filename = 'P_FILE'

dyname = sy-cprog

dynumb = sy-dynnr

filetype = 'P'

location = 'P'

server = space.

Hope this helps you

Read only

Former Member
0 Likes
1,067

Hi,

You can try like this:



AT SELECTION SCREEN ON VALUE-REQUEST FOR P_FILE.

PERFORM GET_FILENAME.

FORM GETFILE NAME.

DATA: c_FILE_mask TYPE dxfields-filemask VALUE '*.*',
  search_dir TYPE dxfields-longpath VALUE '/SAPGLOBAL/users',
  file_path LIKE dxfields-longpath.

Then call Function Module:

F4_DXFILENAME_TORECURSION.

Hope it helps

Regards

Mansi

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,067

Hi,

Refer:


PARAMETERS: f_app(128).
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_app.
  PERFORM get_fname_app.
 
 
FORM get_fname_app.
 
  DATA: c_fnh_mask TYPE dxfields-filemask VALUE '*.*',
  search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
  file_path LIKE dxfields-longpath.
 
  CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
      i_location_flag = 'A'
      i_server        = ' '
      i_path          = search_dir
      filemask        = c_fnh_mask
      fileoperation   = 'R'
    IMPORTING
      o_path          = file_path
    EXCEPTIONS
      rfc_error       = 1
      OTHERS          = 2.
  IF sy-subrc EQ 0.
    f_app = file_path.
  ENDIF.
ENDFORM.                    "get_fname_app

Hope this helps you.

Regards,

Tarun