sapdev logo background
sapdev logo sapdev logo
Comments

ABAP CLASS LOCAL FRIENDS Statement syntax, information and example SAP source code



Return to Statement index



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. It must not be ended with an ENDCLASS statement.

Latest notes: Declaring local classes of a class pool as friends of the global class is necessary, in particular, 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 you want the local classes and interfaces class1 class2 ... and intf1 intf2 ... to be able to access all components of the global class class in their declaration part, you must first specify the statement in the class pool, while also declaring the local classes and interfaces using CLASS - and INTERFACE - DEFERRED .
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




CLASS_INTERFACE_LOAD
CLASS_OPTIONS




comments powered by Disqus