Skip to main content

Celonis Product Documentation

Extracting data from encoded SAP tables

With Celonis Platform, you can extract data from SAP tables. See the following section to learn more about how data is extracted and converted from different tables.

In the AR process, the credit check activity plays an important role. Typically the events are stored in CDPOS and can be extracted without any hassle. However, in S/4 HANA if the customer is using the advanced credit management module, then the outcomes of the credit check are stored in the BALDAT table. This complicates the extraction because BALDAT stores the data in an LRAW data type which is not extractable by our standard process.

Celonis has created an ABAP program which decrypts the column CLUSTD and stores the converted values in a new table which can be extracted as any other standard table from SAP.

Conversion logic and setup for the BALDAT table

The conversion is done using the program /CELONIS/RP_BAL_CONVERT. It calls the built-in SAP function BAL_DB_CONVERT_INTO_VER0000, which:

  • reads the records from table BALHDR

  • looks up their respective logs from the BALDAT

  • converts and writes the records in a new table /CELONIS/BALDAT.

The conversion process is resource-consuming, so we recommend creating a variant and scheduling a background job. The conversion supports two modes - full and delta. The full mode processes all the records without applying any timestamp filters. It is expected that the customers will run this for the initial conversion. Afterwards, they should schedule a job to run in delta mode. In this mode, the program processes only the records added after the last conversion run. The concatenation of columns BALHDR.ALHDATE + BALHDR.ALTIME is used to filter out the new records that have been added after the previous conversion run.

The transports can be downloaded from the Download Portal.

From version 4.5A, SAP no longer stores the MRP lists in the table MDTB. Instead, the data is compressed and stored in the cluster table MDTC, specifically in the CLUSTD field.

Unlike the common table, MDTC cannot be extracted via the standard SAP extractor. Celonis has developed a special program that converts MDTC into a standard table which can be extracted using the SAP extraction client.

Conversion logic and setup for the MDTC extraction

The conversion is done via the program /CELONIS/RP_MDTC_CONVERT. It calls the built-in SAP function READ_MRP_LIST, which:

  • reads the records from table MDKP which has the Header Data for MRP Document

  • looks up their respective logs from the MDTC

  • converts and writes the records in a new table /CELONIS/MDTB.

The conversion process is resource-consuming, so we recommend creating a variant and scheduling a background job. The conversion supports two modes - full and delta. The full mode processes all the records without applying any timestamp filters. It is expected that the customers will run this for the initial conversion. Afterwards, they should schedule a job to run in delta mode. In this mode, the program processes only the records added after the last conversion run. The column MDKP.DSDAT is used to filter out the new records that have been added after the previous conversion run.

The transports can be downloaded from the Download Portal.

Report_covert_MDTC.png

The SAP table STXL contains encoded data stored in the CLUSTD column. This data is not human-readable unless decrypted, and since our standard RFC module reads the text from the DB without any conversion, it is not suitable for this use case. The data is important for some business use cases, and we need a solution to fetch it into Celonis Platform as a readable text.

Rather than extending the RFC Module functionality, we have developed a separate program (the attachment is at the end of the page) that decrypts STXL into a readable format using the native SAP function READ_TEXT, and then writes this data into another table - ZSTXL.

This table can be extracted afterward using our standard RFC Extractor.

The converter program is distributed in the package ZSTX_CONVERT. It contains the following objects:

  • Table ZSTXL - stores the converted data is written

  • Program ZRP_STX_CONVERT - performs the conversion.

57542212.png

The package is distributed as an SAP transport which should be imported into the SAP system. The user can create a variant of the report ZRP_STX_CONVERT, and then execute it regularly via an SAP Background Job to convert the STXL. The running interval is up to the user, and is based on how frequently they want to refresh this data.

The report supports several parameters. The parameter PACKSZ defines the number of rows to process in memory, and the other parameters allow filtering the processed data.

57542222.png
Download STXL conversion file

As an admin of an Celonis Platform team, you can download the STXL conversion zip file from the Download Portal.

Click Admin & Settings > Download Portal and then expand the RFC Module Extensions content:

stxl_download_portal.png