Show TOC

Creating Tabs for Maintenance DialogsLocate this document in the navigation structure

Use

You can use tabs with local pages to structure and organize large maintenance dialogs.

You can only use tabs in maintenance dialogs which are not affected by customizing. Tabs cannot be used for customizing maintenance dialogs.

Note

Do not use local tabs if

  • Required fields are distributed among different tabs, or

  • There are dependencies between fields in different tabs.

In these cases, use an oversized screen, in which you can group related fields in boxes.

Prerequisites
  • The online functions Change Table Entries and Compare are deactivated.

  • The maintenance dialog is not in a view cluster or the view cluster navigation is deactivated.

  • The function module VIEW_MAINTENANCE_SINGLE_ENTRY is not used for this maintenance dialog.

Procedure

Create Subscreens

  1. Delete the name OK_CODE in the element list for the OK code field, to convert the screen into a subscreen.

  2. Create a screen for each tab in the ScreenPainter (SE51), for example, by copying the Detail screen. Enter the screen type Subscreen in the screen attributes.

Modify the Main Detail Screen

The main detail screen is the detail screen which contains the TabStrip. This main detail screen must have the screen number which is specified in SE54 for the detail screen. The key fields, and explanatory text fields for the key fields, remain in the main detail screen.

  1. Delete all fields which do not remain in the main detail screen, in the Layout Editor.

  2. Specify the function code. The function code should begin with a number, to avoid overlaps with new standard view maintenance function codes.

  3. Specify Function Type P, to enable local scrolling.

  4. Assign subscreen areas to the tabs.

Flow Logic

PBO

Insert an individual module after DETAIL_INIT, which does the following

  • Set the active tab

  • Make the tab ready for input

    No screen fields in the detail screen are ready for input in display and transport mode. You must make them ready for input again explicitly for tabs, in an individual module.

  • Insert CALL SUBSCREEN commands for the subscreens assigned to the tabs, with the number of the screen which realized the subscreen.

PAI

  • Assign a CALL SUBSCREEN statement per tab for the subscreens assigned to the tabs, to allow local scrolling.

  • Delete all fields which have been deleted from the detail screen because they have been put in tabs, from the CHAIN statements.

  • For views with read-only fields to referred tables: If the main detail screen has no read only fields to referred tables, the call of the module COMPLETE_<viewname> can be deleted from the SET_UPDATE_FLAG module chain.

  • For table + text table dialog: If the screen contains no ready for input fields for the text table, the complete SET_TXT_UPDATE_FLAG module chain command, including module call, can be deleted.

  • The CHAIN command for DETAIL_PAI remains because the key fields remain on the detail screen.

Modify Subscreens

  1. Delete all fields which are not required in this tab, in the Layout Editor.

  2. Assign the remaining fields, and define boxes.

Flow Logic

PBO

Replace the module call of DETAIL_INIT by VIM_MODIF_DETAIL.

PAI

  • Delete the modules DETAIL_EXIT_COMMAND and DETAIL_SET_PFSTATUS.

  • SET_UPDATE_FLAG module chain: Delete all fields from the CHAIN statement which are not in this tab.

  • For views with read-only fields to referred tables: For views with read only fields to referred tables: The call of the module COMPLETE_<viewname> in this chain is only necessary in the tabs which contain read only fields to referred tables.

  • For table+text table dialog:

    The complete SET_TXT_UPDATE_FLAG module chain command, including module call, can be deleted, if the subscreen contains no text table fields ready for input.

    Delete the complete DETAIL_PAI module CHAIN command, including module call, because the tabs contain no key fields.

Declare data in the generated function group

Put a tab controls statement in the Top Include of the generated function group L<fu gr>TOP:

CONTROLS: xxxx TYPE TAPSTRIP.

Where xxxx is the name of the tab as specified in the Screen Painter.

Flow logic examples

Enter appropriate values in the fields in angle brackets <...>.

Example main detail screen flow logic

            
process before output. module detail_init. module <set_tabstrip>. "individuelles Modul s. 5.2 call subscreen <subscr1> including 'SAPL<fugr>' '<dnr1>'. "TabSeite 1 call subscreen <subscr2> including ''SAPL<fugr>' '<dnr2>'. "TabSeite 2 * process after input. module detail_exit_command at exit-command. module detail_set_pfstatus. call subscreen <subscr1>. "TabSeite 1 call subscreen <subscr2>. "TabSeite 2 chain. * nur die in diesem Screen änderbaren Felder aufführen! field <Tab/View>-<feld1>. field <Tab/View>-<feld2>. ... module set_update_flag on chain-request. endchain. * nur bei Dialog von Tabelle+Texttabelle relevant * nur die in diesem Screen änderbaren Texttabellenfelder aufführen! chain. field <TextTab>-<feld1>. module set_txt_update_flag on chain-request. endchain. chain. field <Tab/View>-<key1>. field <Tab/View>-<key2>. ... module detail_pai. endchain.
            

Example implementation for the module SET_TABSTRIP

            
module set_tabstrip output. * geeignete TabSeite setzen if <my_tabstrip>-activetab is initial. <my_tabstrip>-activetab = '<Fcode>'. endif. * Eingabebereitschaft wird in der Viewpflege standardmäßig im * Anzeigemodus für alle Felder weggenommen. * --> für TabStrip-Reiter Eingabebereitschaft wiederhestellen loop at screen. if screen-name = '<reiter1>' or screen-name = '<reiter2>' or ... . screen-active = 1. screen-input = 1. modify screen. endif. endloop. endmodule. " SET_TABSTRIP OUTPUT
            

Example subscreen flow logic

            
process before output. module vim_modif_detail. "TabStrip * process after input. chain. * nur die in diesem Screen änderbaren Felder aufführen! field <Tab/View>-<feld1>. field <Tab/View>-<feld2>. ... module set_update_flag on chain-request. * nur für View mit Readonly-Feldern auf referierte Tabellen, falls * diese in diesem Screen enthalten sind! module complete_<viewname> on chain-request. endchain. * nur bei Dialog von Tabelle+Texttabelle relevant * nur die in diesem Screen änderbaren Texttabellenfelder aufführen! chain. field <TextTab>-<feld1>. module set_txt_update_flag on chain-request. endchain.
            

Examples

The following examples of the use of tabs with local pages in the view maintenance detail screen are available in the system:

  • Table TTABSTRIP

    Function group: TVCL

    Main detail screen: 0021

    Tab detail screens: 0022, 0023

  • View VTABSTRIP

    Function group: TVCL

    Main detail screen: 0041

    Tab detail screens: 0042, 0043