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: 

FM that find fiels from directory

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Check the following:

Rgds,

HR

10 REPLIES 10

Former Member
0 Kudos

Hi Yossi,

Use Method <b>CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG</b>

Check this thread out

Regards,

Santosh

Message was edited by: Santosh Kumar P

Former Member
0 Kudos

Hi,

Check the following:

Rgds,

HR

former_member181962
Active Contributor
0 Kudos

f4_filename and followed by

GUI_DOWNLOAD.

Regards,

Ravi

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Check with fm F4_FILENAME,

Rgds,

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Hi,

Check with the FM,

GET_COMPONENT_LIST

GET_GLOBAL_SYMBOLS

RS_SCRP_GR_PROG

Regards,

Prakash

former_member188685
Active Contributor
0 Kudos

Hi,

What about this..

Regards

vijay