Application Development 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: 

Getting the list of files present in the APPLICATION server ??

Former Member
0 Kudos

Hi,

My requirement is to get the list of files present in the application server.

Which function module can i use for this purpose.

Regards.

1 ACCEPTED SOLUTION

GauthamV
Active Contributor
0 Kudos

hi,

use this function module.

RZL_READ_DIR_LOCAL.

5 REPLIES 5

GauthamV
Active Contributor
0 Kudos

hi,

use this function module.

RZL_READ_DIR_LOCAL.

Former Member
0 Kudos

you can see the list of files from AL11 transaction

Former Member
0 Kudos

Hi,

Use this FM RZL_READ_DIR


data: p_file type rlgrap-filename,
      lt_file type table of salfldir.

 call function 'RZL_READ_DIR'
        EXPORTING
          name           = p_file
          srvname        = ' '
        TABLES
          file_tbl       = lt_file
        EXCEPTIONS
          ARGUMENT_ERROR = 1
          NOT_FOUND      = 2
          SEND_ERROR     = 3
          SYSTEM_FAILURE = 4
          OTHERS         = 5.

OR


CALL FUNCTION 'RZL_READ_DIR_LOCAL'
EXPORTING
NAME = p_file
TABLES
FILE_TBL = lt_file
EXCEPTIONS
ARGUMENT_ERROR = 1
NOT_FOUND = 2
OTHERS = 3.

Hope it will helps

Former Member
0 Kudos

Hi Akshay,

You can refer this link in SDN :

[Get all files residing on Application Server|]

Regards,

Swapna.

former_member188685
Active Contributor
0 Kudos

if your application server is unix then you can try this also..

REPORT ZUNIX line-size 400
                no standard page heading.
 
data : unixcom like   rlgrap-filename.   
 
data: begin of tabl occurs 500,
        line(400),
      end of tabl.
 data: lines type i.
 
start-of-selection.
  refresh tabl.
 unixcom = 'ls -al'.
  "this is very impoertant
  call 'SYSTEM' id 'COMMAND' field unixcom
                id 'TAB'     field tabl[].
 
 "Loop the tabl and write the results.