Skip to Content

can't join tables using Calculated Attributes

Hello HANA gurus,

I am trying to join tables BKPF and EKBE using the join condition BKPF.AWKEY(10)  =  EKBE.BELNR

AWKEY field in BKPF  is 14 character long and BELNR in EKBE is the first 10 characters of AWKEY.

So i created a caluclated attribute RefKey in BKPF table : RefKey = leftstr(AWKEY,10)

so HANA does not allow me to join this "Cal attribute BKPF.Refkey" which is 10 character long  to the direct field BELNR from table "EKBE" .

Please advise if you have any alternate suggestions



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 23, 2013 at 10:55 PM

    Joins in Analytic Views are executed in the OLAP scenario, which runs before than any calculation scenario you might have (within which are calculated an calc attributes or measures you might have).

    The way I see it, you can either add a column to the original table with the 10 first digits or you can run the join in a calc view (not really recommended since performance would be really bad).

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24, 2013 at 08:30 AM

    Hi Prabhu,

    Just as a thought, can you try adding the a column with "GENERATED ALWAYS AS leftstr(AWKEY,10)". This new column can be added using ALTER TABLE and may not have impact on your existing ETL process.

    The generated column can be used for join.

    As I said, this is just a thought. You may try it.



    Add comment
    10|10000 characters needed characters exceeded