Skip to Content
0
Mar 23, 2016 at 03:21 PM

Hana Views (Loop?)

951 Views

Hi,

I want to create a view to show some order data (VBAK) and depends on the Position of the Orders I want to calculate a column.

Example:

VBELN POSNR ZCOLUMN 10001 000010 X 10001 000020 Y 10001 000030 Y 10002 000010 X

The result should be

VBELN ZCALCULATEDCOLUMN 10001 Z 10002 X

The ZCALCULATEDCOLUMN should be 'Z', if the positions are mixed with 'X' and Y'. If all positions have just 'X', The ZCALCULATEDCOLUMN

should be 'X' and if all positions are 'Y', the calculated column should be 'Y'.

Is it possible to solve this with an graphical analytics or calculation view? Do I have to use a procedure to solve this? Can you give me an example to solve this? In ABAP I just would LOOP the orders and calculate the column with IF-Conditions. But how to do this with HANA?

Thanks

Frank