Skip to Content
Author's profile photo Jerry Wang

New ABAP feature in 740: LET expression

A LET expression defines variables var1, var2, … or field symbols <fs1>, <fs2>, … as local auxiliary fields in an expression and assigned values to them. When declared, the auxiliary fields can be used in the operand positions of the expression. There is no way of accessing an auxiliary field statically outsideĀ  its expression.

See example below:

1. in line 25 and line 26 we define two auxiliary fields date and sep with keyword LET, which are used in LET expressions in line 27.

2. in line 27 we define a LET expression by keyword IN

3. finally the value of LET expression will be calculated and filled to inline variable isodate defined in line 24. We use CONV string to explicitly specify that inline defined variable isodate has type STRING.


Execution result:


Another example:

Defines three local auxiliary variables, x, y, and z, in a constructor expression to construct the values of a structure. The values of the auxiliary variables are used for the structure components.


Execution result:


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Jerry,

           Nice to read about new feature and very useful further.

      but somehow i am experience some difficulty as shown below.

      1.     Why i am not able to declare table like

      2.     I am not able to assign values to table

      *I have not implemented LET statement(due to older version of ABAP).

      and was just trying to assign values in table.


      Author's profile photo Jerry Wang
      Jerry Wang
      Blog Post Author

      Hi Avirat,

      your ABAP version is older than 740. Both of the features mentioned by you need ABAP 7.40. For example regarding EMPTY KEY, refer to this blog. You can search in SCN with keyword "ABAP 740" and you can find a series of blogs for new features available in 740.

      Best regards,


      Author's profile photo Former Member
      Former Member

      Thank you .