Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Track changes to table data

Former Member
0 Likes
5,322

Hi,

I'm trying to make a program that track changes done to a table in a day and then perform some actions accordingly.

We've evaluated several methods of tracking changes to the table's records (e.g. DBTABLOG, CD, ...) and the Change Documents facility was chosen.

Now I've seen that to create a Change Document you have to use transaction SCDO and add every table of interest to one CD. Then, to enable logging to tables CDHDR and CDPOS, you have to enable the "Change Document" flag (via SE11) for every Data Element used in the table's structure definition that one wants to log. I have to track three custom tables.

The issue I'm facing is that I cannot enable the "Change Document" flag for standard Data Elements (e.g. BEGDA, ENDDA). Two of the custom tables doesn't have any Includes, so I'm thinking of replacing each data element with a custom equivalent (e.g. Z_BEGDA, Z_ENDDA). The last table is an HRP* custom table and has standard includes (HRIKEY).

Before going on and even considering replacing that include's structure with a custom one, I'm wondering:

- Are Change Documents the right way to track changes to table data?

- Is there a way not to replace the standard Include/Data Elements in order to enable logging?

Thank you,

Pietro

1 ACCEPTED SOLUTION
Read only

custodio_deoliveira
Active Contributor
0 Likes
3,445

Hi Pietro,

First questions first: I'd say there is no right way, there are options, CD is one and it's a good one. As you know, the other option is setting "Log data chjanges" for th table in the technical settings. One advantage of this approach is that the log is automatic, ie you don't need to call any FM to have the change recorded, as opposed as in Change Documents. One disadvantages is that you need to set some system parameters. Have a look at the doco for Data Element DDPROTOCOL.

As for your second questions, AFAIK there's no way. You need to have that flag checked, so if the standard does not have it checked, you will need a custom one.

Cheers,

Custodio

1 REPLY 1
Read only

custodio_deoliveira
Active Contributor
0 Likes
3,446

Hi Pietro,

First questions first: I'd say there is no right way, there are options, CD is one and it's a good one. As you know, the other option is setting "Log data chjanges" for th table in the technical settings. One advantage of this approach is that the log is automatic, ie you don't need to call any FM to have the change recorded, as opposed as in Change Documents. One disadvantages is that you need to set some system parameters. Have a look at the doco for Data Element DDPROTOCOL.

As for your second questions, AFAIK there's no way. You need to have that flag checked, so if the standard does not have it checked, you will need a custom one.

Cheers,

Custodio