1. SAP Glossary
  2. RESTful ABAP Programming Model
  3. RAP foreign entity


What is 'RAP foreign entity' in SAP BC-ESI-RAP - RESTful ABAP Programming Model?


RAP foreign entity - Overview

  • Component: BC-ESI-RAP

  • Component Name: RESTful ABAP Programming Model

  • Description: A RAP BO entity which is not part of the BO composition tree for which it is defined. Defining a foreign entity in the behavior definition enables cross-BO message mapping between the two BOs.


RAP foreign entity - Details

  • Term: RAP foreign entity

    Component: BC-ESI-RAP RESTful ABAP Programming Model

    Definition: In the context of the SAP RESTful ABAP Programming Model (RAP), a 'foreign entity' refers to a business object or data entity that is external or outside the immediate scope of the current RAP service or behavior definition. It typically represents data that is managed by another service or system but is referenced or consumed within the current RAP scenario.

    How It’s Used: RAP foreign entities are used when a RAP service needs to interact with or display data that belongs to another service or domain without duplicating or owning that data. For example, a RAP service for managing sales orders might reference a foreign entity representing customer master data maintained in a separate service. This allows seamless integration and reuse of existing data models while maintaining clear boundaries between services.

    Important Configuration:

    • Define foreign entities in the RAP CDS views using the @ObjectModel.foreignKey.association annotation to establish associations to external entities.
    • Ensure that the foreign entity is exposed via an OData service or accessible through the RAP service layer.
    • Configure behavior definitions to handle associations and navigation properties correctly, enabling read or update operations as needed.
    • Use the RAP service binding to expose the combined data model including foreign entities.

    Already have an account? Login here!





RAP foreign entity - Related SAP 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