This is a test message to test the length of the message box.
Login
|
New escape characters
Created by Software-Heroes

ABAP - New escape characters

5429

If you should have the new symbols @ and # somewhere in the code, you do not have to despair immediately, we will help you understand the new logic.

Advertising


With the extension of the SELECT statement and the inclusion of new language elements, some new symbols have also been adopted in the modern ABAP. These are also very often used depending on the use of the new commands and constructs.

So that you can easily learn them, here just two examples where we want to explain the effects.


" Select statement
SELECT * FROM adrc INTO TABLE @DATA(lt_adrc).

" Create a structure
DATA ls_t001 TYPE t001.
ls_t001 = VALUE #( bukrs = '1234' butxt = 'Test input' ).

 

The @ within the SELECT

The @ symbol not only stands for the delimiter in an e-mail address, but is used in the Select to say where a statement or variable belongs. Everything marked with @ in Select belongs to the program and is not part of the database statement.

This can be used to perform various actions in selects:

  • Definition of a table for the result (example above)
  • Transfer of parameters and select options
  • Usage of inline functions within a select

 

Hint: Once you use the new logic, it must be applied in the full select statement. The fields are then separated by a comma. You can find more details on how this works in a separate article.

 

The # in a function

Whether hash tag, rhombus or picket fence, the # is also used as a new symbol in ABAP and describes the context-dependent data types, especially in the inline functions.

In the example above, it refers to a data type of the variable to which the structure is assigned via VALUE. The value statement knows that it should refer to the data type of the variable ls_t001 when generating the data type.

Often you will find this:

  • Passing values to methods
  • New inline functions

 

Conclusion

The new escape symbols are relatively easy to understand, given what they are meant for. The usage is mandatory for all new commands, so there is no way around it.


Included topics:
New ABAPEscape characters
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


ABAP - XCO Logging

Category - ABAP

The XCO classes are part of the ABAP Cloud APIs and offer numerous functions that aren't always easy to understand. In this article, we'll take a detailed look at the logging object.

12/16/2025

ABAP - The right Key

Category - ABAP

What about the use of internal tables? Is it still just TYPE TABLE in ABAP, and the table is fully defined?

11/14/2025

ABAP - XCO Regular Expressions

Category - ABAP

Let's take a look at the XCO classes for regular expressions and how you can easily use them to execute REGEX against text and input in ABAP Cloud. We'll also compare them with classic ABAP.

11/07/2025

ABAP - Escape

Category - ABAP

In this article, let's take a closer look at different escape variants that you need for ABAP development and system security.

10/07/2025

ABAP - Date and Time

Category - ABAP

In this article, let's take a closer look at the data types for dates and times in ABAP. Have any changes been made between the various releases, and what should you still use today?

10/03/2025