‎2015 Apr 23 7:23 AM
Hi Experts,er
I am trying to search for a file which is on application server
File Name: payroll_1000_date_timestamp
Since i will not know the timestamp on the file i will have to search the file in the folder like this: payroll_1000_date_*
I have tried almost all below techniques but none of them work in background mode:
1.F.M EPS2_GET_DIRECTORY_LISTING
2.EPS_GET_DIRECTORY_LISTING
3.Perform DIRECTORY_CONTENTS_GET from F.M /SAPDMC/LSM_F4_SERVER_FILE
Would appreciate if someone can highlight on a way i can do this search.
Is there any function module or any utility which can run in background and give me all files present on app. server ? I can than filter it down
later.
Would appreciate your help.
Thanks
Bhanu
‎2015 Apr 27 4:31 PM
Can you use function module ISU_M_L_FOLDER_SERVER?
We use this to retrieve the directory list (will handle up to 75 character file names) and then scan the list for entries of type "f" and the file name mask we are searching for.
Regards,
K--
‎2015 Apr 23 7:34 AM
Hi Bhanu,
did you try the following??
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = gv_folder "'\usr\sap\ECD\SYS\global\chase\inbound'
file_mask = 'payroll_1000_date_*'
TABLES
dir_list = lt_dir_list
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
IF sy-subrc = 0.
‎2015 Apr 23 7:44 AM
Hi Noufal,
Problem with this function module is the return parameter directory list which has only 40 Char limit.
‎2015 Apr 23 7:40 AM
‎2015 Apr 23 7:45 AM
‎2015 Apr 23 7:47 AM
If no other FMs are present, I think you need to make a program to use this Fm and run that as background job
‎2015 Apr 24 5:38 PM
‎2015 Apr 27 4:31 PM
Can you use function module ISU_M_L_FOLDER_SERVER?
We use this to retrieve the directory list (will handle up to 75 character file names) and then scan the list for entries of type "f" and the file name mask we are searching for.
Regards,
K--
‎2015 Apr 28 10:22 PM
Experts,
It was my bad the function module EPS2_GET_DIRECTORY_LISTING can be used in background , there are no issues with it.
I am closing the thread
Thanks
Bhanu Malik