08-08-2006 10:32 AM
hi
i look for FM that you give her PATH and INTERNAL TABLE
and you will get all the fiels that in the directory
thanks
have a nice day
08-08-2006 10:35 AM
08-08-2006 10:35 AM
08-08-2006 10:35 AM
08-08-2006 10:36 AM
08-08-2006 10:36 AM
chk this
* find files
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
DIR_NAME = DIRECTORY
FILE_MASK = L_DEFFMASK
IMPORTING
FILE_COUNTER = FILE_COUNT
ERROR_COUNTER = ERROR_COUNT
TABLES
DIR_LIST = INBOX_FILES
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.
08-08-2006 10:36 AM
class CL_GUI_FRONTEND_SERVICES
the method ::
DIRECTORY_LIST_FILES
here is the program
REPORT ZSRIM_TEMP5.
data itab type standard table of FILE_INFO.
data : v_count type i.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
EXPORTING
DIRECTORY = 'c:\'
FILTER = '.'
FILES_ONLY =
DIRECTORIES_ONLY =
CHANGING
FILE_TABLE = itab
COUNT = v_count
EXCEPTIONS
CNTL_ERROR = 1
DIRECTORY_LIST_FILES_FAILED = 2
WRONG_PARAMETER = 3
ERROR_NO_GUI = 4
NOT_SUPPORTED_BY_GUI = 5
others = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regards
srikanth
added program
Message was edited by: Srikanth Kidambi
08-08-2006 10:36 AM
08-08-2006 10:42 AM
hi
good
check with these function modules
RH_START_EXCEL_WITH_DATA starts Excel with the contents of an internal table. This function finds Excel in the desktop registry. It also uses a local PC working directory to save the file (that's what the 'W' value for data path flag does). Very transparent to user!
thanks
mrutyun
08-08-2006 10:42 AM
Hi yossi,
1. TMP_GUI_DIRECTORY_LIST_FILES
2. Here u can also specify the wild card character
.
3. Along with list of files (in internal table)
it will also get u another internal table,
with SUB DIRECTORIES name also.
regards,
amit m.
08-08-2006 10:54 AM
Hi,
Check with the FM,
GET_COMPONENT_LIST
GET_GLOBAL_SYMBOLS
RS_SCRP_GR_PROG
Regards,
Prakash
08-08-2006 11:14 AM