Does anyone knows what this message means in Celonis Starter kit 'NaNM'? We have this value for those KPIs regarding currency conversions.
Can you share a few screenshots for the same ? What I can think of is that the backend tables are missing in your Data Model.
Sure this is an example, we're using the starter kit for SAP ECC since is the only one available for P2P in the marketplace, but in fact, we're using transformation from S4HANA P2P connector.
The transformation we're using is this one that brings the connector by default:
-- Query No: 1
DROP TABLE IF EXISTS "TCURF_CC";
-- Query No: 2
DROP TABLE IF EXISTS "TCURF_TMP";
-- Query No: 3
CREATE TABLE "TCURF_TMP" AS(
SELECT DISTINCT
*
,CAST(NULL AS TIMESTAMP) AS "VALID_START"
,CAST(NULL AS TIMESTAMP) AS "VALID_END"
,DENSE_RANK() OVER (ORDER BY
TCURF."MANDT"
,TCURF."KURST"
,TCURF."FCURR"
,TCURF."TCURR"
) AS "TCURF_KEY"
,ROW_NUMBER() OVER (PARTITION BY
TCURF."MANDT"
,TCURF."KURST"
,TCURF."FCURR"
,TCURF."TCURR"
ORDER BY (99999999-CAST(TCURF."GDATU" AS INT)) ASC) AS "TCURF_ROWNR"
FROM
"TCURF" as TCURF
WHERE 1=1
AND (99999999-cast(TCURF."GDATU" as int)) >= 18000000
AND (99999999-cast(TCURF."GDATU" as int)) <= 20990000
);
-- Query No: 4
CREATE TABLE "TCURF_CC" AS(
SELECT
*
FROM
"TCURF_TMP");
-- Query No: 5
UPDATE
"TCURF_CC"
SET
"VALID_START" = CAST(LPAD(CAST((99999999-CAST("GDATU" AS INT)) AS VARCHAR(10)),8,'0') || ' ' || '00:00:00' AS TIMESTAMP);
-- Query No: 6
UPDATE
"TCURF_CC" AS TCURF_CC
SET
"VALID_END" = CAST(LPAD(CAST((99999999-CAST(TCURF_TMP."GDATU" AS INT)) AS VARCHAR(10)),8,'0') || ' ' || '00:00:00' AS TIMESTAMP)
FROM
"TCURF_TMP" AS TCURF_TMP
WHERE 1=1
AND TCURF_CC."TCURF_KEY" = TCURF_TMP."TCURF_KEY"
AND TCURF_CC."TCURF_ROWNR" + 1 = TCURF_TMP."TCURF_ROWNR";
-- Query No: 7
UPDATE
"TCURF_CC"
SET
"VALID_END" = '2099-01-01'
WHERE
"VALID_END" IS NULL;
-- Query No: 8
DROP TABLE IF EXISTS "TCURF_TMP";
-------------------------------------
-------------------------------------
-- Statement: Database Preparation: Create Table: TCURR_CC
-- Query No: 1
--DROP TABLE IF EXISTS "P2P_TCURR";
DROP TABLE IF EXISTS "TCURR_CC";
-- Query No: 2
DROP TABLE IF EXISTS "TCURR_TMP";
-- Query No: 3
CREATE TABLE "TCURR_TMP" AS(
SELECT
TCURR."MANDT"
,TCURR."KURST"
,TCURR."FCURR"
,TCURR."TCURR"
,TCURR."GDATU"
--,TO_DATE(CAST((99999999-TCURR.GDATU) AS VARCHAR),'YYYYMMDD') AS GDATU
,TCURR."UKURS"
,TCURR."FFACT"
,TCURR."TFACT"
,CAST(NULL AS TIMESTAMP) AS "VALID_START"
,CAST(NULL AS TIMESTAMP) AS "VALID_END"
,DENSE_RANK() OVER (ORDER BY
TCURR."MANDT"
,TCURR."KURST"
,TCURR."FCURR"
,TCURR."TCURR"
) AS "TCURR_KEY"
,ROW_NUMBER() OVER (PARTITION BY
TCURR."MANDT"
,TCURR."KURST"
,TCURR."FCURR"
,TCURR."TCURR"
ORDER BY (99999999-CAST(TCURR."GDATU" AS INT)) ASC) AS "TCURR_ROWNR"
FROM
"TCURR" AS TCURR
WHERE 1=1
AND (99999999-CAST(TCURR."GDATU" AS INT)) >= 18000000
AND (99999999-CAST(TCURR."GDATU" AS INT)) <= 20990000
);
-- Query No: 4
CREATE TABLE "TCURR_CC" AS(
SELECT
*
FROM
"TCURR_TMP"
);
-- Query No: 5
UPDATE
"TCURR_CC" AS TCURR_CC
SET
"VALID_START" = CAST(LPAD(CAST((99999999-cast(TCURR_CC."GDATU" AS INT)) AS VARCHAR(10)),8,'0') || ' ' || '00:00:00' AS TIMESTAMP)
;
-- Query No: 6
UPDATE
"TCURR_CC" AS TCURR_CC
SET
"VALID_END" = CAST(LPAD(CAST((99999999-CAST(TCURR_TMP."GDATU" AS INT)) AS VARCHAR(10)),8,'0') || ' ' || '00:00:00' AS timestamp)
FROM
"TCURR_TMP" AS TCURR_TMP
WHERE 1=1
AND TCURR_CC."TCURR_KEY" = TCURR_TMP."TCURR_KEY"
AND TCURR_CC."TCURR_ROWNR" + 1=TCURR_TMP."TCURR_ROWNR"
;
-- Query No: 7
UPDATE
"TCURR_CC" AS TCURR_CC
SET
"VALID_END" = '2099-01-01'
WHERE
"VALID_END" IS NULL
;
-- Query No: 8
DROP TABLE IF EXISTS "TCURR_TMP";
----------------------------------------------------------------
--We created an additional table to change type data to some columns if it is necessary on TCURR
DROP TABLE IF EXISTS "P2P_TCURR";
CREATE TABLE P2P_TCURR AS (
WITH Q1 AS (
select DISTINCT
ROW_NUMBER() OVER (PARTITION BY TRIM(TCURR.MANDT),TRIM(TCURR.FCURR),TRIM(TCURR.GDATU) ORDER BY TRIM(TCURR.MANDT),TRIM(TCURR.FCURR),TRIM(TCURR.GDATU) DESC) AS TCURR_RANK,
TCURR.MANDT,
TCURR.KURST,
TCURR.FCURR,
TCURR.TCURR,
CAST(LPAD(CAST((99999999-CAST(TCURR."GDATU" AS INT)) AS VARCHAR(10)),8,'0') || ' ' || '00:00:00' AS timestamp) AS GDATU_TIME,
TCURR.GDATU AS GDATU,
CAST(TCURR.UKURS AS FLOAT) AS UKURS,
CAST(TCURR.FFACT AS FLOAT) AS FFACT,
CAST(TCURR.TFACT AS FLOAT) AS TFACT,
TCURR.VALID_START,
TCURR.VALID_END,
TCURR.TCURR_KEY,
TCURR.TCURR_ROWNR
FROM TCURR_CC AS TCURR
)
SELECT Q1.* FROM Q1
JOIN (
SELECT "MANDT", "FCURR", GDATU, MAX (TCURR_RANK) AS MAX_TCURR_RANK FROM Q1
GROUP BY 1, "FCURR",GDATU
) AS Q2 ON Q2.MAX_TCURR_RANK = Q1.TCURR_RANK
AND Q2."MANDT" = Q1."MANDT"
AND Q2."FCURR" = Q1."FCURR"
AND Q2."GDATU" = Q1."GDATU"
);
----------------------------------------------------------------
--We created an additional table to change type data to some columns if it is necessary on TCURF
DROP TABLE IF EXISTS P2P_TCURF;
CREATE TABLE P2P_TCURF AS (
WITH Q1 AS (
select DISTINCT
ROW_NUMBER() OVER (PARTITION BY TRIM(TCURF.MANDT),TRIM(TCURF.FCURR)ORDER BY TRIM(TCURF.MANDT),TRIM(TCURF.FCURR) DESC) AS TCURR_RANK,
TCURF.MANDT,
TCURF.KURST,
TCURF.FCURR,
TCURF.TCURR,
TCURF.GDATU AS GDATU,
CAST(TCURF.FFACT AS FLOAT) AS FFACT,
CAST(TCURF.TFACT AS FLOAT) AS TFACT,
TCURF.ABWCT,
TCURF.ABWGA
FROM "TCURF_CC" AS TCURF
--WHERE
--TCURF.KURST = 'M'
)
SELECT Q1.* FROM Q1
JOIN (
SELECT "MANDT", "FCURR", MAX (TCURR_RANK) AS MAX_TCURR_RANK FROM Q1
GROUP BY 1, "FCURR"
) AS Q2 ON Q2.MAX_TCURR_RANK = Q1.TCURR_RANK
AND Q2."MANDT" = Q1."MANDT"
AND Q2."FCURR" = Q1."FCURR"
);
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.