3 hours ago
Environment: SAP Profitability and Performance Management 3.0 SP22, On-Premise.
Lookup formula in Calculation function: right-hand join key always quoted as string literal in generated HANA code
Hello,
I am trying to enrich my input data in a Calculation function by pulling fields from another Model Table via a Lookup formula, following the approach from the sample content and older community posts.
Setup:
COUNTERPARTY_TYPE from table 13854, joined on COUNTERPARTY_ID.Formula I entered:
13854.COUNTERPARTY_TYPE[COUNTERPARTY_ID=COUNTERPARTY_ID]Problem: In the generated HANA code, the right-hand side of the join condition is always wrapped in single quotes, so it is treated as a string literal instead of a field reference from the main stream:
IFNULL((SELECT MAX(COUNTERPARTY_TYPE) FROM "SAPDB"."Y820HZL000513854"
WHERE (COUNTERPARTY_ID = 'COUNTERPARTY_ID')), TO_NVARCHAR('')) AS COUNTERPARTY_TYPEBecause of this, the lookup never matches any row and always returns the empty default. The enriched field stays blank, and all my downstream rules that depend on it do not trigger.
What I already tried (each one re-activated and re-checked in the generated code):
...[COUNTERPARTY_ID=M.COUNTERPARTY_ID] | WHERE (COUNTERPARTY_ID = 'M.COUNTERPARTY_ID') |
...[COUNTERPARTY_ID=COUNTERPARTY_ID] | WHERE (COUNTERPARTY_ID = 'COUNTERPARTY_ID') |
...[COUNTERPARTY_ID=$COUNTERPARTY_ID] | WHERE (COUNTERPARTY_ID = '$COUNTERPARTY_ID') |
In every case the right-hand value is quoted as a literal string. The main stream is aliased as AS M in the generated code, so I expected M.COUNTERPARTY_ID to work as a field reference, but it is quoted too.
My questions:
FID.FIELD[KEY=KEY] still supported in 3.0 SP22, or has the recommended approach changed (e.g. using the Lookup tab join configuration instead of a formula)Any guidance on the correct syntax or configuration would be greatly appreciated. Thank you!
Request clarification before answering.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.