Skip to main content
Solved

How to extract data based on a rolling date when the data type is CHAR?

  • June 19, 2026
  • 4 replies
  • 407 views

Lovise Hellner
Level 10
Forum|alt.badge.img+2

hi all,

Context :
We have been using Celonis for many years connected to SAP ECC.
To limit our data consumption + keep our jobs running as efficiently as possible, we have been extracting our tables based on a 24 months rolling basis.
For that, we have a small job running every month setting the start date of all the extractions. This start date is used in the tables extraction filters. This has been running smoothly so far.

What is happening :
Our company is going to transition one ERP from SAP ECC to SAP S4.
in SAP S4, the price conditions table PRCD_ELEMENTS (KONV table in SAP ECC) and more specifically the date field KDATU, is setup in CHAR data type. This is not compatible with our extraction setup.

Assuming I wont be able to get this data type change, any recommendation on how to handle that?

Thanks

Best answer by gagan1

Hey ​@Lovise Hellner ,

In S/4HANA's PRCD_ELEMENTS, KDATU is no longer a DATS date — it uses data element VFPRC_TIMESTAMP, a CHAR(14) field in YYYYMMDDHHMMSS form. That's why your date-type extraction filter breaks.

The good news [ maybe ] because that character timestamp is fixed-width, it sorts chronologically as plain text — so a direct string comparison is both correct and the most performant option. It avoids the implicit data-type conversion (CAST) that a date filter would force on the column, which would otherwise prevent index use and trigger a full column scan on millions of rows.

Fix without touching the S/4 schema:

  1. Change your monthly parameter job to emit a text/string parameter instead of a date.
  2. Format the 24-month rolling start as an exactly 14-char, zero-padded string, e.g. 20260601000000 for 01 Jun 2026.
  3. In the extraction filter, compare as strings:

 KDATU >= '<%=YOUR_ROLLING_START_DATE_TEXT%>'

 

Since it's lexicographic, keep the full 14 characters (don't truncate to YYYYMMDD) so the comparison stays unambiguous. Zero modifications to S/4HANA, and the extraction stays fast.

Ref -> SAP S/4HANA Simplification -->data element changes in PRCD_ELEMENTS (VFPRC_TIMESTAMP); Celonis Data Integration → extraction parameters & filter statements..

Let me know ! if it worked for you

4 replies

gagan1
Member Spotlight
Forum|alt.badge.img+5
  • Member Spotlight
  • Answer
  • June 19, 2026

Hey ​@Lovise Hellner ,

In S/4HANA's PRCD_ELEMENTS, KDATU is no longer a DATS date — it uses data element VFPRC_TIMESTAMP, a CHAR(14) field in YYYYMMDDHHMMSS form. That's why your date-type extraction filter breaks.

The good news [ maybe ] because that character timestamp is fixed-width, it sorts chronologically as plain text — so a direct string comparison is both correct and the most performant option. It avoids the implicit data-type conversion (CAST) that a date filter would force on the column, which would otherwise prevent index use and trigger a full column scan on millions of rows.

Fix without touching the S/4 schema:

  1. Change your monthly parameter job to emit a text/string parameter instead of a date.
  2. Format the 24-month rolling start as an exactly 14-char, zero-padded string, e.g. 20260601000000 for 01 Jun 2026.
  3. In the extraction filter, compare as strings:

 KDATU >= '<%=YOUR_ROLLING_START_DATE_TEXT%>'

 

Since it's lexicographic, keep the full 14 characters (don't truncate to YYYYMMDD) so the comparison stays unambiguous. Zero modifications to S/4HANA, and the extraction stays fast.

Ref -> SAP S/4HANA Simplification -->data element changes in PRCD_ELEMENTS (VFPRC_TIMESTAMP); Celonis Data Integration → extraction parameters & filter statements..

Let me know ! if it worked for you


Lovise Hellner
Level 10
Forum|alt.badge.img+2

thanks, will let you know how it goes


Lovise Hellner
Level 10
Forum|alt.badge.img+2

sorry for the late reply ​@gagan1 
this was the perfect solution, thank you for your help


gagan1
Member Spotlight
Forum|alt.badge.img+5
  • Member Spotlight
  • July 1, 2026

sorry for the late reply ​@gagan1 
this was the perfect solution, thank you for your help

I am glad that it solved your problem ​@Lovise Hellner ,

See you around the forum!



take care :)