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

Upload the data into excel sheet from database table

Former Member
0 Likes
939

hi all,

can we upolad the data from the data base to excel sheet? i have used method 'cl_gui_frontend_services' for uploading but its taking data from table control but i want the data from database. please help me out, and thanks in advance.

thanks,

Amol

7 REPLIES 7
Read only

Former Member
0 Likes
910

Hi,

Get the data into an internal table and download into an excel sheet using the FM GUI_DOWNLOAD.

Check this link

http://www.saptechnical.com/Tips/ABAP/downloadToExcel.htm

Regards,

Satish

Read only

Former Member
0 Likes
910

Hi amol

Just go for method GUI_UPLOAD in the 'cl_gui_frontend_services' classes

or use can directly call FM GUI_UPLOAD

Regards

Hitesh

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 4, 2008 6:22 PM

Read only

Former Member
0 Likes
910

Hi,

The method mentioned so far creates a file as a .csv type. That is a "Character Separated Value" file which is easily read by excel. This is often called a comma separated value file as the comma is the most common character used.

Another method is to use the Create Object and attached directly to excel.

I have a word document which lists the VBA code and the equivalent ABAP code side by side, with a sample application for downloading the contents of mara into an excel sheet.

This is in no way a complete list of all the VBA code, as it does not include creating a cross tab or graphs etc.

But if you would like a copy please let me know. I did suggest adding this as a blog at one point but received no replies.

Kind Regards

David Cooper

Read only

Former Member
0 Likes
910

Hi

What is ur requirement do want to do it through program ?

Or just from SE11 or SE16 .

You can use above methods through Programs.

If you are looking to do it from Se16 follow like below in the MENU OPTIONS..

SYSTEM-->LIST --> SAVE --> LOCAL FILE

From POP UP Select SPREDSHEET and then give your File Name ..

Data will be transferred to ur File ..

Hope it helps .

Thanks

Praveen

Read only

0 Likes
910

Hi Praveen,

Thanks for reply man, and ya i want to upload the data from the database to excel sheet through the program. if you have any solution please help me.

Thanks,

Amol.

Read only

0 Likes
910

Hi

Through Program..

we need to get all entries from required Database tables into INTERNAL table.

This you can do by creating Internal table of type ur DB Table and then write select query to populate the INT Table.

Then call FM GUI_DOWNLOAD

To download data in excel .

call function 'GUI_DOWNLOAD'

exporting

filename = l_f_tb_filenm

filetype = 'XLS'

trunc_trailing_blanks = 'X'

write_lf = 'X'

tables

data_tab = l_t_excel_file (table populated from Select)

Hope it helps.

Praveen

Read only

RemiKaimal
Active Contributor
0 Likes
910

Hi

Check out my reponse in the Thread :

Hope it helps!!

Cheers,

Remi

Plz Reward points if useful!!