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

function module

Former Member
0 Likes
351

hi all

what is the function module that can be used to give information about files on application server and about its operating system

2 REPLIES 2
Read only

Former Member
0 Likes
312

Use FM F4_DXFILENAME_TOPRECURSION

It works both for Application Server files and Presentation Server Files.

For Application server file Pass 'A' To I_LOCATION_FLAG.

For Presentation server file Pass 'P' To I_LOCATION_FLAG.

Regards.

Read only

Former Member
0 Likes
312
REPORT Z_TEST.

PARAMETERS : P_FILE LIKE RLGRAP-FILENAME.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

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.
P_FILE = FILE_PATH.
ENDIF.

Regards.