‎2007 Aug 24 7:04 AM
Hi All,
We have two custom tables. Now the requirement is to log the changes of the first table in the second table.
In the second table if any value in the first table is changed then both the old and the new values should be stored as two different entries. The second table has fields for all the entries in the first table with the names like field1_old, field1_new, field2_old, field2_new.
So we need to log both the old and the new entries.
Plz help me.
Regards,
Sharadendu
‎2007 Aug 24 7:07 AM
What you would like to make already exist with table CDHDR & CDPOS ..
Just activate the "Log data changes" in the Technical setting of your first table.
Fred
‎2007 Aug 24 7:07 AM
SAP has defines a table by itself if you set the parameter to LOG CHANGES for any Customized table.
Goto SE11 & open the table. click GOTO->Technical Settings & at the end, tick the check box LOG DATA CHANGES
Log data changes
The logging flag defines whether changes to the data records of a table should be logged. If logging is activated, every change (with UPDATE, DELETE) to an existing data record by a user or an application program is recorded in a log table in the database.
Note: Activating logging slows down accesses that change the table. First of all, a record must be written in the log table for each change. Secondly, many users access this log table in parallel. This could cause lock situations even though the users are working with different application tables.
Dependencies
Logging only takes place if parameter rec/client in the system profile is set correctly. Setting the flag on its own does not cause the table changes to be logged.
The existing logs can be displayed with Transaction Table history (SCU3).
‎2010 Dec 08 9:26 AM
>
> Logging only takes place if parameter rec/client in the system profile is set correctly. Setting the flag on its own does not cause the table changes to be logged.
>
Hi how do you set the rec/client in the system profile?
Thanks
‎2010 Dec 08 10:00 AM
setting syetem profile parameters is something which you can ask to basis people of your organization .
‎2007 Aug 24 7:07 AM
Hi,
How changes are happening? through ABAP code or direct custom entry?
If abap code then before updating new data. Retrieve old data from Table 1 and then update second table.
Reward if useful!