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: 

table change history log

Former Member
0 Kudos

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.

13 REPLIES 13

former_member181962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

hi sandy,

no way to that.

rgds

anver

if hlped mark points

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

how to read old values and new values from DBTABLOG table

0 Kudos

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

Former Member

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.