Launch Fiori App on Browser using ABAP Code
ABAP developers can launch Fiori apps from ABAP code and display Fiori application on web browser. In this tutorial, I want to show how to build the URL for the Fiori application for a desired Fiori app with a few simple cases.
For example, assume that you want to launch "My Inbox" app on default web browser using ABAP program code.
First of all, you can open the app on LaunchPad and check for URL parameters.
ABAP developers will realize a pattern as follows:
#WorkflowTask-displayInbox
This pattern is formed of "#{Semantic Object}-{Semantic Action}"
If you browse the Fiori Apps Library for "My Inbox" app you can validate the Semantic Object and Semantic Action configuration parameter values.
On Fiori Apps Library page of "My Inbox", switch to tab "Implementation Information"
Scroll down and display hidden details for Configuration
By scrolling down, you will reach a section names "Target Mapping(s)"
In this target mappings table, you will see the Semantic Object and Semantic Action values for the target Fiori app.
As I mentioned before, it is possible to get these parameter values by launching the Fiori app on Launch Pad and checking the URL address easily.
Following ABAP code can be used in an ABAP program which concatenates different parameters to form final Fiori app URL. And then ABAP cl_gui_frontend_services class execute method can launch the target URL on default web browser.
Please note that the semantic parameters are case sensitive, so it is important to use them correctly right as they are defined. Because of that I used "LOWER CASE" option for parameters in Selection Screen.
ABAP programmers can try "SalesQuotation" and "manage", or "ATPRequirement" and "releaseForDelivery" as sample semantic objects and actions for different Fiori apps.
If the URL configuration and semantic object and action parameter values are not correctly defined, the ABAP programmer will definitely get an error message similar to following one:
Message: App could not be opened either due to an incorrect SAP Fiori launchpad configuration or a missing role assignment.
Details: {
"info": "Failed to resolve navigation target \"#ATPREQUIREMENT-RELEASEFORDELIVERY\". This is most likely caused by an incorrect SAP Fiori launchpad content configuration or by a missing role assignment.",
"fixedShellHash": "#ATPREQUIREMENT-RELEASEFORDELIVERY",
"technicalMessage": "Could not resolve navigation target"
}