10-24-2007 3:06 PM
Hi all ,
Can any one tell me<b> what</b> is the use of function module :
<b>EPS_GET_DIRECTORY_LISTING</b>
and <b>how</b> to use it ?
Plz explain with an example ...
10-24-2007 3:12 PM
Hi Dipankar,
this FM is used to get the list of files in the directory.
you can use as below
DATA: lit_dir_list TYPE STANDARD TABLE OF epsfili INITIAL SIZE 0. "Files Table
DATA: lv_dir_name TYPE epsf-epsdirnam. "Directory Name
lv_dir_name = <source directory>.
*** Fetch all the files stored in the directory.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = lv_dir_name
* FILE_MASK = ' '
* IMPORTING
* DIR_NAME =
* FILE_COUNTER =
* ERROR_COUNTER =
TABLES
dir_list = lit_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.
ENDIF.
<b>Reward for helpful answers</b>
Satish
06-09-2012 10:27 AM
How about if I want to use the same but from external server using FTP
What shoud i do before this ?
10-24-2007 3:43 PM
Dipankar,
Please reward points if my input is useful for you.
Satish