Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Datasets

Former Member
0 Likes
703

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.

6 REPLIES 6
Read only

Former Member
0 Likes
673

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

Read only

Former Member
0 Likes
673

INPUT -


> Only READ , You can only read the file but not write

OUTPUT ---> READ/WRITE , you can write to the file

Read only

Former Member
0 Likes
673

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

Read only

0 Likes
673

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.

Read only

0 Likes
673

Pls post your code so that its easy to understand..

Read only

Former Member
0 Likes
673

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.