As per the description on the event community page, this session is about the newly added RAP extensibility options and the easy exposure of business events in RAP-based applications.

The session was hosted by  Rich Heilman and inlcuded following guest speakers.

  • Marcel Hermanns, RAP Product Lead
  • Gururaj Raman, Development Expert S/4HANA Product Engineering
  • Dr. Martin Mueller, Product Owner RAP Business Events
  • Daniel Wachs, Lead Architect RAP Extensibility

Marcel started the session with below image where he highlighted the broad adoption of RAP in SAP S/4 HANA. He mentioned that 300 standard RAP Business Objects are already available.

Here, in addition to On-Stack Developer Extensibility options available with Embedded Steampunk – new options would be available using RAP Business Events for Side-by-side Extensibility.

Guru the showed a quick RAP Extensibility Demo for Sales Order Scenario. Here, a standard app offered as part of S4 HANA Cloud is enhanced with custom requirement to manage a Gift Card.

The standard application is a Fiori Element application based on OData V4 service created using RAP.

The gift card would only be applicable on a certain condition, and the amount needs to be applied as a discount through pricing procedure. User would take decision on when to apply the gift card, hence a button is needed as well.

The extensions can be applied only on released artifacts and the changes would be lifecycle stable and upgrade stable.

This would be available from specific versions and Marcel did address this question here.

Technical aspects of the RAP Extensibility are then explained by Daniel.

From developer point of view there were below extensions

  • Additional field for Gift Card Amount
  • Action on the user interface
  • Action created new pricing element to apply describe
  • Action was only enabled when amount was above 50 i.e. action had a feature control

Technical details to achive this extension

  • Find what objects are extensible by adding Released Objects in the repository tree by Right Click > New > ABAP Repository Tree
  • To search for RAP object we can look for BDEV (Behavior Definition) and also the area in which we want to search. [type:BDEV api:RELEASED] At this point I thought it would have been nice if the video resoution was better – later the font was increased.
  • Business object would look like below
  • The next steps would be to extend the database table using extension include and then extending the CDS View using the CDS extension using CDS View extension. This is for the root view.
  • Similarly projection / comsumtion views are also extended
  • Then the behavior definition is extended with the new field and feature control for the button
  • The instance feature method is implemented in the behavior definition class
  • In the same class a new pricing element is created

In order to understand the video, you would need to be familiar with the RAP basics. Visit SAP RESTFull Application Programming Model if you are not familiar with RAP.

Daniel also explained a bit about the RAP extensibility – levels and suggested to visit the blog Embedded Steampunk – Some more details for ABAP developers.

The RAP documentation is available at SAP Documentation Portal. If the link is not working search with SAP – ABAP RESTful Application Programming Model on https://help.sap.com/.

There is a new section available now for extensibility.

There is important annotation that helps keep the extensions are stable during upgrade. This is new in cloud which we did not have in classic ABAP. The extension suffix is to be used for the fields to be used – fieldname_suffix.

There are certain Limitations like – we can not use custom fields in feature control logic that we need to be aware of as well.

Advanced Extensibility Options like Validation and Determinations

Source

Here, the advanced extensibility options such as Determination and Validations are discussed. In this example, an extended field is validated and error message is displayed in case of error.

These options are only available for Managed Scenarios currently and the behavior definition has to be extended for this.

Next extensibility option discussed was adding a new composition to business object. The annotation allow new composition tells whether this is applicable.

I did not find these options in the Trial ABAP system. I hope it will be realeased soon there for trials.

The session then moves to RAP Business Events which are covered by Dr. Martin Mueller, Product Owner RAP Business Events. In his words, business event is a kind of a message broadcast to indicate that something is changed in the system that interested consumers can pick up and react accordingly.

A sample business event would look like below.

Source

The event will also be coded in Behavior Definition and will be raised in the related class. Later an event binding would be created.

Gururaj then took over to show the application of event in an example of sales order. SAP Event Mesh screen is used to monitor the events.

He also showed unmanaged implementation where the event is raised in similar way as in managed.

My take on the session

This is a must watch session if you are interested in SAP RAP programming or you are ABAP developer as this is the future. I kept thinking that the session video quality could have been better as the image blurred out a lot of times specially when text with small font came up, but its not something that would take away your learning experience.

( Disclaimer : This article is only expected to raise your interest level to go and visit the actual event video. This is not a complete article on RAP extensibility and limits the commentry to the topics discussed within the session)

Check out Devtoberfest Learning Experience 2022 series to find my take on the ABAP sessions.


If you like the content, please subscribe…

Join 4,017 other subscribers

Discovering ABAP YouTube Channel