cancel
Showing results for 
Search instead for 
Did you mean: 

MTA Apps uses cp.portal

c_drancourt
Explorer
0 Kudos
692

Hello,

I'm having an issue with an MTA app that I deployed to SAP Workzone. My need is to be able to access to Solman fiori apps on SAP Workzone. I found no way to federate solman, so the only solution I found was to turn the solman fiori apps into MTA and therefore I could expose them using the HTML5 Apps Content Channel.

I really am not familiar with these MTA apps but in fact, I turned 4 fiori apps into MTA using the same process: 3 of these are working great but the last one doesn't.

The problematic app is the "my Inbox" app and my issue is that the apps is trying to consume odata from

https://*********.launchpad.cfapps.eu10.hana.ondemand.com/cp.portal/sap/opu/odata/IWPGW/TASKPROCESSING;mo;v=2/$metadata

Where I would have expected something like (= what I have on another app that works fine)

https://*********.launchpad.cfapps.eu10.hana.ondemand.com/8f306f9c-cc13-4424-aa7c-192090bf62e3.sm-it...

I have no idea where this cp.portal comes from and I'd like to make my app run like others. Does anyone knows how to achieve this or why my app is calling the odata in a different way?

Thanks for your help.

View Entire Topic
SambhavDublish
Newcomer

I am also facing the same issue. Did you get any root cause for the same. kindly suggest.

 

DavidGir
Explorer
Same on my end. Anyone has insight?
rmnachi_kx
Explorer
0 Kudos

Same here... I have modified xs-app.json but still the redirection is not happening properly. Somehow system is missing the direction to reach the app via metadata path, so CP.PORTAL is filling the void (like /test/ in BAS). Additionally, when I hardcode the path in my manifest.json with app name & internal id, redirection is happening right & metadata is loading. This proves that the problem is with the routing. If anyone finds the fix / reason, please share it here. If I find any, will definitely come and post here.

Just one more, removing '/' is not an ideal option if your MTA ODATA declaration is via datasource in manifest.json. Because, when the MTA is built - it is building its file itself without the '/' in DIST folder. So, removing '/' might work only when you have declared your odata in controller.js or somewhere else but not in manifest.json. 

DavidGir
Explorer

I needed to use an absolute URI, one that uses the work zone prefix composed of the cloud service ID and app ID.
The cloud service ID is field sap.cloud.service in webapp/manifest.json and the app ID is field sap.app.id.
The workzone proxy path is those 2 fields (with all non-alpha characters removed) concatenated with a dot in between
ex: sap.cloud.service = nasa
sap.app.id = rocket.engine.display
proxy path = /nasa.rocketenginedisplay/..
I noticed that the proxy prefix is interestingly starting with a serial number for instance: /a9d98d7c-09a6-42a9-aba8-36f935f378a8.nasa.rocketenginedisplay/
How did i get the proxy prefix? Try the following in your terminal when debugging on workzone, it may help:
this.getMetadata().getManifest["sap.app"].id;
^That command is to confirm your sap.app id (just in case)...
Then follow up with:
jQuery.sap.getModulePath('your_sap_app_id')
This should give you the proxy prefix.

rmnachi_kx
Explorer

Thanks @DavidGir I'm now able to get the proxy path which has the internal app ID generated by respective landscape / application (Thanks for tip & please accept my appreciation). 

However, this can be a workaround but not a solution. Isn't that the application should automatically route ? Some of the app, which I'm migrating from Neo to CF with its Odata path is routing properly. YAML & XS-APP.JSON are exactly same. Not sure why this routing issue is happening only with few apps. I will raise an SAP incident as well to understand what is happening here and why routing is not happening automatically over the YAML specified path + xs-app.json details. As per SAP tutorials & documentations, this should happen automatically.

For your issue - is this how you have solved and moved to Prod ? Wanted to get the view, hence asking. In the meanwhile, If SAP replies with any further insights - I will come back and update here. At present, I'm going to go with the provided workaround for timebeing. 

DavidGir
Explorer
0 Kudos

@rmnachi_kx As you have well identified, it should be done automatically through routing and what I have done on my end is indeed a workaround. I have not moved to prod yet with this. We also have other apps that did not present this issue. I would also be interested to know the solution.