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 details list in a dialog box. It functions in the event blocks only for an interactive list event. In the case of several WINDOW statements in an event block, the last one is valid.

The upper left corner is determined for the column and the line by the values in col1 and lin1. The values are based on the basic list window. 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 window, where the list event took place.

For col1, lin1, col2 und lin2, data objects of type i are expected. The values of all data objects should lie within the basic list window, and the values of col1 and lin1 should be less than those of col2 and lin2. Otherwise, the behavior is undefined.

If no GUI-Status is set with SET PF-STATUS and an event block is defined with 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 with SET PF-STATUS, this should be created in the Menu Painter as a dialog box status; the list template should also be included.


Example

This example displays the details of an airline in a dialog box after selecting a line.

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 
           INTO (scarr_wa-carrname,scarr_wa-url) 
           WHERE carrid = scarr_wa-carrid. 
    WRITE: scarr_wa-carrname, / scarr_wa-url. 
  ENDIF. 

Continue

Lists, Dialog Boxes