Skip to Content

SMP 3.0: An End to End guide to create an OData service for a given SAP Gateway data source

This guide will give a clear understanding on how to create an OData service for a given SAP Gateway data source. Here, i am using publicly available demo gateway service : Flight example

Service URL :

Note: To access this URL, you must have an account on SAP Gateway Demo system. How to get access

Now,to make this service available through SMP 3.0 server, i am going to import it in eclipse and then will deploy to SMP server.

Tools Used: Eclipse Luna, SAP Mobile Platform 3.0 SP10 PL01 Advanced REST Client


Prerequisite: Installing “SAP Mobile Platform Tools” latest version 1.6.2 in Eclipse Luna Reference Document


  1. Create a new project in Eclipse Luna, make sure to select proper “Target Runtime


2. Select Model Content as “OData Service URL”  , Click “Next


3. Provide the service URL and click “Go“. Enter correct credentials to connect to server


Note: Not able to retrieve the service details? Look at Troubleshooting #1.

4. Once done, you can see the automatic creation of OData entities.


5. Next task is to assigning data sources to each and every Entitysets.

    • Right click> FlightModel.odatasrv >Select Data source
    • Make sure you specify Namespace as “IWBEP” (not SAP as always)

The ODC data source is only used for services registered under the iwbep node. For the SAP Gateway service coming from the Hub, you need to bind it with REST data source NOT as ODC data source. Reference


Note: How to identify what is the correct Namespace for a particular SAP gateway service? I generally prefer to a cross-check from step #9.

6. Right click project > Generate and Deploy Integrate Content


7. Now, i have to register RMTSAMPLEFLIGHT service in SMP Management cockpit

<<From SMP 3.0 SP08 Runtime onward, SMP Gateway cockpit has been integrated into SMP Management cockpit>>


Key Value
Destination Name ES4
Destination Type HTTP
Destination URL
Authentication Type SSO Mechanism
SSO Mechanisms Technical User (Basic)
User Name SAP Gateway Demo system usename
Password SAP Gateway Demo system password

Note: Make sure if you have imported ES4 certificate into SMP Keystore. How to do? Check troubleshooting #5

8. Select the “ES4” destination, click on “Test Connection“. You should see a SUCCESS message.


Note: Not able to ping successfully? Look at Troubleshooting #2

9. Register Back-End service from ES4 sever

    • Click on “Register a New Service” under SERVICES
    • Select Destination as “ES4”
    • Type RMTSAMPLEFLIGHT in search
    • Click on “Register”



This is how it should look like:


Note: As you can see the “IWBEP” is the namespace of the service coming directly from server “ES4” and “SAP” is the namespace of the service deployed through Eclipse.

10. Add destination “ES4” to the service “SAMPLEFLIGHT” by clicking on it.


Note: I didn’t find assigning a destination (ES1) to the deployed OData model (SAMPLEFLIGHT) since backend service (RMTSAMPLEFLIGHT) has already been registered in gateway cockpit. But for best practices it is good.

You should see that “ES4” destination has been mapped to service “SAMPLEFLIGHT”.


11. Open “Service Document” as highlighted above. (Assuming you have created a security profile named “SAP” in admin cockpit)


This URL will return all entity sets contained in the service


12. To test each Entityset details, just add the Entityset name at the end of above URL.


a. https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/CarrierCollection(‘AA‘)


This URL will return carrier CARRIER NAME, CURRENCY CODE, URL for Carrier ID “AA”


b.  https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/TravelagencyCollection

This will return all Travel Agencies details available in ES1 system.

c. https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/SubscriptionCollection

d.  https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/FlightCollection

CUD operation:

CREATE: I am getting ‘500 Internal Server Error’


First i need to get X-CSRF-TOKEN value using GET method


Pass mentioned value in header section for updating a record:  image link Dropbox – PUT1.png

<?xml version=”1.0″ encoding=”UTF-8″?>

<entry xmlns=”” xmlns:d=”” xmlns:m=”“>

<content type=”application/xml”>


<d:CARRNAME>British Airways</d:CARRNAME>







You can verify the same in the browser by just running the OData URL Dropbox – PUT2.png

