Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  User Dialogs →  Selection Screens →  Create Selection Screens →  SELECTION-SCREEN →  SELECTION-SCREEN INCLUDE 

SELECTION-SCREEN INCLUDE BLOCKS

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


SELECTION-SCREEN INCLUDE BLOCKS block [ID id]. 

Effect

The BLOCKS addition creates a block block on the current selection screen. block expects a block that must have already been created on a previous selection screen by a SELECTION-SCREEN BEGIN OF BLOCK or SELECTION-SCREEN BEGIN OF [TABBED] BLOCK statement.

The new block has exactly the same structure as the original block and contains the same screen elements. The properties of all the parameters, selection criteria, output fields, and pushbuttons in the new block are copied from the corresponding elements in the original block as if they were copied individually with a SELECTION-SCREEN INCLUDE statement.

If a block is copied within a block with a frame, the width of the original block is adjusted to fit the area within the frame. The original block cannot contain any elements outside this area.

The ID addition can only be used in a selection include for a logical database.


Note

The INCLUDE addition in this variant ensures that once a block structure has been defined, the structure and the corresponding global variables can be used by multiple selection screens at the same time.


Example

Reuses a block from the standard selection screen of an executable program in a separate selection screen with the number 500.

SELECTION-SCREEN: BEGIN OF BLOCK block, 
                  COMMENT /1(40) text, 
                  ULINE. 
PARAMETERS: p1(10) TYPE c, 
            p2(10) TYPE c, 
            p3(10) TYPE c. 
SELECTION-SCREEN END OF BLOCK block. 

SELECTION-SCREEN: BEGIN OF SCREEN 500 AS WINDOW, 
                  INCLUDE BLOCKS block, 
                  END OF SCREEN 500. 

INITIALIZATION. 
  text = 'Standard Selection'. 

START-OF-SELECTION. 
  ... 
  CALL SELECTION-SCREEN '0500' STARTING AT 10 10.