Using the Key-User In-App Extensibility Tools in SAP S/4HANA Cloud Public Edition

Objectives

After completing this lesson, you will be able to:

  • Explain the SAP Fiori apps to use when identifying which extensions have been made or can be made
  • Change the UI of an app and create a custom field
  • Add a custom logic Business Add-In (BAdI)
  • Create a custom user interface
  • Create a custom business object
  • Customize Output Management templates
  • Transport key user in-app extensions

In-App Extensibility Capabilities

In-App Key User Extensibility in SAP S/4HANA Cloud

In-app key user extensibility allows adapting standard functionalities to user requirements without the need for any external tools. Whether you want to apply small changes, such as hiding standard fields for specific user groups or including business logic that triggers a change to happen, there are a variety of apps on the SAP Fiori Launchpad designed to cover diverse extensibility needs. The SAP Fiori apps are targeted to administrators and other "specialists", who have a deep knowledge of the product or a line of business area, but not a technical knowledge in coding.

Note
Check which role is required for your business user to access an application on the Fiori launchpad by looking up the relevant app in the SAP Fiori Apps Reference Library.

Here's a brief overview of what you can do with the in-app key user extensibility tools:

  • Change and adapt the UIs of SAP Fiori apps by moving fields around on the screen and/or adding additional fields that are available to be used for an app UI, but don't display by default.
  • Create custom fields that can be added to existing Fiori app UIs or to custom UIs.
  • Create your own custom templates or extend the standard forms and email templates that are associated to different business processes.
  • Enhance the current business process by creating custom business logic that triggers a change to occur.
  • Create a new custom user interface based on a custom business object, or that simply has an embedded URL to link to a company website or other webpage.
  • Create custom business objects that can be used for analytical scenarios or to generate a simplified application where the business object is a table with data that describes different attributes related to the object. For example, banking information is contained in the Bank business object, but there are many fields within the business object that describe its characteristics, including name, address, SWIFT code, and others.
  • Create customer-specific CDS Views that can be used in analytical scenarios or to generate an API to expose data for use in an external app.
Note
The management of data in an extension scenario deviates from the management of data in the standard scenarios. You are responsible for ensuring that the data used in an extension scenario is managed in accordance with any applicable legal requirements or business needs, such as data protection legislation or data life cycle requirements. Please note that the extensibility framework is currently not integrated in the privacy-by-default functionality. Therefore, the extensibility framework should not be used for the processing of personal data if this processing falls under any applicable data protection legislation.

Does this app support the in-app extensibility framework?

Before we can begin working with the extensibility apps on the launchpad, we need to understand how to determine whether or not an SAP Fiori app supports the extensibility framework, how to keep track of who is making changes, and whether or not an extension has been exported/imported to other systems.

We'll take the Create Customer Projects and Plan Customer Projects apps as an example:

  1. First, look up the app using it's name in the SAP Fiori Apps Reference Library. If you are looking up an app from a test script, use the Overview Table to find the app ID. IDs are generally easier to use when searching the library. For example, both apps described in this example display as two different apps on the launchpad, but they have the same app ID, so you will only find one of them in the reference library (Plan Customer Projects).
  2. Next, scroll to the bottom of the information on the Product Features tab to find linked text that says, "Read more in App Documentation". Click the "App Documentation" - it points you to the app information in the SAP Help Portal.
    Note
    If the app is supported for all deployments of SAP S/4HANA, it's important to select "SAP S/4HANA Cloud" from the drop-down menu at the top of the screen. This makes sure you are sent to the app information in the public cloud area of the SAP Help Portal.
  3. In the SAP Help Portal, look for a section titled "App Extensibility" below the title of the app in the navigation menu. If the app isn't supported with the extensibility framework, you won't see this text. If the app is supported with the extensibility framework, you will see a dedicated section that you can select to find more information about the types of extensibility supported.
  4. After selecting the App Extensibility link, we see the business contexts available to make extensions to, and that both custom fields and custom logic are available. Custom fields are described in the UI Elements table, and custom logic is described in the BAdI (Business Add-In) table.

Extensibility Cockpit App

