SAP SELECT - Obsolete ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• SELECT - short form ABAP_SQL_STATEMENT_OBS

SELECT, Short Form
Short Reference

ABAP_SYNTAX_OBS
SELECT $[SINGLE$] * FROM ${ dbtab $| *dbtab $} ...
...
ENDSELECT.

What does it do?
This statement is a short form of the following AB-SQL statement for accessing an individual DDIC database table dbtab:
SELECT $[SINGLE$] * FROM dbtab INTO ${ dbtab $| *dbtab $} ...
...
ENDSELECT.
The explicit specification of a work area in an INTO clause is not required in the short form. A table work area dbtab or *dbtab is used implicitly as the work area. The table work area must be declared using TABLES. If the name *dbtab is used instead of the name of the DDIC database table dbtab, dbtab is accessed, but the additional table work area is used.
The short form can only be used to read all columns of a database table if * is specified in the SELECT list . When individual columns or aggregate functions are read, the work area must always be specified explicitly. The only exception is when count( * ) is used to specify nothing, if no alias name is defined for it and no GROUP BY clause is specified.