on 2022 Apr 13 5:41 PM
I searched for achieving the rank functionality in SAP DWC in Graphical model but seems there is no rank node available just like we have in HANA. I tried scripted view where I could not get proper syntax to implement the Rank functionality .
note : I did change the language to SQL Script ( Table Function)
Request clarification before answering.
Hi,
can't you use the rank sql function? Have a look here https://www.sqlshack.com/overview-of-sql-rank-functions/
best regards,
tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just as an information: you can also create and consume calculation views from the HANA database that comes with your DWC tenant, its just a bit of hassle to put everything up:
Exchanging Data with SAP SQL Data Warehousing HDI Containers | SAP Help Portal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
// Sample code - Picks latest Sales Order for a Material
// ROWNUMBER can be replaced with RANK or DENSE_RANK based on requirement.
RETURN
SELECT
"MATNR",
"ERDAT",
"VBELN",
"ROWNUMBER"
FROM
(
SELECT
V_VBAK."VBELN" AS VBELN,
V_VBAK."ERDAT" AS ERDAT,
V_VBAP."MATNR" AS MATNR,
ROW_NUMBER() OVER (
PARTITION BY V_VBAP."MATNR"
ORDER BY
V_VBAK."ERDAT" DESC
) AS ROWNUMBER
FROM
"V_VBAK"
INNER JOIN "V_VBAP" ON V_VBAK."VBELN" = V_VBAP."VBELN"
)
WHERE
ROWNUMBER = 1;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
54 | |
10 | |
8 | |
7 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.