SAP Fiori for SAP S/4HANA, SAP Fiori, SAP S/4HANA, SAPUI5

SAP Fiori for SAP S/4HANA – New options for managing Views for filters tables and charts

Views are often the quickest and easiest way to personalize, adapt and extend your SAP Fiori apps. They are extremely useful! Views provide a way to save and reuse settings for filter bars, tables, and charts in many apps. SAP provides a Standard view as a default everywhere views are used.

Example of the My Views dialog in SAP Fiori apps showing the Standard view as the currently selected view

Customers tell us they are so useful, the temptation for business users can be to create too many views, resulting in some unintended confusion over which view to use. So with SAP S/4HANA 2021 there are new and changed options to bring you greater control over who can create views and who can use views.

TLDR; The new launchpad configuration parameter UI5FLEX_ENABLE_VARIANTS lets you control who can create views and where, including letting users create public views in production. You can see the SAP Help Portal documentation in the SAP Fiori launchpad guide > Administration Guide, and section Launchpad Configuration Parameters. Public views can now be created locally, without requiring a transport. Transportable public views can now be created and assigned to specific roles by key users using Adapt UI.

In this blog post you will learn about the main features of views and how these new SAP S/4HANA 2021 capabilities work. You will learn:

  • What’s new for views in SAP S/4HANA 2021
  • How to use existing views
  • How to create views – both personal and public
  • How key users create role-specific views
  • How to control view options centrally
  • Where to find out more about views

What’s new for Views in SAP S/4HANA 2021

In SAP S/4HANA 2020 and lower releases:

  • All users could create personal views.
  • Only authorized users could create public views.
    • Public views were transportable and required a transport request to be assigned to the user
  • You could change who was permitted to create public views using SAP Note 2658662 – Configurable key user check for public/shared views (variants)
    • From SAP S/4HANA 2021 this note is obsolete.

From SAP S/4HANA 2021:

  • You can control whether users can:
    • Create personal views and public views, or
    • May only create personal views
  • You can even control whether users are permitted to create views at all, that is restrict them to only using existing views.

IMPORTANT: Both personal and public views are created as local views. Local views are not transportable and do not require a transport request or software collection. Local views are created in the current system/client (in SAP S/4HANA Cloud, Private Edition or SAP S/4HANA On-Premise) or in the current tenant (in SAP S/4HANA Cloud, Public Edition).

There are also some changes in how public views are handled:

In SAP S/4HANA 2020 and lower releases:

  • Public views were always transportable. To create public views, you needed:
    • The ability to transport the views, for example you needed to be assigned a transport request

From SAP S/4HANA 2021:

  • Public views can be created locally in the current system/client
    • Public views can be used by everyone
    • Public views created locally are not transportable
  • Key users using Adapt UI, i.e. UI Adaptation at Runtime:
    • Can create and save public views that can be used by everyone
    • Can create and save public views restricted to selected business roles, i.e. create role-specific views using the Adapt UI feature
    • Can set views as the default view for every user who has not yet set their own default view
    • Views created using Adapt UI can be transported

These new features give you more control over who can create public views. They also bring more control over which business users will see the public views you have created.

For example, if you have a lot of users and want to avoid too many public views being created, you could:

  • In your Sandbox environment, permit everyone to create local personal and public views to try them out
  • In your Development environment, permit everyone to create personal views and authorize key users to create transportable public and role-specific views.
    • You then transport the key user views to your quality/user acceptance testing and production environments
  • In your quality/user acceptance testing and production environment you could:
    • Decide if you want to allow personal views or not
    • The only public views would be key user created views

If you only have a few users and they work well together, you may just allow anyone to create personal and public views in all your environments.

Or you may decide on to let your users create public views for a limited time only, and then change your configuration settings back to restrict them to creating personal views.

How to use existing views

Views are specific to an app. Views can be created:

  • Dynamically for immediate use but not saved
  • Saved for personal use as a business user, i.e. Private Views
  • Saved for use by everyone, i.e. Public Views
  • Saved for use by people assigned to certain roles, i.e. Role-Specific Views.

As a business user, you can find your views in the My Views dialog in your apps. By default SAP provides a Standard view wherever views apply.

You can use the Manage option to find existing views and add them to your favorites.

My Views dialog showing the Save As and Manage actions

You can mark any views you want to see in My Views as your favorites and optionally choose to make a view your default view. You save your changes.

In the Manage Views dialog you can mark views as your favorites and choose your default view

When you see the views in your My Views dialog, you simply select the view to apply it.

Selecting a predefined view in the My Views dialog

How to create views

All apps that use views provide a default Standard view, i.e. the SAP delivered view.

