Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 5115

Joins with calculated columns in HANA views

$
0
0

I have two tables replicating from ECC, MARA and T179T. The MARA.PRDHA field is actually a field with many different product hierarchy levels all with there own text in T179T. For example, MARA.PRDHA chars 1-3 has a text value in T179T, chars 1-6 has a text value, chars 1-8 has a text value and so on. What I want to be able to do is create a HANA view which includes the codes and texts of each of the product hierarchy levels. I can easily create a calculated column and pull the left characters for each of the product hierarchy levels in an attribute or calculation view, but I'm not able to then join these fields with the text table.

 

In SQL, this situation is easy to recreate as an example:

select matnr, prdha, left(prdha,6) as prod6, left(prdha,8) as prod7, t1.vtext, t2.vtext

from mara, t179t as t1, t179t as t2

where left(prdha,6) = t1.prodh and left(prdha,8) = t2.prodh

 

I just can't seem to get a calculated column in a HANA view to link to a table. Is it not possible to join in a calculation view with a calculated column from an attribute view or calculated column direct in the calculation view? Can anyone think of a way to do this simple parsing of a field into multiple fields and then linking those parsed fields to a text table. It seems like this should be pretty easy like in SQL directly, but I haven't found a good method with a HANA view yet. Any suggestions would be appreciated. Thanks.


Viewing all articles
Browse latest Browse all 5115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>