‎2008 May 05 6:05 AM
Dear All,
Can you please give me an example of how to use the function module XXL_SIMPLE_API?
Regards,
Prosenjit.
‎2008 May 05 6:17 AM
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.
‎2008 May 05 1:37 PM
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.
‎2008 Sep 24 7:45 AM