Skip to main content

is CURRENCY_CONVERT_SAP function need TCURF , TCURX table in datamodel ? or without any reference (currency) table can we use this function? .

Hello @subash.varad ,

that's correct, you need to add those tables in the Data Model (no need to connect to anything, just make them available in the DM and reload it). Make sure they have the exact same SAP Names in case you are using transformations on them.

Further info can be found here

celonis.cloud/help/display/CIBC/CURRENCY_CONVERT_SAP

 

Best,

Gabriel


Hello @gabriel.okaba11 ,

Thanks for the comments. hope this function can handle Special currency's logic as well. like JPY, KRW, VND etc...

 


Hi Subash,

It should work without issues as this runs on top of SAP currency tables. (you might have inconsistent conversion in your SAP tables, but this is a different story 🙂 )

 


Hi all,

 

I am currently trying to implement an analysis with the CURRENCY_CONVERT_SAP function. It shows unusal behavior when trying to wrap a SUM() around it. Specifically it displays "NaN" (in a number KPI) instead of a sum value. I have already checked whether there are any NULL results coming out of the CURRENCY_CONVERT_SAP function but there isn't.

 

As a result, using the following PQL still returns "NaN":

 

SUM

( CASE WHEN

(CURRENCY_CONVERT_SAP ('EUR', 'EURX', "BSEG"."MANDT", "BSEG"."PSWSL" , "BSEG"."BLDAT", "BSEG"."PSWBT" )) IS NULL THEN 0.0

ELSE CURRENCY_CONVERT_SAP ('EUR', 'EURX', "BSEG"."MANDT", "BSEG"."PSWSL" , "BSEG"."BLDAT", "BSEG"."PSWBT" )

END

)

 

When using the CURRENCY_CONVERT_SAP function e.g. in an OLAP table with a vendor dimensions, it works fine.

 

The documentation / help page also does not state anything in this regard...

@gabriel.okaba11 @david.beche12 can you help out here?

 

Best,

 

Florian


Hi Florian,

I would probably need some further info to fully support you.

But given that your OLAP table is working, NaN stands for = Not a Number, meaning that it will work on individual rows like in an OLAP, but when aggregating with SUM, it won't be able to sum a row that is not a number.

My recommendation is to add an OLAP all these columns ', "BSEG"."MANDT", "BSEG"."PSWSL" , "BSEG"."BLDAT", "BSEG"."PSWBT" and the CURRENCY_CONVERT_SAP and then filter by the 'NaN' results.

You can fix those NoN by casting them either on Event Collection or by adding TO_FLOAT(column) which will change it to Null.

 

Best,

Gabriel


Hey @gabriel.okaba11!

 

Thanks for your quick answer. I set up the OLAP and analyzed for which cases the NaN occurs. Unfortunately it is not as easy as filtering on the "NaN" values because Celonis throws an error everytime you try to filter on or filter out NaN values. So I restricted the data scope with an dimension table piece for piece until I had only so few cases left to perform an excel export of the OLAP table without cutting of results (limit here is 50.000 rows as I see). Then I was able to search for the NaN values in the excel file. We had two cases with unusal entries in BSEG.PSWSL. With unusal entries I mean currency entries of currencies that do not exist anymore (italian lira) - it seems like this made the function break since there were also no exchange rate entries in the TCURR table for this. I excluded the two cases and now the SUM of CURRENCY_CONVERT_SAP works all fine! Thanks for your help!


Reply