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: 

How to check file name in APP server

Former Member
0 Kudos

Hi,

Iam writing some files to APP server .Iam unable to check those files by using AL11. How to check those files in APP server?

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use this FM EPS_GET_DIRECTORY_LISTING.

Also please try this FM /SAPDMC/LSM_F4_SERVER_FILE.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.
 
* Open the Browse Dialog Box on the Application Server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
  IMPORTING
    serverfile = p_apath
  EXCEPTIONS
    canceled_by_user = 1
    OTHERS           = 2.
 
IF sy-subrc <> 0.
* No need to check for sy-subrc
ENDIF.

Regards,

Ferry Lianto

5 REPLIES 5

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use this FM EPS_GET_DIRECTORY_LISTING.

Also please try this FM /SAPDMC/LSM_F4_SERVER_FILE.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.
 
* Open the Browse Dialog Box on the Application Server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
  IMPORTING
    serverfile = p_apath
  EXCEPTIONS
    canceled_by_user = 1
    OTHERS           = 2.
 
IF sy-subrc <> 0.
* No need to check for sy-subrc
ENDIF.

Regards,

Ferry Lianto

0 Kudos

Ferry,

I want to see the contents in the file also .How can i check contents in the file?

suresh_datti
Active Contributor
0 Kudos

try the function call 'FILE_GET_NAME'.

~Suresh

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can try this FM EPS_READ_BLOCK or EPS_READ_TEXT_BLOCK to read a block of input file content.

Otherwise, you need to use READ DATASET statement to read all contents.

Regards,

Ferry Lianto

0 Kudos

This f.m TRINT_DISPLAY_FILE_CONTENTS will give contens in the file.