ENDSELECT

Syntax

ENDSELECT.

Effect

The ENDSELECT statement closes a loop started with SELECT.

A SELECT command for which the INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE itab is inserted into an internal table, must be followed by ENDSELECT if the addition PACKAGE SIZE is used.

For all other SELECT commands, ENDSELECT must be used unless a single line above the addition SINGLE is read after SELECT and unless the columns of the result set are statically specified and contain only aggregate functions without the specification of the addition GROUP BY.