Skip to Content
0
Former Member
Oct 20, 2006 at 10:36 PM

downloading to excel problem

22 Views

Hi,

im trying to output my internal table contents to an excel spreadsheet. i used set pf-status so that an icon shows up on the application tool bar and its working fine and triggers the xxl_simple_api FM TOO. however, im not getting any output on the excel spread sheet.please help me out. i attached the code below.

regards,

ravi.

DATA :

it_online LIKE gxxlt_o OCCURS 0 WITH HEADER LINE,

it_print LIKE gxxlt_p OCCURS 0 WITH HEADER LINE.

header-col_no = 1.

header-col_name = 'FIELD1'.

APPEND header.

header-col_no = 2.

header-col_name = 'FIELD2'.

APPEND header.

header-col_no = 3.

................

CALL FUNCTION 'XXL_SIMPLE_API'

EXPORTING

  • header = 'test'

  • filename = 'ZPROGRAM'

N_KEY_COLS = 0

TABLES

col_text = header[]

data = itab_excel[] "data itab

online_text = it_online

print_text = it_print

EXCEPTIONS

dim_mismatch_data = 1

file_open_error = 2

file_write_error = 3

inv_winsys = 4

inv_xxl = 5

OTHERS = 6.

*

IF sy-subrc <> 0.

EXIT.

ENDIF.