Table CDC
This page shows how to use the Table CDC extraction type.
The Table CDC extraction type can be used to extract delta content from SAP Tables. It creates a log table in SAP that records insert, update, and delete activities that apply to a selected SAP table.
Note
Table CDC is an Add-On that requires a license. For more information, contact Theobald Software's sales team at sales@theobald-software.com.
About Table CDC
Change Data Capture (CDC) is a method to keep track of data changes such as insert, update and delete in SAP tables. The Table CDC component creates a log table in SAP that records any changes made to a selected table. The content of the log table is cleared after every successful run of the extraction. Data that was not extracted is not cleared from the log table.
For a detailed overview of this process, refer to the Knowledge Base article Delta Mechanism of TableCDC.
Note
Clusters, pool tables and views are not supported by the Table CDC extraction type.
System Requirements
- The Table CDC extraction type is compatible with SAP ECC 5.0 and higher
- Supported databases:
- HANA
- SQL Server
- Oracle
- IBM Db2
- IBM for i (Db4)
- IBM for z/os (Db6)
- MaxDB
Prerequisites
- SAP custom function module /THEO/CDC_ECC or /THEO/CDC_S4 is installed in SAP.
- SAP custom function module /THEO/READ_TABLE or Z_THEO_READ_TABLE version 2.10 or higher is installed in SAP.
- A connection to an SAP system is available, see SAP Connection.
- The SAP user has sufficient user rights, see SAP Authority Objects.
The SAP transport requests for the function modules are provided in the installation directory: C:\Program Files\XtractUniversal\ABAP\
, see Custom function module for TableCDC.
Warning
Missing Authorization.
To use the Table CDC extraction type, access to the designated authority objects (RFC) in SAP must be available. Adjust SAP Authority Objects accordingly.
Create a Table CDC Extraction
- In the main window of the Designer, click [New] to create a new extraction. The window "Create Extraction" opens.
- Select an SAP Connection from the drop-down menu in Source and enter a unique name for your extraction.
- Select the extraction type Table CDC and click [OK]. The main window of the extraction type opens automatically.
The majority of the functions of the extraction type can be accessed in the main window.
Look Up a Table
- In the main window of the extraction type, click [ ]. The window “Table Lookup” opens.
- In the field Table Name, enter the name of the table to track and extract . Use wildcards (*) if needed.
- Click [ ] . Search results are displayed.
- Select a table and click [OK].
All relevant metadata information of the table is retrieved from SAP. The application returns to the main window of the extraction type.
Define the Table CDC Extraction Type
The Table CDC extraction type offers the following options for tracking SAP tables:
- Select the table columns you want to track and extract. By default all columns are selected. Deselect the columns you do not want to extract.
- If you want to extract the table when first running the extraction, activate [Extract table on first run].
-
Optional: You can set a maximum number of rows that the log table can contain. The default is disabled (Value 0).
If the row limit is reached, the extraction fails with an exception. The maximum row limit of a log table is 500.000.Note
Once a log table is initialized, you cannot change the size limit anymore.
-
Optional: Define a WHERE Clause to filter table records. By default all data is extracted.
- Click [Load live preview] to display a live preview of the first 1000 records.
- The column TS_TIMESTAMP contains a timestamp of when the data was last changed.
- The column TS_OPERATION indicates if a row was inserted (I), updated (U) or deleted (D).
- Check the Extraction Settings and the General Settings before running the extraction.
- Click [OK] to confirm your settings.
To initialize the tracking of the selected SAP table, run the extraction once.
Run the Extraction for the First Time
Run the extraction for the first time to create a log table in SAP that records any changes made to a selected table or view.
- Select the extraction in the main window of the Designer.
- Click [ Destination] to assign the destination where you want to write data to .
- Click [Run] . The window "Run Extraction" opens.
- Click [Run] to run the extraction.
- If the extraction is successful, the status in the General Info section of the window changes to "finished successfully". If an error occurred, you can find information on the error in the Log section of the window.
The log table in SAP is now available for the Table CDC component. The extracted SAP table is now available in your destination.
Note
When running the extraction regularly the content of the log table in SAP is extracted and written to the destination. The content of the log table in SAP is cleared after every successful run of the extraction. Data that was not extracted is not cleared.
Delete Log Table and Triggers
When a Table CDC extraction is no longer in use or if you need to change the structure of the source table, simply deleting the extraction is not enough. To delete the log table and all associated triggers from your SAP system, open the Table CDC extraction and click [Delete CDC resources].
To delete the SAP resources of multiple extractions or extractions that are already deleted, see Active CDC Watches.
Warning
Table change not possible
The source table cannot be changed, if any CDC-related resources connected to the source table in SAP exist.
Clear the CDC-related resources connected to the source table in SAP, see SAP Note 2284776.