cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Add OData URL as Query in Custom Mobile Card

sunil_r
Participant
0 Kudos

Hello All,

I am using SAP Cloud Platform Trail account. I used ADT and developed a OData service in Eclipse using RESTfull ABAP. OData service got generated by creating service binding. This generated OData service, I am trying to use as Query in the custom Mobile card that I have created. But when I click on GET DATA in the URL Tab, system is throwing 404 error. I suspect, something wrong in the Destination backend system that this mobile card is referring to. No clue about what went wrong.

Here is the service Binding and the service URL that is generated, I am using 'acount_balance' entity. This OData service is giving data when I access the URL directly in the browser.

Here is the error that I am getting. I used service URL from the OData service generated above.

Below is the Destination. URL pointing to the cloud system, which I added in Eclipse. Ping is working fine. I did set basic authorizations by defaulting username and password.

sunil_r
Participant
0 Kudos

Comment 3


Here is my Mobile Card

Even the OData test is successful. Data is blank in Mobile Card. Do you find anything missing Marc.

I have one more doubt, that is, the generated URL

https://8ys2v311g3b9qc4h-zproducts-srv.cfapps.eu10.hana.ondemand.com/odata/v2/CatalogService

Contains 'zproducts' which is my project name. If host name contains project name then If I have 10 different projects or applications, will there be 10 different Destinations ?

Thanks for your previous reply, hope you can suggest something, I am trying many things, will update if I find something.

Best Regards,

Sunil Bestha.

Accepted Solutions (0)

Answers (1)

Answers (1)

marcmaurí
Participant
0 Kudos

Hi sunil_r,

I saw your help call here.

I don't know ADT tools, but if I understood you correctly, your service is deployed in your ABAP on-premise system. I'm right?

In that case, did you install and configure SAP Cloud Connector? Your destination is pointing to the cloud instead of your on-premise system. You should point to your exposed cloud connector within a destination with Proxy Type set to OnPremise.

Hope this helps.

Best regards,

Marc

sunil_r
Participant
0 Kudos

Hi Marc,

Thanks for your reply. I was so hopeless from last 2 days, tried everything and stopped working on Mobile cards.

I am working on a Cloud system ( a trial version ) just connected to Eclipse IDE. Its not an on premise system. So my OData service is also created in the cloud system. Below is the URL of my OData Service.

https://3569bb07-a8ef-4088-bc25-ba4eec10a4dc.abap-web.eu10.hana.ondemand.com/sap/opu/odata/sap/ZUI_C...

That domain name is Weird.

I have to find out 2 things :

1. How to find the exact URL of my cloud system ?

2. I want to check if the OData service that I created, exist in this cloud system.

Any suggestions on this Marc ?

When you were working on Mobile Cards how did you create OData services ?

Best Regards,

Sunil.

marcmaurí
Participant
0 Kudos

Hi Sunil,

okay, understood, so you developed your service in the ABAP Service in SAP Cloud Platform. I guess you did something like the steps shown in this tutorial. I'm sorry, I have no experience with this service.

I hope someone else can help you.

Anyway and focusing on the consumption of the service from Mobile Cards, in the URL of the destination, you must set the hostname of your service. I mean, if the URL of your service is https://3569bb07-a8ef-4088-bc25-ba4eec10a4dc.abap-web.eu10.hana.ondemand.com/sap/opu/odata/sap/ZUI_C..., the URL should be https://3569bb07-a8ef-4088-bc25-ba4eec10a4dc.abap-web.eu10.hana.ondemand.com instead of https://api.cf.eu10.hana.ondemand.com as shown in your screenshot above:

On the other hand, in reference to how I develop the services, I use SAP Cloud Application Programming Model.

Best regards,

Marc

marcmaurí
Participant
0 Kudos

Hi Sunil,

the images seem to be broken. Could you please edit the message and add the images again?

Regards,

Marc

sunil_r
Participant
0 Kudos

Hello Marc,

I am writing my query in 3 comments, as its not allowing to submit may be because of size of the comment

Comment 1

Yes I followed that Tutorial.

I did try that URL thing you suggested but still there is some error. So I moved to Cloud application programming approach that you followed. I referred to this tutorial CAP.

I created one OData service in SAP WEB IDE.

URL : https://8ys2v311g3b9qc4h-zproducts-srv.cfapps.eu10.hana.ondemand.com/odata/v2/CatalogService

Created a Destination in Mobile services :

Used OData Destination Test tool to test my service

sunil_r
Participant
0 Kudos

Comment 2

I got the expected result. It showed me Entities in the service that I created

I used the same URL in the mobile card.

Clicked on CHECK. Check was successful, but I don't see any data.

Clicked on GET DATA. Browser page opened, showing an error 'Error loading Data'.

sunil_r
Participant
0 Kudos

Comment 3


Here is my Mobile Card

Even the OData test is successful. Data is blank in Mobile Card. Do you find anything missing Marc.

I have one more doubt, that is, the generated URL

https://8ys2v311g3b9qc4h-zproducts-srv.cfapps.eu10.hana.ondemand.com/odata/v2/CatalogService

Contains 'zproducts' which is my project name. If host name contains project name then If I have 10 different projects or applications, will there be 10 different Destinations ?

Thanks for your previous reply, hope you can suggest something, I am trying many things, will update if I find something.

Best Regards,

Sunil Bestha.

marcmaurí
Participant
0 Kudos

Hi Sunil,

configure your Query URL like shown below because your data service is an OData V2:

Then clicking on GET you will see your data in a new browser tab:

...

marcmaurí
Participant
0 Kudos

...

In the Editor tag, fields should be addressed like this:

and this is the result in the emulator:

Hope this helps 🙂

Best regards,

Marc