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: 

Update info while using Table Maintenance

former_member194669
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

former_member194669
Active Contributor
0 Kudos

Hi Naren,

I am looking for is any userexit i can use for it, ie after updating using SM30 [Table maintenance]

Thanks

aRs

Former Member
0 Kudos

You can do this in event 01 - Before saving the data in the database.

Rob

Former Member
0 Kudos

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

former_member194669
Active Contributor
0 Kudos

Hi folks,

Can you please give more details about this event 01 , Rob had suggested.

Thanks

aRs

0 Kudos

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

former_member194669
Active Contributor
0 Kudos

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