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: 

How to check whether a file is present in the UNIX directory of app. server

Former Member
0 Kudos

Hi,

I am creating files in the UNIX directory in the application server using :

CONCATENATE '/sapmnt/RD1/interfaces/client670/'

p_fname '.CSV' INTO w_filename.

OPEN DATASET w_filename FOR OUTPUT IN TEXT MODE.

LOOP AT t_output1.

TRANSFER t_output1 TO w_filename.

ENDLOOP.

CLOSE DATASET w_filename.

I am unable to check whether a file with the same name exists or not. How to check the duplicate state of the file.

1 REPLY 1

Former Member
0 Kudos

You can use the following fm

RZL_READ_FILE

or

use OPEN DATASET FOR INPUT.