cancel
Showing results for 
Search instead for 
Did you mean: 

Mobile Application from WebApp in SAP WEBIDE

bhuvneshkumar_gupta
Participant
0 Kudos

Dear Experts,

My objective is , I want to create one App which should work on both platforms - Browser and Mobile

I have developed Mobile applications using tutorials, which are registered to HCPms . In these mobile applications to communicate with Backend I'm using the following syntax

var oHeaders = {};

                oHeaders['X-SMP-APPCID'] = appcid;

                                                                                 

                var request = {

                    headers : oHeaders,

                    requestUri : sUrl, //https://mobile-XXXXXXX.hana.ondemand.com/com.test.log (URL is of HCPms)

                    method : "GET"

                };

OData.request(request, onSuccessForRegister, onRegError);

Here APPCID is must for authorization.

And I have developed a SAPUI5 Webapp in WEBIDE and deployed to Hana Cloud Platform(HCP), Here I have used JSON Model and Odata Model to communicate with backend -

var urlUser = "/sap/opu/odata/sap/Z_EXAMPLE_SRV/EXAMPLESET?$format=json"; // to get the Data (URL is of HCP Destinations)

var oUser = new sap.ui.model.json.JSONModel(urlUser);

var requestURLPost = "/sap/opu/odata/sap/Z_EXAMPLE_SRV/"; // to POST (Create) Record (URL is of HCP Destinations)

var oCreateModel = new sap.ui.model.odata.ODataModel(requestURLPost);

oCreateModel.create("CREATESET", Params, null, function(data) { },function(e) {});


Both of these (Mobile and WebApp) are working Fine.

Now I wanted to create Mobile application from this Web App, So I have Created Application in HCPms and deployed this webapp to HCPms from WEBIDE , for SAML I have added Auth parameter in required file and created APK.

When I'm opening app in mobile , the Federation page is coming for saml auth, after that nothing is happening, I think backend communication is not happening.

So my question  are,

1- Is it possible to create mobile app from from webapp application, where WEB App is not using HCPms URL.

2- How the app will communicate to backend as there is no Appcid and URL of HCPms.

Please Guide How can I achieve this objective.

Create one App which should work on both platforms - Browser and Mobile

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bhuvnesh,

To answer your question:

1. Yes, it is possible to have a mobile app without HCPms, In this case the application whill communicate to Fiori Launchpad and all your apps will be visible. Something life Fiori Client which is available for use.

2. I guess above explanation answers your second question.

Further, the app that you have it should work for SAML also. What happens after your enter the Login Details in your IDP Login Screen?? Ensure your federation services/end points are mapped correctly.

Regards,

Nagesh