Application Development 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: 

OPEN DATASET code

Former Member
0 Kudos

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

Former Member
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

User t-code FILE to define logical paths.

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

Thanks,

Santosh

0 Kudos

Thanks all.

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

Linda