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

OPEN DATASET code

Former Member
0 Likes
652

Hi all,

I have the following code to output data.

OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE encoding default.

my question is what the format of output file should be? Is there any specific requirement? And if I run this code successfully, I should save the file onto server. How can I see the file? Thanks in advance!

Linda

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
625

u need to declare an internal table which contains all fields of type c and length as correspodning to itab fields.

loop at itab.

tab-field1 = itab-field1.

tab-field2 = itab-field2...and so...on

append tab.

endloop.

so, tab will be having data which is in character format.

now, this internal table can be used to download to application server using datasets.

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
625

I usually use a text file with the extension .txt, it is the easiest to work with, I think. Usually comma delimited also. You can see the files on the application server via transaction AL11

Regards,

Rich Heilman

Read only

Former Member
0 Likes
626

u need to declare an internal table which contains all fields of type c and length as correspodning to itab fields.

loop at itab.

tab-field1 = itab-field1.

tab-field2 = itab-field2...and so...on

append tab.

endloop.

so, tab will be having data which is in character format.

now, this internal table can be used to download to application server using datasets.

Read only

Former Member
0 Likes
625

In addition to the above replies...

You can view the file using Transaction AL11

or

If u have an FTP connection you can view them

Read only

Former Member
0 Likes
625

User t-code FILE to define logical paths.

Execute t-code AL11 and go to that particular directory to find your file.

Thanks,

Santosh

Read only

0 Likes
625

Thanks all.

I have no access to those TC at this moment. Let me try later.

Linda