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: 

Change log of a custom table.

former_member199126
Participant
0 Kudos

Hi,

I have a custom DB where the Change log is not enabled.

The problem is for some reason, I wish to know the change log of that table. I noticed in table DBTABLOG, i could find an entry on the changed date and time. But i could not find out the actual changed data. There is a LOGDATA of type lraw and if i convert it to readable string, i am getting the table name instead of the actual data.

Any way to find that ?

Thanks,

Karthik

6 REPLIES 6

satyabrata_sahoo3
Contributor
0 Kudos

"Log Data Changes" option on table should Ticked & the profile param "rec/client" should set to enable change log of any custom table and this can be tracked in DBTABLOG or SCU3. Also there should be a Maintenance view for the table..


On data element level 'Change Document' should be checked in Further characteristic tab to enable change log in CDHDR/CDPOS.


Without this custom table data changes won't get recorded.


-Satya

Former Member
0 Kudos

Hi

Please use field LOGKEY of table DBTABLOG and table name to retrieve the changed record

for MARA table for Exemple the LOGKEY will containe MATRN(CHAR18) 

For a table that contains 2 first fields as keys ( 1st with char10 and 2nd with CHAR5 ) you need to pass

keyfield1 = DBTABLOG-LOGKEY+0(10)

keyfield1 = DBTABLOG-LOGKEY+10(5) ..... during the select statement

Hope that will help

regards

0 Kudos

Hi Kicham,

No that does not work. If you convert the Log data, from DBTABLOG (005A00440055004D004D0059005F005400410042004C00450020002000) ,  you again get the table name ZDUMMY_TABLE and not the actual changed data.

Thanks,

Karthik

Former Member
0 Kudos

Hi Karthikeyan,

In the technical settings of the table you must check "Log Data changes".

Then you will be able to see the change log of the table along with data and date details from tcode SCU3 - evaluation of  change logs.

Thanks,

Sowbhagya

Former Member
0 Kudos

Look at the example in the link http://scn.sap.com/thread/486920 from

Thanks,

Vikram.M

FredericGirod
Active Contributor
0 Kudos

it should be the key corresponding of the line modified in the table