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

Tracking Custom field changes

former_member212005
Active Contributor
0 Likes
4,356

Hi Experts,

I need to find when was a value being inserted/updated/deleted for a custom field in a database table.

E.g. if in KNA1 I have a custom field ZZTEST...

I need to know when was this field last used i.e. when was the last time that a value was inserted/updated/deleted from this field.

Is there any standard program/function module which will help us solve this issue?

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,336

U can track changes of the custom table using change documents.

Let me explain you tracking process in deatil so that u can look further in that direction. I am taking example of KNA1 table. Only those fields of the table are tracked through change documents for which change document is checked at data element level. U can find change document check box at data element level under further characteristics tab.Now for all fields of custom table ( z table) for which u want to track changes u need to check this box.

All the change data for standarad table tracked through change documents is stored in tables CDHDR & CDPOS.

CDHDR -> Change document header

CDPOS--> Change document items

All data is stored w.r.t OBJECTCLAS. OBJECTCLAS groups various tables of similiar business process for tracking changes.

Whenver u make any changes in fields marked with change document ................. a change number for the table w.r.t to OBJECTCLAS is generated in CDHDR table.Using this change number and OBJECTCLAS we can extract all change details from CDPOS table.

i.e VERKBELEG is OBJECTCLAS for all SD related tables(vbak ,vbap,vbuk etc...).

U need to do following actvities to track changes:---

1> Got to custom table and at data element level check the box change document.

2> Go to SCDO and create the custom OBJECTCLAS for ur table.

hope u understood basic concept behind it and will look in this direction to solve ur problem.

9 REPLIES 9
Read only

GauthamV
Active Contributor
0 Likes
2,336

You have to check the checkbox for log data changes in technical settings

of table. Then you can find your changes to table in SCU3 transaction.

Read only

Former Member
0 Likes
2,336

Hi Guatham,

I think you are pointing to the changes to the database table and not the data contained in it.

@ the query, you can also use the concept of change pointer where you create a message type and assign the required fields to the message type. You can then query CDHDR and CDPOS based on this message type and fields.

Regards,

Nilesh.

Read only

0 Likes
2,336

Gautham.....Thanks for your reply

I am dealing with standard SAP tables...i.e. KNA1

So as i have already said....there is a Z field in this table, for which I need to know when was it last modified?

Is there any standard report program which can do this?

Read only

Former Member
0 Likes
2,336

If change document is checked at data elemnt level ............................. all details will come in CDHDR & CDPOS tbale.

Read only

Former Member
0 Likes
2,336

Hi,

Set Change document flag = 'X' for the data element of this field. Then create a change document object and assign this field. Change details can be retrieved using tables CDHDR and CDPOS tables. Hope this is helpful.

Regards,

Vaishali.

Read only

Former Member
0 Likes
2,337

U can track changes of the custom table using change documents.

Let me explain you tracking process in deatil so that u can look further in that direction. I am taking example of KNA1 table. Only those fields of the table are tracked through change documents for which change document is checked at data element level. U can find change document check box at data element level under further characteristics tab.Now for all fields of custom table ( z table) for which u want to track changes u need to check this box.

All the change data for standarad table tracked through change documents is stored in tables CDHDR & CDPOS.

CDHDR -> Change document header

CDPOS--> Change document items

All data is stored w.r.t OBJECTCLAS. OBJECTCLAS groups various tables of similiar business process for tracking changes.

Whenver u make any changes in fields marked with change document ................. a change number for the table w.r.t to OBJECTCLAS is generated in CDHDR table.Using this change number and OBJECTCLAS we can extract all change details from CDPOS table.

i.e VERKBELEG is OBJECTCLAS for all SD related tables(vbak ,vbap,vbuk etc...).

U need to do following actvities to track changes:---

1> Got to custom table and at data element level check the box change document.

2> Go to SCDO and create the custom OBJECTCLAS for ur table.

hope u understood basic concept behind it and will look in this direction to solve ur problem.

Read only

0 Likes
2,336

Thanks Sanju....for the reply....

My Z field in standard table i.e. KNA1 already has the change document checked.

Now, how do we track it? Is there any standard program which can do this? Rather than writing a new report program!

Read only

0 Likes
2,336

U have to create custom report for this requiremet....there is no standard report which will track ur custom field changes.

Read only

0 Likes
2,336

Hi Vin,

I am also having the same issue. Can you please let me know how you resolve this.

Regards,

sarath