2008 May 27 6:41 AM
Hi,
How can us find the perticular file in application server.
Thanks and regards,
surya
2008 May 27 6:44 AM
&----
*& Report ZDIRFILES *
&----
REPORT ZDIRFILES .
PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/tmp'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.
List of files are contained within table it_filedir
loop at it_filedir.
write: / it_filedir-NAME.
endloop.
2008 May 27 6:47 AM
Hi,
1.This to find the path for the File:
DATA: dl_file TYPE ibipparms-path. " File name
CONSTANTS: c_dir TYPE rlgrap-filename.
F4 filename for Application server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = c_dir
filemask = ' '
IMPORTING
serverfile = dl_file
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e000 WITH 'Error while getting the file name'(006).
EXIT.
ELSE.
p_file = dl_file.
ENDIF.
2.check this function module F4_DXFILENAME_TOPRECURSION..
we use this function module for F4 help to give all the existing files list in Application server !!
From the transaction AL11 u can see all the directories in SAP i.e application layer files directories..
By default when u create an application server file in an ABAP program using OPEN DATASET and CLOSE DATASET this file gets created in a default home directory of SAP ...... HOME directory...
Regards,
Shiva Kumar
2008 May 27 6:53 AM
HI
use this FM
ws_c_directory(128) type c value '/conversions/',
call function 'F4_FILENAME_SERVER'
exporting
pfad = ws_c_directory
IMPORTING
FILE_NAME =
exceptions
no_file_on_server = 1
others = 2.
2008 May 27 6:54 AM
HI
Use this FM
ws_c_directory is the path u can give for Ex: ws_c_directory(128) type c value '/conversions/',
call function 'F4_FILENAME_SERVER'
exporting
pfad = ws_c_directory
IMPORTING
FILE_NAME =
exceptions
no_file_on_server = 1
others = 2.
if sy-subrc <> 0.
message s001(zv_errr).
endif.
if sy-ucomm = c_yes.
p_file = sy-lisel+1(68).
condense p_file.
concatenate ws_c_directory p_file into p_file.
endif.
endif.