Skip to Content
0
Former Member
Mar 14, 2007 at 10:54 PM

problem while Downloading

21 Views

Hi friends ,

This is program to download the report to excel file when ever it encounter a non string or numerical Heading its going to short dump .

What I have to do for headings which are numbericals.

data : Begin of itab occurs 0,

t1 type i value 8,

end of itab.

append itab.

DATA: begin of tb occurs 0,

reptext like dfies-reptext,

end of tb.

tb-reptext = 'mar'.

append tb.

CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'

EXPORTING

FILE_NAME = 'C:\T001'

  • CREATE_PIVOT = 0

DATA_SHEET_NAME = 'Companies'

  • PIVOT_SHEET_NAME = ' '

  • PASSWORD = ' '

  • PASSWORD_OPTION = 0

TABLES

  • PIVOT_FIELD_TAB =

DATA_TAB = Itab

FIELDNAMES = tb

EXCEPTIONS

FILE_NOT_EXIST = 1

FILENAME_EXPECTED = 2

COMMUNICATION_ERROR = 3

OLE_OBJECT_METHOD_ERROR = 4

OLE_OBJECT_PROPERTY_ERROR = 5

INVALID_FILENAME = 6

INVALID_PIVOT_FIELDS = 7

DOWNLOAD_PROBLEM = 8

OTHERS = 9

.

IF SY-SUBRC <> 0.

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

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

endif.