Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XXL_SIMPLE_API - example needed

Former Member
0 Likes
858

Dear All,

Can you please give me an example of how to use the function module XXL_SIMPLE_API?

Regards,

Prosenjit.

3 REPLIES 3
Read only

Former Member
0 Likes
640

REPORT Z_EXCEL_FORMAT.

types: begin of tp_marc,

matnr type matnr,

werks type werks_d,

end of tp_marc.

data: t_head type standard table of GXXLT_V,

wa_head like line of t_head,

t_tab1 type standard table of GXXLT_o,

t_tab2 type standard table of GXXLT_p,

t_marc type standard table of tp_marc,

w_file type GXXLD_FILE.

select matnr

werks

into table t_marc

from marc

where werks = '4012'.

clear wa_head.

wa_head-COL_NO = 1.

wa_head-COL_NAME = 'Material No.'.

append wa_head to t_head.

clear wa_head.

wa_head-COL_NO = 2.

wa_head-COL_NAME = 'Plant'.

append wa_head to t_head.

clear wa_head.

w_file = 'C:\test.xls'.

CALL FUNCTION 'XXL_SIMPLE_API'

EXPORTING

FILENAME = w_file

HEADER = space

N_KEY_COLS = 1

TABLES

col_text = t_head

data = t_marc

online_text = t_tab1

print_text = t_tab2

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.

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

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

ENDIF.

Read only

Former Member
0 Likes
640

Dear Gayathri,

Thank you fro your reply. Can you please elaborate on the parameters header, online_text and print_text of the f.m?

Regards,

Prosenjit.

Read only

Former Member
0 Likes
640

Thanks!