Defining and using naming conventions ensure consistency in the names used by all the developers on a project. This posts summarizes the naming conventions recommended by SAP for the RAP Development Objects.
The overall object name will be split into 3 parts.
For custom object, the namespace can just be Z. Your project can also have a namespace like ZAB_ etc.
Prefix is used to differentiate between different types of same development object. For example, Root Entity and Projection Entity can be differentiated using the prefix.
This can be any meaningful text separated by _ characters. For example, customer_name.
Suffix can be used for additional differentiation between different types of development objects. For example, a service binding with UI service can be named with suffix _V2 for OData version 2 and _V4 for OData version 4.
With this explanation, let us understand how the RAP development objects can be named. For the examples the namespace used is ZJP_.
ABAP Dictionary Objects
|Database Tables – Persistent|
|Database Tables – Draft|
|Interface CDS Entity (Root CDS Entity)|
|Base CDS Entity|
|Projection CDS Entity|
|Behavior Definition – Root||Same as root CDS Entity|
|Behavior Definition – Projection||Same as projection CDS Entity|
|Metadata Extension||Same as the related CDS entity|
|Service Binding for UI Service with OData V2||UI_||_O2|
|Service Binding for UI Service with OData V4||UI_||_O4|
|Service Binding for Web API||API_|
Source Code Objects
|Behavior Pool||BP_ |
The naming conventions can also be checked in the ABAP Flight Reference Scenario. This contains many reference services which can help you learn more about ABAP RAP. Check for package /DMO/FLIGHT_LEGACY.
The code can be also downloaded from github link https://github.com/SAP-samples/abap-platform-refscen-flight.
Reference : https://help.sap.com/docs/btp/sap-abap-restful-application-programming-model/naming-conventions-for-development-objects
Visit ABAP RESTful Application Programming Model to explore all articles on ABAP RAP Model.
If you like the content, please subscribe…