Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
ulrike_liebherr
Advisor
Advisor

Introduction

In the Create Custom Business Objects in SAP S/4HANA Cloud tutorial group it is shown how to create a custom business object and generate a UI (user interface) in SAP S/4HANA Cloud, public edition.

Some restrictions apply for SAP S/4HANA and SAP S/4HANA Cloud, private edition (both referred to as SAP S/4HANA from now on). This blog will show how to handle these restrictions and complement the tutorial group in SAP S/4HANA since release 2022.

The restrictions are:

  • Lifecycle management: transportation itself is done using Change and Transport System (CTS), but extensibility apps support assignment to packages and transport requests. Additionally, own namespaces can be created.
  • The OData service that underlies the application must get exposed by oneself.
  • The User Interface cannot be generated but needs to be implemented manually using VS Code or Business Application Studio.
  • Fiori Launchpad content and roles need to be maintained using corresponding transactions.

Note that there exist two different deployment options for SAP Fiori (see documentation: Deployment Options)

  • Standalone (hub) deployment: This scenario features an SAP Fiori front-end server (hosting the Fiori launchpad and applications) that is deployed on a standalone system decoupled from the backend components.
  • Embedded deployment: This scenario features an SAP Fiori front-end server deployed along with the backend components in the same system.

When you set up a new SAP S/4HANA system, the recommended setup of SAP Fiori is the embedded scenario. Therefore, this blog focuses on the steps that need to be performed in an embedded deployment scenario. For standalone (hub) deployment, the steps are quite similar and there are just minor differences. For instance, when activating the OData service, the corresponding system alias needs to be selected. These differences will not be detailed in this blog since they are not specific to custom business objects. However, it will be explicitly mentioned what steps need to be performed on the SAP Fiori front-end server.

Lifecycle Management/ Transportation

If you want to develop content as a key user in your SAP S/4HANA development system and that content shall be transportable to other systems like test and productive systems you must set up the Adaptation Transport Organizer, short ATO. For instance, you must specify a prefix or namespace that shall be used for the extensions and define a local package where the extensions are stored initially. ATO provides the option to use a default setup. In this case, the prefix is ZZ1_and the local package is TEST_YY_KEY_USER_LOCAL. How to set ATO up is described in documentation: Configuration Information: Adaptation Transport Organizer.

At creation, key user objects are put to the local package and are not transportable as you can see in App “Register Extensions for Transport” (see documentation)


Custom Business Object is not transportable

To be able to transport the Custom Business Object you must create a package first or decide for a matching existing one (see documentation: Configure Software Packages). In the “Configure Software Package” App you next add a registration for your chosen package and configure it for Automatic Request and Task Handling. For instance, you can configure that a transport request and tasks shall be created automatically if needed.

Configure Software Package

Now you must reassign your custom business object from the local package to the registered package and make it transportable by that.

Custom Business Object is transportable

After development is finished you release your transport request in via the Transport Organizer transaction (code: SE09).

Expose UI service

If you have a custom business object you have to tick the “Back End Service” feature for that (see tutorial: Create the UI for a Custom Business Object > Step 1: Generate UI). By this you have defined a service to build a UI on. Its name can be seen below the ticked “Back End Service” feature once it got published.

Custom Business Object Backend Service Details

However, the service is still not ready to use for UI development yet. You must expose this OData V2 service on the SAP Fiori frontend-server for usage next, see documentation “Activate and Maintain Services”.
Create a new package and transport request on the SAP Fiori frontend-server. The package can be created via the Object Navigator transaction (code: SE80) or the Package Builder transaction (code: SE21). Even if the SAP Fiori front-end server is embedded, do not put the front-end server related objects to the package that contains the custom business object, since service exposure artefacts (and UI and launchpad artefacts later) cannot be managed via ATO and this provides a clear separation between frontend and backend artifacts.

  1. Log in to the SAP Fiori front-end server of your SAP S/4HANA system via SAP Logon.
  2. Start transaction “Activate and Maintain Services” (code: /iwfnd/maint_service). Press “Add Service”
  3. Choose “Co-deployed” (1) (not in case of SAP Fiori standalone deployed systems, see documentation: Deployment Options), enter the “Technical Service Name” (2), that you get shown in the Custom Business Object App (in this example ZZ1_BONUSPLAN_CDS), in the corresponding field and press “Enter” (3). The service will be shown in the result list. Select the service (4) and press “Add selected Services” (5)
  4. In the appearing pop up, enter your package and confirm the addition.
  5. Choose the transport request that was generated for that package.

This registration activates the service and makes it ready to use.

Develop and deploy the UI

As you could see before, the Custom Business Object does not provide the feature to generate a User Interface in SAP S/4HANA.

Instead, you must implement the UI yourself with either Business Application Studio or Visual Studio Code and deploy it to the SAPUI5 ABAP repository of the SAP Fiori front-end server. How to do that using Visual Studio Code you can see in tutorial: Create a SAP Fiori Online Shop App and Deploy it

Following differences will arise:

  • Bonus plan example is used.
  • The package is not created in an eclipse with ABAP Development Tools plugin (short ADT), but you reuse the one that you created on the SAP Fiori front-end server at the service exposure.
  • Use the Bonus plan service for the project in Visual Studio Code
  • When defining the deployment configuration give that package from the SAP Fiori front-end server and its transport request
  • Instead of ADT you can also see the so far created artefacts in transaction “Object Navigator” (code: SE80).


Add UI to FLP

After the deployment, the app is available in the SAP Fiori front-end server of the SAP S/4HANA system. To make it accessible to users,

  • Create a launchpad app descriptor item including tile and target mapping in a technical catalog using the Fiori Launchpad App Manager,
  • add a tile/target mapping reference from the technical catalog to a business catalog using the Launchpad Content Manager,
  • add the tile of the business catalog to a launchpad page using the Manage Launchpad Pages app,
  • add the launchpad page to a launchpad space using the Manage Launchpad Spaces app,
  • add the business catalog and launchpad space to a role using the Role Maintenance transaction,
  • and assign the role to the user.

To achieve that you can follow tutorial: Add the Online Shop Fiori Application to FLP. Following differences will arise:

  • Bonus plan example is used.
  • When creating the semantic object and technical catalog ensure to use the transport request for the service exposure, UI and FLP artefacts package.
  • When creating the launchpad app descriptor item, give the action name “maintain”.
  • Instead of ADT you can also see the created artefacts in transaction “Object Navigator” (code: SE80).
  • Authorizations of the Business Role look different as CBO services are OData V2 (and not V4) services.

For more detailed information refer to the SAP Fiori Launchpad documentation.

4 Comments