Data Model Transformations

Data Model Transformations use ABAP Simple transformations to increase the performance of JSON Serialization.

Feature Explanation

Applications running on Neptune DXP – SAP Edition use REST-based APIs to access services and data in the SAP backend systems.

The payload of each of these API calls is encoded in JSON. To facilitate the delivery of JSON data, the runtime data of the API implementation needs to be serialized from ABAP data types into JSON.

With the Neptune DXP – SAP Edition 2021.1 release, the existing serialization methodology gets a new companion: JSON serialization based on ABAP Simple Transformations.

Depending on the complexity of the data models used, this approach provides significant performance improvements as the data conversion is not handled by explicit coding anymore but leverages the built-in transformation capabilities of the ABAP runtime environment.

For each data model (i.e. SAP- or custom-defined datatypes) to be enabled for Simple Transformations, an XSLT-based transformation program is required. The good news is that these programs will be created and managed by the system for you.

To gain first experience with this new transformation approach, it has to be enabled on a per data model basis either in App Designer or API Designer. Enabling transformations to evaluate the performance impact of specific, critical data models is safe as a fail-safe approach has been implemented. In case any problems occur with specific transformations, the system disables this transformation and switches automatically to the “classic” serialization mode. This way an API call will always return valid data.

Enabling Data Model Transformation in App Designer

Data Model Transformations can be enabled in the App Designer for UI elements with table-like model sources.

data model transformations 1

Enabling Data Model Transformation in API Designer

Data Model Transformations can be enabled in the API Designer on the Response page for a selected operation. Here it is also possible to jump into a detailed view for a given Data Model Transformation.

data model transformations 2

Analyzing Data Model Transformations in the Cockpit

To get an overview of all Data Models enabled for Simple Transformations, the new cockpit app “Data Model Transformation” in the development section is provided.

From the overview of all enabled transformations, you can display the actual XSLT transformation program as well as navigate to a detail page.

data model transformations 3

On the detail page, you can activate a transformation in case it has been disabled due to transformation errors (once the errors have been resolved, of course).

data model transformations 4

In addition, you can check here which APIs and Apps use this data model.

data model transformations 5

System Settings for Data Model Transformations

The usage of Data Model Transformations can be configured with three new settings which are part of the “System” app in the cockpit:

data model transformations 6
  • The “Disable XSLT Transformation” switch lets you disable the usage of transformations globally in case you want to make sure that these have no side effects.

  • The “XSLT Transformation Prefix” will be used as a prefix for all generated transformations which will be placed in the temporary development package $TMP.

  • If you want to be informed about problems with transformations so that they can quickly be addressed, enter a suitable email address in “XSLT Transformation error email address”.

Data Model Transformations and the system landscape

When enabling Data Model Transformations, it is important to know about the relationship between design-time and runtime information. The enablement settings for data models within apps or APIs are part of the design-time information and as such will be transported together with the app or API definitions, e.g. from the development to a QA system.

In contrast, the XSLT source programs for the Data Model Transformation are runtime artifacts which belong to the system where they are generated and executed. As such, they will not be transported between systems.

In case apps or APIs are bound to RFC destinations, the XSLT source programs will only be generated and used in the backend systems which are denoted by the RFC destinations.

Data Model Transformation Housekeeping

The XSLT source programs for the Data Model Transformation are managed in the background.

The nature of these programs requires some housekeeping on a regular basis to keep them in sync with the used data models. Specifically, this includes:

  • Generating transformation programs for transformation-enabled data models where they are missing (especially in non-dev systems).

  • Checking all transformation-enabled data models for changes and updating the corresponding transformation programs.

  • Deleting all unused transformation programs.

This housekeeping is performed by the report /NEPTUNE/DM_TRANS_CHECK. To run this on a regular basis, a background job should be planned for this report, running every hour.

In addition, this report can always be run on demand.

Minimum SAP_ABA Release

This feature requires a minimum SAP_ABA release 750.