Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Purpose:

Suppose we have a table in the dictionary and it has a maintenance generator which contains many events and lot of features (display a field as drop down, check box or field header text) incorporated manually in the function group of the maintenance generator. At this moment if the table structures changes and it requires one extra field to be appended and maintenance generator needs to be there as it was previously with the amended of the new field then changing the table structure and re-generating the maintenance generator will not provide the solution. If we re-generate the maintenance generator after changing the table structure then it will incorporate the new field but all the events and other features will be deleted from the maintenance generator. So same features and events needs to be coded again.

This can be avoided by adjusting the maintenance generator manually and not re-generating it using the following steps:

Step1:

Create a table ZTEST_EMP using tcode SE11 with a maintenance generator.

Now Utilities->Table Maintenance Generator and create the Maintenance Generator:

Now from SM30 tcode we can create new entries to the table:

Display table ZTEST_EMP:

Step2:

Change the table structure with the addition of new field ‘EMP_AGE’ and activate it:

Now if we display the table it will also display the new field with initial value:

But the table maintenance generator will not contain the new field:

Step3:

Now we will adjust the Table Maintenance Generator so that this additional field is added and other functionalities in the Table Maintenance Generator remains intact.

Get the Function Group from the Table Maintenance Generator Display:

Go to tcode SE80 and open the function group and select the screen number and click on Layout from toolbar.

This Design Screen will appear:

Add the extra column (input/output field) manually:

Name the new column as the same updated in the table structure.

Add the column header text as follows: Name the header text field as- *ZTEST_EMP-EMP_AGE

Save and Back. Go to Flow Logic tab and add the following line indicated:

Go to Element List->General Tab: Tick the red marked field as dictionary field.

Save it. Following pop up will be prompted. (Select your choice accordingly and click ok)

Then the following popup will come. (Click as per your requirement. Here we choose yes as we want new table field to be in Table Maintenance Generator)

Finally Activate the Table Maintenance Generator. If activated successfully then go to tcode SM30 to maintain data.

We will change Employee age as 30 and save the record. In the table display we can see that age is updated.

6 Comments
former_member196331
Active Contributor
0 Kudos

Good .........!   Keep Gaining And Keep Sharing.

naimesh_patel
Active Contributor

Wouldn't it be easier to use the Table maintenance generator? Press the change button, and a small popup comes where you can say, I have added additional field. Only those options which you select on this popup would be generated.

Regards,
Naimesh Patel

former_member216168
Active Participant
0 Kudos

Interesting, but not too useful. Table maintenance generator is faster than that

nareshmochi
Explorer
0 Kudos
Instead of taking Function Group  and display it on SE80 then go to Screen, just Double click on Screen number in Table Maintenance Generator. Thanks for the Blog it is useful.
GopalNair
Participant
0 Kudos
Thank you - very useful.

For previous comments about Table Maintenance Generator being easier :

Yes - its true that its easier. However, if you have used the Maintenance Events and put code into the events to fintune/control the user entries, the table maintenance re-generation wipes this off. We can certainly use INCLUDE and OO-Techniques to minimize the impact - but still the starting point of all these event code will be wiped clean when re-generating.

Hence, the technique discussed here in this Blog can be used to prevent this event code wipes.

 

Best Regards,

Gopal Nair.
former_member111137
Participant
0 Kudos
Thanks, awesome guide.

Best regards