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: 

Table maintenance generator - multiple requirements

Former Member
0 Kudos

Hi Experts

we are trying to achieve some functionalities using TMG.

1. Stop user creating manual entry in table other than transaction SM30 or transaction code we will create for it .(through SE11 utilities-table contents-create/display anyone can modify entry we want to stop that, even if user has authorization to change table he should not be able to change through SE11)

2. When user modifies one entry, we want to retain the original record with different version. using events we can achieve this i am just confused as to which even will enable me to do it. following steps i want to perform

user wants to change record A

user changes record A presses button to save it.

original record A is modified (not with user's change but even before user changed it) and saved with version 2.

a record with user's desired changes is inserted as record B.

3. How do i hide fields when table is displayed ? i have to create a view on this table ? can i use TMG of table with the view as well ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

For point 3, when you create a maintenance view, you can set the property in SE11 of the field as 'hidden', that is make the 4th column as 'H'. It wont display in the maintenance view.

However if a key field is hidden, then you have to take care to use the event 21 and fill the hidden fields, else it might lead to some inconsistencies during the maintenance of the data.

7 REPLIES 7

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

former_member212005
Active Contributor
0 Kudos

Hemant, please find the below answers

1) For not allowing changes through SE11, simply uncheck the check box which says 'Table Maintenance Allowed'.

If the checkbox is not ticked, then it will not allow you to change or create through SE11...but allow it through SM30..

In ECC 6.0 it is in Delivery and Maintenance Tab as a list box

In 4.6c it is in Attributes tab

2) When the user modifies one record..you want to keep both the existing as well as the changed record..

How is it possible....what I am saying is that user will not be allowed to modify primary keys...we can only modify non-primary keys...

So considering your scenario...you will have two entries with same primary key and obviously it will not work...

So what you have to do is....keep another field COUNT as primary key...

and increment the count as the changes are made...

i.e. for the existing record the count initially would be 0...the new modified record should have count as 1.

You can use the event '01' Before saving in the database...for doing all these things

0 Kudos

Hey Vin thanks for reply.

your point is right i have one more key now and in before save event i am writing my logic to create history.

Former Member
0 Kudos

For point 3, when you create a maintenance view, you can set the property in SE11 of the field as 'hidden', that is make the 4th column as 'H'. It wont display in the maintenance view.

However if a key field is hidden, then you have to take care to use the event 21 and fill the hidden fields, else it might lead to some inconsistencies during the maintenance of the data.

Former Member
0 Kudos

Hi Hemath,

you can activate change log in the technical settings.

Thanks,

Jiten

Former Member
0 Kudos

i solved requirement of maintaining history when user changes entry with help events. with event 01, just before saving i took a copy of original record and added it to 'total' table which is available. 'total' table is finally saved in database. New entrries have to have field 'action' = N.