Show TOC

Developing NavigationLocate this document in the navigation structure

The URL expresses an intent regarding the navigation target. This is something users can easily relate to, and with the help of the browser's history cache, they can easily return to their frequently-used apps, just by typing a few characters in the browser's address bar.

The complete syntax for the URL fragment looks as follows:

#<SemanticObject>-<Action>?<parameter-1>=<value-1>&…&<parameter-n>=<valuen>[&/< innerappspecificfragment>]

The URL fragment has a shell part and an app-specific part:

The shell part of the URL fragment is used for cross-app navigation. It is independent from the concrete implementation of an app.

The app-specific part of the URL is dependent on the concrete implementation of an app.

Note

You might come across URLs with the following pattern:

#<SemanticObject>-<Action>[~<InternalTargetID>]?<parameter-1>=<value-1>&…&<parameter-n>=< value-n>[&/<innerappspecificfragment>]

The <InternalTargetID> (the part of the URL after the tilde (~) character) is a hash value that is set by the navigation target resolution service. While the combination of a semantic object and an action specify a navigation intent, the unique target ID identifies a specific target app. This part of the URL is usually not shown to end users and should not be touched by developers.

Cross-App Navigation

The following example shows a link for cross-app navigation:

<a href="#DaysSalesOutstanding-drilldown?kpiId=1234&amp;variantId=abcd" target="_self">Details</a>

To make sure that the URL format is always correct, use the CrossApplicationNavigation service to construct such links. For more information, see sap.ushell.services.CrossApplicationNavigation.

Inner-App Navigation

The SAPUI5 core library provides an API for navigating with URL fragment changes. When an app is running within the SAP Fiori launchpad, the implementation considers the shell-specific navigation parts and allows both inner-app and app-to-app navigation by similar means. The navigation API provides the following functionality:

  • Directly trigger navigation to a parameterized navigation target
  • Register navigation routes and listeners for URL fragment changes to restore a specific state