Skip to main content

💡 Tip of the Week: How to extract data based on a rolling date when the data type is CHAR?

  • Jul 2, 2026 2:30 AM UTC
  • 1 reply
  • 124 views

Chitra
Celonaut
Forum|alt.badge.img+2

 

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?

 

Tip from our one of our active contributor ​@gagan1 

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..

 

Have you faced similar issue before?

What's your go-to solution for this? Share it in the comments! And hey, if you'd like to contribute a tip for next week's session, I'm here just send me a message.

1 reply

gagan1
Community MVP
Forum|alt.badge.img+8
  • Community MVP
  • Jul 2, 2026 10:21 AM UTC

Thanks for featuring this, ​@Chitra .


S/4HANA migrations usually break a lot of legacy date filters, so hopefully, this simple string comparison saves other teams from dealing with slow column scans and extraction timeouts. Glad it could be helpful!