After learning we can make extensions with both custom fields and custom logic for the Create/Plan Customer Projects apps, we can now look up the relevant business context in the Extensibility Cockpit app in SAP S/4HANA Cloud. Each business context has a set capacity and different types of extensions take up more or less space in the capacity. For example, a custom free-text field that allows 300 characters is going to take up significantly more context capacity than a free-text field that allows 30 characters.

If someone else has made extension(s) in that same context, there will be less capacity for us to work with, however the extension the other person made might be something we want to reuse so we don't have similar/the same extensions created by different people. Extensions made within a business context can be easily used across related apps that also use that same business context. In the Extensibility Cockpit app, you can explore the available options to extend an SAP app by filtering on the type of extension, solution scope, scope item (business process), or business context. This app helps you gather information when planning or preparing to build an extension.

Extensibility Inventory App

After I make an extension, it needs to be exported from the customizing tenant of the development system, and imported to the test and production systems. The Extensibility Inventory app is used to track who last made changes to the specific extension, and whether it's been exported/imported. This app is the master library of all extensions made within the extensibility framework and helps you view associations or dependencies between them.

Fiori User Interface Adaptation & Custom Fields

Adapt Fiori UI at Runtime

Even if an app doesn't support adding custom fields, most SAP Fiori apps support some type of UI adaptation. This type of customization is also referred to as "runtime authoring", because you are editing the application while it's running. Changes made in the UI adaptation mode can be saved and published to the transport log. Fields can be moved around by "dragging and dropping" or right-clicking with your mouse to see all options. If two fields are selected by holding the Shift key, they can be combined to display side-by-side. If you change your mind, they can be separated again, or you can undo the change.

After changes are imported to the production system, end users will see the customized app screen. Only users with permission to turn on this runtime authoring mode will see the option available from the user menu when in an application. The key is to make sure you have permission to both the app you want to edit, and the Administrator or Extensibility Specialist business role to make the adaptation function available.

In addition, you can create variants of apps for specific use cases (countries, organizational units, user groups). UI changes made to the original app or a variant are not applied to other variants. However, if the UI of the original app gets changed outside of this authoring mode, for example in a release upgrade, the new UI changes will be applied on top of the changes already made to the original app and all variants of it.

Activate new version of app & publish

After you've made changes you're satisfied with, use the Navigation tab to test the app out as an end user. The Visualization tab shows you where changes have been made. If everything performs well, select the "wand" icon in the top left corner to activate a new version of the app. The "truck" icon will then become visible so you can publish the changes to the transport log. These changes will now be visible in the Extensibility Inventory app, and can be added to a software collection to export them from the customizing tenant of the development system.

Learn more about Adapting SAP Fiori UIs at Runtime in the SAP Help Portal.

Create custom fields

Custom fields are created in the Custom Fields app. You can make a single custom field available to be used across other related apps (important for continuity of data), reports, email/form templates, and APIs. After a field is created, it needs to be added to relevant app UIs using the UI adaption functionality previously discussed. For reports, it can depend as some reports are analytical dashboard apps where you would use Adapt UI, where others could be ad-hoc reports (like a custom CDS view) where you pick and choose which fields to include. Email and form templates use a separate editor to pull in custom fields.

After making the field available for other related areas, select the Save button, then Publish. Publishing is a scheduled job that can take up to 30 minutes to fully process.

Note
  • Read access logging is not provided for custom fields.
  • Custom fields cannot be marked as relevant for Data Protection & Privacy (DP&P) and cannot be blocked or deleted. Generic mechanisms for DP&P compliance do not cover DP&P-relevant content in custom fields.
  • Learn more about the Custom Fields app in the SAP Help Portal.

Custom Business Logic

Create custom business logic

Custom logic triggers something to happen in the system that doesn't already occur by default. SAP has a variety of released Business Add-Ins (BAdIs) that can be added to different applications using the Custom Logic app.

After you've identified a BAdI to implement, navigate to the Custom Logic app to select the correct BAdI. Because business logic is written in ABAP code, the View Documentation link provides information about what is possible to change/control within the code. After you create and publish the BAdI, you may choose to open the Code Editor to view the ABAP code that has been generated.

View the Business Add-In (BAdI) code

If you want to make further changes to the standard code, you can view the sample code that shows you correct syntax in this specific situation. The Custom Logic app is one of the few areas in the customizing tenant where you will see code, but only if you specifically look for it in the Code Editor. In most cases, there won't be any reason to do this, because the code for the BAdI that you select is already generated when you create and publish it. If you make changes to the code that are not supported, the editor simply won't allow you to save or publish. This is a very controlled method of making small changes that trigger other things to occur in the SAP S/4HANA Cloud system with no developer knowledge. After implementing a BAdI, you should always test it out.

Learn more about the Custom Logic app in the SAP Help Portal.

Custom UIs

Create a custom app to display on the Fiori launchpad

You can create apps that display on the Fiori launchpad and link to external applications or websites with the Custom Tiles app. For example, you could link to a specific Build Workzone page the customer has created to provide HR information to their employees, or a custom application created with Build Apps.

When you create a new app for the launchpad, always remember that end-users cannot access it unless they have permission (through a business catalog assigned to a business role) and the structure of where the app will display on the launchpad is defined (through a launchpad page assigned to a space, assigned to the same business role as the business catalog.

From within the Custom Tiles app, you can navigate directly to the Custom Catalog Extensions app, which is where you publish the tile to an existing business catalog. Afterward, you navigate to the Manage Launchpad Pages app to add the new tile to an existing launchpad page.

Assign the app to a business catalog, then to a launchpad page

For example, if we create a custom tile that links to a website relevant for all employees, I need to figure out which business catalog would be most suitable for this app. The Employee business role generally includes apps relevant for all employees in the organization, so I can navigate to the Maintain Business Roles app to look at the business catalogs assigned to this role. The existing HCM - Employee Self Service catalog looks like a good fit for my new app. Within the Custom Tiles apps, I can navigate directly to the Custom Catalog Extensions app to publish my new app to the HCM - Employee Self Service business catalog.

Next, I need to add the new app to a launchpad page assigned to a launchpad space that is already assigned to the Employee business role. Again, in the Maintain Business Roles app I can look up the assigned launchpad space and page(s) for the Employee business role. I see the space, SAP_BR_EMPLOYEE includes one page, BR_EMPLOYEE, with the apps My Inbox, My Outbox, and My Queries.

You cannot edit an SAP-delivered space directly (IDs that start with SAP_ or BR_), but you can remove the original space and re-assign it in an editable form by selecting "Create Spaces Based on SAP-Delivered Spaces". This allows you to make a copy of the original space that you can make changes to. The space ID should change to ZBR_EMPLOYEE and the page ID should change to ZBR_EMPLOYEE.

If I'm already in the Maintain Business Roles app looking at launchpad spaces assigned to the Employee business role, I can navigate directly to the Manage Launchpad Pages app by selecting the assigned space, then the assigned page I want to edit. After adding my new app to the launchpad page, I can save and navigate back to the Employee business role. Now, I assign the role to my user and refresh my browser to see the new app display on the launchpad.

Learn more about creating custom tiles in the SAP Help Portal.

Custom Business Objects

Create a custom business object

A business object is a term used to describe an artifact in an ERP system. A single business object can have one or more nodes (entities) that describe it in a hierarchical structure, one or more fields (attributes) that store data about the business object, and transactional operations that allow you to create, update, and delete business data for that object. A business object could be a document (customer invoice, employment contract), legal entities (customer, bank), or physical objects (material, inventory item).

Before creating a custom business object, make sure it doesn't already exist in the SAP S/4HANA Cloud system. The Graph Navigator (select the sap.s4 entity) can be a resource to see entities that already exist in SAP S/4HANA Cloud and their attributes. In the event a business object doesn't exist for what the customer requires, you can use the Custom Business Objects app to create a custom business object. Custom business objects can be used to generate database tables, services (APIs), UIs, and applications.

After creating the initial business object information, select the relevant features. For example, check the box, User Interface to generate an app UI from the object. You could also check the box, Can Be Associated to allow yourself to create a custom field that you add to an app UI to call the business object in the future. One node is automatically generated to match the object name, and you can add additional nodes below it, if necessary. Last, enter data for the fields that will hold information that describes the object or is related to it. If we generate an app UI from the object, these fields will be visible on the screen when you open the app.

Assign the business object to a business catalog and view the app UI

After publishing the business object, you can add business logic. In addition, you'll see a link titled Maintain Catalogs on the General Information tab. Select this link to jump into the Custom Catalog Extensions app where you need to assign the business object to an existing business catalog.

After assigning the app to a catalog, assign the role that includes this catalog to your user and refresh your browser. Once you have permission to access the app UI, you'll see the link Go to Generated UI become available in the business object. Click this link to explore the new app. Remember, the app will not display on the launchpad unless you add it to a launchpad page connected to a launchpad space that is mapped to the same business role as the business catalog.

Last, consider how the business object will be used. Do you need to link to the business object from another application? If so, does that application support custom fields? In the Custom Fields app, you can create a custom field with an association to a standard business object that already exists in the system, or a custom business object you've created.

Learn more about creating custom business objects in the SAP Help Portal and in this tutorial.

Customized Email and Form Templates

SAP S/4HANA Output Control & Output Parameter Determination

SAP S/4HANA Output Control is the framework used by business applications in SAP S/4HANA Cloud to perform different types of output. When a document is generated, the relevant output parameters (output channels, recipients, form templates) are automatically determined in the background with output parameter determination. Use the Output Parameter Determination app if you need to make changes to the standard output settings. For example, removing the default master form template and associating a custom master form template. The app allows you to create and maintain business rules in decision tables that determine what to output, who are the receiver(s), communication channel for the output, and the look of the output.

Forms and master forms are used to structure the content and layout of the output. To create documents out of these forms, Adobe Document Services is used. Documents can be output through the channels: PRINT, EMAIL, and EDI (electronic data interchange). Learn more about Adobe Document Services Configuration in the SAP Help Portal.

For example, previewing a PDF form in Adobe Reader is considered "printing" a document on an ad-hoc basis. A previewed document could also be sent to a local printer in the customer's company network. In a cloud environment, the back-end system does not have a connection to the local printers in the customer's network, so a communication arrangement (integration) needs to be set up to establish this connection. To define the end-point where a document should be sent, a print queue needs to be set up in the Maintain Print Queues app to represent the output channel to a local printer. Additional details are described in the SAP Help Portal.

Maintaining Output Templates

For business processes that generate form or email templates, there are already standard templates pre-loaded in the SAP S/4HANA Cloud system that are connected to the relevant business processes. For example, if a sales person creates and releases a sales order, the system determines the document should be sent by email to the customer. The system creates a PDF file using the form template defined in the output parameter determination settings, then sends the PDF as an email attachment to the customer. If no error is returned by the e-mail server, the email appears with the status Sent in the monitoring app, Display Email Transmissions.

One person on the implementation team should be identified to handle the end-to-end setup of the business process, Output Management (1LQ). This business process includes set-up instructions and a test script to address the setup of printers and email, defining output determination parameters and communication channels, and customizing master form templates with corporate branding (logo, header/footer.

Customizing individual form and email templates are also covered in the Output Management (1LQ) business process, however individual templates should be handled by the line of business (LoB) configuration expert responsible for configuring the business processes that generate these individual (application) form or email templates. There may be some overlap between forms relevant for different LoBs, so it's helpful to use the Forms accelerator document from SAP Signavio Process Navigator to identify which forms are mapped to different business processes. The Forms accelerator is located in the SAP Best Practices for SAP S/4HANA Cloud Public Edition solution scenario ⇒ Accelerators tab ⇒ Reference tab ⇒ Forms.

Maintain Email Templates

The standard email templates in the Maintain Email Templates app consist of fixed content (such as subject or disclaimer) and variable parts (such as the form of address). To make changes to a predelivered template, make a copy of the standard template and edit the custom template. For example, if a company is rolling out multiple countries, there may need to be language-specific variants defined for certain email templates.

If a custom email template is created, either from scratch or by copying the standard template and editing, it needs to be assigned to the relevant business process. Learn more about assigning custom email templates to a business process.

To monitor email transmissions in the event there are errors with sending email notifications to the correct receiver(s), use the Monitor Email Transitions app. Due to data protection reasons, emails in this app are deleted from the table view after 30 days. You can also send a test email to any recipient you choose using this app to verify outbound emails are successfully being sent by the system.

Note
Customized templates are created in the customizing tenant of the development system and must be transported to the test and production systems to be usable/visible to end users in the relevant business processes.

Manage Logos & Manage Texts Apps

Use the Manage Logos app to upload, download, edit, and delete company logos that can be added to master form templates. The app also provides information about how many and which master forms use a specific logo.

Use the Manage Texts app to create, edit, and delete standard texts that can be added to master form templates. For example, a standard company header or footer with address details. The app also provides information about how many and which master forms use a specific text.

Types of Form Templates

There are three types of form templates:

  • Master forms define the overall layout of the pages (for example, page size and orientation, title, or logo), and contain placeholders for the content of logos, sender addresses, and footer blocks that are dynamically filled based on the output parameter determination. Learn more about editing master form templates.
  • Application forms provide the business content of the output by referencing one layout variant of a master form template and adding their content to the form. Learn more about editing application form templates.
  • Standalone forms do not use a master page and combine content and layout in one form template.
Note
Only print forms are supported within SAP S/4HANA Cloud. To use interactive forms, a customer would need to subscribe to the SAP Forms Service by Adobe running on the SAP Business Technology Platform and an integration needs to be set up to connect the service with the SAP S/4HANA Cloud system. Learn more about the technical setup of the SAP Forms Service by Adobe in the SAP Help Portal.

Maintain Form Templates

The standard form templates in the Maintain Form Templates app already include translations for the countries they are relevant for. To edit a form template, make a copy of the standard template and download the template in the original language. Templates can be downloaded in XDP (XML Data Package) or XSD (XML Schema Description) format:

  • XDP files are intended to be an XML-based companion to PDF that allows a PDF to be transformed into XML and back to PDF without losing information. These files can be opened in Adobe Livecycle Designer to make text and formatting changes. Adobe Livecycle Designer needs to be downloaded as a desktop application through the Install Additional Software app.
  • XSD files store content as plain text and therefore can be opened by any text editor program. Use this format if you do not have access to Adobe Livecycle Designer and only need to make text changes.

If a custom form template is created, either from scratch or by copying the standard template and editing, it needs to be assigned to the relevant business process. Learn more about assigning custom form templates to a business process.

Note
Customized templates are created in the customizing tenant of the development system and must be transported to the test and production systems to be usable/visible to end users in the relevant business processes.

Transporting In-App Extensions

Exporting software collections

All key user in-app extensions must be exported from the customizing tenant of the development system with the Export Software Collection app, and imported to the test and production systems with the Import Collection app.

In the Export Software Collection app, you create a software collection and add the extension items you want to release. Items with dependencies need to be exported in the same collection. For example, a custom business object with it's corresponding custom catalog extension need to be exported and imported together. Select Check to identify if there are errors or dependencies in your software collection before exporting. If there are dependencies not included in the collection already, select Add Missing Items to include them. Select Export to release a standard software collection, or Hotfix to release a collection with fixes to extensions you've already exported/imported previously.

Learn more about exporting software collections in the SAP Help Portal.

Import Collection App

The Import Collection app is used to import all types of extensions, including key user in-app extensions, business content changes from SAP Central Business Configuration, and developer extensions done in the development tenant of the development system.

Extensions are first imported to the test system where they can be thoroughly quality tested. After an extension is finalized in test, it can be forwarded to the production system from within the Import Collection app. To make the extension usable for end-users, the Import Collection app must be used in the production system to finalize the import.

There are several import types:

  • Manual, where the import was manually triggered by a person.
  • Manual (forecast), where the system expects the collection will need to be manually addressed, potentially due to a failure or issue with the collection.
  • Automatic, where the software collection was imported automatically. This happens between SAP Central Business Configuration and the customizing tenant of the development system with business content.
  • Automatic (scheduled), where the software collection was imported based on a schedule defined in the automation settings.
  • Not relevant, where collections with the status Outdated or Discarded are not relevant to import anymore. For example, if a collection is not imported prior to a release upgrade, and after the upgrade, an enhancement or extension in the collection is not supported by the latest software version.

Keep in mind, importing items can lead to business interruptions. For example, a user could be working in an app in the productive system while items are being changed in that same app with a software collection import. There is a column in the Import Collection app titled, Business Interruption, which indicates if the interruption risk is high or low for each specific import. Importing collections with high risk should be done during off-hours, when very few users are active in the system.

Note
Export, import, and forwarding are NOT possible when the system is being prepared for an upgrade. This usually occurs a few days before the actual upgrade occurs over the weekend.

Learn more about importing software collections in the SAP Help Portal.

Log in to track your progress & complete quizzes