Skip to content

Do not use field symbols for dynamic data access

Starting in ABAP Platform 2021, there are almost no places left where using a field symbol is necessary to perform access to generically typed variables or dynamic access to components of a variable.

So, instead of something like

" anti-pattern
ASSIGN dref->* TO <fs>.
result = <fs>.

write

result = dref->*.

Refer to New kinds of ABAP expressions (SAP blog) for more examples and detailed explanations of replacing dynamic and generic accesses via field symbols with more modern syntactical constructions.

From SAP/styleguides under CC BY 3.0 — more details
Last updated on