‎2009 Mar 16 3:41 AM
Hi Gurus,
I have to download a report output from memory to excel sheet and has to sent via email to proper person . for that I am using the following function modules. But it is not giving in proper format. can anyone suggest the function module?
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
att_type = 'CSV'.
DATA: BEGIN OF listasci OCCURS 0,
line(4096),
END OF listasci.
CALL FUNCTION 'LIST_TO_ASCI' "report to ASCII text
TABLES
listasci = listasci
listobject = listobject
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
CALL FUNCTION 'Z_RAW_TO_RTF' "add carriage return/linefeeds
TABLES "& wrap to 255 char blocks
objcont_old = listasci
objcont_new = objbin.
‎2009 Mar 16 4:09 AM
Hi,
try passing the list output to an internal table and then pass the internal table to the excel sheet using FM GUI_DOWNLOAD and pass the FILENAME as ' .XLS' extension..
Hope this works!!
Thanks
Ravi
‎2009 Mar 16 3:59 AM
Hi ,
Kindly go through this link below:
http://www.thespot4sap.com/Articles/Download_to_excel.asp
And to send the data through mail go through this link:
Hope it helps
Regrds
Mansi
Edited by: MANSI ASNANI on Mar 16, 2009 5:02 AM
‎2009 Mar 16 4:09 AM
Hi,
try passing the list output to an internal table and then pass the internal table to the excel sheet using FM GUI_DOWNLOAD and pass the FILENAME as ' .XLS' extension..
Hope this works!!
Thanks
Ravi