2020 Mar 11 11:17 AM
Hi All,
I had created a Z Custom table and at data element level i.e further characteristics i had checked the Change Document as well as at Technical setting of the table i had checked the Log Data Changes also i created Tmg events for the same 01 and 02 events.The changes are seen through CDHDR table.But when i checked through sm30 tcode and checked in utilities->change logs but there is no logs found there.Please help.
Regards,
Rahul
2020 Mar 12 1:40 PM
First check if table logging (and not change document) is already active on your system: try either
If it's activated, remove your code to provide change documents and activate the logging on the data elements and the database table. Regenerate TMS dialog and test.
Hi All,
I had created a Z Custom table and at data element level i.e further characteristics i had checked the Change Document as well as at Technical setting of the table i had checked the Log Data Changes also i created Tmg events for the same 01 and 02 events.The changes are seen through CDHDR table.But when i checked through sm30 tcode and checked in utilities->change logs but there is no logs found there.Please help.
Regards,
Rahul
2020 Mar 11 12:28 PM
Hi, Rahul
There are two similar but different ways to log changes:
- change documents (data goes to CDHDR & CDPOS tables)
- log changes (at table level) (data goes to DBTABLOG table)
It looks like you are using the first way to save changes. But this menu item in SM30 takes you to see changes logged the second way (i.e. it reads from DBTABLOG table). That's why you don't see your changes there.
2020 Mar 11 12:42 PM
Hi Egor,
How can i view those changes in the SM30 change log?.
2020 Mar 11 1:55 PM
Rahul,
It looks possible technically. For example
- you can create a custom button on your maintenance screen that would call some report/code, that displays change documents (https://blogs.sap.com/2014/11/11/how-to-create-custom-button-in-tmg/ )
- you can enhance standard code so that when you select 'Change logs' menu item, standard behavior is replaced with the code, that displays change documents
As you see, these solutions don't seem simple and native. Maybe, there are some better ones I'm not aware of.
I would recommend you to first reconsider your logging approach - are you sure you cannot switch to logging in DBTABLOG? It would make it all easier, but it is not always possible (in some installations DBTABLOG may be forbidden/not activated for performance reasons).
2020 Mar 11 3:56 PM
Hi Elgar,
I have used this link https://blogs.sap.com/2014/01/17/find-changes-logs-for-a-table-using-sm30/ for reference for change logs in sm30. But I couldnt achieve the change logs as per this reference. Could you provide some reference for which I could achieve the change log in sm30.
Regards,
Rahul
2020 Mar 12 12:39 PM
Rahul,
the reference you've found is fine with one minor exception - it doesn't state that this sort of logging should be enables in the system by setting REC/CLIENT Parameter in the System Profile.
read more about it here https://help.sap.com/saphelp_tm92/helpdata/en/4d/b6a69336311dcee10000000a42189c/content.htm
or in SAP Note 2437986
Please note: if you turn this logging on, the log table (DBTABLOG) will (eventually) grow, so it is recommended to plan ahead its maintenance i.e. clean older records regularly, etc.
2020 Mar 12 1:40 PM
First check if table logging (and not change document) is already active on your system: try either
If it's activated, remove your code to provide change documents and activate the logging on the data elements and the database table. Regenerate TMS dialog and test.
2020 Mar 13 9:47 AM
Hi Raymond,
With help of basis team i checked the rec/client was set OFF for the Client.Due to which we couldn't find the required change logs.When we set to ON it is showing the change logs.
Thank you
Regards,
Rahul
2020 Mar 13 1:12 PM