Skip to Content
author's profile photo Former Member
Former Member

CC file receiver. Empty file

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 08, 2012 at 09:45 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.