Ansicht
Dokumentation
ABENOO_OBS_STRUCT_1 - OO OBS STRUCT 1
BAL Application Log Documentation CPI1466 during BackupThis documentation is copyright by SAP AG.
No Obsolete Casting for Interface Parameters
-
In ABAP Objects the construct STRUCTURE for defining the
types of formal parameters in
procedures is not allowed. The only procedures allowed in ABAP Objects are methods.
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.
General Material Data BAL_S_LOG - Application Log: Log header data
This documentation is copyright by SAP AG.
Length: 1541 Date: 20240426 Time: 230846 sap01-206 ( 26 ms )