Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Developer Advocate
Developer Advocate
In the past two years, I wrote a few posts that explained the nature of the managed approuter and when it can be helpful to use this feature (here and here). In parallel, we created a GitHub repository that contains sample projects and diagrams to make the differences between both options more tangible. Overall, there's a lot of content that explains why it makes sense to favor the managed over the standalone approuter. (I highly recommend that you make yourself familiar with the linked resources above if you don't know them yet). Once you read the content, you have a good understanding of the managed approuter's advantages. And with this, it makes sense that the managed option is the default setup for newly generated SAP Fiori apps in the SAP Business Application Studio.

Update: August 2021: Added a new question Q9

But, naturally, many developers are new to SAP Business Application Studio and SAP BTP, which can cause confusion about the standalone approuter (as they only know the managed approuter). For those developers, I compiled this short FAQ to help them understand the differences when you come "from the other direction":

How to pick the right option?

Q1: Is the managed approuter a service in SAP BTP?

No, the managed approuter is not a service. It is a feature of various SaaS subscriptions that SAP provides in SAP BTP. Both the SAP Launchpad service and the SAP Cloud Portal service come with that feature. This is why you don’t find the managed approuter in the Discovery Center.

Q2: Why don't I see my app in the Cloud Foundry space?

A: Cloud Foundry spaces only contain applications that consume runtime memory. HTML5 applications won't show up here as they are a set of static content files (.html, .js, .css) that are run by the browser. In SAP BTP, HTML5 Applications are stored in HTML5 Application Repository service. During runtime, HTML5 Application files are served to the browser by the managed or standalone approuter.

If you have a standalone approuter, you will see it in the space, unlike the HTML5 Applications hosted in HTML5 Application Repository. These applications can be visualized using HTML5 Applications UI (in the SAP BTP Cockpit) or via cf html5-list.

Q3: I used the default option (managed approuter) when I created the SAP Fiori app, and I could deploy it. But now I get the following error "Error No client with requested id". (or here)

A: This most likely means you didn't subscribe to the correct subscription service. As mentioned above, here are two services: The SAP Launchpad Service and the SAP Cloud Portal service, both of which should work for what you want to do. Make sure you are subscribed to these subscriptions. Depending on your account, you might also see service instances with these names. Please don't use service instances for this; they won't help you here!

The URL of the managed approuter contains either cpp (pointing to the SAP Cloud Portal service) or launchpad(pointing to the SAP Launchpad service). Both segments are substitutable, but you need to verify to use the segment of your enabled subscription. 

Q4: Can I change the URL of the managed approuter?

A: Th default URL is determined by the subscription service and your subaccount subdomain. But you can change the URL in production accounts via the custom domain service. 

Q5: When using the managed approuter, should I use subaccount- or instance-level destinations?

A: Instance-level destinations should be used from now on forward as they avoid subaccount-wide access and enable better mta lifecycle handling. Note that when undeploying with instance-level destination, the destination configurations get deleted as well, unlike subaccounts destinations.

Q6: I neither want to use the SAP Launchpad Service nor the SAP Cloud Portal service. Can I use the mana...

A: You can subscribe to these products just to get managed approuter functionality (no need to model launchpad tiles, etc.); just run the applications from HTML5 Application UI. We recommend using a standalone approuter only if you need to implement approuter extensibility for some special use cases.

Q7: How can I build an SAP Fiori app that leverages the standalone approuter?

A: The SAP Business Application Studio offers a shortcut for the default option that uses the managed approuter. Look at this video which explains the longer flow (create empty MTA, add managed approuter, add Fiori app). Follow this flow but select the "standalone" approuter when prompted. I also added a few screenshots below that you can follow to see all the needed steps.

Q8: Can I change the URL of the standalone approuter?

A: Yes. The default URL can be customized via the "host" property of the mta.yaml file. The * is usually given, but you can change this as well with a custom domain

Q9: Can I use the approuter to host web apps that provide UI5 flexibility features?

Yes, this is possible with both options. If you use the standalone approuter, you need to integrate it with a key-user service instance and make some configuration changes. In case you go with the managed approuter, you don't need to integrate this service. It's worth mentioning that this option currently doesn't allow key-user changes. Other features of the UI5 flexibility service such as custom filter variants will work out of the box with the managed approuter if you embed the application in an SAP Fiori Launchpad.

Q10: I want to built an application that can handle multiple tenants. Which approuter option should I choose?

As of September 2021, MTX apps are not supported by the managed approuter. Therefore, you should go with the standalone approuter in this case.

Attachment to question 7:

Create an empty MTA project.

Create a module from template.

Select "Approuter Configuration".

Make sure to answer these questions with a yes.

Add any web app and in the last step of the wizard, make sure to include it in the MTA project and add the deployment configuration.

Now you are ready to build and deploy the project with the standalone approuter.