‎2007 Apr 05 2:17 PM
Hi Group,
Can you plz explain
OPEN DATASET 1. ... FOR INPUT
2. ... FOR OUTPUT.
Read in the F1 help but unable to understand, since both is explained as modifiies the file.
Thank you for your time.
Regards,
Varun.
‎2007 Apr 05 2:20 PM
Hi,
OPEN DATASET is used to read and write data into the files that exist on the application server:
OPEN DATASET ...For INPUT --for reading from Aplln server
... For OUTPUT --for writing to Apppln server
reward points if useful
regards,
ANJI
‎2007 Apr 05 2:22 PM
INPUT -
> Only READ , You can only read the file but not write
OUTPUT ---> READ/WRITE , you can write to the file
‎2007 Apr 05 2:24 PM
Hi barun,
The INPUT opens the file for reading. By default, the file pointer is set at the start of the file. If the file specified does not exist, sy-subrc is set to 8.
The OUPUT opens the file for writing. If the specified file already exists, its content is deleted. If the file specified does not exist, it is created. Read access is also permitted.
reward is useful,
regards,
Tanmay
‎2007 Apr 05 2:29 PM
Thank you for responding.
When I try to output my data to Appl Server,
In my file its showing #'s symbols, why like this.
Here is my output in Appl server:
###########(###2
In my abap prog output code is:
1
167772,160
34,209,792
199,168
1,034
5
167772,160
167772,160
335544,320
503316,480
671088,640
Thank and Regards,
Varun.
‎2007 Apr 05 2:35 PM
‎2007 Apr 05 2:27 PM
Hi,
Dataset can be opened for four tasks.
input - with this data can be Read only ,
output - file contains are cleard and new data wrtten,
appending- With this contains are appended to exsitng contains,
update - With this containsare updated in files anywhere.
I will tell you more about INPUT and OUTPUT:
Input: The addition FOR INPUT opens the file for reading. By default, the file pointer is set at the start of the file. If the file specified does not exist, sy-subrc is set to 8.
Means, file will be open for read only purpose.
Output : The addition FOR OUPUT opens the file for writing. If the specified file already exists, its content is deleted. If the file specified does not exist, it is created. Read access is also permitted.
Means file will open for writing purpose and old contains will be deleted.
Hope it is clear to you.