Google Search - Blog...........

ABAP - Download Data From Internal Table To Excel Sheet.

REPORT ZTESTPROG002.

tables: mara.

PARAMETERS: p_file LIKE rlgrap-filename
default 'C:\Documents and Settings\venkatapp\Desktop\venkat.xls'.

data:begin of it_mara occurs 0,
matnr like mara-matnr,
meins like mara-meins,
mtart like mara-mtart,
mbrsh like mara-mbrsh,
end of it_mara.

SELECT matnr
meins
mtart
mbrsh
FROM mara
INTO corresponding fields of TABLE it_mara.

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
i_filename = p_file
TABLES
i_tab_sap_data = it_mara.


ALSO READ:




RETURN TO MAIN INDEX:

- Sample Programs On Uploading & Downloading Files.

- Sample Programs On HR ABAP.

- Sample Report Programs On ALV List/ Grid Display.

- Sample Programs On Selection Screen.

- Sample Programs On BDC.

.....Back To MAIN INDEX.

4 comments:

  1. hi
    nice article,can u tell me how to download an internal table in MS-word using OLE concept,the table in word should be of dynamic nature,pls reply to swarnali.basu@gmail.com

    ReplyDelete
  2. Very good, till now I've known only to save csv file

    ReplyDelete
  3. I just cannot pass the header for output file, since I_LINE_HEADER is of type char1.

    ReplyDelete
  4. Hi,

    Can you tell me how to transfer MS word to internal table. please do reply at menonmeister@gmail.com

    ReplyDelete