ABAP Keyword Documentation → ABAP - Reference → Declarations → Local Declarations in Expressions → let_exp - LET ... IN
LET Expression
This example demonstrates a LET
expression in a constructor expression.
Other versions:
7.31 | 7.40 | 7.54
Source Code
TYPES text TYPE TABLE OF string WITH EMPTY KEY.
cl_demo_output=>new( )->write(
VALUE text( LET it = `be` IN
( |To { it } is to do| )
( |To { it }, or not to { it }| )
( |To do is to { it }| )
( |Do { it } do { it } do| ) )
)->display( ).
Description
A constructor expression with the value operator
VALUE constructs rows in an internal table. The value of the local auxiliary variable it
is passed to the table.