How To Fix OO021 - Interface &1 still contained in interface &2


SAP Error Message - Details

  • Message type: E = Error

  • Message class: OO - Class Builder/API

  • Message number: 021

  • Message text: Interface &1 still contained in interface &2

  • Show details Hide details
  • What causes this issue?

    You wanted to delete the implementation relationship for interface
    &V1&. However, interface &V1& is still implemented in interface &V2&.
    Since all interfaces contained in &V2& must be implemented, you cannot
    delete the implementation relationship for &V1& unless the
    implementation relationship for &V2& is also deleted.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message OO021 - Interface &1 still contained in interface &2 ?

    The SAP error message OO021 indicates that there is an issue with the interface implementation in ABAP (Advanced Business Application Programming). Specifically, it means that an interface (let's call it &1) is still referenced or contained within another interface (&2), which is causing a conflict or violation of the interface implementation rules.

    Cause:

    1. Interface Inheritance: The error typically arises when an interface that is supposed to be removed or modified is still being referenced by another interface. This can happen if:

      • The interface is still being used in the implementation of another interface.
      • There are dependencies that have not been resolved.
      • The interface has not been properly detached from the implementing classes or other interfaces.
    2. Implementation Issues: If you are trying to delete or modify an interface that is still in use, the system will prevent this action to maintain data integrity and consistency.

    Solution:

    1. Check Dependencies:

      • Use transaction SE80 (Object Navigator) or SE11 (Data Dictionary) to check where the interface &1 is being used. Look for any classes or other interfaces that implement or reference it.
      • You can also use the "Where-Used List" feature to find all occurrences of the interface.
    2. Remove References:

      • If you find that the interface is still being implemented or referenced, you will need to remove those references first. This may involve modifying or deleting the implementing classes or interfaces.
    3. Recompile:

      • After removing the references, recompile the affected objects to ensure that the changes take effect.
    4. Delete or Modify the Interface:

      • Once all references are cleared, you should be able to delete or modify the interface &1 without encountering the OO021 error.
    5. Transport Requests:

      • If you are working in a transport environment, ensure that all changes are included in the appropriate transport requests.

    Related Information:

    • ABAP Documentation: Review the official SAP documentation on interfaces and their implementation to understand the rules and best practices.
    • SAP Notes: Check for any relevant SAP Notes that might address specific issues related to interface management and the OO021 error.
    • Community Forums: Consider searching or posting in SAP community forums or Stack Overflow for additional insights from other developers who may have encountered similar issues.

    By following these steps, you should be able to resolve the OO021 error and manage your interfaces effectively in SAP.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
The AI Support Assistant is great. It provides comprehensive assistance even on the most difficult issues. I highly recommend this service.
Rate 1
John Jordan
SAP Consultant & Author