Explaining Developer Extensibility

Objectives

After completing this lesson, you will be able to:

  • Explore ABAP RESTful application programming model BO extensibility.
  • Explore BAdI design.

Developer Extensibility

Developer extensibility allows a clear separation between SAP solutions and programmed extensions.

Developer extensions are oriented towards the traditional ABAP developer persona. Using released extension points, developers are able to implement more complex use cases. Some of the possibilities are as follows:

  • Extensions that require frequent and/or complex SQL access to data
  • Extensions that run in the same logical unit of work (LUW) as SAP applications
  • Extensions that will serve as a remote application programming interface (API) for side-by-side applications

Developer extensions are implemented within the SAP S/4HANA Cloud, ABAP environment (part of the ABAP platform for SAP S/4HANA) using the ABAP Cloud development model. All the building blocks of the model are used, such as using ABAP development tools for Eclipse, the use of public released interfaces, and so on.

Developer extensibility is provided to customers as two possibilities, as follows:

  • ABAP RESTful application programming model extensibility options
  • Business Add-Ins

As with classical extensibility, SAP decides whether and to what degree the two possibilities are offered. Currently over 125 Business Object Interfaces (which list the extensible parts of an ABAP RESTful application programming model BO) and over 800 Business Add-Ins are available to customers.

Implement Extensions By Adding a New Field

Implement Extensions By Adding a New Action

Implement Extensions By Adding a New Validation

Implement Extensions By Adding a New Node

SAP S/4HANA Cloud Business Add-Ins (BAdIs)

SAP S/4HANA Cloud Business Add-Ins (BAdIs)

SAP S/4HANA Cloud Business Add-Ins (BAdIs) are an additional enhancement option available.

SAP S/4HANA Cloud Business Add-Ins (BAdIs) are an additional enhancement option available. The BAdI concept is not new – it has been available as an extension possibility with SAP's ERP platform for many years. BAdIs are object-oriented in their design and implementation and, consistent with the clean core concept, are separate than the underlying SAP object it is extending. Also, as with ABAP RESTful application programming model extensibility, SAP S/4HANA Cloud updates won't affect BAdI extension implementations, and vice versa. For more information, including an example of creating a BAdI implementation, see the exercise Implementing an Extension Using Key User and Developer Extensibility in the Develop Extensions Using SAP S/4HANA Cloud, ABAP Environment course on the SAP Learning Web site.

System Landscape for On-Stack Developer Extensibility

Originally, SAP S/4HANA Cloud was provided to customers in a two tenant landscapes: A quality tenant that was used for development, configuration, and testing activities and a production system, where end users worked in a productive capacity. This setup was sufficient for key user extensibility.

However, because the implementations of on-stack developer extensions require ABAP-based tools along with the associated ABAP code, a slight change in the tenant configuration is necessary. Similar to the traditional on-premise design, separate tenants for development, testing, and production is provided to customers for SAP S/4HANA Cloud. Both key and developer extensions are assigned to transports to be tested and used in productive environments.

SAP S/4HANA Cloud ABAP RESTful Application Programming Model Extensibility

Most artifacts at every layer of the ABAP RESTful application programming model can be extended.

In Unit 3 Lesson 2, Exploring the ABAP Cloud Development Model (ABAP Cloud), we examined the various ABAP RESTful application programming model artifacts, such as ABAP RESTful application programming model BOs and service definitions, and how ABAP Cloud development uses the ABAP RESTful application programming model. ABAP RESTful application programming model extensibility therefore becomes one of the ways that developer extensibility is achieved in SAP S/4HANA Cloud. ABAP RESTful application programming model extensibility offers the capability for customers to create upgrade and lifecycle-stable extensions for ABAP RESTful application programming model BOs on each layer of the ABAP RESTful application programming model stack. The original ABAP RESTful application programming model BO is developed by SAP, and at each layer, SAP can both enable extensibility and also specify what specific types of extensions are permitted. Generally speaking, the types of extensions possible throughout the ABAP RESTful application programming model stack are as follows:

  • Data Model Extensions
  • Field Behavior and Behavior Extensions
  • Node and Service Definition Extensions
  • Data Model Extensions

    These extensions come in two forms database table extensions and CDS view extensions. The concept of adding new fields to a database table is a familiar one to ABAP developers. With developer extensibility, SAP-created tables are explicitly released as extensible via an annotation. SAP also provides an extension structure (also explicitly released as extensible) for the ABAP developer to place the new fields and this structure is explicitly referenced by the table. For CDS views, if an ABAP developer extends a database table with new fields, then any CDS entities dependent on that table is correspondingly extended as well. Similar to the database level, an SAP created CDS view and a linked extension include view (both explicitly released as extensible) is used. This ensures that the CDS view is aware of and can select any new fields created. In addition to new fields, the modeling of new associations is also permitted.

  • Field Behavior and Behavior Extensions

    These extension types enable the ABAP developer to enrich an ABAP RESTful application programming model BO with new behavior. The following are some of the extension possibilities available for customers to utilize:

    • New fields can be added to the original ABAP RESTful application programming model BO model and used in additional field mappings.
    • New actions, determinations, and validations are possible in the original ABAP RESTful application programming model BO.
    • An additional save can be defined and implemented.
    • For draft enabled ABAP RESTful application programming model BOs, new determine actions can be added and the ABAP RESTful application programming model framework supplied determine action Prepare can be extended.
  • Node and Service Definition Extensions

    Closely related to field and field behavior extensions, node extensibility allows for the adding of additional ABAP RESTful application programming model BO entities to an existing ABAP RESTful application programming model BO. For example, a customer-specific table that was not represented in the delivered SAP ABAP RESTful application programming model BO can nevertheless be integrated into it as a new ABAP RESTful application programming model BO extension entity, even though a new BO entity the field and field behavior extensions outlined in the previous section are available to be used for it to ensure proper business logic implemented for the new BO entity. Finally, to make sure the new node is available for service consumption, a service definition can be extended to include the new ABAP RESTful application programming model BO entity.

Extensibility Enablement Versus Extensibility Provisioning

In understanding extensions, the terminology is important to minimize confusion. As with classical extensibility, the determination of whether extensibility is permitted is done by SAP, and hence the term "extensibility enablement" will be used. The actual use of the extension, in other words, the "extending", is done by the customer and the term "extensibility provisioning" will be used as the term of reference.

Implement a Released BAdI

Log in to track your progress & complete quizzes