2008 Oct 10 8:01 AM
Hi All,
I just learned how to trigger change document from the program if someone change some data in a table, but how can one trigger change document if the data of the table is change via SM30?
2008 Oct 10 8:04 AM
Hi,
Logically user shud not be given authorization for sm30.
Nothing else can be done if data is changed thru sm30.
Regards,
Amit
2008 Oct 10 8:13 AM
Yes I agree that normal users should be accessing SM30 to change the data, that's the requirement to monitor data changes which occurs in SM30. I believe change document can be used since I found some entries in CDPOS which has bare the TCODE SM30. Anyone has done this before?
2008 Oct 10 8:20 AM
if you can insert the code and call the function module write_document related to change document object in the save event 02 of the table maintenance , you maintain the logs.
2008 Oct 10 8:49 AM
and just how do I do that, Vijay? How can I find the place to put codes in the table maintenance? Please advice.
2008 Oct 10 9:12 AM
Usually, changes to tables that can be maintained via SM30 are tracked using the table logging option in the technical settings of a table. These are stored in DBTABLOG and can be evaluated from within the SM30 transaction. Much less development work involved.
Thomas
2008 Oct 10 9:17 AM
in one of the table maintenance event before save or after save you can call the function to write the change log. are you familiar with the table maintenance events..
2008 Oct 10 10:05 AM
2009 Mar 01 5:01 AM
If i write the code in the event won't the code be wiped out when the table maintenance generator is deleted or regenerated?
Ajay
2008 Oct 10 10:36 AM
Hi,
Goto se11 -> table -> Utilities -> Table Maintenance Generator -> then
Goto Environment -> Modification -> Events.
Here write code as you need.
SAP help on Table events: (It could be useful to you)
http://help.sap.com/saphelp_erp60/helpdata/EN/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
Mydhili
2008 Dec 17 3:18 PM
Go to transaction SE54, enter the name of the table/view, select "generated objects" radio button, click on display, double click on "Overview Screen". Add the respective modules in the process after input; normally before the loop on extract to refresh the old and new tables, before LISTE_UPDATE_LISTE to load the old table and after the LISTE_UPDATE_LISTE to load the new table.
The modules should be on include L(view name)TOP. Here you should include the CDT and CDC includes generated with the change document. To load the old and new tables you should use internal tables (view name)_EXTRACT and (view name)_TOTAL, taking into account that column action stores the action made to the respective row (U, D, I).
After you inserted the changes with form CD_CALL_(change document) you can view changes made using the report CHANGEDOCU_READ.
Hope it helps,
David