DELETE: Dropbox – DELETE.png

<<I was not able to upload images in the blog so i have placed it at dropbox for time being. I am checking why i am not able to insert images here , will update it soon>>


If you are using any proxy setting to access any external network, you may encounter below issues:

(A). Connection timed out: connect


Resolution: Go to Windows>Preferences>Network Connections. Select Active provider as ‘Manual’ and provide proxy details for HTTPS. Check Reference Document for more details.

(B). Connection has Failed: Connection to refused




Set HTTP/HTTPS proxy settings in Admin cockpit. > SETTINGS>SYSTEM



(C). Could not retrieve services from the destination ES1






Set the proxy server details for the destination ES1. Go to path:C:\SAP\MobilePlatform3\Server\config_master\service.destinations\destinations

               Open ES1. And proxy details.

e.g. Proxy=proxyserver:80


save the file and NO need of restarting SMP server.


(D). When you try to access any entityset information, you are encountered with message saying “Error in Getting the service“,




  Check if you have missed registering the service as mentioned in step #9.


(E). Importing ES1 HTTPS certificate into SMP server keystore


     Open in a browser ( i did in chrome) and follow below screenshots:


     Select Base-64 encoded option


  You can export it anywhere as per your wish (for me its on Desktop) and you should see a successful message at last.





From SMP 3.0 SP08 Runtime onward, you can directly import certificate into SMP keystore through SMP Management Cockpit.

Note: This has to be done only and only by Administrator.

Open SMP Management cockpit: https://localhost:8083/Admin/  > SETTINGS>CERTIFICATES




You have to restart SMP server







This below method is valid if you are working with SMP3.0 SP07 server or lower version

Once certificate export is done, open a command prompt and run below keytool command:


C:\SAP\MobilePlatform3\Server\configuration>keytool -import -v -alias sapgatewaycert -keystore smp_keystore.jks -storepass s3pAdmin -file c:\Users\Jitendra\Desktop\ES1.cer


Note, the password shown above, s3pAdmin, was a value that was requested during the SMP 3.0 server install.  Replace changeit with the value you specified during the install. Note that the SMP 3.0 server needs to be restarted after making this change.

One tool which provides a graphical view of the contents of keystores is KeyStore Explorer.





(F). Peer not Authenticated


Pinging the destination through an error: Connection test failed-Peer not authenticated

When i looked into its ‘Certificate’ details, then came to know that its certificate had already expired. Delete this and import a new valid certificate.









(G). Log Settings

Logon to Admin Cockpit > Logs > Settings

Log Level > debug

Trace > Enabled


Follow these forums for latest update on SAP Mobile Platform 3.0 : SMP Developer Center, SAP for Mobile

Note: Big thanks to Bjoern Woppmann for helping me in writing this blog.

