
The local variable is declared inline using the statement addition DATA(temp).
In a method implementation, you can convert inline declarations of one or several local variables into explicit declarations.
Example
The inline declaration DATA(temp) is removed and an explicit declaration is inserted in the method implementation.
CLASS cl_car DEFINITION.
PUBLIC SECTION.
METHODS: drive
IMPORTING
i_speed TYPE i.
PRIVATE SECTION.
DATA: current_speed TYPE i.
ENDCLASS.
CLASS cl_car IMPLEMENTATION.
METHOD drive.
DATA(temp) = nmin( val1 = 220 val2 = i_speed ).
current_speed = temp.
ENDMETHOD.
ENDCLASS.
In the corresponding method, the new local variable (temp) is generated and replaces the undeclared inline variable. The type (i) is derived from the usage of the variable.
Example
Implementation part of the ABAP class after declaration:
CLASS cl_car IMPLEMENTATION. METHOD drive. DATA: temp TYPE i. temp = nmin( val1 = 220 val2 = i_speed ). current_speed = temp. ENDMETHOD. ENDCLASS.