Show TOC

Processing BlocksLocate this document in the navigation structure

Use

In the PAI event of the selection screen, the

AT SELECTION-SCREEN ON BLOCK block

event is triggered. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK block - END OF BLOCK block . You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block, the fields in the block are made ready for input again on the selection screen.

        


        
REPORT demo_at_selection_on_block.
        
SELECTION-SCREEN BEGIN OF BLOCK part1 WITH FRAME.
        
PARAMETERS: number1 TYPE i,
        
number2 TYPE i,
        
number3 TYPE i.
        
SELECTION-SCREEN END OF BLOCK part1.
        
SELECTION-SCREEN BEGIN OF BLOCK part2 WITH FRAME.
        
PARAMETERS: number4 TYPE i,
        
number5 TYPE i,
        
number6 TYPE i.
        
SELECTION-SCREEN END OF BLOCK part2.
        
AT SELECTION-SCREEN ON BLOCK part1.
        
IF number3 LT number2 OR
        
number3 LT number1 OR
        
number2 LT number1.
        
MESSAGE e888(sabapdocu) WITH text-001.
        
ENDIF.
        
AT SELECTION-SCREEN ON BLOCK part2.
        
IF number6 LT number5 OR
        
number6 LT number4 OR
        
number5 LT number4.
        
MESSAGE e888(sabapdocu) WITH text-001.
        
ENDIF.
        


        


         

If the user does not enter numbers in ascending order in one of the blocks, the whole of the corresponding block is made ready for input again.