SAP CLASS LOCAL FRIENDS ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• LOCAL FRIENDS CLASS

CLASS, LOCAL FRIENDS

ABAP_SYNTAX
CLASS class DEFINITION
LOCAL FRIENDS class1 class2 ...
intf1 intf2 ...

What does it do?
This statement makes the local classes and interfaces class1 class2 ... and intf1 intf2 ... of a class pool friends of its global class class . At least one class or one interface must be specified.
This statement does not introduce a declaration part and must not be closed using the ENDCLASS statement.



Latest notes:

The declaration of local classes of a class pool as friends of the global class is particularly necessary for local test classes that test the private components of the global class.
This variant of the statement CLASS can also only be listed in the context described under CLASS.
If the local classes and interfaces class1 class2 ... and intf1 intf2 ... are to have access to all components of the global class class in their declaration part, the statement must first be specified in the class pool, for which the local classes and interfaces must first be registered using CLASS - or INTERFACE - DEFERRED.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
In the CL_DEMO_AMDP_MESH class, the