2007 Oct 04 11:12 AM
how to move the contents of internal table to excel file with tab delimited. the excel file should be created dynamically with preloaded header information.the naming of the excel file also should change dynamically.
2007 Oct 04 11:17 AM
Rishi,
During debuggin right click and choose option save as excel or if you want to do it thru program you can use gui_download to do the job.
OR
Use the FM "RH_START_EXCEL_WITH_DATA" if your system has it.
OR u can use OLE concepts...
also
Check this out
http://www.sapdevelopment.co.uk/file/file_updownpop.htm
http://www.sapdevelopment.co.uk/programs/custom/zdownempdata.htm
Reward if helpful,
Karthik
2007 Oct 04 11:21 AM
Hi,
Use the below function module
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
i_filename = p_fname "'D:\file1.xls'
I_APPL_KEEP = ' '
tables
i_tab_sap_data = input_rec "your internal table
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2007 Oct 04 11:26 AM
The best way is to do by i_oi_spreadsheet.
It has several features , which makes the task easy. take a look at pkg SOFFICEINTEGRATION which has several examples on how to integrate Excel and ABAP.
2007 Oct 04 1:17 PM
2007 Oct 04 1:20 PM
hi,
U can use the FM
Hi,
Use the below function module
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT',