Application Development 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: 

Log data changes - SCU3, S_AUT01, DBTABLOG

gilberto_parga
Participant
0 Kudos

Hi guys,

I have questions, all related to the topic of log data changes. You should know that, in ABAP Dictionary, we can checkbox the option "Log data changes" in the technical settings of custom tables. In the ALV report given by transaction SCU3 (Analysis of changed customizing objects and tables), if you set table name, you can see the transactions that have modified the custom table, date, time, and the users that have changed the table too. And if you go to S_AUT01 transaction, and choose a custom table, you will see that some fields of that table are checked in the ALV shown there, but some others are not. So the 1st question is if logging of data changes can be done only for some fields (the marked fields in the column LOGGING in S_AUT01 report) or if the logging is something that affects the data element, and so, all the tables that have fields defined with that data element. Do you know?

Table DBTABLOG is used to log the table's content changes. This table is increasing size contents very fast in the system I work on. It contains the data changes information for the custom table, like the transaction code, and others. Program RSTBPDEL is a standard utility and it is used to delete rows of DBTABLOG. Unfortunatelly it only contains 2 parameters: "End date" and "Tables". Do you know any other standard program or application intended to delete DBTABLOG with more select options, specially transaction code? I saw the code of RSTBPDEL and seems simple. I think I can create a Z program based on it with the select options desired by my customer, do you think it is a good idea in case no other program is found?

Finally do you know a BADI, user exit or some kind of enhancement to manipulate data to be entered in the table log? Maybe we want only to track changes if SM30 transaction was used, only for specific custom tables.

Guys, if you think I am violating rules since I posted 3 questions in 1 single post, let me know. If it is unfair, only consider the first question. I will create new posts for the 2 and 3 question if it is so.

Thanks!

1 ACCEPTED SOLUTION

Former Member

First of all, logging only takes place if the parameter rec/client in the system profile is set correctly. Setting the flag on its own at table level does not cause the table changes to be logged.

Secondly, if 'log data changes' is flagged at table level, it is not necessary that the 'change document' will be flagged for each data element of the table, or have to be flagged.

Table level logging and DE level logging both are separate things.

If you flag 'change document' at DE, it will log the changes in CDHDR/CDPOS tables, whereas if you flag 'log data changes' at table level, the changes to that particular table will be visible in SCU3.

Also, the DE that you flag for change documents, may be used in various tables/transactions. So, when you flag it, irrespective of whether you have the flag at table level or not, it will log the changes in CD tables, with the TCodes used to update.

And, even if none of the DEs in a table are flagged as 'change document', but if 'log data changes' is active at table level, then it will track all the changes to that table in SCU3.

Hope I was clear in my explanation!

Thanks.

4 REPLIES 4

Former Member

First of all, logging only takes place if the parameter rec/client in the system profile is set correctly. Setting the flag on its own at table level does not cause the table changes to be logged.

Secondly, if 'log data changes' is flagged at table level, it is not necessary that the 'change document' will be flagged for each data element of the table, or have to be flagged.

Table level logging and DE level logging both are separate things.

If you flag 'change document' at DE, it will log the changes in CDHDR/CDPOS tables, whereas if you flag 'log data changes' at table level, the changes to that particular table will be visible in SCU3.

Also, the DE that you flag for change documents, may be used in various tables/transactions. So, when you flag it, irrespective of whether you have the flag at table level or not, it will log the changes in CD tables, with the TCodes used to update.

And, even if none of the DEs in a table are flagged as 'change document', but if 'log data changes' is active at table level, then it will track all the changes to that table in SCU3.

Hope I was clear in my explanation!

Thanks.

0 Kudos

Hi Abdulaziz ,

Your answer is helpful. But if TMG of a ztable is maintained in a single screen it is updating perfectly in SCU3.

But when TMG has two screens , if I update from first screen it is updating correctly , but when I update from second screen it is not updating in SCU3.

Can u please help me if you have any solution.

Thanks,

Chaithra.

SandySingh
Active Contributor
0 Kudos

This message was moderated.

gilberto_parga
Participant
0 Kudos

Thank you guys, copy of RSTBPDEL into a custom report and adding more select options and then running it with job was chosen to avoid DBTABLOG continue increasing size.