Hi all.
As a daily ABAP/UI5 developer, on real-life scenarios (nothing against academics 🙂 ), I have regular requests for "a new field", "a new functionality" "a new behavior" on standard fiori APP's. Many of you, that deal with customers/teams with similar requests know that you can do that using the already available resources for app enhancement/extension.
The basic scenario is to add a new field to a Fiori Element APP. You can simply extend the CDS, add the new field and voilá, it's now available.
However, there are some requests a "bit" more complex where you have to enhance the front-end code (i.e: add a new action, that shows a popup to add some comments, before submit a PO creating). That's possible in (at least) 2 different ways:
- Create a new app, copy from the standard one
- Create an extension for the app that will basically work like "inheritance" and where you will only and the extra code you need.
On both scenarios, the result will be a Z APP, with a new component and you will need to add it to a catalog/group in order to make it available to final users.
That being said, you call say "yeah... and? that's simple"... well... yes... in some cases it may be. Let's say, for instance, that you have a very "complex" authorization scenario, where the app is present on multiple catalogs, and you don't want to change all of them because of a "simple" new button, new action, etc
Well, we found a better solution, that we called "Fiori APP Mapping override".
The "normal way":
- create the enhancement/extension for the requested app
- add your new/changed code
- create a new catalog
- add the new app, with new semantic object, new component,etc
- add this new catalog to the needed roles (all this without changing SAP objects)
- remove old app from catalog/remove full catalog
The ODKAS Way:
If you don't want or can't change the standard/Z* catalogs, you can do this:
- create the enhancement/extension for the requested app
- add your new/changed code
- Create a new global catalog i.e:"ZUI5_OD_MAPPING_OVERRIDE"
- in this catalog you will add all mappings, for enhanced apps
- Add above catalog to all users (for instance on a base role that every user has)
- Voilá, the enhanced app replaces the original one.
As everything, is easier said than done, but in this case, it is.
Creating a Global Fiori APP Mapping Override Catalog
In order to make it more straight forward, I will use MyInbox APP as example. As the subject here is not how to extend a standard app, I will not put focus on that. To keep it simple to test, you can go to your webIDE, extend the MyInbox app and add the following:
Then, for the Override:
On the standard SAP_FND_BC_MANAGER_T you have 2 target mapping, being the first one for "Display Inbox".
Looking into the details:
it's a simple Fiori App Mapping, pointing to the respective BSP.
when you use that it shows the standard MyInbox app.
til here, nothing new. But let's say that you need to change the header text for the master list (left side list), and you don't want to change the standard app but also don't want to re-do all the Z* catalogs where you put the MyInbox app.
(here starts the "magic")
First you create a new Z* catalog, in this example I will call it ZUI5_ODK_MAPPING_OVERRIDE
Then (and just to speed it up) create the target mapping by reference
- choose the required target mapping and click "Create Reference"
- choose the previously created catalog
Now, on the Z* catalog, select the new target mapping and click "Configure"
Change the BSP Url to the new app you created (extension app) and the corresponding ID
And then, here is the main trick, add a new parameter "
sap-priority" with default value "
1".
Very important: in order to be "overrided" the Semantic Object and the action needs to be the same as the original app. Only then will it be replaced/overrided.
Finally, hit SAVE.
After this, when you go to your launchpad, and open the standard MyInbox app, this happens:
Hope this helps you out on those real-life scenarios where users do really need some extra feature on the standard app.
Best Regards,
Carlos Castro
ODKAS