2007 Mar 14 8:53 AM
Hi there,
What is the best way to list all table changes made by a user for a specified time-frame?
I know that either the changes will have to be logged by "log changes" indicator in table technical settings, or logged by change documents.
I would like to explore both to get the most "coverage" - Any help would be appreciated.
I also know that "client/rec" must be set in profile parameters for "log changes" to work.
Are there any SAP standard reports that can do this? I know SCU3 lists changes, but NOT BY USERNAME - I need by username please.
Also is there a SAP standard report to list changes for all activated change documents?
Thanks
2007 Mar 14 1:15 PM
Hi ,
U can use Transactions CDHDR and CDPOS for this but prior u have to check
The Log data changes .In CDHDR u have to input userid objectid or objectname .
In CDPOS u have to input change number and object id.
Hope will be helpfull for u.
Regards,
Ravi Kumar
2007 Mar 14 8:58 AM
Hi ,
Check Tcode STAT and STAD
in STAT check the column DB changes for the user .
Regards,
Vijay
2007 Mar 14 9:53 AM
Thanks Vijay, but I am already doing this - problem is that it does not tell me what table changes were made - only that there were in fact table changes.
Ideally I need to list values before and after changes...
2007 Mar 14 10:46 AM
1)In Cdhdr table, if u give username(USERNAME) & date(UDATE) u wil get OBJECTCLAS,OBJECTID,CHANGENR.
2)iN CDPOS table if u pass there values, u wil get
i)TABNAME (tablename)
ii)FNAME(Fieldname)
iii)VALUE_NEW(New Value)
iv)VALUE_OLD(Old Value)
of that particular field.
Hope it solves ur query.
2007 Mar 14 10:46 AM
2007 Mar 14 11:26 AM
Thanks vijayalakshmi,
That is helpful - Assuming there is not a SAP standard report to show list of changes for change documents with user and date/time restriction, I will have to use this logic to create my own report.
Next question is about any SAP standard reports or function modules to read changes logged by system where the table is marked to "log changes"...?
2007 Mar 14 11:46 AM
Hi David
For SAP standard FM,
changes can be found by using fm
1)changedocument_read_headers,-header level (cdhdr table)
2)changedocument_read_positions-item level(cdpos table)
3)changedocument_read
Hope this wil help u,
Regards,
Viji
2007 Mar 14 12:09 PM
RE: Check RM_97 transaction...
Rama - Unfortunately I do not have this transaction...
2007 Mar 14 9:03 AM
Hi,
You can check the Tables CDHDR and CDPOS for the different changes made by users on each table and field.
Regards,
Anji
2007 Mar 14 11:28 AM
Hi David
Check Tables CDHDR (Change document header)
and CDPOS(Change document Item) tables
for the different changes made by users on each table and field.
Regards,
Kumar
2007 Mar 14 11:51 AM
refer to this blog ..<a href="/people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap:///people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap
regards,
vijay
2007 Mar 14 12:14 PM
Thank you everyone for all your help - It seems that change documents will be easy to track...
Any suggestions for the logs of changes to tables marked to "log changes" in technical settings..? I think it saves to DBTABLOG - Any function modules or programs I should refer to or use?
Thanks
2007 Mar 14 12:53 PM
For anyone reading this later, there is a good program to look at in SAP to read change documents - RSSCD1TS.
Very generic and easy to use.
2007 Mar 14 1:15 PM
Hi ,
U can use Transactions CDHDR and CDPOS for this but prior u have to check
The Log data changes .In CDHDR u have to input userid objectid or objectname .
In CDPOS u have to input change number and object id.
Hope will be helpfull for u.
Regards,
Ravi Kumar
2007 Mar 14 2:01 PM
Ravi,
CDHDR / CDPOS store <b>change document</b> changes, not <u>logged changes</u>.
Please correct me if I am wrong...
I think changes logged because the table has been marked to "<u>log changes</u>" in technical settings are stored in DBTABLOG - I need away to read this data. This table has a RAW field which I need to be able to interpret..
2007 Mar 14 8:40 PM
if you are going to activate logging - be aware that it's goingot log ALL changes for ALL users for all tables which have "log data changes" selected in technical settings.
You can use RSVTPROT to analyze logs, and you'll need to delete (archive) logs when no longer required otherwise they'll grow really fast.
(check RSTBPDEL for log deletion).
I think it was mentioned already that you can use RSSCD1TS as an example of the report to list changes based on change documents (no logging is required here). change documents are saved in CDHDR/CDPOS.
2007 Mar 15 6:27 AM
Thanks Siarhei - We have had change logging on for a while now in the prod system and we do archive etc...
Report RSVTPROT is called by SCU3 - I need to be able to report by <b>username</b>, <b>date</b> and <b>time</b> for all tables that are logged...
Change documents are not a problem any more.
2007 Mar 15 2:59 PM
David,
check the logic in RSVTPROT around FM DBLOG_READ_WITH_STATISTIC, you'll see how SAP reads logs and formats....besides this FM contains table parameter for usernames ;o) you can try to play with it a bit.
I believe the field LOGDATA of DBTABLOG table contains values of all non-key fields of logged table. So, if you want to parse logdata - you'll need to retrieve dictionary info for logged table & then parse field based on field type/length of non-key fields. (like SAP does it in logs_modernise form.