Menu

Using Maintenance Views to Display Additional Data in Extended Table Maintenance

2014-08-20       

Sometimes, it is desirable to display data from more than one table in a table maintenance dialog. This could for example be explanatory texts or descriptions from another database table. With maintenance views, we can make that happen. Read on to learn how.

Recommended Now

Fire TV Stick Lite Essentials Bundle

This bundle contains Amazon Fire TV Stick Lite and Mission USB Power Cable. The USB power cable eliminates the need to find an AC outlet near your TV by powering Amazon Fire TV directly from your TV's USB port. Includes special power management circuitry that enhances the peak power capability of the USB port by storing excess energy and then releasing it as needed.

Check it out on amazon.com →

Maintenance views can be used to display additional data during table maintenance, which is what I’m going to demonstrate today. They are comparable to database views, but they are not created on the database; they only exist on the application server.

To create a maintenance view for several database tables, the first thing we need are foreign key relationships. I’m going to re-use the example from the last three posts to display the company code text during table maintenance as a read-only field. Let’s go ahead and create a foreign key relationship. This is done in transaction SE11.

Creating a foreign key relationship

The next step is the actual creation of the maintenance view. Again, go to transaction SE11, enter a view name, and click Create. In the popup that appears, select “Maintenance view”.

Creating a maintenance view

Continue by entering the table name in the “Tables” part of the interface. Be sure to put the main data table there; this will be the so-called primary table that all other tables are based on.

It can be a bit tricky to add the other tables if you’ve never used that interface. You will need to mark the row with your table entry, then click the Relationships button to add other tables to the view. You will only be offered tables that have a foreign key relationship with the table you’re starting with, which is why we added this first.

Adding tables to the view

I’ll add the table T001 here so I can access the field T001-BUTXT, where the company code text is stored. The next thing to do is to select the actual view fields. Change to the tab View Flds and enter all the fields you want in your maintenance view. With the field P (Maintenance attribute), you can decide if the field should be ready-only, ready for entry, hidden (you can write in hidden fields using events) or used for subsets. I’ve chosen to make the company code text display-only here.

Completed maintenance view

You’re almost done! All that remains to do now is to create a table maintenance dialog for the view, using the table maintenance generator. The result will look like this. The user can now see the company code text, making his maintenance job easier. Great!

Table maintenance with additional displayed data