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: 

Create Excel file with Open Dataset

Former Member
0 Kudos
364

Hi,

I need to create a excel file from itab in background with OPEN DATASET...

Is it possible?

What do you do it?

Thanks!!!

1 ACCEPTED SOLUTION

Former Member
0 Kudos
80

Hello,

.CSV file carries the same property as .XLS file. So you can save your data in Application server with .CSV extension. All you need to to save the file with .CSV extension is seperate all the data of the fields with comma.

types: begin to ty_final,

line type string,

end of ty_final.

data: t_final type standard table of ty_final.

loop at itab in wa.

concatenate wa-field1

wa-field2

-


into wa_final-line separated by ','.

append wa_final to t_final.

endloop.

Transfer t_final to application server.

Hope it helps and does not makes you angry at me :-).

Thanks,

Jayant

9 REPLIES 9

Former Member
0 Kudos
80

No its not possible . You can go for CSV format later u can format it in excel.

0 Kudos
80

Can you post the code for CSV format?

0 Kudos
80

This message was moderated.

0 Kudos
80

With GUI_DOWNLOAD I have error code_page in background.

0 Kudos
80

CSV means a text file, where the columns are separated by a character ";".

The best way to change a list to CSV is to create an internal table in the ABAP, with the structure of the required CSV.

You have to fill in this internal table.

Use the Function Module SAP_CONVERT_TO_CSV_FORMAT to convert the internal table into Comma separated format then download this internal table using

open dataset .........

0 Kudos
80

You cannot use GUI_DOWNLOAD it is used to download the file in presenattion layer , but your requirement is to create in application layer.

0 Kudos
80

Hi Navenn ...

PLS READ THE QUESTION BEFORE ANSWERING.....??????????

Dont answer for points u r nothing to do with that!!What is the question and what are you answering ?

its reportd...already

Regards

Sas

Former Member
0 Kudos
81

Hello,

.CSV file carries the same property as .XLS file. So you can save your data in Application server with .CSV extension. All you need to to save the file with .CSV extension is seperate all the data of the fields with comma.

types: begin to ty_final,

line type string,

end of ty_final.

data: t_final type standard table of ty_final.

loop at itab in wa.

concatenate wa-field1

wa-field2

-


into wa_final-line separated by ','.

append wa_final to t_final.

endloop.

Transfer t_final to application server.

Hope it helps and does not makes you angry at me :-).

Thanks,

Jayant

0 Kudos
80

Jayant Sahu Many many Thanksssssssss