To change the view, you use:

  • Adapt filters for Filter bars
  • Settings (gear wheel icon) for Tables and Charts

Any changes are applied and can be used immediately – without saving.

Example of where to find views, adapt filters, and the settings icons in SAP Fiori apps

You can tell you have made a change because a * appears next to the view name indicating the change has not been saved. To save a view you press the View dropdown to access the My Views dialog.

Example of the View name followed by * indicating that the current view settings are not saved

In the My Views dialog you use Save As to save your view.

My Views dialog showing the Save As action

How to save a Personal View

Personal views can only be seen by you.

Simply give your view a name and save it.

Saving a View as a Personal View

Tip: The Apply Automatically option seen for filter views is the equivalent of saying “and press Go immediately”.

You can optionally make your view your personal default. This means the view is shown immediately, whenever you enter that app. For example, in a list report, such as Manage Sales Orders, you can set your favorite table columns, sort order and grouping by using a table view and setting as as your default view for that app.

Personal saved views can be set as your default view

Your current view is shown in the views dropdown menu and you can swap between any of your views.

Personal saved views appear immediately as your current view

Personal views are always local and cannot be transported.

How to save a Public View

Public views can be seen by everyone.

You follow much the same process as when you create a personal view.

When you name the view you also choose the option Public.

Saving a view as a Public view by selecting the Public checkbox

In SAP S/4HANA 2020 and lower releases, when you selected the Public checkbox you would be prompted for a transport request.

From SAP S/4HANA 2021, public views created in this way are local public views and cannot be transported.

IMPORTANT: In SAP S/4HANA 2021, if you want to create transportable views you need to be authorized as a key user.

How key users create role-specific views

To create views for selected roles you must be a key user and have the authorization to use the Adapt UI feature. For example, in SAP S/4HANA on-premise or SAP S/4HANA Cloud, Private Edition you must be assigned the role SAP_UI_FLEX_KEY_USER or an equivalent custom role.

IMPORTANT: Key Users make UI Adaptation changes in the Development environment. Any changes they make are tested before being transported to the Production environment.

Launch the app and go into Adapt UI from the User Actions (Profile) menu on the SAP Fiori launchpad shell bar.

User Actions menu includes the Adapt UI action if you are authorized as a key user

You will get an information message if there are existing role-specific views already created.

Example information message shown when entering UI Adaptation mode

In UI Adaptation, swap to the Navigation mode to adjust the filters to the values you want to use and try them out. In this screenshot some additional filters have been added and values have been set. You can see the * in the My Views area showing that the values have not been saved.

Within UI Adaptation, view settings can be adjusted in the Navigation tab and the * shows beside the view name to indicate the changes have not yet been saved

Then swap to UI Adaption mode. In UI Adaptation mode when you select the My views drop down you will see the adaptation action Save View As.

In UI Adaptation mode, the Save View As action appears when the current view name is selected

Give the view a name. To create a role-specific view, select the option Only for users in specific roles and then choose Add Roles to add the roles.

In UI Adaptation mode, in the Save View dialog you nominate whether the visibility is for everyone (public) or role-specific

IMPORTANT: If you choose the option “For all users”, this creates a public view that is transportable.

When creating a role-specific view, you can select and add multiple roles to the same view.

  • You can add SAP delivered roles or custom roles.
  • You can search for roles by name or id.
You can search for roles by name and add multiple roles to the role selection

Once you have added your roles, save the view.

Saving a role-specific view after the roles have been selected

When you select a saved view in UI Adaptation mode, you can see additional actions.

In UI Adaptation view, when you select a saved view name you can see multiple adaptation actions

The UI Adaptation features available for role-specific views are:

  • Rename – rename the current views
  • Save View – update the current view
  • Save View as – copy the current view to a new view
  • Manage Views – mark views as favorites, nominate the default view
  • Switch Views – switch to a different view so that you can maintain it
Actions available for saved views created using UI Adaptation

In Manage Views you will see the view visibility is shown as Restricted.

Manage Views in UI Adaptation mode shows which views are Restricted by roles

Once you have finished making your changes, in the UI Adaptation tab, press Save & Exit to apply your changes.

In UI Adaptation mode, Save and Exit applies your changes to the current app

IMPORTANT: You can also choose the Save As action to assign your view only to an App Variant. An App Variant is a new version of the current app. To use an app variant, users must be assigned the app variant. That is the app variant must be added to a business catalog assigned to their business role. Tip: If you can’t see the Save As button, look for the “…” more actions menu button.

Saving your adaptations starts the reload of the app and you will see an information message confirming that the role-specific views will be applied.

Example information message shown on saving UI adaptations

How role-specific views impact users

