‎2008 Sep 02 6:26 AM
Hi All,
I need a Function Module to download the Internal table to Excel File.
I Have used SAP_CONVERT_TO_XLS_FORMAT,
but this function modules are using GUI_Download indirectly.
I dont want to use GUI_DOWNLOAD as i am going to call this Function Module in Portal.
So pls anybody has this type of function module.
Thanks & Regards,
Dhruv Shah
‎2008 Sep 02 6:27 AM
‎2008 Sep 02 7:04 AM
Hi,
But this function module is using GUI_DOWNLOAD .
so i am unable to use it in Portal.
Thanks
‎2008 Sep 02 6:28 AM
Try using FM 'SAP_CONVERT_TO_XLS_FORMAT'. this can be used to download internal table to presentation server xls file. Provide the file address and internal table in the parameters.
Hope this solves your problem.
or else
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
INFORM = 'X'
PROGRAM = 'EXCEL'
COMMANDLINE = 'C:\EXCEL.XLS'.
if this is absolute then you cna use GUI_RUN FM.
Edited by: murali papana on Sep 2, 2008 1:29 AM
‎2008 Sep 02 7:06 AM
Hi murali,
I already used this fm but it si working fine in R/3.
But in Portal i cannot use this as it is using GUI_DOWNLOAD.
also WS_EXECUTE is for opening the file with data already in it.
I want to transfer the data from internal table to excel.
If you have any other FM pls tell me.
Thanks & Regards,
Dhruv Shah
‎2008 Sep 02 7:16 AM
use open dataset/read dataset
open dataset d1 for output in text mode ENCODING DEFAULT.
LOOP AT I_FINAL.
concatenate I_FINAL-MATNR I_FINAL-WERKS I_FINAL-VERID
I_FINAL-ATWRT I_FINAL-ATWRT1 I_FINAL-ATWRT2
into str
separated by cl_abap_char_utilities=>horizontal_tab.
transfer str to d1.
endloop.
close dataset d1.
‎2008 Sep 02 6:59 AM
Hi dhruv,
Use the FM:-
MS_EXCEL_OLE_STANDARD_DAT
Also check link,
[Internal Table to Excel|http://abaplovers.blogspot.com/2008/05/abap-internal-table-to-excel-sheet.html]
Luck,
Bhumika
‎2008 Sep 02 8:02 AM
Hi Bhumika,
Thanks for reply, but this also indirectly uses GUI_Download Function Moduel which i cant use in Portal.
If you have any other FM then pl reply me.
Thanks & Regards,
Dhruv Shah
‎2008 Sep 02 7:01 AM
‎2008 Sep 02 7:02 AM
‎2008 Sep 02 7:52 AM
Hi Snehi.
Thanks for Reply. I already used this Function Module.
But it is also using GUI_DOWNLAOD. which is not accessible in Portal
‎2008 Sep 02 7:17 AM
Hi,
Do you think it causes problem if I offer you to create excel file through mail attachment and get this file from mail then?
If you do like this, just you have to provide the attch type as XLS,
and it will create it for you.
Maybe helps.
Deniz.
‎2008 Sep 02 7:20 AM
‎2008 Sep 02 8:02 AM
Hello Dhruv.
In Agreement with Deniz.
It is required to Export the query as an excel file.
[SAP HELP Library - Standard Reference - Exporting as a CSV File / MS Excel 2000 File|http://help.sap.com/saphelp_nw04/helpdata/en/d2/11a28fc26d4042a6d230a9783152f2/content.htm]
[SDN - Reference - Error in "Export to Microsoft Excel" from Portal|;
Hope this works out well.
Good Luck & Regards.
Harsh Dave
‎2008 Sep 02 8:08 AM