1. SAP Glossary
  2. ABAP Runtime Environment
  3. friend


What is friend in SAP BC-ABA - ABAP Runtime Environment?


SAP Term: friend

  • Component: BC-ABA

  • Component Name: ABAP Runtime Environment

  • Description: A term in ABAP Objects. The additions FRIENDS and LOCAL FRIENDS of the statement CLASS define other classes or interfaces as friends of the class. This means that the friends are granted access to all the class components, regardless of the visibility section or the addition READ-ONLY. In addition, friends of a class can create instances of the class without restrictions.


Smart SAP Assistant

  • Key Concepts: 
    Friend is a term used in the ABAP Runtime Environment of SAP. It is a type of relationship between two classes that allows them to access each other’s private attributes and methods. This type of relationship is known as encapsulation, which is a way of protecting data and code from being accessed by unauthorized users. 
    
    How to use it: 
    In order to use the friend relationship, the two classes must be declared as friends in the ABAP Runtime Environment. This can be done by using the “FRIEND” keyword in the class definition. Once declared, the two classes can access each other’s private attributes and methods. 
    
    Tips & Tricks: 
    It is important to note that the friend relationship should only be used when absolutely necessary, as it can lead to security issues if not used properly. Additionally, it is important to ensure that both classes are declared as friends in order for the relationship to work properly. 
    
    Related Information: 
    For more information on the friend relationship in SAP, please refer to the official SAP documentation on ABAP Runtime Environment. Additionally, there are many online resources available that provide more detailed information on this topic.
    • Do you have any question about this SAP term?


      Upgrade now to chat with this SAP term.

Related SAP Glossary Terms

Click the links below to see the following related SAP glossary terms:
Rating
ERPlingo's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker