11-20-2008 11:07 AM
Hello ppl,
I found the following help for OPEN DATASET in APPENDING mode:
If the file already exists, its contents are retained, and the system moves to the end of the file. If the file does not exist, the system creates it. If the file was already open, the system moves to the end of the file.
But, I am not sure what exactly will happen if the file is already open.
Please help me understand it better.
Thanks,
Dawood.
11-20-2008 11:10 AM
Hello,
From SAP HELP.
Attempted read access to a file opened with FOR APPENDING with the statement READ DATASET fails, and returns the value 4 for sy-subrc.
It will not let you write to a already opened file.
Hope it helps.
Thanks,
Jayant
11-20-2008 12:21 PM
The addition FOR APPENDING opens the file for appending.
If the file specified already exists, it is opened and the file pointer is set at the end of the file.
If the file specified does not exist, it is created. Attempted read access to a file opened with FOR APPENDING with the statement READ DATASET fails, and returns the value 4 for sy-subrc.