Application Development and Automation 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: 
Read only

Change document for tables

Former Member
0 Likes
12,772

Hi ,

I have three tables for which I need to track some of their fields. I created the change docoment object for these three tables. Out of these three tables one table is maintained as view, and this called through FM VIEW_MAINTNANCE_CALL. The other two have thir dialog programs and are call through CALL DIALOG .....

Out of these two situations where I need to write the code to track the fields of these tables ? For Dialog programs I am assuming to fetch original data in PBO and current data in user_command.... and call the created subroutine while saving. Please confirm this.

But for the first case I am not sure of where to write the code. Both cases I need help.

Thank you,

Surya

5 REPLIES 5
Read only

Former Member
0 Likes
10,948

Hi,

I dont understand the question exactly. But if you want the change history for a database table you can do a fetch to DBTABLOG table which stores every change to a DB table...

Is this you need?

Cheers

Kothand

Read only

0 Likes
10,948

Hi Kothand,

Thanks for your quick reply. There are two ways to log changes of a custom table fields.

Yes, table changes are logged to DBTABLOG when Log data changes is checked under Technical settings of a custom table. This is useful when there are very minimum changes to the fields of a table.

Change documents are used to store the change made to the fields of a table are more in volume. The underlying tables which store these changes are CDHDR and CDPOS. Tcode to create Change Document object is SCDO. I guess this helps you understand more of my porblem.

Thank you,

Surya.

Edited by: Surya on Jul 11, 2008 9:58 AM

Read only

0 Likes
10,948

Hi ,

I solved this problem by using both Log Data Changes(for 2 tables) and SCDO(for 3rd table).

It seems that Log Data Changes is not working. Any clue on this ?

Thank you,

Surya

Read only

0 Likes
10,948

See SAP notes 1916 and 84052.

Cheers,

Julius

Read only

Former Member
0 Likes
10,948

For the table part and the maintenance view, you can turn the table logging on via SE13 for the table. Then display the changes via SCU3 (depending on whether the log is at all globally on or off => param rec/client = 'ALL').

For the dialog part and change objects, I am not sure exactly what you have done there or want, but most likely if you do a where-used-list on tables CDPOS and CDHDR then you will have a fair idea of what your options are and how to use them.

See this thread for more a detailed discussion:

Cheers,

Julius