Skip to main content

Hi,

 

I am learning the celonis from the training track, while working on the creating the Account payable use case, i created the activity table but when inserting the second activity i am getting the above error so please help me where did i go wrong?

 

Thanks.

Hi Varadarajula,

 

Would you be able to provide the INSERT expression you are using? Most likely there is a syntax error that must be resolved that results in the utilization of two non-compatible data types.


Hi Varadarajula,

 

Most probably you are missing an item on your list or trying to insert a date type into the _SORTING column. As you can see in the following example, I am adding the SORTING column with an INT value ('10')

Sorting column 


Hi all,

 

Thank for your responses, I have found it out what I have done wrong. I did not convert the data types

 

INSERT INTO _CEL_AP_ACTIVITIES(

    "_CASE_KEY", "_ACTIVITY","_EVENTTIME","_SORTING")

 

SELECT DISTINCT

                "BSEG"."MANDT" || "BSEG"."BUKRS" || "BSEG"."BELNR" || "BSEG"."GJAHR" || "BSEG"."BUZEI" AS "_CASE_KEY",

                'ENTER INVOICE IN SAP' AS "_ACTIVITY",

                CAST("BKPF"."CPUDT" AS DATE) + CAST("BKPF"."CPUTM" AS TIME) AS "_EVENTTIME", // Here I haven't used the CAST key word earlier.

                10 AS "_SORTING"

 

FROM "BSEG"

JOIN "BKPF" ON

                "BSEG"."MANDT"="BKPF"."MANDT" AND 

                "BSEG"."BUKRS"="BKPF"."BUKRS" AND 

                "BSEG"."BELNR"="BKPF"."BELNR" AND

                "BSEG"."GJAHR"="BKPF"."GJAHR"

 

WHERE BSEG.BSCHL='31'

                AND BKPF.CPUDT IS NOT NULL

                AND BKPF.CPUTM IS NOT NULL;

 


Reply