Application Development and Automation 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: 
Read only

Need a function module name

Former Member
0 Likes
775

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
Read only

Former Member
0 Likes
628

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

Read only

Former Member
0 Likes
628

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

Read only

Former Member
0 Likes
628
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
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
628

Hi

Try for Datasets.

Regards,

Sreeram

Read only

sharadendu_agrawal
Active Participant
0 Likes
628

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