Skip to Content
Personal Insights
Author's profile photo Aman Garg

Embedded Steampunk – What’s under the hood? Part II

Welcome to Part II of blog post series Embedded Steampunk – What’s under the hood?

  1. How to use Embedded Steampunk in S/4 HANA 2022 on premise system,
  2. RAP as the programming model of choice in Embedded Steampunk(current topic),
  3. Restricted ABAP in Embedded Steampunk with tried out examples,
  4. ADT tips which might be useful.
Hyperlinks to topics #3,4 will be updated here once they are published

Update: The term Embedded Steampunk is now replaced with “The SAP S/4HANA Cloud ABAP Environment”, as suggested in this blog


In part I, we have seen how to use Embedded Steampunk in SAP S/4 HANA 2022 on premise.

Now let’s see how Embedded Steampunk promotes ABAP RESTful Application Programming Model (RAP) as the programming model of choice to build Fiori App and services. We would also see how to generate RAP based services in a few clicks using Generate ABAP Repository Objects.

RAP as the programming model of choice in Embedded Steampunk

Let’s try to create OData services in different ways and see which way is supported in Embedded Steampunk.

1. Generate OData service using OData.publish Annotation

Exposing a CDS with ABAP Language version Standard ABAP as an OData service

Exposing%20CDS%20with%20language%20version%20Standard%20ABAP

Exposing CDS with language version Standard ABAP

Outcome: Exposed successfully

Exposing same CDS with ABAP Language version ABAP for Cloud Development as an OData service (Embedded Steampunk)

Exposing%20CDS%20with%20language%20version%20ABAP%20Cloud

Exposing CDS with language version ABAP Cloud

Outcome: Exposure not allowed

Error Details:

Error%20details

Error details


2. Generate OData service using ABAP Programming model for SAP Fiori

Exposing a CDS with ABAP Language version Standard ABAP using BOPF programming model

Standard%20ABAP%20with%20ABAP%20Programming%20model%20for%20SAP%20Fiori

Standard ABAP with ABAP Programming model for SAP Fiori

Outcome: Exposed successfully

Exposing same CDS with ABAP Language version ABAP for Cloud Development using BOPF programming model (Embedded Steampunk)

ABAP%20Cloud%20with%20ABAP%20Programming%20model%20for%20SAP%20Fiori

ABAP Cloud with ABAP Programming model for SAP Fiori

Outcome: Exposure not allowed

Error Details:

Error%20details

Error details


3. Generate OData service in SAP Gateway Service Builder(SEGW)

Generating OData service via SEGW is not possible because the standard interfaces used in generated MPC/DPC classes are not released, hence not permitted to be used in ABAP Cloud development.

SEGW%20based%20oData%20service

SEGW based oData service

Outcome: Exposure not allowed


4. Generate OData service using ABAP RESTful Application Programming Model(RAP)

Generating an OData service via RAP is usually quick, as it allows us to focus more on implementing business logic than worrying about the technical aspects. What’s even quicker is generating a RAP based OData service with a few clicks through Generate ABAP Repository Objects

Generate ABAP Repository Objects is now available with SAP S/4 HANA 2022 On Premise as well.

Let’s see how to create RAP based service in a few clicks:

Step 1:

Right click on your database table on top of which you want to build the RAP Data model, and select Generate ABAP Repository Objects to open Generator wizard and select Generator ”ABAP RESTful Application Programming Model: UI Service”

Generator%20wizard

Generator wizard

 

Step 2:

Click next and enter data model, behavior, service definition, service binding names and select binding type

Enter%20data%20model%20and%20service%20binding%20details

Enter data model and service binding details

 

Step 3:

Click next to preview generator output before generating the repository objects

Preview%20generator%20output

Preview generator output

Step 4:

Select Transport Request and click Finish

Click%20Finish

Click Finish

Step 5:

Test generated service via service binding

Generated%20Business%20Service

Generated Business Service

Outcome: Exposed Successfully

This way we created a fully functional RAP based Business service in a matter of few clicks 🙂

Also, as you can see below, ABAP Language version for the generated objects is marked as ABAP for Cloud Development (Embedded Steampunk)

ABAP%20for%20Cloud%20Development

ABAP for Cloud Development


Conclusion:

  1. Publishing an OData service with annotation @OData.publish fails in Embedded Steampunk with error “Use of annotation OData.publish is not permitted”
  2. Publishing an OData service with ABAP Programming model for SAP Fiori fails in Embedded Steampunk with error “Use of annotation ObjectModel.CompositionRoot is not permitted”
  3. Publishing an OData service with SAP Gateway Service Builder(SEWG) is not allowed as the interfaces used in generated classes are not released.
  4. Publishing an OData service with ABAP RESTful Programming model (RAP) works smoothly on Embedded Steampunk.

This way, it’s safe to conclude that RAP is the programming model of choice in Embedded Steampunk for OData exposures.

Hope you liked the post. Please share your thoughts in comments, or connect with me on LinkedIn.

In the next blog post, I would highlight restricted ABAP in Embedded steampunk with tried out examples, so stay tuned 😉

Thanks,

Aman Garg

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.