Skip to Content

SMP 3.0 : Accessing more than one OData services in one application

Hi All,


We have been knowing that SMP 3.0 is based on OData. To access any SAP & NON-SAP Backend (SOAP WS, Database,JPA & REST service) data services in SMP for developing any hybrid/native application there is a provision in SMP to convert those services into OData services with the help of SAP Mobile Platform Tools in Eclipse Kepler. For example, I have created 4 different OData services with the help of below details:



Connection Details URL Reference
JDBC (HSQLDB) https://jk:8083/gateway/odata/SAP/DEPTHSQLDB;v=1 Guide
SOAP WS https://jk:8083/gateway/odata/SAP/ARTICLE;v=1 Guide
SAP System (ODC) https://jk:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1 Guide
REST Service https://jk:8083/gateway/odata/SAP/THOMASRESTIGW;v=4 Guide



Now i want to incorporate all above mentioned OData services in a single application id. How to do this? How to access information from all services? Here you go.


  1. Login to “Admin cockpit” https://jk:8083/Admin/
  2. Create a new application id: New>



3. Under BACKEND tab, copy of the mentioned above URL. This URL would act as a PRIMARY Back-end Connections URL





Note: From SP04 PL01 onward, all Integration gateway (IGW) URLs are HTTPS based and listen on https admin port 8083/8084.

While whitelisting IGW URLs provide SMP server host name not localhost or ip address.


4. To add another two URLs, Click on NEW button under Back-end Connections and provide connection name and respective URLs for both.




Note: If you are accessing any external resources through a proxy network, make sure to configure proxy settings in SMP server and select “Use System Proxy” option. Check this.


5. Under AUTHENTICATION tab, provide a security profile as per your wish. I have selected admin under EXISTING PROFILE

6. Once done, make sure connection to these services are successful from SMP server.




7. Open a REST Client. Next task is to register the application id. How to do that? You must get a “201 status code” on success.




8. Lets take some example for accessing data from different URLs.




    • As I have set DEPTHSQLDB as primary URL so i can get it directly by calling a GET method as below.
    • For getting entity set “DEPARTMENT” details, replace URL with  https://jk:8081/com.test.demo/DEPARTMENT
    • For POST, PUT, DELETE refer this blog.


    8.2 To access SOAP WS information

    • Replace com.test.demo by com.test.article
    • Here “ArticleSet” is the entityset.





    • At right hand side, ARTICLE is the only ENTITY SET for given URL. To access its information add this at the end of backend URL.




Note: Payload for POST request can be found at this guide.


8.3 To access SAP netweaver gateway information





8.4 To access REST Service information



For POST, PUT, DELETE: Make sure you get a X-CSRF-TOKEN value in GET request and pass this value in header section along with other header sets. For more info check : SMP 3.0 : REST API Application Development


NOTE: X-CSRF-TOKEN value is needed for the Odata services (have been converted using Integration Gateway) for doing any transactions.



I hope this blog will help you.Your comments and suggestions are most welcome.



JK (@jkkansal1987)

You must be Logged on to comment or reply to a post.
  • Hi Jitendra,

    As usual, awesome blog from you, Thank you so much. I have little concern, I am developing Native Android App, I am getting the problem in consuming multiple OData services on Android Studio, however it is accessing the “Primary URL”, but it would be good if you suggest how to consume “Secondary Services”.

    Is there any other way? However I am trying to access it using “Entity Sets” exposed by various other URLs from different DBs which is defined as connections to “Primary End Point URL”, but leading to nowhere.

    However I am also exploring “Service Mashup in IG” (Service Mash-up in Integration Gateway – It’s Simpler Than You Think) suggested by Midhun, my another favorite like you.

    And another option of having “Relative URL” in SMP, is also beyond my understanding now. I am not clear on the role of having “Relative URL” option in SMP, Is this the way to go further? Please advice.


    Warm Regards


    • Hemendra Sabharwal

      It is always advisable to have one OData endpoint for one mobile app.If you want to retrieve info from more than one data sources (looks like your case), you can create multiple entitysets connecting to respective data-sources using IGW.  At the end, you will have one service document having all entity sets. You can mash-up among all.

      If you have any other issues, I would request you to raise a new thread, you may give reference of blogs/docs you are referring to, plus share steps you have followed along with screenshots.

      Hope this helps.



  • Hi JK,

    I have two questions,

    1.I have registered an application ,but I’ve also registered many

    Back-end Connections in this application.

    how can I access these connections with smp3 native sdk?

    2.Must I create all the entities in the same project with the TCODE “SEGW”.

    Best Regards,


    • Kael Xin

      You can go either way

      1. you have to call each service by their connection name, e,g. com.test.northwind


      2. You can create all entities in same project, so at the end , you will have a single OData URL having all entities.

      If you have any further questions, feel free to post at SMP Developer Center



      • Dear Jitendra

             I try to create two backend connection in one application(the backend url is same),

             But I got the error code’403′ with the Advanced rest client.

             the backend connection works fine in application with single backend connection.

             The SMP Server version is SMP3.0 sp08,

             Can you help me?


        Best Regards,