‎2008 Nov 21 2:47 PM
Hello,
I have the following code:
data: begin of imp_tab_xls occurs 0,
serge like equi-serge,
tip_cont(4) type c,
dep_to like ztransfer-dep_to,
datcrea like ztransfer-datcrea,
end of imp_tab_xls.
SELECTION-SCREEN BEGIN OF BLOCK dmselection WITH FRAME TITLE text-001.
parameter: path like RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK dmselection.
call FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
Exporting
FILENAME = path
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 7
I_END_ROW = 65000
TABLES
INTERN = imp_tab_xls
EXCEPTIONS
INCONSISTENT_PARAMETERS
UPLOAD_OLE.
When running it, it ends in short dump with the following error:
Runtime errors CALL_FUNCTION_CONFLICT_TAB_TY
Exception CX_SY_DYN_CALL_ILLEGAL_TYPE
And this is the Error analysis:
An exception occurred. This exception will be dealt with in more d
below. The exception, assigned to the class 'CX_SY_DYN_CALL_ILLEGA
not caught, which
led to a runtime error. The reason for this exception is:
The system tried to pass internal table "IMP_TAB_XLS[]" to the for
parameter "INTERN", but a type conflict occurred between the
formal and the actual parameter.
The condition selected below has been violated:
(" ") The access types defined for the tables are incompatible.
The following hierarchy shows the compatibility rules:
ANY_TABLE
/ \
/ \
INDEX_TABLE HASHED_TABLE
/ \
/ \
STANDARD_TABLE SORTED_TABLE
A concrete access type is only compatible with types higher
in the hierarchy. For example, STANDARD_TABLE is compatible
with INDEX_TABLE and ANY_TABLE, but not with HASHED_TABLE.
("X") The line types of the tables are incompatible.
("X") The table keys of the tables are not identical.
(" ") One of the tables has a UNIQUE key, but the other has a
NON-UNIQUE key.
How can I solve this problem?
Thanks.
‎2008 Nov 21 2:53 PM
declare imp_tab_xls as :
data : imp_tab_xls type kcde_cells occurs 0.
‎2008 Nov 21 2:53 PM
declare imp_tab_xls as :
data : imp_tab_xls type kcde_cells occurs 0.
‎2008 Nov 21 3:08 PM
Ok, but doing so, how do I define the exact fields that my original imp_tab_xls table contained, becuase these is esential to have the same description and name as I have showed above.... ?
if I do :
if imp_tab_xls-serge ....
when activating it says that the field: imp_tab_xls-serge does not exist....
Thank you.
‎2008 Nov 21 3:14 PM
One point is that we have to declare variables the way it is declared in FM .. 'KCD_EXCEL_OLE_TO_INT_CONVERT' ..
In this FM .. tables INTERN refers to KCDE_CELLS .. so we also need to refer to the same ..
U don't have the field serge in KCDE_CELLS .. U need to get serge from KCDE_CELLS-VALUE ..