Application Development and Automation 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: 
Read only

Application server read

Former Member
0 Likes
519

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
466

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

3 REPLIES 3
Read only

Former Member
0 Likes
467

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

Read only

0 Likes
466

Hi Mahesh Raganmoni,

Sorry, My system is not on UNIX.

Can you please suggest some ideas.

Thanks & Regards

Siddhu

Read only

Former Member
0 Likes
466

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