cancel
Showing results for 
Search instead for 
Did you mean: 

calculated attribute to combine BELNR (char -10) and GJAHR(numc-4)

0 Kudos

Hi Experts,

I am trying to create a calculated attribute (Ref_KEY)  which should combine fields BELNR (type "char" and length 10) and GJAHR (type "numc" and length 4).

RefKEY = Concat ("BELNR","GJAHR") . I defined RefKey as 14 long nvarchar datatype.

But I am running into the below error message.Please help.

Short Text: Attribute type is not valid

Cause: Mismatch between data type defined and values computed.

So the ultimate goal is to join  the tables  BKPF.AWKEY = EKBE. RefKey

Thanks,

PK

Accepted Solutions (0)

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

Are you sure concat() worked? it's not even a documented function in http://help.sap.com/hana/hana_dev_en.pdf (setion 7.5.11 has the supported functions).

Also, the error is probably because the numeric field is not varchar in HANA table, but some numeric type.

I suppose you could just do something like string("BELNR") + string("GJAHR"), just to be on the safe side.