You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exercise 1: Generate and Inspect your Exercise Package
Introduction
In this exercise, you will generate and make yourself familiar with your exercise package ZRAP110_###, where ### is your assigned suffix.
This generated package will contain an OData-V4-based UI service and all the RAP artifacts required for this workshop. The UI service is based on a managed Business Object (BO) with two entities, travel and booking, with generic transactional behavior - i.e. CRUD: Create, Read, Update, and Delete.
For your convenience, the class ZDMO_GEN_RAP110_SINGLE is provided to you to generate the package ZRAP110_### alongside with the aforementioned RAP business object after execution. You can find the steps in Exercise 1.1.
For ⚠ ASUG 2023 TechConnect users
Please skip step 1.1., because the packages have been pre-generated for convenience in the dedicated workshop system.
🔵 Click to expand!
Right-click Favorite Objects and click Add Object.
Search for ZDMO_GEN_RAP110_SINGLE, select it and click OK.
Right-click ZDMO_GEN_RAP110_SINGLE, select Run As > ABAP Application (Console) F9.
Now your package is created. Check the ABAP console. ⚠Copy the suffix for later use.
Get to know the generated ABAP development objects.
Regarding ⚠ warnings about missing CDS access controls
Please ignore the warnings about missing access control that will be displayed for the CDS views entities ZRAP110_R_TravelTP_###, ZRAP110_C_TravelTP_###, ZRAP110_R_BookingTP_###, and ZRAP110_C_BookingTP_###. These is due to the view annotation @AccessControl.authorizationCheck: #CHECK specified in these entities.
Due to time constraints, we will not define CDS access control in this workshop.
You can suppress these warnings by changing the annotation value to #NOT_REQUIRED.
🔵 Click to expand!
Go to the Project Explorer, select your package ZRAP110_### and check all generated ABAP repository objects
Below is a brief explanation of the generated artefacts for the different RAP layers: Base BO, BO Projection, Business Service, and addtional help classes.
Base Business Object (BO) Layer
Base BO Nodes Travel and Booking
Object Name
Description
ZRAP110_R_TravelTP_###
(aka Root Base BO view): This data definition defines the data model of the root entity Travel which is the only node of our business object).
ZRAP110_R_BookingTP_###
(aka Child Base BO view): This data definition defines the data model of the child entity Booking which is the only node of our root BO entity).
ZRAP110_R_TravelTP_###
(aka _Base BO behavior): This behavior definition contains the definition of the standard transactional behavior of the root base Travel BO entity and the child base Booking BO entity. It is a managed and draft-enabled implementation.
ZRAP110_ATRAV### and ZRAP110_ABOOK###
(aka Active tables): These database tables are used to persist the consistent data from travel and booking instances respectively at runtime. It is managed by the RAP framework.
ZRAP110_DTRAV### and ZRAP110_DBOOK###
(aka Draft tables): These database tables are used to temporary store the data from draft travel and booking instances at runtime. It is managed by the RAP framework.
ZRAP110_BP_TRAVELTP_### and ZRAP110_BP_TRAVELTP_###
(aka Behavior pool): These ABAP classes are used to provide the implementation of the behavior defined in the behavior definition ZRAP110_R_TravelTP_### and ZRAP110_R_BookingTP_### of the base Travel and Booking BO nodes.
BO Node Projection Nodes Travel and Booking
The BO projection represents the consumption specific view on the BO data model and behavior.
Object Name
Description
ZRAP110_C_TravelTP_###
(aka BO projection view): This data definition is used to define the projected data model of the root entity Travel relevant for the present scenario. Currently almost all fields of the underlying base BO view are exposed and the definition of metadata extension is allowed using the view annotations @Metadata.allowExtensions: true.
ZRAP110_C_BookingTP_###
(aka BO projection view): This data definition is used to define the projected data model of the child entity Booking relevant for the present scenario.
ZRAP110_C_TravelTP_###
(aka BO behavior projection): This behavior definition exposes the subset of the underlying base Travel and Booking BO entities which is relevant for the present scenario using the keyword use.
ZRAP110_C_TravelTP_### and ZRAP110_C_BookingTP_###
These metadata extension are used to annotate the views ZRAP100_C_TravelTP_### and ZRAP100_C_BookingTP_###respectively and their elements with UI semantics via CDS annotations.
Business Service
Object Name
Description
ZRAP110_UI_TRAVELTP_###
A service definition is used to define the relevant entity sets for our service and also to provide local aliases if needed. Only the Travel entity set is exposed in the present scenario.
ZRAP110_UI_TRAVELTP_O4_###
This service binding is used to expose the generated service definition as OData V4 based UI service. Other binding types (protocols and scenarios) are supported in the service binding wizard.
Additional generated ABAP Classes
Object Name
Description
ZRAP110_CALC_TRAV_ELEM_###
These ABAP classes are used to provide the implementation of the travel virtual elements calculation.
ZRAP110_CALC_BOOK_ELEM_###
These ABAP classes are used to provide the implementation of the booking virtual elements calculation.
Now, check the local service endpoint of your service binding ZRAP110_UI_TRAVEL_O4_###, and use the preview to test the Travel app by creating, updating an deleting travel instances and booking instances.
🔵 Click to expand!
Now start the Fiori elements App Preview for the Travel entity set.
For that, either select the entity set Travel in the Entity Set and Associations section and press the Preview button or simply doubleclicking on it.
The Travel app will be started in your browser.
Create, update and delete travel and booking entries.
Only the generic CRUD - i.e. create, read, update, and delete - logic is available for now. You will enhance the BO behavior in the next exercises.