Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need a function module name

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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

Former Member
0 Kudos

try these

SAP_CONVERT_TO_XLS_FORMAT Excel

-> MS_EXCEL_OLE_STANDARD_DAT Excel

-> RSPO_DOWNLOAD_SPOOLJOB Excel

RH_START_EXCEL_WITH_DATA Excel

Regards

Prabhu

Former Member
0 Kudos
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

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Try for Datasets.

Regards,

Sreeram

sharadendu_agrawal
Active Participant
0 Kudos

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