Application Development 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: 

How can I trigger change document from SM30?

Former Member
0 Kudos

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?

10 REPLIES 10

Former Member
0 Kudos

Hi,

Logically user shud not be given authorization for sm30.

Nothing else can be done if data is changed thru sm30.

Regards,

Amit

0 Kudos

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?

0 Kudos

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.

0 Kudos

and just how do I do that, Vijay? How can I find the place to put codes in the table maintenance? Please advice.

0 Kudos

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

0 Kudos

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

0 Kudos

Yes Vijay.. I think I know what you mean.

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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