cancel
Showing results for 
Search instead for 
Did you mean: 

CC file receiver. Empty file

Former Member
0 Kudos

Hello,

I need to leave files with a sequence established:

- First let a control file with nonzero length

-  Second left a data file,

-  and Thirdly, override the control file, now with zero length (writing an empty file ).

The problem is that the control file isn't overwritten with zero-length (I tried to delete the control file and write it to zero length and if it works), however, i need overwrite the file control with zero-lenght

Any idea??

Regards,

Silvia

Accepted Solutions (0)

Answers (1)

Answers (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Silvia,

              what protocol you are using to write the files NFS/SFTP/FTP? Solution to this depends on the protocol being used. You need a small java mapping code in the last Operation mapping scenario to implement this. You can write files directly to target system using java code. Please check this UDF for further information on how to write a file using FTP.

http://scn.sap.com/thread/316570

If you write the third file using same file name as first control file then the third file will over write the first one. 

Regards

Anupam

Former Member
0 Kudos

Thanks Anupam,

If you write the third file using same file name as first control file then the third file will over write the first one.

This fails! why?

I'm using FTP. The UDF is last option..

Regards,

Silvia

anupam_ghosh2
Active Contributor
0 Kudos

Hi Silvia,

             How are you presently writing the third file?

Did you check the permissions of the directory where you are writing the files ?

Also if the first file writing is not complete(file pointer is not closed)  before you try to over write it System will not allow you doing so. Thus you need to ensure following things

1. Writing of first file is complete, before you over write it.

2. Directory permissions are read/write .

3.The file is having a read/write access.

Regards

Anupam