Inline declaration from a generically typed source

 home quick fix  example  edit

inline_generic_source

Pragma: ##TYPE

Description

Finds inline declarations whose value is a generically typed parameter or field symbol

Extended Information

DATA( ) or FINAL( ) takes the type of the source. When the source is a parameter or
field symbol with a generic type, the type is fixed when the program is compiled: string for clike and
csequence, xstring for xsequence. The syntax check warns "The fixed type STRING is used for the generic
type CLIKE".

Reported for DATA(var) = source and FINAL(var) = source when the source is just the parameter or field
symbol. Most other generic types cannot be made concrete, that is a syntax error which check_syntax reports.

Declare the variable with a type, or name the type with CONV.

The pragma ##TYPE, which hides the syntax check warning, also hides this issue.

prefer_inline does not suggest inline declarations for generic sources, this rule reports the ones
that exist.

https://help.sap.com/doc/abapdocu_758_index_htm/7.58/en-US/abapmove.htm

Default Configuration

Hover to see descriptions, Ctrl+Space for suggestions

Examples