Basic Syntax
You use ABAP SQL SELECT statements to retrieve data from one or more data sources (such as database tables, views or internal tables). Note that many syntax examples in this cheat sheet show a selection from dbtab denoting a database table as a source.
This can be done to create a multirow or single row result set by assigning the result set to a suitable data object, i. e. you can store the multirow read result in an internal table or the single row result in a structure.
The SELECT statement includes several clauses that serve different purposes.
The following code snippet shows the basic syntax and mandatory clauses to be specified. Although its use is optional, a WHERE clause should be specified to further restrict the read result.
However, there are plenty of additions and syntax variants, some of which are mentioned in the cheat sheet. In general, choose F1 for the keywords and additions to get all the details in the ABAP Keyword Documentation.
SELECT FROM source "What data source to read from
FIELDS field_list "What columns should be read
WHERE condition "Specifies conditions on which a row/rows should be read
INTO target. "Specifies the target of the result set
Serkan AKKAVAK
Computer Engineer BSc
Head of SAP & Software Department
Contact : serkurumsal@yandex.com

0 Comments