Ansicht
Dokumentation
ABENABAP_SQL_UNTYPED_LITERALS - ABAP SQL UNTYPED LITERALS
General Data in Customer Master CL_GUI_FRONTEND_SERVICES - Frontend ServicesThis documentation is copyright by SAP AG.
- Untyped Literals
... ${ $[+$|-$]n$[n$[n$[...$]$]$]
$| 'c$[c$[c$[...$]$]$]' $| `$[c$[c$[c$[...$]$]$]$]` $} ...
Effect
Untyped literals in ABAP SQL correspond to general ABAP literals and the same rules apply. In , untyped literals can be specified in read positions of statements where host variables are possible. The following applies, depending on the operand position:
- If an untyped literal is specified in an operand position in which it is handled like an elementary SQL expression, the corresponding rules apply and the untyped literal is mapped to a dictionary type and evaluated accordingly on the database.
- If an untyped literal is specified in an operand position in which it is not handled like an SQL expression, it is handled like a host variable. If necessary, an ABAP specific type conversion takes place and a lossless assignment to the data type required in the operand position must be possible. Non-matching untyped literals produce, depending on the syntax check mode, syntax warnings or syntax errors.
Notes
- While general ABAP supports untyped literals only, ABAP SQL also supports typed literals which should be preferred.
- In some operand positions in which untyped literals are allowed and host expressions are forbidden, an untyped literal can be specified with the syntax @( literal ) and is handled as an untyped literal and not as an expression.
Example
Reading of data from the DDIC database table SPFLI using . The read rows are specified as untyped text literals in the WHERE condition. After UP TO, an untyped numeric literal specifies the maximum number of rows to read.
BAL Application Log Documentation BAL_S_LOG - Application Log: Log header data
This documentation is copyright by SAP AG.
Length: 2619 Date: 20240418 Time: 002730 sap01-206 ( 41 ms )