Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Customizing Change Objects Not Found through TCODE SM30 (Utilities->Change Logs)

prahul20995
Explorer
0 Likes
3,127

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

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
2,668

First check if table logging (and not change document) is already active on your system: try either

  • Look at parameter 'rec/client' in transaction RZ11
  • Execute SCU3
  • Browse DBTABLOG in transaction SE16 or SE16n

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

8 REPLIES 8
Read only

egor_malov
Contributor
2,668

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.

Read only

0 Likes
2,668

Hi Egor,

How can i view those changes in the SM30 change log?.

Read only

0 Likes
2,668

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).

Read only

0 Likes
2,668

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
Read only

egor_malov
Contributor
2,668

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.

Read only

RaymondGiuseppi
Active Contributor
2,669

First check if table logging (and not change document) is already active on your system: try either

  • Look at parameter 'rec/client' in transaction RZ11
  • Execute SCU3
  • Browse DBTABLOG in transaction SE16 or SE16n

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.

Read only

0 Likes
2,668

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

Read only

2,668
prahul20995 Be careful, some SAP standard tables have the "table logging" activated, so the log table may grow very fast depending on what you do in your system. See these notes to understand the effects of activating the logging: