1. SAP Glossary
  2. RESTful ABAP Programming Model
  3. RAP function


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


RAP function - Overview


RAP function - Details

  • Term: RAP function

    Component: BC-ESI-RAP RESTful ABAP Programming Model

    Definition: A RAP function in SAP refers to a reusable, encapsulated piece of business logic or service operation defined within the RESTful ABAP Programming Model (RAP). It enables developers to implement specific actions or behaviors on business objects, such as validations, calculations, or side effects, which can be invoked via OData services or UI elements.

    How It’s Used: In real SAP projects, RAP functions are used to extend standard business objects with custom logic or to implement transactional operations that go beyond simple CRUD (Create, Read, Update, Delete) actions. For example, a RAP function might be created to approve a purchase order, trigger a workflow, or perform complex data validations before saving. These functions are typically called from Fiori apps or external consumers via OData services, ensuring a clean separation of concerns and reusability.

    Important Configuration:

    • Define RAP functions in the ABAP Development Tools (ADT) within Eclipse as part of the RAP business object behavior definition.
    • Implement the function logic in the behavior implementation class using ABAP methods.
    • Expose RAP functions via OData services by including them in the service binding.
    • Use the RAP function annotation syntax to specify input parameters, return types, and transactional behavior.
    • Test RAP functions using SAP Gateway Client (transaction /IWFND/GW_CLIENT) or Fiori apps.

    Already have an account? Login here!





RAP function - Related SAP Terms

Rating
ERPlingo simplifies finding the accurate answers to SAP message errors. I now use every week. A must have tool for anyone working with SAP! Highly recommended!
Rate 1
Kent Bettisworth
Executive SAP Consultant