Exploring In-app Extensibility

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Use in-app extension tools for enhancing SAP applications

In-app extensibility

SAP S/4HANA Cloud extensibility provides a comprehensive set of tools, platforms, and methodologies to serve the needs of customers and partners. In this lesson, we learn more about in-app extensibility.

The term In-app means that extensions are implemented within the S/4HANA Cloud tenant itself.

In-app extensibility is generally used to apply minor changes and extensions, to increase user productivity or implement adaptations of the application logic without changing the major parameters of the respective business processes. These extensions add value to SAP applications and continue to rely on the full context of the standard implementations with respect to the data, process, and UI levels. Examples are adding custom fields and tables, creating custom Core Data Services (CDS) views, changing or adding business logic via BADIs, rules, code snippets, and so on.

You can implement in-app extensions that satisfy all extensibility qualities. In particular, end-to-end tools enable business experts to apply changes without risk, as the technical complexity is reduced to a level that corresponds to the business purpose and is stable and fault-tolerant, similar to standard office applications. As a result of a strict tool-based approach, these extensions are loosely coupled with core business processes and contribute to a pace-layered IT. This scenario is applicable for the on-premise and Cloud deployment options.

There is a range of several tools available to realize in-app extensions in SAP S/4HANA Cloud.

Exploring tools for in-app extensibility

The tools for in-app extensibility are available as apps in the SAP Fiori Launchpad, under the Extensibility group.

You can use in-app tools to do the following tasks:

  • Easily define custom extensions
  • Adapt and change standard UIs
  • Develop ABAP coding in an embedded editor
  • Replicate data to SAP Business Technology Platform (BTP)
  • Use lifecycle management for export or import of customer objects

The in-app tools automatically create related custom:

  • Data Dictionary (DDIC) fields, structures, and tables
  • Core Data Services (CDS) views
  • OData services for internal and external access
  • SAP Fiori UIs for custom business objects

Introducing the Extensibility Cockpit

Use the Extensibility Cockpit to get an overview of the available key-user options in the delivered apps, and the options available to extend in SAP S/4HANA Cloud through in-app extensibility. This app provides a detailed view of the extensibility options for business contexts associated with the SAP S/4HANA Cloud for Enterprise Management edition.

Some of the key features that are possible within the app are as follows:

  • Filter data based on solution scopes, scope items, or business contexts.
  • Extend the search options to extensible objects.
  • Search for the name and description of related extensible objects.
  • View additional search results before navigating to the objects.
  • Navigate directly to the corresponding object from the Additional Search Results column.
  • Navigate to the SAP Best Practices Explorer for details about a scope item.
  • View information about the availability of a structural or logic enhancement for a business context.
  • View information about extensible objects such as CDS views, APIs (SOAP, ODATA), business logic, and business scenarios.
  • Change the appearance of a result list by sorting, grouping, and reordering data.
  • Navigate to the SAP API Business Hub for details about released APIs.
  • View details about the communication scenario and arrangement for each API.
  • View information about custom fields extended in an app for UIs and reports, email templates, and form templates.
  • View details about a CDS view in the View Browser app.
  • Read documentation about enhancement options.
  • View details about CDS view types (analytical/non-analytical/cube).
  • Navigate to the SAP Fiori Apps Reference Library for details about a UI app.

Introducing the Extensibility Inventory

In contrast to the Extensibility Cockpit, you can use the Extensibility Inventory app to display an overview of your extensibility items and to view associations or dependencies between various extensibility items. You can determine how importing or exporting a given extensibility item would affect other extensibility items.

Introducing custom fields and logic

The Custom Field and Logic App

The Custom Field and Logic app allows you to create your own fields and implement custom logic in the standard apps. Using this app, you can create new fields and add them to the applications and their UIs, reports, e-mail templates, and form templates.

Note
Add new fields to the apps, they should be enabled for key-user extensions. To check this, you can refer to the Extensibility Cockpit app and see the available business contexts.

The Custom Field and Logic app combines three extensibility options: custom fields, data source extensions, and custom logic.

Custom Fields

Perform the following tasks under custom fields:

  • Create a field for a specific business context.

    Hint
    When you publish an implementation description, it is integrated at the designated point of the corresponding application and in the business process in the test system. The implementation description is then executed within the scope of the data set that is relevant to a specific business part. Depending on the business context you choose, the selection of enhancement options are limited to that specific business context.
    Note
    You can choose a business context only if the app that you want to extend is extensible.
  • Make your field available in other languages.
  • Enable field usage to do the following:
    • Make your fields available for UIs, reports, e-mail templates, form templates, and business scenarios.
    • Make the content of your field searchable with free-text search.
    • Specify the aggregation behavior of fields.
    • Publish fields to your test system.
    • Edit fields that have already been published.
    • Discard changes made to a field that was already published, and reset all modifications to get back to the state of the last published version of a field with one click.
    • Delete new fields and previously transported fields.

