LET Expression

Index

 

ABAP HANA 7.51: Let Expression

Let expression defines as well as initialize variables and field-symbols. This works as a local helper for the expression. Some important points to be noticed regarding LET expression are as follows:

  • Variables or Field-symbols defined for LET expressions can’t be used outside scope of expression
  • Variables or Field-symbols defined for LET expressions can’t be redefined even if they are not accessible outside LET scope
  • LET expression can be encapsulated inside constructors, VALUE operator, FOR operator, COND operator, SWITCH operator etc.

Sample Source Code: Variant 1

Let_Var1_source

Output: Variant 1

Let_Var1_output

 

Check the video for Illustration and Example:

Find the code on GitHub:

Go to Code

Index

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s