SAP REF TYPES OBJECTS - Guide
Get Example source ABAP code based on a different SAP table
Reference to Data Types or Data Objects
ABAP_BACKGROUND
As well as
ABAP_RULE
If a data object directly depends on another data object, refer to it directly using
ABAP_DETAILS
For example, if a helper variable of the type of an input parameter is required within a procedure (
However, if no close reference to another data object exists, it is usually more useful to declare data objects with reference to a
Latest notes:
Obsolete references to flat structures or database tables or views of the ABAP Dictionary using
ABAP_HINT_END
ABAP_EXAMPLE_BAD
The following source code shows the declaration of a helper variable in a method that is supposed to be of the same data type as an interface parameter. The
PUBLIC SECTION.
METHODS some_method
CHANGING some_parameter TYPE some_type.
...
ENDCLASS.
CLASS some_class IMPLEMENTATION.
METHOD some_method.
DATA save_parameter TYPE some_type.
save_parameter = some_parameter.
...
ENDMETHOD.
...
ENDCLASS.>
ABAP_EXAMPLE_END
ABAP_EXAMPLE_GOOD
The following source code shows the improved declaration of the helper variable that now directly refers to the interface parameter with
METHOD some_method.
DATA save_parameter LIKE some_parameter.
save_parameter = some_parameter.
...
ENDMETHOD.
...>
ABAP_EXAMPLE_END