2012 Feb 16 8:02 AM
hi all,
i am using FM 'TEXT_CONVERT_XLS_TO_SAP ' to upload the excel into my internal table , but i am getting below error -
Error during conversion - field type conflict
The sending and receiving fields have conflicting types. The receiving field has type P. Value BCTR1 was supposed to be transferred to this field, but this conflicts with the type definition for the receiving field.
The incorrect field is field 1 of the receiver structure.
BCTR1 is the value of Material field which has the data type of char18 in the table.
and i have declared my internal table also with the same structure of table.
please help me on this.
Edited by: shweta gupta on Feb 16, 2012 9:03 AM
2012 Feb 16 8:12 AM
Hi..
Where ur internal table filed lenth and type is same in standard..
Can u share ur Internal table and which table u r refer for that fields..
Same problem i faced ,, i solved because wrongly i assiged in internal table..
Reply back i vil chk here.. Share ur program.
regards
Prabu K
2012 Feb 16 8:12 AM
Hi..
Where ur internal table filed lenth and type is same in standard..
Can u share ur Internal table and which table u r refer for that fields..
Same problem i faced ,, i solved because wrongly i assiged in internal table..
Reply back i vil chk here.. Share ur program.
regards
Prabu K
2012 Feb 16 8:59 AM
table structure is below -
z_table -
MANDT MANDT CLNT 3
KUNNR KUNNR CHAR 10
MATNR MATNR CHAR 18
INV_PER ZZSV_INVPER DEC 5
MAX_ORD_QTY ZZSV_MOQ QUAN 15
ETD_DAYS ZZSV_ETD_DAYS INT4 10
BUS_ST_DATE ZZSV_BUS_ST_DT DATS 8
BUS_END_DATE ZZSV_BUS_END_DT DATS 8
DIS_FLAG ZZSV_DIS_FLG CHAR 1
ERDAT ERDAT DATS 8
ERZET ERZET TIMS 6
ERNAM ERNAM CHAR 12
UDATE AEDAT DATS 8
UTIME CDUZEIT TIMS 6
UNAME CDUSERNAME CHAR 12
and in my program i declared the table like below -
i_data type standard table of Z_table.
using the function module like below -
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER = 'X'
i_tab_raw_data = i_raw
i_filename = v_file
tables
i_tab_converted_data = i_data
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
2012 Feb 16 9:13 AM
Hi,
Instead of declaring global structure....declare internal table as local types structure in the report.
Regards,
2012 Feb 16 9:17 AM
Hi,
1. Check file which u are uploading has the same no of columns and in the same sequence as the the table decared.
2 Or Declare all the fields of the internal table as char.
Regards,
Madhukar Shetty
2012 Feb 16 9:34 AM
hi Madhukar Shetty,
Thanks a lot , it solved my prob.
i declared all the fields of internal table as char , and it worked.
2012 Feb 16 9:36 AM
Hi swetha..
Thats wrong..
Exmaple:
Types: Begin of ty_tab,
kunnr type kunnr,
matnr type matnr,
end of ty_tab.
data: lt_tab type standard table of ty_tab,
wa_tab type ty_tab
u follw same way.....