Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Downloading data to excel sheet

Hi All,

I have data present in internal table <FS>.

when i tried to download it, using FM GUI_DOWNLOAD , i got error as :

"<FS>" is not a "STANDARD TABLE".

Could any body please tell me how can i download the data in excel shet ?

my code is

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = filename

WRITE_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = <FS>.

Tags:
replied

Hi,

plz declare this way:

DATA: i_itab type standard table of mara.

FIELD-SYMBOLS : <fs> TYPE STANDARD TABLE .

ASSIGN i_itab  to <fs>.

select * from mara into table
i_itab
up to 100 rows.
 

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename                        = 'C:\testfile.xls'
    WRITE_FIELD_SEPARATOR           = 'X'
  TABLES
    data_tab                        = <fs>
 EXCEPTIONS
   FILE_WRITE_ERROR                = 1
   NO_BATCH                        = 2
   GUI_REFUSE_FILETRANSFER         = 3
   INVALID_TYPE                    = 4
   NO_AUTHORITY                    = 5
   UNKNOWN_ERROR                   = 6
   HEADER_NOT_ALLOWED              = 7
   SEPARATOR_NOT_ALLOWED           = 8
   FILESIZE_NOT_ALLOWED            = 9
   HEADER_TOO_LONG                 = 10
   DP_ERROR_CREATE                 = 11
   DP_ERROR_SEND                   = 12
   DP_ERROR_WRITE                  = 13
   UNKNOWN_DP_ERROR                = 14
   ACCESS_DENIED                   = 15
   DP_OUT_OF_MEMORY                = 16
   DISK_FULL                       = 17
   DP_TIMEOUT                      = 18
   FILE_NOT_FOUND                  = 19
   DATAPROVIDER_EXCEPTION          = 20
   CONTROL_FLUSH_ERROR             = 21
          .

thanx.

Edited by: Dhanashri Pawar on Sep 24, 2008 11:52 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question