Sub topic 11
Opening apps directly by URL and intent
This chapter assumes you can already log on to the launchpad and start apps from tiles, search, and the App Finder. It also assumes you know that roles lead to catalogs, and catalogs lead to the apps you see. If those ideas are new, review the chapters on roles and catalogs first.
By the end you will be able to read a launchpad URL, build a link to an app, and explain why a link works for one colleague and fails for another.
Why open apps by URL
Tiles, search, and the App Finder are all ways to find an app by browsing. A URL skips the browsing. Direct links are useful in several situations:
- You bookmark an app you use every day.
- A colleague sends you a link to a specific business object.
- A workflow email or a wiki page points to an app.
- You are testing an app after an administrator changed a role.
Every one of these links relies on the same mechanism: the launchpad reads an intent from the URL and resolves it to an app.
Anatomy of a launchpad URL
You saw the base URL in the logon chapter. On an ABAP front-end server it looks like this:
https://<host>:<port>/sap/bc/ui2/flp?sap-client=<client>&sap-language=ENThe parts before the # are sent to the server. They say which system, which client, and which logon language to use. Your administrator provides the host, port, and client.
The part after the # is called the hash fragment. It carries the navigation intent. The simplest example opens the launchpad home page:
https://<host>:<port>/sap/bc/ui2/flp#Shell-homeHere Shell is the semantic object and home is the action. The launchpad treats Shell-home as a built-in intent that means "show the home page".
<br>
What an intent is
An intent is a pair of names joined by a hyphen:
#<SemanticObject>-<action>- The semantic object names a business thing, such as a sales order, a supplier, or a material.
- The action names what you want to do with it, such as
display,manage, orcreate.
For example, #SalesOrder-display means "display a sales order". The intent says nothing about which app does this. That choice is made when the launchpad resolves the intent.
Because the intent describes the purpose and not the app, an administrator can replace the app behind it without breaking your bookmarks. A link to #SalesOrder-display keeps working after an upgrade swaps in a newer sales order app.
Adding parameters
Many intents need more information, such as which sales order to show. You add parameters after a question mark, in the same style as a normal query string:
https://<host>:<port>/sap/bc/ui2/flp?sap-client=<client>&sap-language=EN#SalesOrder-display?SalesOrder=1234Several things are worth noticing in this URL:
- The query string before the
#(sap-client,sap-language) configures the launchpad session. - The query string after the
#(SalesOrder=1234) is passed to the app as an input parameter. - Multiple parameters are joined with
&, for example?SalesOrder=1234&Plant=1000. - Which parameters an app accepts is defined by the app and its target mapping. Unknown parameters are usually ignored, but required ones that are missing can leave the app without data or show an error.
The names SalesOrder and 1234 here are illustrative. Use the semantic object, action, and parameter names that your own system defines.
Inner-app routes
Some apps support navigation inside the app, for example to a detail page. Those links add a second part after &/:
#SalesOrder-display&/SalesOrders(1234)Everything before &/ is the intent, which the launchpad handles. Everything after it is a route that only the app understands. You normally do not write these by hand. Copy them from the browser's address bar when you are already on the page you want.
How the launchpad resolves an intent
When you open a URL with an intent, the launchpad does not look up an app by name. It follows the same path as the role and catalog model from earlier chapters.
The key step is the check against target mappings. A target mapping is a record, stored in a catalog, that connects an intent (semantic object plus action) to an app. The launchpad only considers target mappings in catalogs that are assigned to your roles.
Two consequences follow:
- A URL is not a permission. Knowing the link does not give you access. If none of your roles contains a matching target mapping, the intent cannot be resolved.
- An app does not need a tile for its intent to work. The target mapping alone is enough. This means you can sometimes open an app by URL even though you have no tile for it, if a catalog in your roles holds the mapping but no tile or the tile is not on your home page.
<br>
What happens if you are not logged on
If you paste a link and have no session, the launchpad asks you to log on first. After a successful logon it continues to the intent in your link. You do not need to open the home page and navigate again.
The sap-client and sap-language parameters matter here. If the link omits sap-client, the system uses its default client, which may not be the one where your user exists. If it omits sap-language, the launchpad uses your user's default language. Include them in links you share when your landscape has several clients.
Building a link in code
If you generate links in a script, a report, or a documentation page, build them carefully. The server query string and the intent parameters need different handling, and parameter values need URL encoding.
from urllib.parse import quote, urlencode
def launchpad_link(host, port, client, semantic_object, action, params=None, language="EN"):
base = f"https://{host}:{port}/sap/bc/ui2/flp"
server_query = urlencode({"sap-client": client, "sap-language": language})
intent = f"#{semantic_object}-{action}"
if params:
intent += "?" + "&".join(
f"{quote(str(k), safe='')}={quote(str(v), safe='')}" for k, v in params.items()
)
return f"{base}?{server_query}{intent}"
print(launchpad_link("example.corp", 44300, "100", "SalesOrder", "display", {"SalesOrder": "1234"}))Running this prints:
https://example.corp:44300/sap/bc/ui2/flp?sap-client=100&sap-language=EN#SalesOrder-display?SalesOrder=1234The host example.corp and the client 100 are placeholders. Replace them with your own values.
Finding the intent for an app you already use
You rarely need to invent an intent. The easiest way to learn one is to open the app the normal way and read the address bar. After the # you will see the semantic object and action, and possibly parameters.
Copy the full address and you have a working link for yourself. Before you share it, check these points:
- Remove parameters that hold personal or temporary values, such as a filter that only makes sense in your session.
- Keep
sap-clientif the colleague might otherwise land in the wrong client. - Remember that the colleague needs a role that contains the target mapping. If they cannot open it, the cause is access, not the link.
Common errors
| Symptom | Likely cause | What to check |
|---|---|---|
| Launchpad opens on the home page instead of the app | The hash is missing or was lost when the link was pasted | Confirm the `#` and everything after it is in the address bar |
| Message that the intent or navigation target cannot be resolved | No target mapping in your roles, or a typo in the semantic object or action | Compare the names with the address bar of a working session |
| App opens but shows no data | A required parameter is missing, misspelled, or has the wrong value | Compare parameter names and values with the working link |
| Logon screen for the wrong client | `sap-client` missing or wrong | Add the correct `sap-client` to the server part |
| Works for you, not for a colleague | The colleague lacks the role or catalog | Ask an administrator to compare role assignments |
| Link breaks after a transport or upgrade | The target mapping was renamed or removed | Ask your administrator which intent replaced it |
The last two rows connect this chapter to the troubleshooting chapter. A link that fails is a clean test of the role-and-catalog model. If the intent resolves for one user and not another, the difference is in what their roles contain.
Limits to keep in mind
- Intents are resolved per user. A link is only as useful as the access of the person who opens it.
- Names in the intent must match the system's definitions exactly. Copy them instead of typing them from memory.
- Special characters in parameter values must be URL encoded. Spaces,
&,#, and/can otherwise change how the URL is read. - Browsers and mail clients can cut or rewrite long links. If a link fails only when sent by email, test it by pasting it into a fresh browser tab.
- Bookmarks that include a
sap-clientfor a test system will not work in production. Keep separate bookmarks for each system.
<br>
Practice
Exercise
A colleague sends you this link and it opens the launchpad home page instead of the app: https://<host>:<port>/sap/bc/ui2/flp?sap-client=100&sap-language=EN. What is missing, and how would you fix it?
Show answer
The link has no hash fragment, so there is no intent. Without one, the launchpad opens the home page. Ask the colleague to open the app in the launchpad and copy the full address, including the # and the semantic object and action after it. For example, #SalesOrder-display?SalesOrder=1234 would be appended to the end.
Exercise
You paste a link containing #PurchaseOrder-display?PurchaseOrder=4500 and get a message that the navigation target cannot be resolved. The same link works for your manager. Give the most likely cause and name where an administrator would look.
Show answer
None of your roles contains a catalog with a target mapping for the intent PurchaseOrder-display, while your manager's roles do. An administrator would compare the roles assigned to you and your manager and check which catalog holds the target mapping. Assigning a role or catalog with that mapping to you fixes the problem. The link itself is not at fault.
Exercise
Why can an app keep working through a bookmark after an upgrade replaces it with a newer app?
Show answer
The bookmark stores an intent (semantic object plus action), not the name of an app. An administrator can point the target mapping for that intent to the new app, so the same link resolves to the replacement.