I want to capture changes for all possible SAP tables.
I figured out that CDHDR
and CDPOS
tables capture change documents but it's not clear for which all tables it does that.
I have multiple questions to ask:
- Get list of all tables for which
CDHDR
andCDPOS
tables capture change documents. - As
CDPOS
table only contains changed field and I need to map it with Primary Key of the table. How can I map changed record with primary key of a table?
To purely answer your question, I certainly can tell you to look into the t-code
SCDO
to get the clue on what you need, but I would choose to challenge your reasoning approach. So, you have a requirement to capture changes for all possible SAP tables. For what purpose? There are thousands of SAP tables being tracked byCDHDR
andCDPOS
, and most tables there do not bring immediate business values to you. Whenever a table column has a data element likeBELNR_D
andGJAHR
, it could appear inCDHDR
, because such element is marked as "Change Document" flag (t-codeSE11
):And SAP's explanation to the flag is:
Therefore, with thousands of tables being tracked, it would not be a good idea to solve the problem purely from technical aspect, and we have not even started looking into the performance problem with
CDHDR
andCDPOS
yet.If your requirement is part of a data warehousing project, then without the hassle of dealing with
CDPOS
andCDHDR
, you can analyze the incremental insertion, deletion and update through the transparent tables or standard extractors. If you can use DB trigger, then SLT could also be an option to get the changed records on the tables you are interested in at almost real-time (5-second delay by default setting).To summarize, to get to what you need, you can navigate to SAP Menu - Tools - ABAP Workbench - Other Tools - Change Document, or simply the t-code
SCDO
. However, my comment above on the business requirement is what I really intend to express.