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 logs for Z table.

Former Member
0 Kudos

Hi All,

I am trying to fetch the old value and new value for the z table field.Change log is activated for the Z table. but i dont know how to fetch the change logs.

SCU3 is the standard transaction to see the change logs for all the tables.

Is there any table where the change logs values are maintained?

Does anyone know how to get the change log value?

Thanks in advance.

Regards,

Amruta.

1 ACCEPTED SOLUTION

0 Kudos

Hi,

Please check the table CDHDR and CDPOS for changes also with old and new value.

Regards

Bhavesh

7 REPLIES 7

Sm1tje
Active Contributor
0 Kudos

It's been a while, but the first table that comes to mind is DBTABLOG

Former Member
0 Kudos

Hi Micky,

But this table is not giving the old and new values.

0 Kudos

Hi,

Please check the table CDHDR and CDPOS for changes also with old and new value.

Regards

Bhavesh

0 Kudos

Hello,

If for a specific set of tables no change documents are triggered by SAP you can always setup your own Change Document Object with transaction SCDO.

Of course you need to be careful with this transactions (how big is the table data, how many changes, etc...).

Table logging is something else, they are stored in table DBTABLOG and can be analysed via SCU3.

For table logging you need extra system parameters to be set, they are explained in SAP Note:

Note 1916 - Logging table changes in R/3

Pay attention with table logging because a lot of tables are logged in DBTABLOG once you activate the parameter, this can have a major impact on performance.

To have an idea what other tables will be logged, check tcode SE16 on table DD09L and put an 'X' in field PROTOKOLL, result will be thousands of tables.

In your specific scenario I think it is best you go for the change documents with SCDO.

Wim Van den Wyngaert

Hi Friend ,

Please see this WIKI for the Table change log entries .

[http://wiki.sdn.sap.com/wiki/display/stage/ABAP-DataChangeTrackerforCustom+Tables]

Regards,

former_member203650
Participant
0 Kudos

Amruta,

I am currently investigating the very same thing. I have a z-table for which I want to track ALL data changes. We already have table change logging turned on in our production R/3 system, so i want to use that feature. I turned on table logging for my z-table in our sandbox system. I can see the records for my changes being added to table DBTABLOG, but only the header information is human-readable. For some reason SCU3 does not find the log records for my z-table, so I cannot view them there. Also, my users want to be able to look up changes by table key, not just by timeframe.

I discovered the function module /BEV2/ED_READ_DBLOG, which takes as input the from and to dates and times, and one or more table names, and returns a deep structure with an embedded table of the before and after values for each field in the table, and a flag field to indicate if the value changed.

I will attempt to write an ABAP program that selects records from table DBTABLOG, then uses this function module to "unpack" the before and after information, and display it in an ALV grid. If you have the ABAP expertise, you could do the same.

Cheers,

Terry

sujeet2918
Active Contributor
0 Kudos

Hello Amruta,

if you want to maintain Change Log for any Z table then first of all you will have to assign that z table for change log maintenance. kindly search on SDN. how to make z table Log.

and for viewing Logs, Kindly refer to table CDHDR and CDPOS.

Regards,

Sujeet