‎2009 Nov 06 10:34 AM
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!
‎2009 Nov 06 11:13 AM
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.
‎2009 Nov 06 10:55 AM
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.
‎2009 Nov 06 11:10 AM
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.
‎2009 Nov 06 11:22 AM
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?
‎2009 Nov 06 11:25 AM
If change document is checked at data elemnt level ............................. all details will come in CDHDR & CDPOS tbale.
‎2009 Nov 06 10:56 AM
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.
‎2009 Nov 06 11:13 AM
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.
‎2009 Nov 06 11:25 AM
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!
‎2009 Nov 06 11:29 AM
U have to create custom report for this requiremet....there is no standard report which will track ur custom field changes.
‎2010 Sep 16 8:00 PM
Hi Vin,
I am also having the same issue. Can you please let me know how you resolve this.
Regards,
sarath