Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  User Dialogs →  Classic Lists →  Displaying Lists 

WINDOW

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


WINDOW STARTING AT col1 lin1 
       [ENDING  AT col2 lin2].

Effect

This statement initiates the display of the currently created detail list in a dialog box. It only works in the event blocks for an interactive list event. If there are multiple WINDOW statements in an event block, the last one is valid.

The upper left corner is determined for the column and the row by the values in col1 and lin1. The values are based on the GUI window of the basic list. The lower right corner is set automatically. The maximum lower right corner can either be specified in col2 and lin2 or is specified using the lower right corner of the GUI window where the list event took place.

col1, lin1, col2, and lin2 expect data objects of the type i. The values of all data objects should lie within the GUI window of the basic list and the values of col1 and lin1 should be less than those of col2 and lin2. If not, the behavior is undefined.

If no GUI status is set using SET PF-STATUS and an event block is defined using AT LINE-SELECTION or AT PFnn, the system automatically uses a standard list status suitable for the dialog box without a menu bar and system toolbar. This includes pushbuttons for the predefined function codes "PICK" (only for AT LINE-SELECTION), "PRI", "%SC", "%SC+", and "RW" in the application toolbar.


Note

If a GUI status is set using SET PF-STATUS, this should be created in Menu Painter as a dialog box status; the list template should also be included.


Example

Displays the details of an airline in a dialog box after a row is selected.

DATA: scarr_wa TYPE scarr, 
      col      TYPE i, 
      lin      TYPE i. 

START-OF-SELECTION. 
   SELECT carrid 
          FROM scarr 
          INTO scarr_wa-carrid. 
    WRITE / scarr_wa-carrid. 
    HIDE  scarr_wa-carrid. 
  ENDSELECT. 
  CLEAR scarr_wa-carrid. 

AT LINE-SELECTION. 
  col = sy-cucol + 40. 
  lin = sy-curow + 2. 
  WINDOW STARTING AT sy-cucol sy-curow 
         ENDING   AT col lin. 
  IF sy-lsind = 1 AND 
     scarr_wa-carrid IS NOT INITIAL. 
    SELECT SINGLE carrname, url 
           FROM scarr 
           WHERE carrid = @scarr_wa-carrid 
           INTO (@scarr_wa-carrname, @scarr_wa-url). 
    WRITE: scarr_wa-carrname, / scarr_wa-url. 
  ENDIF. 

Continue

Lists, Dialog Boxes - Example