Skip to Content
avatar image
Former Member

CopyColumnData failed because of type mismatch which can't be

Hi,

I try to load data from an DDIC table to a local table in my own schema. The target tables structure is identical to the source table except there are two additional attribute at the end of the target table. However I get following error message:

Could not execute 'INSERT INTO MERKLEB."/BA1/F1_CON_FLAT" SELECT "MANDT", m.new_EXT_CONTRACT as EXT_CONTRACT, ...' in 7:50.007 minutes . SAP DBTech JDBC: [6]: invalid data: setITab failed: copyColumnData() failed: attribute 'NOTICE_PERIOD' from source type='string' into target attribute 'NOTICE_PERIOD' with type='int' for table 'MERKLEB:/BA1/F1_CON_FLATen'

This message tells me that the source attribute has not the same type as the target type. This is strange because the target table is a copy of the source table.

Here you can see my code:

INSERT INTO MERKLEB."/BA1/F1_CON_FLAT"
SELECT 
"MANDT",
m.new_EXT_CONTRACT as EXT_CONTRACT,
"PRODTYPE",
get_int_from_hash(new_EXT_CONTRACT) as "PARTITION_KEY",
"BUS_VALID_FROM",
"SYS_TIME",
"CONTRACT_NR",
m.new_INT_CONTRACT as INT_CONTRACT,
"PARTITION_VALID_TO",
"SYS_CURRENT",
"AUTH_GROUP",
"STATUS",
"VERSION_STATUS",
"TEMPLATE_TYPE",
"INFO_TIME",
"CRUSER",
"SEL_CRIT",
"COMPRESS_STATUS",
"RELUSER",
"REL_CHNG_TIME",
"CHECK_STATUS",
"OP_DATE_TIME",
"FATHER",
"POS_NR",
"FATHER_PRODUCT",
"PRODUCT",
"VERSION",
"NODE_NO",
SYSUUID as "COMP_GUID_FLAT",
"DATA_IND_BPR",
"DATA_IND_CFH",
"DATA_IND_CRE",
"DATA_IND_CRL",
"DATA_IND_CUR",
"DATA_IND_FCO",
"DATA_IND_FPO",
"DATA_IND_KFG",
"DATA_IND_LIM",
"DATA_IND_OPD",
"DATA_IND_RAT",
"ORIGINAL_SYSTEM",
"CONTRACT_TYPE",
"ASSET_FLAG",
"CONTRACT_STATUS",
"CONTRACT_DATE",
"CONTRACT_TIME",
"CONTRACT_STARTD",
"CONTRACT_STARTT",
"CONTRACT_ENDD",
"CONTRACT_ENDT",
"CONTRACT_APPD",
"CONTRACT_APPT",
"CONT_CONF_STARTD",
"CONT_CONF_STARTT",
"CONT_CONF_ENDD",
"CONT_CONF_ENDT",
"DATE_END_CPTIEUP",
"TIME_END_CPTIEUP",
"DATE_STFIXINTER",
"TIME_STFIXINTER",
"DATE_ENDFIXINTER",
"TIME_ENDFIXINTER",
"CONTRACT_CUKY",
"CONTRACT_RATE",
"CUST_RATE_TYPE",
"MARKET_RATE",
"MARKET_RATE_TYPE",
"CONTRACT_SECCUKY",
"FAC_TYPE",
"COLLATERAL_TYPE",
"COLLATERAL_PRIO",
"INTER_CALC_METH",
"INTR_CALC_CAL",
"INT_CONT_NUMBER",
"BUY_SELL_FLAG",
"SPOT_FORW_FLAG",
"NOTICE_PERIOD",
"PERIOD_UNIT",
"SETTLEMENT_DATE",
"MULTIPLICITY",
"CALENDAR_I",
"CALENDAR_II",
"ACTIVE_PASSIVE",
"RISK_BASIS",
"CREDIT_EXP",
"PROD_VARIANT",
"BOOK",
"GRACE_PERIOD",
"ORGUNIT_OWNER",
"EXTERNAL_PRODUCT",
"OPER_PROC_ID",
"OPER_PROC_TYPE",
"FUNDED_FLAG",
"PROD_CONTROL",
"ACC_NAME",
"ACC_CRDATE",
"ACC_CURRENCY",
"ACC_STATUS",
"INST_SDESC",
"INST_TYPE",
"ISIN_NUMBER",
"NOM_VALUE",
"NOM_CUKY",
"IPO_AMOUNT",
"IPO_CUKY",
"IPO_EXCRATE",
"IPO_OWN_FLAG",
"INDEX_BAS_100",
"INDEX_VALUE",
"INDEX_CUKY",
"TRANS_TYPE",
"QUOT_TYPE",
"TRADE_FLAG",
"CLASS_TYPE",
"CLASS_DURATION",
"CLASS_RISK",
"CLASS_INTEREST",
"LAST_TRADE",
"LISTED_FLAG",
"REPAY_RATE",
"REORG_STATUS",
"DUMMY_SDL_MDF_SAP",
"/BA1/C55LGENT",
"/BA1/C11BOOK",
"/BA1/C11PRDCTR",
"/BA1/C49POSMD",
"/BA1/C62EXTMDB",
"/BA1/C63SPLITR",
"/1BA/_BA1C_GRSCT",
"/1BA/_BA1C_GRTID",
"/1BA/_BA1C_LGDID",
"/1BA/_BA1C_PDGID",
"/1BA/_BA1C_RECTR",
"/1BA/_BA1C_RPDID",
"/1BA/_BA1C_RPGID",
"/1BA/_BA1C_SMXID",
"/1BA/_BA1C_TMXID",
"/B20C/S_CALTKEY1",
"/B20C/S_CALTKEY2",
"/B20C/S_CCOTYPE",
"/B20C/S_CERFGCB",
"/B20C/S_CLGDMODL",
"/1BA/_BA1C_BOOK",
"/B20C/S_CORGUNIT",
old_INT_CONTRACT as ORIGINAL_INT_CONTRACT,
COMP_GUID_FLAT as original_comp_guid_flat
FROM intmapping m INNER JOIN SAPF6P."/BA1/F1_CON_FLAT" c on m.old_EXT_CONTRACT = c.EXT_CONTRACT

SYSUUID is a constant and intmapping is a table which will map the EXT_CONTRACT and INT_CONTRACT to an new EXT_CONTRACT and INT_CONTRACT.

Intmapping is structured as

OLD_EXT_CONTRACT (NVARCHAR);

NEW_EXT_CONTRACT (NVARCHAR);

OLD_INT_CONTRACT (VARBINARY);

NEW_INT_CONTRACT (VARBINARY)

Is here anyone who have an idea what's going on here?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 06, 2017 at 06:00 AM

    Hi Lars,

    the table was created by the following statement:

    CREATE TABLE MERKLEB."/BA1/F1_CON_FLAT"LIKE SAPF6P."/BA1/F1_CON_FLAT" WITH NO DATA;

    The DDL of the tables I attached to my post.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 15, 2017 at 08:04 PM

    I also received exactly similar error. I am working in SAP HANA version 1.00.122.11. Please let me know if there is any solution. In my case. type for both the source and target is SMALLINT.

    Add comment
    10|10000 characters needed characters exceeded