Copyright 2024 - BV TallVision IT

Your selection screen can also be build up with several "views" or subscreens, which can be accessed via a tab strip...

 

If you want to add a tabulator strip to your selection screen (mostly right at the top but it can be added as part of the main selection screen as well), the actual contents of the tabstrip is to be defined as a SUBSCREEN. So here's what you need to do to set up a selection screen with tabulator strip:

  1. Place your select-options or parameter fields in a subscreen block like so:
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
    PARAMETERS: pa_updat(40),        
                pa_count(4) type n.  
    SELECTION-SCREEN END OF SCREEN 1100.
  2. For the other tab contents you will need to create another set of select-options and parameters. For the example this screen is called SCREEN 1200.
  3. Now introduce the actual tab-strip, like so:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK maintab FOR 12 LINES.
    SELECTION-SCREEN TAB (15) gl_tab1 USER-COMMAND tab1
                     DEFAULT SCREEN 1100.
    SELECTION-SCREEN TAB (15) gl_tab2 USER-COMMAND tab2
                     DEFAULT SCREEN 1200.
    SELECTION-SCREEN END OF BLOCK maintab.
    Note that the variables gl_tab1 and gl_tab2 are text variables which are (automatically) defined (thus no DATA statement required).
  4. FOR 12 LINES. defines the height of the tabstrip window in lines. If the actual subscreen holds more lines than the tabstrip height, a scroll-bar will be automatically added.
  5. The (15) bit defines the length of the tabstrip text field in characters
  6. Assign the names of your tabs (the actual labels) in the program's initialization event (thus before the selections screen is build up). 
    gl_tab1 = 'Tab one'.
    gl_tab2 = 'Tab two'.
  7. The tabstrip should already be working by now. Actual tabstrips work like buttons, backed by an OKCODE which is in this case set to TAB1 and TAB2.