Skip to Content
Technical Articles
Author's profile photo Carine Tchoutouo Djomo

Be prepared for the ABAP Programming Model for SAP Fiori

You’ve surely already heard about the ABAP Programming Model for SAP Fiori for building state-of-the-art, intrinsically SAP HANA-optimized web-based apps in SAP S/4HANA [If not, then get started here] and maybe even played around with it, but you are still on SAP Business Suite – optimally on SAP HANA.

This is the situation for the vast majority of SAP’s customers and partners right now in 2017, but sooner or later they will get in touch with the Digital Core, that is SAP S/4HANA!

As a developer or development manager, the questions at this stage are surely about how to best prepare yourself, your team and the new custom application developments for this new world – as this is just a matter of time until you get in touch with the digital core that is SAP S/4HANA.

[update] Note that this blog is also applicable to be prepared for the ABAP RESTful Application Programming Model (aka ABAP RESTful Programming Model) which is the evolutionary successor of the ABAP Programming Model for SAP Fiori.
Learn more: Get started with the ABAP RESTful Application Programming Model (RAP)

Introduction

The ABAP Programming Model for SAP Fiori has been introduced with the ABAP release 7.50 SPS01, first only supporting the development of read-only Fiori apps, and then successively enhanced and improved with the following ABAP releases.

The ABAP Programming Model for SAP Fiori is based on proven technologies such as Core Data Services (CDS) for the data modelling and access, OData protocol for the service exposure and the business object processing framework for the transactional processing.

The picture below gives an overview of the end-2-end stack:

Figure: ABAP Programming Model for SAP Fiori – Big Picture

 

Here are the major deliveries up to date – i.e. until SAP NetWeaver AS ABAP 7.52:

AS ABAP 7.50 SPS01 Read-only SAP Fiori apps
Starting with this release, the development of read-only SAP Fiori (Elements) apps thru easy OData exposure of CDS-based data models.
Such data model can be enriched with domain-specific annotations – e.g. Analytics, search, SAP Gateway and more.
AS ABAP 7.50 SPS05 “Batch-input”-like SAP Fiori apps
Starting with this release, simple transactional SAP Fiori apps can be built using the CDS-BOPF integration where the CDS-based BOPF framework handles for the transactional processing.
AS ABAP 7.51 SPS02 Interactive SAP Fiori apps with draft handling
Starting with this release, you can build more complex transactional SAP Fiori apps using the CDS-based BOPF framework for the transactional and draft handling (incl. locks).

 

Different development guides are available on the SAP Help Portal to help you getting started with the development of the different application types.

With AS ABAP 7.52, various enhancements and improvements for the different application types – incl. supportability and access control enhancements have been delivered. But note that the programming model is still evolving and further major deliveries are on their way. Read more on this in the Outlook section of this blog.

Hence it is important for you to understand where to invest now in order to make yourself ready for the “new world”.

Recommendations

You may have already seen the slide below somewhere – e.g. at SAP TechEd 2017 session S4H140 or in blogs. If not yet, then check it out here!


The slide above provides a list of recommendations meant to guide you for a best preparation for the future. They are meant for application developments where the ABAP Programming Model for SAP Fiori cannot be used. The reasons for that may be that you’re not yet on SAP S/4HANA or your application requirements cannot be fulfilled with the current function scope of the ABAP Programming Model for SAP Fiori – e.g. the use of legacy write APIs.

Let me restructure the different recommendations a bit and briefly elaborate on them.

 

YOU SHOULD

Follow the programming model and best practices and use…

  ABAP Core Data Services (CDS)
ABAP CDS provides a powerful data modelling infrastructure enabling advanced view building in the ABAP stack. It is the go-to infrastructure for view building in ABAP and plays a central role in SAP S/4HANA – especially for the CDS-based virtual data model and the ABAP programming model for SAP Fiori.

Availability: ≥ AS ABAP 7.40 SPS 05 | DocumentationGetting Started with ABAP CDS 

  ABAP CDS Access Controls
ABAP CDS has its own data control language (DCL) which provides a declarative approach for the access control on CDS entities.Such an authorization access is declared once for a given CDS view and automatically used every time the view is consumed – everywhere.

Availability: ≥ AS ABAP 7.50 SPS10 | Documentation

 ABAP CDS Metadata Extension (MDE)
CDS MDE are used to enrich CDS-based data models with UI-specific semantics which are UI technology agnostic, i.e. @UI annotation.It offers a separation of matters by separating UI metadata from the back-end relevant metadata.

Availability: ≥ AS ABAP 7.51 SPS 02 | Documentation | Compact Intro

 Classic Business Object Processing Framework (BOPF)
If you’re working on ABAP releases ≤ 7.50, the classic BOPF in transaction BOBX or in the eclipse-based BOPF modelling editor will allow you to modularize your custom business object logic similarly to what is done within the ABAP programming model for SAP Fiori using determinations, validations and actions.Note that a lightweight, CDS-based BOPF is used within the ABAP programming model for SAP Fiori where the BOPF business objects are automatically generated out of the given CDS-based data models. BOPF concepts like actions, determinations, validations and authorization checks are still valid.

Availability: ≥ SAP ERP 6.0 EHP5 (SAP_BS_FND 7.02) | Documentation  | BOPF Feature Availability Matrix

 SAP Gateway integration of CDS or BOPF
Regarding the code-based implementation of OData service in transaction SEGW, we strongly recommend the use of the mapped data source option in ABAP 7.40 and referenced data source option as of ABAP 7.50, together with CDS entities.For these service implementation options, the SAP Gateway runtime offers generically the read-only OData calls including goodies like sorting, filtering and text search for CDS views out of the box.

The reference data source (RDS) option is the option used within the ABAP Programming model for SAP Fiori and is also the valid approach for the use of legacy write APIs – like BAdIs/Function modules – when building new SAP Fiori apps since this scenario is not yet supported by the ABAP programming model. This option is also to be used for cross BO scenarios.

Whenever possible make use of the SEGW RDS together with CDS.

Availability: ≥ AS ABAP 7.40 | DocumentationOData service development options | SAP Gateway Foundation Developer Guide

 Floorplan Manager (FPM) Integration of CDS or BOPF
In case you have to build new Web Dynpro ABAP-based applications, then use CDS and the FPM SADL integration or the FPM BOPF Integration.

Availability of FPM SADL Integration: ≥ AS ABAP 7.40 | Documentation
Availability of FPM BOPF Integration
: ≥ SAP EHP 5 for SAP ERP 6.0 (SAP_BS_FND 7.02) | Documentation

 

DO NOT

Implement things that are already solved:

   Manual implementation of read-only OData calls to Database
Instead of implementing yourself the read-only OData calls again and again when building SAP Gateway service in transaction SEGW, use the mapped data source or -better- the referenced data source option instead. The advantages of these two options are already explained in the DO’s section. 

 Business logic mixed with technical aspects
(e.g. locks, authority-check, LUW handling, persistency)
This is nothing new, but just the re-emphasizing of a general good development style which is to encapsulate the different business logic paths of a given application and decouple them from surrounding technical aspects such as locks, authority checks, LUW handling and persistency. For example, BOPF offers dedicated exits for authority checks.By doing this, you’re able to easily reuse your custom business logic at different places with less effort – i.e. in different scenarios/applications.

 Business logic mixed with protocol specific APIs
(e.g. PBO/PAI modules)Similarly to the previous recommendation, when manually implementing your SAP Gateway services in transaction SEGW, do not put your custom business logic directly in the predefined SAP Gateway extensions classes (ending with DPC_EXT), but instead decouple it, so it can be reused easily somewhere else.

 

BENEFITS

Reuse / Prepare your skillset and custom coding for the future – i.e. SAP S/4HANA

  Reuse CDS-based data models and access controls in SAP S/4HANA
CDS is a cornerstone technology in the Digital Core and offers the basis for the ready-to-use, semantically enriched, CDS-based virtual data model (VDM) on top of which the applications are built in SAP S/4HANA. [Read more in this blog about VDM] Thus starting working with CDS – both, the data definition language (DDL) and data control language (DCL) – as soon as possible will be of advantage for you in the “new world”. 

Easy reuse of modularized and decoupled custom business logic
for implementing business object behaviours in different applications and scenarios. 

Lower TCD for the future: Minimal investment on technical protocol level
The ABAP RESTful Programming model will be supporting the OData V4 protocol and the application runtime will be switched to the new protocol under the hood.

Outlook

The ABAP Programming Model for SAP Fiori can already be used today to build SAP HANA-optimized Fiori apps, but it is still evolving. Thus do expect new deliveries to come with the future ABAP platform releases in order to optimize the total cost of development (TCD) with the goal of providing the ABAP RESTful Programming Model.

The main investment areas of the future development are:

 Enhancement of the ABAP Language to provide a native support of the business object concepts (BO as first-class ABAP citizens)

 Support of typed APIs for default business object implementation tasks

 Avoidance of code generation

 Support the integration of legacy write APIs

 End-to-end OData V4 support

 Optimization of the end-to-end development flow

 Improvement of testability and supportability

 Enablement for the definition of UI semantics in the SAP Web IDE

For more road map details, check out the recording of session S4H140 at SAP TechEd 2017.

You may also be interested in general recommendations about what you can do today to prepare your custom ABAP code for SAP S/4HANA. Find this information here.

[Update] Check these blogs: Evolution of the ABAP Programming Model | Getting started with the ABAP RESTful Application Programming Model (RAP)

Back to the top

Related Information:

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Nic Teunckens
      Nic Teunckens

      Nice Summary ...

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Carine,

      Thanks for your summary!

      Nevertheless when I read the headline, I hoped to find something about BDL, Service Binding and Service Definition here as well 🙂 - Maybe this will be included in some upcoming Blogs?

      Best regards,

      Sebastian

       

       

      Author's profile photo Former Member
      Former Member

      Thanks Carine 🙂

      Would really appreciate if we get more vide tutorials of the BOPF based draft handling and transactional app development techniques.

       

      Regards,

      Prasenjit

       

      Author's profile photo Aliaksandr Shchurko
      Aliaksandr Shchurko

      Thanks!

      Author's profile photo Florian Henninger
      Florian Henninger

      What I would love to see is an ongoing tutorial / learncontent which guide you through all the necessary steps with a simple scenario in the beginning, an advanced in the middle and an complex in the end to really have the oppurtunity to see through the jungle and find the village you want to live:-)

      The begin is there, having the developer-editions. Just that I mention that we are on track. We just need to go on.

      ~Florian

       

      Author's profile photo Julian Phillips
      Julian Phillips

      I just found this blog, and I want to say that I think this is a very important topic for those of us currently using a HANA based solution - and looking to the future. We need to prepare ourselves for the next big step, and here you have given plenty of pointers for how to do that, so a really good and interesting blog. I plan to write a blog myself pretty soon discussing steps we plan to take to more to a more CDS based solution, which is a part of the steps you have described here.

      One of the current blockers for us;  is that Fiori and BOPF are only fully compatible for LUW processing in 7.52. Current released versions of the on premis ECC can only run on 750, so it is still really a little early to be switching to Fiori based BOPF solutions at the moment for us, we are probably a year away from that currently, and this must also apply to many other SAP customers. By this I mean that current BOPF based applications built for FIORI cannot retain and manage database locks between sessions, once the user session drops, the locks are still retained and you have a problem. Apparently 752 resolves this problem.

      Thanks once again for an interesting read!

       

      Author's profile photo Pavan Golesar
      Pavan Golesar

      Hey,

      The blog is very nice and informative!! 🙂

      Thanks,

      Pavan G