09-20-2006 2:45 PM
Hi All,
I have a created a ZTABLE and will be updated manually.
I need to get the table change history log.
Please suggest me how I can get it.
Thanks
Sandeep.
09-20-2006 2:49 PM
In the technical settings for the table:
Check the check box for Log Data Changes.
1) Check the check-box for log changes option in technical settings for the table.
2) The table which has all the log data is DBTABLOG
Regards,
Ravi
Message was edited by: Ravi Kanth Talagana
09-20-2006 2:49 PM
If you are updating table manually then add one field for date in your table & then update it with remainng fields.
In this way you can keep the track of last date when it has been updated.
09-20-2006 2:53 PM
Hi Sandeep,
Maintain the Technical Settings in SE11 for the table. Flag the Log Data Changes checkbox.
Database logging (parameter rec/client) should be ON.
Regards,
Erwin
09-20-2006 2:55 PM
hi sandeep,
the easiest way.
create a field LASTCHANGDBY in ur table.
give that LASTCHANGDBY = sy-uname.
during any data base activity, this will be upadted.
or
chk here
The table for log data DBTABLOG
rgds
anver
Message was edited by: Anversha s
09-20-2006 3:03 PM
Thanks Anver,
Here we can get who has changed last time to this table.
But suppose if I need to get what values has been changed to the field of table.Then how can I get it.
please suggest.
Thanks,
Sandeep.
09-20-2006 3:10 PM
hi sandy,
there is a way.
keep a fild called 'VERSION' in ur ztable.
initially, whn a record a newly created the version will be 1.
each time an activity happens to tha record in the ztable,just increment the version.
so in the later stage, the highest version will be the recent record.
u can c the the chnges on looking the version.
hope u got an idea.
rgds
anver
if helepd mark points
09-20-2006 3:13 PM
Yes Anver u right ,
But there is any way to get the previous values from the ztable even the new value will be overwritten the old one.
Thanks
Sandeep.
09-20-2006 3:14 PM
09-20-2006 3:47 PM
you have 2 options :
1) enable logging which requires 2 changes - tbale should be marked for logging and logging should be switched ON on server.
2) if your table is updated by your program only you can create new change document object, generate necessary function modules and then call function module to create change log document (cdhdr/cdpos tables), then you can use another FM to read/display this changelog.
You can find futher info on change documents by searching SAP help on "Change documents".
I would select option 2).
Hope this helps.
09-20-2006 4:04 PM
Hi Sandy,
You can get the history log by going to maintenance view
of the ZTABLE in SM30 and utilities->change logs->execute
Remember, this works only if the check box "Log data changes" is checked in the technical settings.
Thanks,
Vinay
03-20-2011 4:38 AM
11-24-2014 2:36 AM
Dear all !
If I enable the logging of the tables change, so where is the folder we need to monitor the size increasing ?
I'm using DB2 on Windows & AIX
Thanks
11-24-2014 4:08 AM
Hi sandy,
Do you want to achieve the same effect like PO's change log?
(I.E. Storing header data's change log in talbe CDHDR,
Storing items's change log in table CDPOS)
Implementing such requirement,the following two steps is necessary:
1,Data element'change log should be falged.
2,Go to tcode SCDO,Generating maintenance function module.
For further details,read these Reference Article :
http://scn.sap.com/thread/1750879
http://scn.sap.com/community/erp/blog/2012/02/13/change-documents-for-sap-objects
Regards.