‎2006 Jul 19 8:44 AM
MAY ANY ONE SUGGEST ME HOW I CAN TRANSFER MY DATA FROM INTERNAL TABLE INTO EXCEL.
OR HOW TO CONVERT MY INTERNAL TABLE INTO EXCEL AND SAVE IT IN LOCAL DIRECTORY.
IS THERE ANY FUNCTION MODULE PRESENT FOR THIS.
I M WAITING FOR REPLY
‎2006 Jul 19 8:46 AM
DATA FROM INTERNAL TABLE INTO EXCEL.
USE FM <b>gui_download.</b>
REFER...
/people/harry.dietz/blog/2005/11/11/yet-another-from-database-or-internal-table-to-excel
‎2006 Jul 19 8:46 AM
GUI_DOWNLOAD and GUI_UPLOAD are used to transfer contents from file to internal and back.
‎2006 Jul 19 8:50 AM
Hi,
Consider these code.
<a href="/people/sap.user72/blog/2006/02/07/downloading-data-into-excel-with-format-options">/people/sap.user72/blog/2006/02/07/downloading-data-into-excel-with-format-options</a>
<a href="/people/rich.heilman2/blog/2005/09/12/manipulate-excel-with-ole-abap">/people/rich.heilman2/blog/2005/09/12/manipulate-excel-with-ole-abap</a>
Regards,
Arun Sambargi.
‎2006 Jul 19 8:52 AM
Hi,
look into this simple example.
<b>
report ZWA_TEST2.
data: file type string,
path type string,
file_path type string.
data: itab type standard table of t001.
start-of-selection.
SELECT * FROM t001 INTO TABLE itab.
call method cl_gui_frontend_services=>file_save_dialog
changing filename = file
path = path
fullpath = file_path.
check not file_path is initial.
call method cl_gui_frontend_services=>gui_download
exporting filename = file_Path
WRITE_FIELD_SEPARATOR = 'X'
changing data_tab = itab.</b>
Regards,
Wasim Ahmed
Message was edited by: Wasim Ahmed
‎2006 Jul 19 8:53 AM
‎2006 Jul 19 8:57 AM
hai check this,
there is one FM, <b>ws_excel</b> .
CALL FUNCTION 'WS_EXCEL'
EXPORTING
FILENAME = 'C:/RAMU.XLS'
SYNCHRON = ' '
TABLES
DATA = LT_EXCEL " internal table u want to download to excel
EXCEPTIONS
UNKNOWN_ERROR = 1
OTHERS = 2
.
‎2006 Jul 19 9:02 AM
Hi,
Use FM :- GUI_DOWNLOAD
<b>UPLOAD / Download Programs to PC</b>
http://abap4.tripod.com/Upload_and_Download_ABAP_Source_Code.html
http://www.sapgenie.com/abap/code/abap13.htm
http://sap.ittoolbox.com/code/archives.asp?d=3333&a=s&i=10
http://www.sap-img.com/abap/download-and-upload-your-abap-program.htm
http://www.geocities.com/rmtiwari/Resources/Utilities/WebViewer.html
‎2006 Jul 19 9:04 AM
Hi Pavan,
U can refer to the below code
'SAP_CONVERT_TO_XLS_FORMAT'REPORT Zxls .
parameters: p_file like rlgrap-filename default 'c:\temp\test01.xls'.
data: itab like t001 occurs 0 with header line.
CLEAR itab.
REFRESH itab.
select * from t001 into table itab.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FILENAME = p_file
TABLES
I_TAB_SAP_DATA = itab
regards,
Sharat
ps: reward points if helpful
‎2006 Jul 19 10:21 AM
Hi,
Simple technique is USE GUI_DOWNLOAD & in the file name extension give .xls and FIELD_SEPERATOR = 'X'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
<b> FILENAME = 'C:\ABC.XLS'
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'</b>
*--AND SO onn
regards,
Srikanth
‎2006 Jul 19 10:44 AM
Hai Pavan
Check the following Code
data: v_file type string,
v_path type string,
v_file_path type string.
data: begin of it_mara occurs 0,
matnr like mara-matnr,
mbrsh like mara-mbrsh,
mtart like mara-mtart,
meins like mara-meins,
end of it_mara.
start-of-selection.
SELECT matnr
mbrsh
mtart
meins
from mara
into table it_mara
where mtart = 'ROH'.
if sy-subrc = 0.
sort it_mara by matnr.
endif.
if not it_mara[] is initial.
call method cl_gui_frontend_services=>file_save_dialog
changing filename = v_file
path = v_path
fullpath = v_file_path.
check not v_file_path is initial.
call method cl_gui_frontend_services=>gui_download
exporting filename = v_file_Path
WRITE_FIELD_SEPARATOR = 'X'
changing data_tab = it_mara[].
endif.
Regards
Sreeni