Tuesday, December 21, 2010
REPORT  ztest_notepad.
DATA: it_files_in_dir  TYPE salfldir OCCURS 0 WITH HEADER LINE.
PARAMETER: p_fdir TYPE pfeflnamel DEFAULT '/usr/sap/tmp'.

START-OF-SELECTION.
* Get Current Directory Listing for OUT Dir
CALL FUNCTION 'RZL_READ_DIR_LOCAL'
EXPORTING
name     = p_fdir
TABLES
file_tbl = it_files_in_dir.

* List of files are contained within table it_filedir
LOOP AT it_files_in_dir.
WRITE: / it_files_in_dir-name.
ENDLOOP. 

REPORT ztest_notepad.
DATA:w_path LIKE  dxfields-longpath.
PARAMETERS: p_file TYPE dxfields-longpath.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
w_path = '/usr/sap/tmp'.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'   "a for application path and P for presntation palth
i_server        = ' '
i_path          = w_path
filemask        = ' '
fileoperation   = 'R'
IMPORTING
o_path          = w_path.
p_file = w_path.
START-OF-SELECTION.
WRITE p_file.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.