Users with one of the specified roles see the restricted view listed in the Manage Views dialog, reached by opening the My Views dialog and selecting the Manage action.

For example, sales managers see the role-specific view assigned to them as a Public view.

Users with the nominated roles see role-specific views as Public views

Users who have the app but do NOT have one of the specified roles cannot see the view at all.

For example, this Sales Representative user does not have the Sales Manager role, and so does NOT see the role-specific view.

Users who do NOT have the nominated role will not see the role-specific view at all

How to control view options centrally

There is a new launchpad configuration parameter called UI5FLEX_ENABLE_VARIANTS that lets you centrally control the behaviour of views in the current system and client.

Because UI5FLEX_ENABLE_VARIANTS is a FLP UI Server Setting these parameters can be set centrally in Customizing.

IMPORTANT: FLP UI Service Settings cannot be set as parameters of target mappings.

Launchpad configuration parameters can be set centrally:

  • Client-specific in transaction /UI2/FLP_CUS_CONF (preferred)
  • Cross-client in transaction /UI2/FLP_SYS_CONF

When UI5FLEX_ENABLE_VARIANTS is set to public – i.e. all users can create both private and public views.

Launchpad Configuration Parameter UI5FLEX_ENABLE_VARIANTS set to PUBLIC in transaction /UI2/FLP_CUS_CONF

This means in the My Views dialog the Save As action is available.

My Views dialog showing the Save As action

When you Save As you the option Public is available to create a public view. No transport is required as this is a local public view.

When users are permitted to create public views, the Public checkbox is available in the Save View dialog

When UI5FLEX_ENABLE_VARIANTS is set to private, users can only create personal views. They are not permitted to create public views.

aunchpad Configuration Parameter UI5FLEX_ENABLE_VARIANTS set to PRIVATE in transaction /UI2/FLP_CUS_CONF

When you open the My Views dialog, you can see the Save As action.

When users are only permitted to create personal views, the Public checkbox is NOT available in the Save View dialog

However, when you press Save As the option to create a Public view is not visible.

When users are only permitted to create personal views, the Public checkbox is NOT available in the Save View dialog

When UI5FLEX_ENABLE_VARIANTS is set to none, users cannot create any views.

Launchpad Configuration Parameter UI5FLEX_ENABLE_VARIANTS set to NONE in transaction /UI2/FLP_CUS_CONF

When UI5FLEX_ENABLE_VARIANTS is set to NONE, the Save As action does not appear in the My Views dialog at all. Users can still select Manage to see existing views that they can use and select their favorite views.

hen users are not permitted to create any views, the Save As action is NOT available in the My Views dialog

How to transport Views

From SAP S/4HANA 2021, only views created by key users via UI Adaptation can be transported.

You will need to be assigned a transport request to publish the view.

IMPORTANT: In SAP S/4HANA Cloud, Private Edition or SAP S/4HANA On-Premise you can create transport requests using GUI transaction SE09.

When you are ready to transport your view, as a key user you enter Adapt UI mode again and then use the Publish action to add your changes to a transport request. You are recommended to use a customizing transport request.

In UI Adaptation, the Publish action adds your adaptations to a transport request ready for transport

In SAP S/4HANA on-premise and SAP S/4HANA Cloud, Private Edition, your technical team will find that the transport object type for key user adaptations saved to a customizing request is R3TR LRST. Your transport team will standard ABAP transport management system to manage the transport. That is, you release the request to push the transport through your system landscape.

IMPORTANT: You should NOT the program /UIF/WRITE_TRANSPORT_ENTRIES to transport layered repository contents. This is a support tool intended for SAP support only in exceptional circumstances only.

WORTH KNOWING: In SAP S/4HANA Cloud, Public Edition the transport process is slightly different.

  • Instead of a transport request you use a software collection.
  • When you press Publish your key user changes are automatically added to your assigned collection
  • To transport the changes, as an Administrator, you use the SAP Fiori app F1433 Export Software Collection to release the collection in your source environment and SAP Fiori app F1432 Import Collection to import the changes into your target environment
  • You can find out more about this approach in the guide Extend and Integrate your SAP S/4HANA Cloud

Where to find out more about Views

For developers, wanting to implement views in their custom apps, look for topic Managing Variants in the SAPUI5 SDK documentation.

***Hint:

In this blog post the screenshots were taken in a SAP S/4HANA 2021 FPS0 system.

The examples were performed using:

  • a test user assigned the SAP Business Role Internal Sales Representative, or
  • a key user with the same role, plus the security role SAP_UI_FLEX_KEY_USER.

The test user was generated using the task list SAP_FIORI_CONTENT_ACTIVATION.