‎2008 Feb 04 12:55 PM
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
‎2008 Feb 04 12:58 PM
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
‎2008 Feb 04 12:59 PM
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
‎2008 Feb 05 2:02 AM
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
‎2008 Feb 05 2:10 AM
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
‎2008 Feb 05 4:28 AM
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.
‎2008 Feb 05 4:38 AM
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
‎2008 Feb 05 5:05 AM