What does it do? The information in lines> specifies whether the results set has one line or multiple lines. • SINGLE SELECT - lines
ABAP Alternative 1 ... SINGLE [FOR UPDATE]>
ABAP Addition ... FOR UPDATE>
What does it do? If SINGLE> is specified, the results set has a single line. If the remaining additions of the statement SELECT> select more than one line from the database, the first line that is found is placed in the results set. The data objects specified after INTO>> cannot be internal tables, and the APPENDING>> addition cannot be used. The addition ORDER BY>> cannot be used either.
Latest notes:When SINGLE> is specified, the lines to be read should be clearly specified in the WHERE> condition >, for the sake of efficiency. When the data is read from a database table, the system does this by specifying comparison values for the primary key>. The addition SINGLE> is not allowed in subqueries>>. If SINGLE> is specified and LOB handle>s are created> in the INTO > clause>, all primary key fields joined by AND> in logical expressions must be checked for equivalence in the WHERE> condition>. If this is not possible, the UP TO 1 ROWS>> addition can be used instead of SINGLE>. INTHINT There are technical reason for demanding full key INTHINT specification with LOB-Handles. A SELECT SINGLE, where INTHINT the key is not fully specified, is switched internally to INTHINT a SELECT UP TO 1 ROWS and reader streams would be INTHINT closed implicitly in contradiction to the following hint. If the SINGLE> addition is used, after the creation of LOB handle>s>, all reader streams> which are created when executing the SELECT> statement, as well as locators>>, continue to exist until they are closed, either explicitly with one of their methods, or implicitly at the end of the current database LUW>. The associated database operation is not completed during this time. We recommend that you close all LOB handle>s as soon as possible.