2006 Oct 05 10:45 PM
Hi Friends,
I need to send few files into the same file on the application server. I have used OPEN DATASET...FOR APPENDING. But the file is adding the data to the already existing data instead of overwriting the already existing file. I need help to overcome this.
Thanks,
Raj
2006 Oct 05 11:23 PM
Hi Raj,
Use syntax,
OPEN DATASET FNAME FOR OUTPUT MESSAGE MESS.
do not use for appending...
Regards,
Azaz.
Hi Raj,
Use syntax,
OPEN DATASET FNAME FOR OUTPUT MESSAGE MESS.
do not use for appending...
Regards,
Azaz.
2006 Oct 05 11:23 PM
Hi Raj,
Use syntax,
OPEN DATASET FNAME FOR OUTPUT MESSAGE MESS.
do not use for appending...
Regards,
Azaz.
2006 Oct 06 12:55 AM
I tried with FOR OUTPUT but I cannot append by using FOR OUTPUT.
Thanks,
Raj
2006 Oct 06 1:07 AM
Hi,
For not appending the file already present in the application server check the code present in the link,
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3cc0358411d1829f0000e829fbfe/content.htm
For appending the data in the file,
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ccd358411d1829f0000e829fbfe/content.htm
Regards,
Azaz Ali.
2006 Oct 06 1:32 AM
Hi Raj,
Try this if you want in binary mode,
OPEN DATASET FNAME FOR OUTPUT In binary mode .
Try this if you want in text mode,
OPEN DATASET FNAME FOR OUTPUT In text mode encoding default .
Please dont forget to reward all helpful answers.
Regards,
Azaz Ali.
2006 Oct 05 11:23 PM
Hi,
Try removing the FOR APPENDING addition in the OPEN DATASET..
Thanks,
Naren
2006 Oct 06 2:18 AM
Dear Raj
To keep it simple, take it this way:
p_file is the filename.
1. APPENDING MODE:
open dataset p_file <b>for APPENDING</b> in text mode encoding default.
Here, if p_file already exists it is opened to append the exisiting data in the file. If the file does not exist it is open a new file.
2. OUTPUT MODE:
open dataset p_file <b>for OUTPUT</b> in text mode encoding default.
Here everytime the file is opened as a new one.
Hope the above info helps you.
Kind Regards
Eswar
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |