2009 Feb 02 5:02 PM
Hello,
what I'm trying to do is to log all the changes made in a user table (Z...). For the changes made through SM30 it's easy since I can use the standard logging feature in SE11 and then see these changes through transaction SCU3 for example.
My problem is that most of the changes are made through ABAP programs, i.e. through insert, modify and so on, and in these cases the modifications are not logged. So I would like to know if it's possible to log the changes in a standard way (maybe with a function module) so then I can see the report of modifications through SCU3.
I would like to keep track of all my changes, not only the ones made with the table maintenance but also the ones made through ABAP coding
Regards,
2009 Feb 02 5:15 PM
Hi,
You would need to use change document object (transaction SHDO) to do this. For help on this, refer to http://help.sap.com/saphelp_nw04/Helpdata/EN/2a/fa018f493111d182b70000e829fbfe/frameset.htm.
Regards,
SS
Hello,
what I'm trying to do is to log all the changes made in a user table (Z...). For the changes made through SM30 it's easy since I can use the standard logging feature in SE11 and then see these changes through transaction SCU3 for example.
My problem is that most of the changes are made through ABAP programs, i.e. through insert, modify and so on, and in these cases the modifications are not logged. So I would like to know if it's possible to log the changes in a standard way (maybe with a function module) so then I can see the report of modifications through SCU3.
I would like to keep track of all my changes, not only the ones made with the table maintenance but also the ones made through ABAP coding
Regards,
2009 Feb 02 5:04 PM
Hmm, as far as I know, SE11 table logging also tracks changes done via ABAP programs. Doublecheck via SE16 on DBTABLOG and give your table name there.
Thomas
2009 Feb 02 5:08 PM
Here is what SAP says as a F1 help on the logging flag in technical setting of a table..
Log data changes
The logging flag defines whether changes to the data records of a table should be logged. If logging is activated, every change (with UPDATE, DELETE) to an existing data record by a user or an application program is recorded in a log table in the database.
Note: Activating logging slows down accesses that change the table. First of all, a record must be written in the log table for each change. Secondly, many users access this log table in parallel. This could cause lock situations even though the users are working with different application tables.
Dependencies
Logging only takes place if parameter rec/client in the system profile is set correctly. Setting the flag on its own does not cause the table changes to be logged.
The existing logs can be displayed with Transaction Table history (SCU3).
2009 Feb 02 5:15 PM
Hi,
You would need to use change document object (transaction SHDO) to do this. For help on this, refer to http://help.sap.com/saphelp_nw04/Helpdata/EN/2a/fa018f493111d182b70000e829fbfe/frameset.htm.
Regards,
SS
2009 Feb 02 5:15 PM
Hi
U should create a custom object (trx SCDO) for your Z-TABLE in order to manage the change document, but then u need to change all program updating that table and call the fm to update the change document table (CDHDR and CDPOS).
Max
2009 Feb 02 5:19 PM
Max it is not necessary, we need to have these conditions satisfied for change logging custom tables:
Change log flag set to ON in technical settings
rec/client is set to ON in system parameters
SAP says that the table will be logged for both user changes through SM31 or application program changes through UPDATE, INSERT etc statements. Read my post, which I copied from SAP application help.
2009 Feb 03 2:56 PM
Thank you very much to everybody for your answers. Vishnu as you said, it should be enough with the standard feature for logging changes in sap. But maybe I will have a look at change documents, because I want to track some more user information than the username and the date.
Thanks everybody for your support
2009 Feb 02 5:26 PM
Hi Javier,
Use change documents inorder to capture changes. Please check the below link for change document log.
http://sample-code-abap.blogspot.com/2008/02/applying-change-document-technique-on.html
Thanks,
Vinay
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |