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
Product and Topic Expert
Product and Topic Expert
10,372

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 differences 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 differences and complement the tutorial group in SAP S/4HANA since release 2022.

The differences 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 custom business object and all generated and created artefacts can be displayed but must not be changed with SAP Logon in corresponding transactions, most of them in transaction “Object Navigator” (code: SE80)
  • The OData service that underlies the application must get exposed by oneself.
  • To generate the user interface, SAP note 3458562 (“Downport of CBO on-premises UI generation“) needs to be present in the system.
  • 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 mostly 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. It will be explicitly mentioned what steps need to be performed on the SAP Fiori front-end server. However, the generated UI resides in the backend system. That is, for a standalone (hub) deployment, you cannot use the generated UI but you need to develop the UI and deploy it to the front-end server yourself.

1. Lifecycle Management/ Transportation

If you want to develop key user objects 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 transportableCustom 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 PackageConfigure Software Package

Alternatively, you can leave Automatic Request Handling switched off and always provide a modifiable transport request before implementing the custom business object.

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 transportableCustom Business Object is transportable

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

2. Expose the OData service

In the Custom Business Objects Fiori app, 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 DetailsCustom Business Object Backend Service Details

However, the service is still not ready to use 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.

3. Create the UI

3.A. Generate the UI

This step is done in case you will use the UI generated in the S/4HANA system.
In the Custom Business Objects Fiori app, tick the “User Interface” feature. By doing this the UI with Business Server Page (BSP) Application and semantic object get generated at publishing. The SAPUI5 Component ID and Semantic Object are shown below the “User Interface” checkbox afterwards.

Custom Business Object Backend Generated UI DetailsCustom Business Object Backend Generated UI Details

The BSP application is generated into the same package as the custom business object. In transaction “Object Navigator” (code: SE80), you can view it and retrieve its BSP ID.

CBO package in SE80 shows BSP ApplicationCBO package in SE80 shows BSP Application

You can view the generated semantic object in transaction “Display Semantic Objects - Customer” (code: /ui2/semobj).

Generated Semantic Object in /UI2/SEMOBJGenerated Semantic Object in /UI2/SEMOBJ

Be reminded that this step requires release 2022 SP05 or 2023 SP02 and higher or the implementation of SAP Note 3458562 - Downport of CBO on-premises UI generation. Additionally, it’s only available in an embedded deployment scenario.

3.B. Develop and deploy the UI

You can also implement a 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. This might be relevant for you, if the generated list report application does not fulfill your requirements, or in case of a standalone (hub) deployment.

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).


4. Add UI to FLP

After the deployment or generation, 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.
  • In the case of generated UI, the semantic object will be created automatically, and you do not need to maintain it manually.
    When creating the semantic object and technical catalog ensure to use the transport request for the service exposure and FLP artefacts package. In the case of generated UI this package also contains the UI.

  • 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.

6 Comments