10-20-2006 4:15 AM
Hi All,
I have requirement to update user info and date & time in custom table whoever using Table Maintenance.
ie.
My requirement is if any user updating any table [SAP standard or Custom table] using table maintenance, then
i need to update the user name, date and time into custom table.
Can anbody suggest a solution for this.
Thanks
aRS
10-20-2006 4:24 AM
Hi,
Try this solution...This might work for custom tables..
Create a new report program..
Take the table name as a parameter..
Then get all the contents from the table and store it in a internal table..
Then call the transaction SM30 with the table name..
Once they update the table and save..The control will come back to the report program...
Then again get the values from the custom table..
Compare the values..If there is any change...Then update your custom table with the user info..
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
10-20-2006 4:24 AM
Hi,
Try this solution...This might work for custom tables..
Create a new report program..
Take the table name as a parameter..
Then get all the contents from the table and store it in a internal table..
Then call the transaction SM30 with the table name..
Once they update the table and save..The control will come back to the report program...
Then again get the values from the custom table..
Compare the values..If there is any change...Then update your custom table with the user info..
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
10-20-2006 6:33 PM
Hi Naren,
I am looking for is any userexit i can use for it, ie after updating using SM30 [Table maintenance]
Thanks
aRs
10-20-2006 6:48 PM
You can do this in event 01 - Before saving the data in the database.
Rob
10-20-2006 6:51 PM
Hi,
You may not find a common user exit in SM30..Which will be triggered when you try to update in all the custom tables...As each table will be created under different programs...
Thanks,
Naren
10-20-2006 8:47 PM
Hi folks,
Can you please give more details about this event 01 , Rob had suggested.
Thanks
aRs
10-20-2006 8:58 PM
Actually, I'm not sure it's what you want.
As I understand it, you want to be able to add code to update user information for a custom table, but add that code only once (in SM30 somewhere).
Events are available in the table maintenance dialogue for individual tables. In other words, you have to be using table maintenance dialogues (I think), and you have to add the code for each table.
So, do you still want to know about events?
Rob
10-20-2006 9:12 PM
Hi Rob,
Thanks your reply.
I have 6980 custom tables with table maintenance. by adding code to each table maintenance is difficult from the programming point of view. I am looking for common
trigger event before or after save OR user exit before or after save.
Thanks
aRs