‎2007 May 09 8:09 AM
Hi,
I am trying to download data from a classical report using 'GUI_DOWNLOAD'.
It is downloading data fine but it is not downloading header part of the classical report.
So can any body give me the function module which will download data along with header from a classical report.
Thanx in advance
Subhani.
‎2007 May 09 8:12 AM
Hi,
<b>RSTXTPDF4,</b> Pass the spool number of a report's output to this program to have the output converted to PDF
U can use the function module..
XXL_SIMPLE_API
or
XXL_FULL_API
And can download the output data into xl sheet.
Regards
Sudheer
‎2007 May 09 8:13 AM
‎2007 May 09 8:20 AM
have you tried with the option FIELDNAMES in GUI_DOWNLOAD
DATA : ITAB TYPE MARA OCCURS 0 WITH HEADER LINE.
SELECT * INTO ITAB
FROM MARA
UP TO 10 ROWS.
APPEND ITAB.
ENDSELECT.
DATA : BEGIN OF ITAB1 OCCURS 0,
LINE(50) TYPE C,
END OF ITAB1.
ITAB1-LINE = 'field1 description'.
APPEND ITAB1.
ITAB1-LINE = 'field2 desc'.
APPEND ITAB1.
ITAB1-LINE = 'field3 desc'.
APPEND ITAB1.
*--and so on you have to add up the records in itab1.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'c:abc.xls'
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = ITAB
FIELDNAMES = ITAB1
‎2007 May 09 8:21 AM
‎2007 May 09 9:38 AM
Just add the header line into the internal table using the INSERT statement and then pass the internal table to the required FM gui_download..
Sharadendu