I tried what you suggested, but it still didn't work. Does the sap version have anything to do with this? I'm using 6.2, also, I used the FM REUSE_ALV_GRID_DISPLAY to display a report and just added an excel button to create the excel file. Everyone has seemed to suggest the same suggestion you gave. I just don't know where my program went wrong. Can you give me some other suggestions. Thanks a lot guys for your help. I really appreciate them.
I am having a problem in getting headers by using cl_gui_frontend_services=>gui_download. I am getting headers as F1 F2 F3 F4.......and so on for headers. Can anybody provide me the code as to how to display the headers.
For filetype 'DBF', the headers come automatically as F1 F2 and so on inspite of not giving fieldnames. So the method you suggested is not working. Basically i am using 'DBF' to retain 0.00 in excel when internal table is downloaded since client wants it. So is there a way to keep 0.00 in excel other than using 'DBF'.
I have a requirement , Which I m downloading the contents of internal table using the GUI_DOWNLOAD in excel format, I need to keep the first line of the excel sheet as a header, Can any one suggest how to go for this,
Then i tried to download the table rows with GUID values from SE16N and found that the excel looks good. The GUIDs and other field values appear correctly. The point is while the table involves GUID values (RAW) in nature then if you download as ASCII file then the problem occurs. So in such a case first convert the table data into XSTRING and then convert this XSTRING data to BINARY and then download this BINAY formatted data as a BIN file with .XLSX format and then your excel looks really cool.
To send email with excel file from ABAP its neccesary to use SO_NEW_DOCUMENT_ATT_SEND_API1 this function module its availabel on SAP R3 and SAP hana, this will depends of your SAP version.
After execute this code you will recive and email with and excel file sending from abap. You can limit who send email with password on your program, to do this its neccesary has a Field type password in abap.
After you execute this source code, you will receive an email with and excel file attached into email, its very important that your SAP server has configured SMTP to send emails and the ports opened.
After you execute this programs you will recive and email with excel attached from ABAP program, if you not recive this email its neccesary to check whats happed, to do this please go to Tcode: SOST, this the code shows you all emails sending from SAP.
3a7c801d34