Ansicht
Dokumentation

ABENABAP_SQL_HOST_EXPRESSIONS - ABAP SQL HOST EXPRESSIONS

ABENABAP_SQL_HOST_EXPRESSIONS - ABAP SQL HOST EXPRESSIONS

CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- @( expr )

... @( expr ) ...

Effect

Specification of a host expression in an statement. Host expressions are ABAP expressions expr that can be specified in operand positions in . expr is a general expression position. Any expressions or calls possible here, as well as individual data objects, can be specified.

Host expressions can be specified as elementary SQL expressions in all operand positions in which SQL expressions are possible. They can also occur in the following read positions in which no SQL expressions are possible:

The relevant restrictions apply in operand positions in which host variables are handled like SQL expressions.

The host expressions of an statement are evaluated from left to right and the results are passed to the database, like the content of host variables. Conversions of the result of a host expression to the data type required in the operand position must be possible and be lossless. The following additional restrictions apply:

  • Host expressions cannot be used in dynamic tokens.

Notes

  • In the operand positions where host expressions can be specified, it is also always possible to specify host variables but not vice versa.
  • In some operand positions in which host expressions are forbidden, but literals and host variables are allowed, the syntax @( literal ) and @( dobj ) can be used. It is handled as a literal or host variable rather than as an expression.
  • When host expressions are specified, the syntax check is performed in a strict mode, which handles the statement more strictly than the regular syntax check.

Example

Determination of the right side of a comparison in a WHERE condition using a functional method call in a host expression. Within the host expression, the instance operator NEW is used here to create a temporary object.






BAL Application Log Documentation   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 5113 Date: 20240426 Time: 200044     sap01-206 ( 63 ms )