SAP RAP Tutorial : Naming Conventions for Development Objects


๐Ÿ“˜ Introduction

Welcome to our SAP RAP Tutorial and ABAP Development Guide for SAP RAP on Mastering ABAP RAP.

When developing applications using the ABAP RESTful Application Programming Model (RAP), maintaining consistent and meaningful naming conventions is crucial. SAP RAP promotes a structured approach to naming development objects, which enhances readability, maintainability, and collaboration across teams.

In this blog, weโ€™ll explore the standard naming conventions used in RAP development and how they help streamline your ABAP projects.

If you want to familiarize yourself with ABAP RAP, you can check our blogs on SAP RAP Tutorial – ABAP RAP Business Objects: Mastering Composition vs. Association or Mastering ABAP RAP: Your Guide to SAPโ€™s Modern Development Model to get an introduction.


๐Ÿงฉ General Naming Structure

The standard format for naming development objects in RAP is:

[/<namespace>/][<prefix>]_object_name_[<suffix>]

Namespace

  • Use a custom namespace reserved for your organization.
  • Avoid using /DMO/, which is reserved for demo purposes.

Prefix

  • Indicates semantic differences between similar object types.
  • Example: UI_ for UI service bindings, API_ for Web APIs.

Suffix

  • Adds additional context, such as protocol version or development guide type.
  • Example: _O2 for OData V2, _M for managed scenario.

๐Ÿ—‚๏ธ Naming Conventions by Object Type : SAP RAP Tutorial

๐Ÿ“ ABAP Dictionary Objects

Database Tables

  • A_ for active data
  • D_ for draft data
    Example: /DMO/A_TRAVEL_D

๐Ÿ“„ CDS Views

TypePrefixDescription
Interface ViewI_Defines reusable interfaces
Base ViewR_Core data model
Projection ViewC_Consumption layer
Extension IncludeE_Enhances existing views

Suffix: Use TP for transactional processing
Example: /DMO/R_AGENCYTP, /DMO/C_Travel_Processor_M


โš™๏ธ Behavior Definitions

  • Same name as the root entity of the business object
    Example: /DMO/C_TRAVEL_M

๐Ÿงพ Metadata Extensions

  • Same name as the related CDS entity
  • Use numbered suffixes for multiple extensions
    Example: /DMO/C_BOOKING_U_M2

๐ŸŒ Business Services

Service Definitions

  • Typically no prefix/suffix unless reused for both UI and API
    Example: /DMO/TRAVEL_U, /DMO/UI_TRAVEL_U

Service Bindings

  • Prefix: UI_ or API_
  • Suffix: _O2 or _O4 for OData versions
    Example: /DMO/UI_TRAVEL_U_O2

๐Ÿง‘โ€๐Ÿ’ป Source Code Objects

Behavior Pool Classes

  • Prefix: BP_
    Example: /DMO/BP_TRAVEL_U

Handler & Saver Classes

  • Prefixes:
    • LHC_ for local handler
    • LSC_ for local saver
      Example: LHC_TRAVEL_CREATE, LHC_BOOKING_CUD

โœ… Best Practices : For SAP RAP Tutorial and Beyond

  • Stick to consistent naming across all layers of your RAP application.
  • Use semantic prefixes and suffixes to clarify object roles.
  • Avoid using demo namespaces in production environments.
  • Align naming with the development guide type (e.g., _R, _M, _D, _U, _C).

๐Ÿ“Œ Conclusion

Following SAP RAP naming conventions ensures your ABAP applications are clean, scalable, and easy to maintain. Whether you’re building transactional apps, APIs, or Fiori UIs, these guidelines help you stay organized and aligned with SAP best practices. Going forward in our SAP RAP tutorial we will try to stick to these conventions.

SAP RAP tutorial, ABAP RAP naming conventions, CDS views, service bindings, ABAP development guide, SAP Fiori, OData services

Read the next tutorial – SAP RAP Tutorial: Understanding the ABAP Flight Reference Model

2 thoughts on “SAP RAP Tutorial : Naming Conventions for Development Objects”

    1. Thank you so much! I’m really glad you found the post helpful. Absolutelyโ€”I’ll be sharing a step-by-step RAP tutorial soon to make it easier for everyone to follow along and build confidently. Stay tuned!

Leave a Comment

Your email address will not be published. Required fields are marked *