Problem solve Get help with specific problems with your technologies, process and projects.

Download online report

You can download the total report as it is look like on the online screen by using function module 'LIST_TO_ASCI'.

You can download the total report as it is look like on the online screen by using function module 'LIST_TO_ASCI'.
Just pass the list index  and one internal table into 
which it will download the report. 
The strucure of the itab will be 

Data: begin of itab occurs 0, 
line(300), 
end of itab. 

after this just use 'ws_download' function and pass this itab.
The total online report will get downloaded into the flat file.
The function module 'LIST_TO_ASCI' should use at the end of report,
that is after writing each and every statement in the report. 
small example is as follows. 
REPORT  ZDOWNLOAD_REP                           . 
tables: mara. 

DATA: BEGIN OF ITAB occurs 0, 
        MATNR TYPE MARA-MATNR, 
        MTART TYPE MARA-MTART, 
        MBRSH TYPE MARA-MBRSH, 
        MATKL TYPE MARA-MATKL, 
      END OF ITAB. 

data: begin of itab1 occurs 0, 
      line(300), 
      end of itab1. 

start-of-selection. 

select * from mara into corresponding fields of table itab. 

loop at itab. 
WRITE:/ ITAB-matnr, itab-mtart, itab-mbrsh,itab-matkl. 
endloop. 

CALL FUNCTION 'LIST_TO_ASCI' 
 EXPORTING 
   LIST_INDEX               = 0 
  TABLES 
    LISTASCI                 = itab1. 

CALL FUNCTION 'WS_DOWNLOAD' 
 EXPORTING 
   FILENAME                      = 'C:report.txt' 
   FILETYPE                      = 'ASC' 
  TABLES 
    DATA_TAB                      = itab1. 

This will work in all the versions of SAP.
This was last published in February 2004

Dig Deeper on SAP trends, strategy and ERP market share

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close