I have a view, 1 row per Maintenance order.
Now I need to add 'System Status' to this view.
System Status consists of multiple values, so many per order.
I need to concatenate all the status values for each order, so that there is 1 long string per order.
This reflects how the status strings are displayed in transactions IW33 for example.
However, I believe there the values are gathered using an ABAP function, which I don't have in HANA.
I can do all this in a Calculation (SQL) View :
var_out = select
"JEST_OBJNR_Object_number"
, STRING_AGG("TJ02T_TXT04_Individual_status_of_an_object_short_form", ' ') AS STRINGRESULT
from
"_SYS_BIC"."apci.data_quality.shared/SYSTEM_STATUS"
GROUP BY
"JEST_OBJNR_Object_number";
However, in Data Preview, this took 6 minutes to return 200 rows.
The other option , in theory, is what I did before in SQL Server
There I created a UDF that accepted the Order's OBKNR as an input parameter, and returned the concatenated string.
Yet looking in HANA, it seems SQL statements are not supported in UDFs !?
I have played around with Procedures, but as yet to no joy.
Has anyone any better ideas as to how to approach this problem ??
Many Thanks