SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
No Obsolete Casting for Interface Parameters
In ABAP Objects, the following statement causes an error message:
METHODS meth IMPORTING p1 STRUCTURE struc.
Correct syntax:
METHODS meth IMPORTING p1 TYPE struc.
or
METHODS meth IMPORTING p1 TYPE ANY.
METHOD meth.
FIELD-SYMBOLS <fs> TYPE struc.
ASSIGN p1 TO <fs> CASTING.
...
ENDMETHOD.
Reason:
Formal parameters whose type is defined with STRUCTURE are a mixture of parameters with types and parameters for which there is a
casting for data types
defined in the ABAP Dictionary or locally in the program. The types of the field symbols are defined
with the TYPE addition. Local field symbols and the ASSIGN ... CASTING statement can be used for the casting.