‎2007 Aug 20 3:24 PM
I have requirement to read the flie names from application server and upload to Ztable then accoring to time stamp it has to excute the infopackage ( for this routine in infopackge external data tab).
I find some Function module "SUBST_GET_FILE_LIST" from this I am getting all the data except the date and time these are the important fileds for my requirement. Can any one put some light on this.
It will be great helpful for me.
Thanks In advance
Regards
Siddhu
‎2007 Aug 20 3:28 PM
If your sap is on unix.. then use this unix command from ur abap program
DG_UNIX_LOC(9) = 'ls *.csv'.
DG_UNIX_LOC+9(45) = P_AFILE.
DATA : V_STRING(100) TYPE C.
REFRESH DT_TABL.
CALL 'SYSTEM' ID 'COMMAND' FIELD DG_UNIX_LOC
ID 'TAB' FIELD DT_TABL-SYS.
LOOP AT DT_TABL.
IF DT_TABL-LINE CS 'batch/data/inb/sec-cam/sec-cam'.
IT_FILELIST-FILE_NAME = DT_TABL-LINE.
APPEND IT_FILELIST.
ENDIF.
ENDLOOP.
Thanks
Mahesh
‎2007 Aug 20 3:28 PM
If your sap is on unix.. then use this unix command from ur abap program
DG_UNIX_LOC(9) = 'ls *.csv'.
DG_UNIX_LOC+9(45) = P_AFILE.
DATA : V_STRING(100) TYPE C.
REFRESH DT_TABL.
CALL 'SYSTEM' ID 'COMMAND' FIELD DG_UNIX_LOC
ID 'TAB' FIELD DT_TABL-SYS.
LOOP AT DT_TABL.
IF DT_TABL-LINE CS 'batch/data/inb/sec-cam/sec-cam'.
IT_FILELIST-FILE_NAME = DT_TABL-LINE.
APPEND IT_FILELIST.
ENDIF.
ENDLOOP.
Thanks
Mahesh
‎2007 Aug 20 3:32 PM
Hi Mahesh Raganmoni,
Sorry, My system is not on UNIX.
Can you please suggest some ideas.
Thanks & Regards
Siddhu
‎2007 Aug 20 3:29 PM
Hi,
Look at the below function modules
RZL_READ_DIR ---> If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server
RZL_READ_DIR_LOCAL --> Read a directory on the Application Server
RZL_READ_FILE --> Read a file from the presentation server if no server name is given, or read file from remote server. Very useful to avoid authority checks that occur doing an OPEN DATASET. This function using a SAP C program to read the data.
Regards
Sudheer