You probably remember our requirement to extend SPRO customizing with a specific point to maintain specific tables.
In “Part 1” of the blog, I created the specific tables and defined foreign keys relationships between them. Finally, I created a maintenance view that joins these tables and generated a view maintenance dialog that looks as follows.
The next step consists in modifying the maintenance dialog screens 3 and 4 in order to get the required layout.
I still use the same example of transaction OMR6 and will explain in the second part of the blog how to get the same layout as the standard one.
- Modification of screen 3Double-click on screen 3. The automatically generated code appears.Select “Layout” in the menu toolbar You will see a list containing all fields of view ZVMM_T169. The columns are ordered following the fields order in view ZVMM_T169.However, I need to display only 4 columns in this order: company code, company name, tolerance key and tolerance key description.I followed the next steps to fulfill this requirement:
- Suppress the existing layout
- Add a new table control by clicking the corresponding button and give it the same name as in the generated code, in our case: TCTRL_ZVMM_T169
- Adjust table settings by clicking the button . Important is to keep the same name as in the generated code version for selection element (in this case VIM_MARKED) since it is used in the screen flow logic.
- Add the four fields of view ZVMM_T169 in the required order using
- And push button VIM_POSI_PUSH (It is used to position a given entry)
- Add the text “VIM_POSITION_INFO” (It gives the number of entries that are displayed)
- The final layout looks as following.
- Modify now the screen flow logic code. You will find below the code parts that have been changed
- Modification of screen 4:
Double-click on screen 4 on the maintenance dialog then click on “Layout”. The generated layout looks as following.I will modify the display in order to get two different blocks for lower and upper limits as in transaction OMR6.The resulting screen is the following. To get this screen, I just deleted all existing screen elements and used the buttons toolbar to drag and drop the elements I need in the order I want.Now adjust the flow logic code
Notice that the modifications done in screens 3 and 4 are overwritten each time that the dialog is regenerated for maintenance issues, i.e. to add new fields in view ZVMM_T169.
That is why it is recommended to create a copy of each screen as backup. This can be achieved in SE80 by selecting the function group name and copying screen 3.
Enter screen number and confirm
Do the same for screen 4. As a result, we obtain two new screens 5 and 6 as backups to screens 3 and 4.
Continue reading Part 3, the last part of this blog post.
The SAP University Team