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.

P1.png

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

P2.png

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

P3.png

Display table ZTEST_EMP:

P4.png

Step2:

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

P5.png

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

P6.png

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

P7.png

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:

P8.png

P9.png

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

P10.png

This Design Screen will appear:

P11.png

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

P12.png

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

P13.png

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

P14.png

P15.png

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

P16.png

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

P17.png

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

P18.png

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)

P19.png

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

P20.png

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

P21.png

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Naimesh Patel

    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

    (0) 

Leave a Reply