Custom Logic

Using the Custom Logic app, you can implement designated enhancement points within business processes using custom business logic to extend process behavior.

Custom logic is made possible through available enhancement implementations. Key users can use these BAdI implementations to add the new custom logic. Custom logic also provides the following benefits:

  • Implementation from using ABAP for key users
  • Implementation of custom logic
  • Testing of custom logic, for example, with predefined test variants
  • Creation of filter conditions to define when an implementation is executed
  • Publishing of an implementation to your test system
  • Editing an implementation description that has already been published
  • Deletion of implementations
Note
To extend an app with custom logic, the app must be extensible.

SAP provides pre-designated enhancement points (in the form of BAdIs) for the available business context, which can be implemented to achieve the custom functionality.

Introducing custom business objects

Let's explore what you can do with the Custom Business Objects (CBO) app.

The Custom Business Objects app, allows you to do the following:

  • Create your own business objects and the corresponding database tables that are created automatically by the system.
  • Use an existing CBO to create a new CBO. A prerequisite is that the existing CBO should be published.
  • Create new code lists that can be reused in custom business objects.
  • Generate UIs based on custom business objects for maintenance.
  • Create associations between custom business objects for reuse.
  • Generate OData services for custom business objects by selecting the Service Generation option under the General Information tab. After OData is generated, you can work with the custom business object from an external environment.
  • Publish business objects.
  • Edit business objects that have already been published.
  • Create multiple sub-nodes for one business object.
  • Implement custom logic on node level.
  • Reset business objects to their last published version.
  • Delete custom business objects and custom code lists that have not yet been transported to your production system.
  • Trace the run-time of your custom business objects and contained logic.

Introducing custom CDS views

Generally the data of an application is distributed across several database tables. Custom CDS Views allows you to retrieve data in a way that the system does not offer. Using CDS views allows you to model the data access without changing the underlying database tables. You can rearrange the table fields and describe the metadata of the fields that belong to one object but are located in different databases. In general, CDS views are intended to be consumed by UIs, analytics, or other systems.

To create a new CDS view, you need to choose the Custom CDS Views app in the SAP Fiori launchpad. The new custom CDS view will be created on top of the pre-delivered data sources, like existing views that are built on top of a Virtual Data Model. In addition, you can also use an existing custom CDS view as the data source.

After creating a custom CDS View, you are required to choose one of the following scenarios:

  • Analytical Cube
  • Analytical Dimension
  • External API
  • Standard CDS View

The following features and tasks are supported by custom CDS Views through the Custom CDS Views app:

  • Joining of multiple associated data sources
  • Defining input parameters
  • Selecting elements (columns)
  • Defining calculated elements (columns)
  • Filtering extracted rows

Introducing UI adaptations at run-time

The following video shows the ways in which the user can adapt the UI directly in the running application.

UI Adaptation is not available in any application. For an application to be adaptable, the UI should be built based on SAPUI5 flexibility services. SAPUI5 flexibility services allow you to extend your apps based on your requirements, for example, by creating your own variants or adapting the UI at run-time.

In particular, SAPUI5 flexibility services allow you to manage smart control changes, provide personalization functions for your SAPUI5 apps, and work in multiple layers and store entities in a layered repository. For example, this allows customers to create their own SAPUI5 entities based on the delivery of SAP without having to modify existing entities in a lower layer.

Describing in-app extensibility scenarios

Extensions can happen in various places of the application architecture. The following figure outlines the involved areas.

Managing the lifecycle of in-app extensions

To export and import your software collection (consisting of custom extension items, such as, custom fields, custom logic, e-mail templates, form templates, or queries) that you have created, you can use the Export Software Collection and Import Software Collection apps.

Note
You must add your created extension items to your software collection manually.

When you are transporting custom extensibility objects:

  • Transport from the test to the production system
  • The transport is performed by the key user without interaction with the service provider
  • The transport is independent from SAP updates

The following activities can be performed when using the Export Software Collection app:

  • Create new software collections
  • Add custom extension items to your software collection
  • Merge software collections
  • Check items of your software collection for inconsistencies and dependencies
  • Export a software collection
  • Add to a hotfix export (If you need to export an extension item as hotfix independently of the regular export cycle, you can add the item to a hotfix collection)

The following activities can be performed when using the Import Software Collection app:

  • Check the content of your software collection
  • Check which software collection items, for example, custom fields or custom logic, have been changed or added to a certain software collection version
  • Import a software collection version to the production system
  • Check the log of a software collection version that was imported
  • View the status of the import
  • View the business interruptions
    Note
    An import into the production system might cause interruptions in the applications that are affected by the import. In the case of a high risk of business interruption, it is recommended that you either inform your application users about potential business interruptions, or import your software collection version during a time of minimal workload.

Log in to track your progress & complete quizzes