You must be Logged on to comment or reply to a post.
  • Great stuff, I’ve installed so far everything, now I’m little bit struggling migrating my old iOS ODATA app to the new.

    Could you maybe point me to an iOS example to copy from?



  • Hi Jitendra,

    We have SMP 3.0 SP 04 in our internal server and running behind proxy server. I performed the following step to access the

    . Set HTTP/HTTPS proxy settings in Admin cockpit. > SETTINGS>SYSTEM

    – Modified props.ini

    – Modified ES1 files from service destination folder also.

    Still in gateway/cockpit i am getting


    Please find the below statements from SMP server log

    2014 10 08 failed to serve request for URI, message = Proxy Authentication Required |

    2014 10 08 methods starts in ServiceRepositoryProvider |

    2014 10 08 method starts in ServiceRepositoryAPIHandler |

    2014 10 08 namespace, String serviceName, String serviceVersion) method starts in TechnicalServiceDAO |

    2014 10 08 namespace, String serviceName, String serviceVersion) method ends in TechnicalServiceDAO |

    2014 10 08 method ends in ServiceRepositoryAPIHandler |

    2014 10 08 methods ends in ServiceRepositoryProvider |

    2014 10 08 and Closing transaction

    • Ranjeet Salunkhe

      Are you able to resolve above issue?

      Please verify once:

      1. Import ES1 system certificate into SMP keystore  > restart SMP server

      2.set http/https proxy settings in Admin cockpit >System

      3.No need to modify props.ini file

      4.Add proxy details in destination file under C:\SAP\MobilePlatform3\Server\config_master\service.destinations\destinations\ES1



        • Sukanya k

            In SMP 3 SP03 , Where to set the Http/Https proxy settings?

          In SP03, you have to add it manually in props.ini file    

          1. <SMP-HOME-PATH>\MobilePlatform3\Server

          2. Add as per your config

          • -Dhttp.proxyHost=myProxy
          • -Dhttp.proxyPort=8080
          • -Dhttps.proxyHost=myProxy
          • -Dhttps.proxyPort=8080

          3. Regenerate SMP mobile service

          Check this guide for more info.



  • Hi Jitendra,

    I was able to connect to the backend erp with http://address:port/sap/iwbep?sap-client=100

    But when i go and try to search for the service nothing pops up. The service that i created is installed under the SAP node and not under the iwbep node. Infact there is no iwbep node in my gateway system. Earlier also during service implementation when i search with SAP i am able to do it in Eclipse. I believe there is something to do with the URL that i am searching for.

    What would be the substitute url for http://address:port/sap/iwbep?sap-client=100 because what i believe is it is searching for the service under the above destination path but not able to find.

    Please see my Gateway path for the service



    Best Regards,

    Rakshit Doshi

    • Hi Rakshit,

      Please tell me you make this application in you SAP NETWEAVER GATEWAY ,

      ergo for this example Flight in SAP NETWEAVER GATEWAY .

      If so , you could You could give me the guide for this development.



  • Hi Jitendra,

    Nice blog. I have a doubt though. Why do we have to create the service via the Odata modeller? Couldn’t we just configure the service as the endpoint URL for the application?



    • Hi Roy,

      For that particular service (exposed from SAP Gateway system), we can configure it as the endpoint URL for the app without creating via odata modeller.

      As per SAP, benefit of creating an OData service for the given sap service using ODC could help to implement mash-up scenarios with other data sources supported with IGW.



      • HI  JK

        As you mention in the reply, we can mash-up the data from different data source. Can we define the navigation between the data from different data source?


  • Hi Jitendra,

    When I try to perform the “Generate and Deploy Integration Content” I am getting the following error message: “Deployment cannot be completed for MyTest2 HHTP/1.0 301 Move Permanently”

    I successfuly tested the connection under Window-Preferences-SAP Mobile Platform Tools-Server, using the following parameters:


    User (my SCN user)

    Password (my SCN password)

    I can see the available catalogs for OData services under Window-Preferences-SAP Mobile Platform Tools-Service Catalogs  ->

    I am using Eclipse Kepler

    Can you help?



  • Hi Jitendra,

    Many thanks

    I replaced the URL by (as I am using the trial version in the cloud) but then when I press button “Test Connection” I get error message “Unable to establish connection to the operations server, Reason: Connection timed out”

    (Note: the below paragraphs are all valid only when I use url

    If I use port 443 on the URL instead ( the error message displayed after pressing button “Test Connection” is “Authorization problem, Reason: User not authorized”

    I already tried with my SCN user ID and SCN password, as well as with the User ID and password I set up on the register.html file during the registration in Chrome, and the error message in Eclipse is always the one about authorization mentioned above.

    For the registration in Chrome I made the following changes on the register.htm file:



    function getSMPURL()


         return “https://” + “” + “:443”;


    function getUserName()


         return “brincaa1”;

         // return document.getElementById(“user”).value;


    function getPassword()


         return “alemanha2014”;

         // return document.getElementById(“password”).value;


    The registration was successful and I can see it under the “Application Connections” at SAP Mobile Platform Administration and Monitoring, along with the user name brincaa1 (the user name I used on the register.html file)

    I can also see the error entries on the logs at SAP Mobile Platform Administration and Monitoring each time I try to test the connection from Eclipse at Window-Preferences-SAP Mobile Platform Tools-Server. The trace log details always mention:

    2014-11-06 12:20:51.365#ERROR#com.sybase.sup.server.http.ODPSecurityFactory#null#Application connection id is not provided”

    Kind Regards

    Aderito Brinca

  • /
  • /
  • /
  • Hi Rakshit,

    After I applied the changes and pressed ok, and then open the Server connection again, I am getting a different error message when I don’t specify the port on the URL. The error message is “Authorization Problem,  Reason: User is not authorized”

    Kind Regards


    • Hi Jitendra,

      Many thanks for your clarification and for all the time you spent with this.

      It’s a pity that this is not available yet. I’m functional consultant, but I have some skills in Java and I’m a fan of Eclipse with ADT.
      I would like to buid some demos for my Client, but in the end the time invested on research over this topic was not lost, as I learned a lot.

      I will be waiting for SAP to release the solution. SAP mobile definitely has great potentialities.

      Kind Regards
      Aderito Brinca

  • Hi Jitendra

    My problem is the next :

    1 ) I have successful this step 11. Open “Service Document”


    2 ) but in the moment add this CarrierCollection(‘AA’)


    What is the problem if I have correct response in URL case 1 ?



      • Hi Jitendra , thanks for you response .

        I getting this error for all entity’s . Please look this , I have only diferents with you example

        (I installed SMP 3.0 SP4)

        in step 10 in your system


        in my system .


        Is this a problem ? because I don’t see other difference .




  • Jaime Aguilar

    Thanks for highlighting. I forgot to update the image at step #10, now i did it. With respect to your comment, that image was taken while working on SP03 as IGW URL in SP03 listens on HTTP and 8080 port but in SP04, IGW URLs listen on HTTPS and admin port 8083/8084. (you can check this difference in your above comment).

    Coming back to your issue, i feel that when you try to access any entity set information its not reaching to ES1 server from your machine.

    Were you able to ping ES1 destination successfully under “DESTINATIONS” tab?

    Are you using any proxy settings in the browserwhile accessing this URL ?



  • hi Jitendra,

    i am getting the following problem while registering the service document with in Eclipse Kepler.i am able to login from SAPGui with same user id. but not through Eclipse.

    server version SMP3.0.

    i have done all the proxy and network settings in Eclipse.




      • /
        • prasad sistla

          You have entered wrong proxy details. First check it in browser

          e.g. Chrome>Settings>Show Advanced settings>Network>Change proxy settings>Connection>LAN settings>proxy server

          Have you entered any address and port here? If yes, same you have to enter for HTTP and HTTPS.



          • prasad sistla

            I was thinking you are using any proxy server to access any external service but as per below screenshot, proxy server is unchecked and you have selected automatic detect settings, means there is no proxy required to access the URL.


            You remove all settings in eclipse, restart it


          • Hello Jitendra,

            the problem with Office network, in home networking its working. but not able to create destination. Capture.PNG

            here is the latest logs:

            2015 01 15 in fetching Destinations |

            2015 01 15 exception occured while getting the destination DestinationConfigurationException- exception occured while getting the destination







  • Hi. Thank you for blog 🙂

    I have some problem.

    I all downloaded / install and configured but have problem

    <error><code/><message xml:lang=”en”>Cannot load JDBC driver class ‘org.hsqldb.jdbcDriver'</message></error>

    but I copied hsqldb.jar and sqltool.jar from C:\hsqldb-2.3.1\lib\.

    What I create wrong ?

    Thank you

  • Hi,

    im following the tutorial but i can’t get pass the step 6. I am not able to open the cockpit. it states as webpage is not available. Please advise


    Thank you

    • Dear Chris,

      Please check if the SMP Server Services are running fine.

      If you are not able to view the cockpit it means your services are not running.

      Hope this helps,


      Rakshit Doshi

  • Hi,

    Great how-to! I tried to follow the individual steps, but as soon as I hit “Test Connection” I get the following error: “Cannot read property ‘statusCode’ of undefined” I enabled Chrome console and there is a big stack of error messages. Does anyone know what this error means i.e. is there a real problem with the URL or is there something else fundamentally missing in my installation/connection?

    Thanks a lot!

  • /
  • Jitendra Kansal

    In the Step 7 – Destination URL field as you mentioned like below, But I don’t have sap client machine, Is there any alternative to Destination URL.

    Note : I’m using SP06 Runtime server and OS Mac X.

    Thanks & Regards,


  • Thanks for sharing nice & detailed blog Jitendra. But unfortunately I am facing a error, please see below screen for your reference, however this error is coming only when I am trying to see the “Entity Set” – and for ALL entity sets (I have revisited, step 5/9 & 10):


    Although, SAP Gateway system exposed odata, can also be configurable as the endpoint URL for the app without creating via odata modeller and this url is not giving me any error for the same entity sets.


    1.SMP3 SP5

    2.Pinged Sucessfully.

    3.Yes as per step #9 & #10.

    4.Able to execute below Gateway service


    Please suggest on above problem.


    Warm Regards


    • Hi Hemendra,

      I somehow couldnt get your query clearly.

      1. Are you able to execute backend url (without SMP) and respective SalesOrderCollection entityset?

      2. Have you imported backend HTTPS certificate? if required



      • Hi JK,

        Thank you so much for taking out time and responding to my concern.

        I followed the way you suggested in your blog – using odata modeler designed in eclipse and trying to access endpoint url exposed by SMP – It is not working, specifically entity sets, however the base url exposed by SMP is showing all the entity sets. But on requesting entity sets giving error (Pic-1 above in my comment).

        And the SAP gateway exposed url,  configured in SMP (Step #9 above in your blog, where you are directly accessing Gateway url in SMP and SMP produced endpoint url is mapped to modeler url) – So this gateway url exposed through SMP is also giving me the expected result set in all the entity sets (as Pic-2 in above comment). I hope, I am able to give you the clear understanding of my problem. Please see replies to above raised points 1 & 2.

        1. Yes, I am able to fetch the data from back-end url (without SMP, only SAP gateway url) and also the respective entity sets (As shown in Pic-3 above, it is fetching the data).

        2. No, I haven’t imported back-end HTTPS certificate, because my SAP Gateway is on-premise demo system and Gateway services are exposed with basic authorizations (HTTP). To my understanding “Importing of certificate” is required when there is secured connection established between SAP gateway and SMP – Is it correct? Or it is the necessary condition to import the back-end certificate, please advice. So the demo landscape is as follows: ECC to SAP Gatewa – HTTP, SAP Gateway to SMP – HTTP and SMP yields HTTPS endpoint url.


        Warm Regards


        • Hi Hemendra,

          I got your query now.

          Can you check once again the namespace given for entityset as per step #5? It should be same value as for ZGW_EPM_SO_SRV (backend) as shown in step #9. For my case it is IWBEP.

          If you have already checked and still facing the same issue, i will ask you to share similar screenshots as step #5, 7 and 9.

          I will also suggest you to increase log level settings + Enabled in Admin cockpit for Integration Gateway and look into log file for troubleshooting.



  • /
    • Minh Hoa Le

      I am not sure what is causing this issue.Can you check if you are able to execute backend url registered in GW cockpit for a given destination? Follow step 7,8 and 9.

      You may share screenshots also. I will also suggest you to increase log level settings + Enabled in Admin cockpit for Integration Gateway and look into log file for troubleshooting.



  • Hi Jitendra,

    Very helpful blog!

    Can you please suggest any doc which refers to the consummation of ODATA service for a given SAP datasource using SMP 3.0.

    Not getting any data when trying to call odata service from SMP Server, Guess SMP takes something more.


    Shalini Mathur.

  • Thanks JK nice blog.

    But I have one Q, Why are we following above all the steps, because I have observed that any OData service exposed from ECC can be directly registered in SMP Gateway Cockpit. Could you please suggest me on the same?

    Thanks & Regards


    • Saurabh Mishra

      If you already have an OData service that has been exposed via SAP NW gateway, you can directly use it as OData proxy in SMP. But if you have more than one OData services connecting to different backend systems, you could do mash-up using IGW. So here i showed how an SAP system service can be converted into IGW service and later could be used for mash-up.

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