cancel
Showing results for 
Search instead for 
Did you mean: 

How to check file that is exist in AL11

sawanee_aimsaard
Explorer
0 Kudos
5,798

Hi Experts.

I want to check file that exists in AL11 (SAP Server) or not. I tried to use "PFL_CHECK_OS_FILE_EXISTENCE", that is similar to work, but when I input the parameter with the folder name(no file name), the function returns that exists as well but my expectation, It should return to be no exist (because It is not a file). Could you please help to suggest me?

CALL FUNCTION 'PFL_CHECK_OS_FILE_EXISTENCE'
EXPORTING
long_filename = '/Document/folder'
fully_qualified_filename =
importing
file_exists = lv_file_exists
exceptions
authorization_missing = 1
others = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
View Entire Topic
Yogesh_bagul
Explorer
0 Kudos

Hi

You can use the below FM just give the path till folder, you will get list files details available in that folder of AL11

FM : EPS2_GET_DIRECTORY_LISTING

Thanks & Regards,

Yogesh Bagul