Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member14709
Contributor
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 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 CDS with language version ABAP Cloud



Outcome: Exposure not allowed


Error Details:


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 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 Cloud with ABAP Programming model for SAP Fiori



Outcome: Exposure not allowed


Error Details:


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 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 wizard


 

Step 2:

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


Enter data model and service binding details


 

Step 3:

Click next to preview generator output before generating the repository objects


Preview generator output


Step 4:

Select Transport Request and click Finish


Click Finish


Step 5:

Test generated service via service binding


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 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
3 Comments
0 Kudos
Hi,

I want to explore ABAP Cloud development (Embedded Steampunk) in on-premise edition;
to connect with the ABAP system in ADT, what are the steps I need to do to be able to provide the ABAP service instance URL? Is this different from the ABAP environment instance created in BTP cockpit?

Regards,
Freddie
former_member14709
Contributor
Hello Freddie,

You can follow detailed steps shared here to setup your ADT

https://developers.sap.com/tutorials/abap-install-adt.html

Once your ADT is setup, you just need to add a new ABAP Project in ADT and select your respective backend system, client and enter your credentials. (Just like you add any other on premise systems in ADT). Exploring embedded steampunk doesn't require any additional installations. Once your backend system is added, you can explore embedded steampunk by changing ABAP language version in your object to ABAP Cloud development (as highlighted in part I of this blog post series). Let me know if you still see any issues.

Good Luck!

Thanks,

Aman Garg
Attila
Active Participant

Hi Freddie,

the feature comparison in this blog is excellent, I just want to emphasize, when You start to work with Embedded steampunk, that do not mix classic and developer extensibility approach. After setting up the ADT project, You need to ensure that Embedded steampunk is set up - through a custom software component - as well for the package You are working in, to have automatic checks and separation.

Check out this official SAP Samples repository for that:

https://github.com/SAP-samples/fiori-custom-plugin-abap/tree/main/exercises/ex_1

Sometimes not everything can be done with developer extensibility approach, because no public API is provided by SAP to call it in your extension code. In that case define a well defined interface between the extension code and the custom code with classic extensibility approach (doing the required job) in a separate "normal package". Maybe later the classic part can be replaced with public APIs.

https://github.com/SAP-samples/fiori-custom-plugin-abap/tree/main/exercises/ex_2

Good luck on this journey!

Attila

Labels in this area