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

Enable audit trail for customized table

Former Member
0 Likes
4,405

Hi expert,

I have a customized table with 5 fields. We can to have audit trail / log to record all changes make to the table.

And from there, write a customize report to show who add / edit entry in the table.

Is this possibe.

Thanks a lot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,887

You can also make use table maintenance generator event s01 and 05.

if you want one custome report who have added entry then use sy-uname.

Chcek the total enries in the custome table.

define and internal table and sort it .

take one variable and describe internal table.

One doubt , are updating the table from that custom reprt?

Hi expert,

I have a customized table with 5 fields. We can to have audit trail / log to record all changes make to the table.

And from there, write a customize report to show who add / edit entry in the table.

Is this possibe.

Thanks a lot.

9 REPLIES 9
Read only

Former Member
0 Likes
2,888

You can also make use table maintenance generator event s01 and 05.

if you want one custome report who have added entry then use sy-uname.

Chcek the total enries in the custome table.

define and internal table and sort it .

take one variable and describe internal table.

One doubt , are updating the table from that custom reprt?

Read only

0 Likes
2,887

thanks. The update is from a SAP add-on.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,887

Hello,

In the technical settings of the table, check the "Log Data Changes" checkbox.

You can see the data changes in the transaction SCU3.

BR,

Suhas

Read only

Former Member
0 Likes
2,887

Hi Jess,

You have two ways to log your data changes:

1) You can switch on the logging option in the Z-table by going into Technical Settings -> Log Data Changes checkbox.

2) Another option is to create three additional columns in the custom table: createdby, date and time. Every time the table is updated, you can just pass these three parameters as follows:

Ztable-createdby = sy-uname.

ztable-date = sy-datum.

ztable-time = sy-uzeit.

Please check which one is appropriate for you and implement accordingly.

Hope this helps! Do revert if you have any further queries.

Cheers,

Shailesh

Always provide feedback for helpful answers

Read only

0 Likes
2,887

I already have that field to log last change by who and when. But the customer want to see exactly which field was changes and what is the changes. Any way to do this?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,887

Hello Jess,

Did you check my previous post? Have you tried checking the "Log Data Changes" check box & analyzing the change log in SCU3 ?

BR,

Suhas

Read only

0 Likes
2,887

Thanks. I tried, but when i check the SCU3, there isn't any log for the customized table. Any idea why? Or is there any place that i need to enable for the log?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,887

Hello,

I think you should check the param: rec/client

Please see this SAP help documentation for details: [http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21eaf9446011d189700000e8322d00/content.htm|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21eaf9446011d189700000e8322d00/content.htm]

Check this link on how to change the parameter: [http://help.sap.com/saphelp_nw2004s/helpdata/EN/32/a479f0e083fc4386e66380e932497e/content.htm|http://help.sap.com/saphelp_nw2004s/helpdata/EN/32/a479f0e083fc4386e66380e932497e/content.htm]

Hope this helps.

BR,

Suhas

Edited by: Suhas Saha on Feb 10, 2010 3:42 PM

Read only

0 Likes
2,887

Hi Jess,

Oh, in that case, it is essential that those three columns - username, date and time - are key fields. This way, every time the table is updated, a new entry will be created in the table. So when you generate a report, you can find out exactly what field was changed and by how much etc.

Hope this helps! Do revert if you have any further queries.

Cheers,

Shailesh

Always provide feedback for helpful answers