Skip to Content
0
Former Member
Mar 14, 2007 at 08:11 PM

Urgent task on download file

23 Views

Hi friends ,

I download the data into the excel file succesfully by 'EXCEL_OLE_STANDARD_DAT'

.But I didnt get the Headings What I have to Modify.

&----


*& Report ZT11

*&

&----


*&

*&

&----


report zt11.

data : begin of head occurs 0,

h1(5) type c value 'one',

h2(5) type c value 'two',

end of head.

append head.

data : begin of itab occurs 0,

t1(5) type c value 'sag',

t2(5) type c value 'ntc',

end of itab.

append itab.

*write : itab-t1,itab-t2.

CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'

EXPORTING

FILE_NAME = 'C:\DETAILS'

  • CREATE_PIVOT = 0

  • DATA_SHEET_NAME = ' '

  • PIVOT_SHEET_NAME = ' '

  • PASSWORD = ' '

  • PASSWORD_OPTION = 0

TABLES

  • PIVOT_FIELD_TAB =

*DATA_TAB = ITAB[]

FIELDNAMES = head

  • EXCEPTIONS

  • FILE_NOT_EXIST = 1

  • FILENAME_EXPECTED = 2

  • COMMUNICATION_ERROR = 3

  • OLE_OBJECT_METHOD_ERROR = 4

  • OLE_OBJECT_PROPERTY_ERROR = 5

  • INVALID_PIVOT_FIELDS = 6

  • DOWNLOAD_PROBLEM = 7

  • OTHERS = 8

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.