10-30-2007 1:54 PM
Hi Friends,
I need a small help.I am new in using this function module 'XXL_FULL_API'.
I saw the SFLIGHT demo program for this FM.
I did not understand why some fields are appended to HKEY and some to VKEY.
i.., MANDT,CARRID,CONNID,FLDATE and all others to VKEY.
But,all Labels are haedings are present horizontally.
I wrote a simple program for it.
My requirement is to display two material details on an excel sheet.
But,I am getting an exception 'dim_mismatch_sema'.
Please check my code and let me know,what is the mistake I'm doing.
Usefula nswers will be rewarded.
DATA :
header1 LIKE gxxlt_p-text VALUE 'IMRAN',
header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
Internal table for holding the SFLIGHT data
DATA: BEGIN OF t_mara OCCURS 0.
INCLUDE STRUCTURE ztype_mara.
DATA END OF t_mara.
Internal table for holding the horizontal key.
DATA BEGIN OF t_hkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_h.
DATA END OF t_hkey .
Internal table for holding the vertical key.
DATA BEGIN OF t_vkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_v.
DATA END OF t_vkey .
Internal table for holding the online text....
DATA BEGIN OF t_online OCCURS 0.
INCLUDE STRUCTURE gxxlt_o.
DATA END OF t_online.
Internal table to hold print text.............
DATA BEGIN OF t_print OCCURS 0.
INCLUDE STRUCTURE gxxlt_p.
DATA END OF t_print.
Internal table to hold SEMA data..............
DATA BEGIN OF t_sema OCCURS 0.
INCLUDE STRUCTURE gxxlt_s.
DATA END OF t_sema.
t_mara-mandt = '800'.
t_mara-matnr = '123'.
t_mara-maktx = 'Test1'.
t_mara-werks = '0235'.
APPEND t_mara.
t_mara-mandt = '800'.
t_mara-matnr = '124'.
t_mara-maktx = 'Test2'.
t_mara-werks = '0235'.
APPEND t_mara.
Defining the vertical key columns.......
t_vkey-col_no = '1'.
t_vkey-col_name = 'MANDT'.
APPEND t_vkey.
t_vkey-col_no = '2'.
t_vkey-col_name = 'MATNR'.
APPEND t_vkey.
Header text for the data columns................
t_hkey-row_no = '1'.
t_hkey-col_no = 1.
t_hkey-col_name = 'MAKTX'.
APPEND t_hkey.
t_hkey-col_no = 2.
t_hkey-col_name = 'WERKS'.
APPEND t_hkey.
populating the SEMA data..........................
t_sema-col_no = 1.
t_sema-col_typ = 'STR'.
t_sema-col_ops = 'DFT'.
APPEND t_sema.
t_sema-col_no = 2.
APPEND t_sema.
t_sema-col_no = 3.
APPEND t_sema.
t_sema-col_no = 4.
APPEND t_sema.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
DATA_ENDING_AT = 54
DATA_STARTING_AT = 5
filename = 'TESTFILE'
header_1 = header1
header_2 = header2
no_dialog = 'X'
no_start = ' '
n_att_cols = 6
n_hrz_keys = 2
n_vrt_keys = 2
sema_type = 'X'
SO_TITLE = ' '
TABLES
data = t_mara
hkey = t_hkey
online_text = t_online
print_text = t_print
sema = t_sema
vkey = t_vkey
EXCEPTIONS
cancelled_by_user = 1
data_too_big = 2
dim_mismatch_data = 3
dim_mismatch_sema = 4
dim_mismatch_vkey = 5
error_in_hkey = 6
error_in_sema = 7
file_open_error = 8
file_write_error = 9
inv_data_range = 10
inv_winsys = 11
inv_xxl = 12
OTHERS = 13.
IF sy-subrc <> 0.
MESSAGE 'error' TYPE 'I'.
ENDIF.
Regards,
Imran.
02-07-2008 10:42 AM