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.
cancel
Showing results for 
Search instead for 
Did you mean: 
mariusobert
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 *.cfapps.eu10.hana.ondemand.com-suffix 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.
65 Comments
mariusobert
Developer Advocate
Developer Advocate
0 Kudos
Hi,

for this, you need to use the included User API service with a dedicated route. You can find all details and a sample here.
0 Kudos
Hi Marius,

Thanks for the wonderful blog.

I was trying to build and deploy MTA application using Managed App Router also followed complete SAP developer tutorial  . But when I deploy application and try to access it using given command cf html5-list -di <APPNAME>-destination-service -u. It gies the URL. But when I am opening the app in new tab it is giving me internal server error. It is also not showing in HTML5 repository.

I have the correct destination reference also in my XS-app.json and also I created the application using wizard. Any hint what is getting wrong?

Below is the screenshot for reference.

mariusobert
Developer Advocate
Developer Advocate
0 Kudos
Hi,
I noticed you also asked the question here so I suggest to use the Q&A instead as it's more suited for your kind of question.
0 Kudos

Hello Marius,


About the enviroment variables of managed approuter ,  can it be changed by requesting an incident ?

mariusobert
Developer Advocate
Developer Advocate
0 Kudos
I'm not sure if I understand, which env vars are you referring to? The managed approuter is not an application and there has no env vars that are exposed to the user.
former_member732788
Discoverer
mariusobert
Developer Advocate
Developer Advocate
0 Kudos
Ah, I see. You want to set environment variable for the managed approuter.

No, this is not possible.
michael_smithe5
Participant
0 Kudos

mariusobert, thanks for the blog!

We are subscribed to the free tier SAP Launchpad service in our Pay-As-You-Go subaccount, but I do not see the Managed App Router on the HTML5 Repository screen like I see in the trial account.  Also, I cannot access my HTML5 Apps content provider from the Launchpad application.  I don't see any documentation in the discovery center regarding the Managed App Router being limited to Standard plans, so why can I not use it in the Free plan?

michael_smithe5
Participant
0 Kudos

mariusobert , oddly I was able to resolve my own issue.  I deleted the Launchpad subscription, then created it again - viola!  The HTML5 Repository now has the "Managed App Router provided by SAP Launchpad" header and the HTML5 Apps provider appears in the Launchpad application.  So, for anyone else who encounters this issue, delete the subscription and create it again.  A "special" feature of Cloud Foundry, I guess. 😛

WRoeckelein
Active Participant
0 Kudos

Hi mariusobert and all others here,

thank you for this and all the other blog and you numerous answers to the questions.

Unfortunatly I have to ad another question:  In some cases I need to do a additional request in a standalone server to an onpremise server.

I have already a beforeRequestHandler and noticed that in req.app.services are the details to connect to the destination and connection services.

However I am lacking some example code how to best do a second request inside beforeRequestHandler. Is anybody aware of such a code snippet?

Thank you all, have a great time and stay healthy,

Wolfgang

 

0 Kudos
Where exactly did you put the timeout property? Would be helpful for us as well
0 Kudos
How are timeouts managed in that case? Is there any way to increase that?
kevindass
Participant
0 Kudos
mariusobert  thanks for the blog!

I would appreciate if you could look at SAP BTP Launchpad Services- Integrate the REST API via Destination Service for Fiori app so as to share your thoughts.

 

Regards,

Kevin Dass
KarthT
Explorer
0 Kudos

Hi Marius,

Thanks for the blog.

Testing SAP BTP destinations with standalone approuter, as described here

Is the above possible with Managed approuter (SAP Build Workzone - Standard Edition)? No fiori apps, or HTML5 apps, just expose the external on-premise application using managed approuter.

Regards,

Karthik

urvimehta
Discoverer
0 Kudos

Hi mariusobert - Thanks for your blog. Very helpful to clear some doubts.

 

With help of your Question # 2 in the post, I figured out on why the HTML5 app is not visible in CF space and how to look it up.

For our use case, we have subscribed to the 'SAP Custom domain service'. We have finished configuring custom domain and updated DNS record for it. However unable to figure out how to map route the HTML5 app to custom domain in CF. Any insights will be helpful here. This is what you have referred to in question # 4.

I cannot locate a documentation/tutorials on SAP HANA Academy for the use case of mapping HTML5 app to a custom domain. There are other use cases out there for example - map route MTE SaaS app to custom domain, Map CF app to Custom domain. But how I go about configuring route for my HTML5 app to a custom domain. 

It would be great if you have any insights into Question # 4. Thanks!