‎2005 Nov 21 5:24 PM
Hi ,
Could any one say me where are the log changes stored when any user make changes in the database table as i have clicked the checkbox for <b>LOG DATA CHANGES</b> in Technical setting.
Regards.
‎2005 Nov 21 5:28 PM
Hi,
tables CDHDR, CDPOS are header and item of changes documents.
You can also use FM CHANGEDOCUMENT_READ to get the change documents.
Regards, Manuel
‎2005 Nov 21 5:43 PM
Hi,
I have to write a report whoes out is displaying the user who changed and also the change made in the DBase table.
Thanks.
‎2005 Nov 21 5:51 PM
In the CDHDR table there is USERNAME field.
In CDPOS table there are VALUE_NEW and VALUE_OLD.
Use them in your report.
Regards,
Ravi
‎2005 Nov 21 5:29 PM
Hi Aima,
This is what the f1 help says,
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).
Regards,
Ravi
‎2005 Nov 21 5:31 PM
Hi
Changes are logged in tables CDHDR, CDPOS .
You can use FMs CHANGEDOCUMENT_READ_HEADERS
CHANGEDOCUMENT_READ_POSITIONS , to retrieve data.
Regards
Kalpana
‎2005 Nov 21 5:49 PM
Hi kalpana ,
Thanks for ur sharing ur knowledge.
Is it possible to figure out wat were the changes made by the user ?
will these FM CHANGEDOCUMENT_READ_HEADERS
CHANGEDOCUMENT_READ_POSITIONS gives me the changes made?
Regards.
‎2005 Nov 21 5:54 PM
Yes,
VALUE_NEW, VALUE_OLD in CDPOS will tell you what were the changes .
- Kalpana
‎2005 Nov 21 6:05 PM
Hi,
try this:
parameters: class like cdhdr-objectclas,
id like cdhdr-objectid.
data: xcdhdr type table of cdhdr with header line,
xcdred type table of cdred with header line.
call function 'CHANGEDOCUMENT_READ'
exporting
objectclass = class
objectid = id
tables
editpos = xcdred
exceptions
no_position_found = 1
wrong_access_to_archive = 2
time_zone_conversion_error = 3
others = 4.
loop at xcdred.
write: / 'USER:', xcdred-username,
'TABLE:', xcdred-tabname, 'FIELD:', xcdred-fname,
'OLD VALUE:', xcdred-f_old,
'NEW VALUE:', xcdred-f_new.
endloop.
please remember to reward points for useful answers and to close thread when the problem is solved.
Regards, Manuel
‎2005 Nov 21 6:20 PM
Hi Manuel,
What does objectclass and Objectid determines ?
Thanks for guiding me.
‎2005 Nov 21 6:28 PM
Object class determine the type of object
example BELEG = FI documents
ObjectID is the key of the object
Example (for FI documents) concatenation of mandtbukrsbelnr+gjahr
Regards, Manuel
‎2005 Nov 21 6:33 PM
Hi Manuel,
Thanks for ur reply, For my ztable wat Object class should i give ?
‎2005 Nov 21 6:39 PM
You should create a custome object.
transaction SCD0.
1) create a Z_my_change_doc.
2) link the Z table to z_my_change_doc (with trans. SCD0).
please remember to reward points for any helpful answer and close the thread if the problem is solved.
Thanks, Manuel.
‎2020 Dec 03 1:51 PM
Hi,
The logging flag defines whether changes to the data records of a table should be logged.
Use: 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.
Steps 1: SE11 - Database Table – Technical Settings – Log Data Changes – Save and back – utilities – Table maintenance generator – create, save.
Follow second step to check your log data changes.
Step 2: SM30 – Table name – display – utilities – change Logs – select start data and end date – execute.
Regards,
Nasreen.