Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 23, 2013 at 08:46 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded