ABAP platform 1809, the latest release of the on-premise ABAP platform — is a thorough foundation for SAP S/4HANA and SAP S/4HANA Cloud. In addition to delivering improvements to the Eclipse-based ABAP development tools that enable the efficient development and enhancement of business applications, ABAP platform 1809 includes optimizations that help SAP customers take full advantage of the underlying capabilities of SAP HANA and the features of SAP S/4HANA.
Here we look at three key optimizations for SAP HANA and SAP S/4HANA that are delivered with ABAP platform 1809: the ability to use SAP HANA hierarchy and abstract entities in core data services, support for adapting custom code for SAP S/4HANA, and enabling machine-to-machine (M2M) communication.
Using SAP HANA Hierarchy and Abstract Entities in Core Data Services
With ABAP platform 1809, for the first time, the ABAP stack can focus exclusively on SAP HANA without having to ensure that corresponding features are available on other database platforms as well. One key feature that is supported only by SAP HANA is hierarchies, which are not well handled on the SQL level since you need to model them as tables. In principle, you could define a two-column table in SQL, with a column for parent and a column for child, but this approach becomes unwieldy if you need to compute the descendants (such as grandchildren) — in this case, you would have to define join operations of the table with itself, known as self-joins, which are not easy to handle.
In traditional ABAP, these types of hierarchies were typically handled on the application server level using internal tables. With ABAP platform 1809, you can use the SAP HANA hierarchy functions in-memory on the database level using the new keyword DEFINE HIERARCHY (see Figure 1). Supported by core data services, you can easily navigate to subordinate levels and access nodes and branches of a given hierarchy without the need to introduce internal tables on the ABAP language level. The new hierarchy functions can also be used in ABAP SQL, which is the name for Open SQL as of ABAP platform 1809, because SQL no longer focuses on supporting any database, but instead on full optimization of the ABAP layer on top of SAP HANA.
Another important improvement is the definition of abstract entities in core data services using the new keyword DEFINE ABSTRACT ENTITY. Abstract entities, such as database entities, have a structure consisting of fields, but they are not stored in a table. They correspond to structure definitions in the traditional ABAP Dictionary. They can be used in metadata extensions to define the user interface, similar to how structures are used in Dynpro and Web Dynpro development.
Making the transition from SAP Business Suite to SAP S/4HANA means adapting your custom code for SAP S/4HANA, which uses a different data model than SAP Business Suite.1 ABAP Test Cockpit is a central entry point for beginning this transformation and shepherding you through the adaptation. ABAP Test Cockpit has been a strong analysis tool for identifying incompatibilities between your custom SAP Business Suite code and SAP S/4HANA — however, you have to fix the errors manually when making the conversion to SAP S/4HANA.
With ABAP platform 1809, ABAP Test Cockpit offers quick fixes for commonly identified issues that you can apply with a single mouse click. Figure 2 shows an example that often occurs in the SAP HANA context, where a binary search operation in ABAP requires a sorted result, but the SQL standard is not sorted by default. In this case, you need to append the addition ORDER BY PRIMARY KEY, which is supported by the quick fix functionality. This approach saves a significant amount of development time and also increases code quality.
In addition, ABAP platform 1809 introduces highly graphical SAP Fiori-based reporting applications, such as the one shown in Figure 3, to support you with scoping and analysis capabilities, and to guide you through the transition. Objects that are out of scope won’t be imported to get rid of unused code.
Enabling M2M Communication
Due to the growing popularity of IoT scenarios, the Message Queuing Telemetry Transport (MQTT) protocol, which was designed to support M2M communication in industrial IoT scenarios, has generated a lot of interest for enabling real-time data updates and the ability to react to events on the fly. MQTT supports this capability by offering a lightweight publish-and-subscribe infrastructure where clients can send and receive messages through a message broker.
With ABAP platform 1809, the ABAP stack can act as an MQTT client that can publish messages and receive events, similar to the ABAP channels infrastructure. Figure 4 shows the implementation of an MQTT client that connects to a public MQTT broker and publishes a message to that broker.
In this way, MQTT can be used to extend SAP S/4HANA and SAP Cloud Platform in an event-driven way, taking advantage of the IoT and machine learning capabilities included with SAP S/4HANA, and enabling real-time analytics and responsiveness with the speed provided by SAP HANA.
1 For a detailed look at this process, see the SAPinsider article “A Simplified Way to Bring Your Custom Code to SAP S/4HANA” (Issue 2 2018) available at SAPinsiderOnline.com. [back]