Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert


We got a requirement where we have to fetch all registered device details from SMP 3.0 Admin cockpit those have been registered for push notifications (GCM, APNS, BES,WNS, MPNS). We have got access to Derby DB tables where required information is available.

 

This database stores information about the data that passes through the SAP Mobile platform system like execution requests between client and server, information about native and hybrid applications, back-end notification requests, and usage statistics.

 

Note: This write-up is only for SMP 3.0 development edition where Derby Database is get installed by default. For SMP 3.0 Production, you can find SMP related information in other database (either Oracle DB, ASE, DB2) that has been chosen while SMP installation.

 

There is a table name SMP_NOTIFICATION_TARGET that has all required details.



 

Tools & Platform Used: SQuirreL SQL Client v.3.5.3, Eclipse Kepler 4.3, SMP 3.0 SP03, Windows

 

Pre-requisite:

 

Note: If you are trying to install "Integration Gateway plugins" in eclipse juno, you may not find it. This tool will not be available for Eclipse juno, as SAP has official ended the support of Eclipse Juno in the end of June 2014. See this announcement.

 

Steps:


 

1. In Eclipse Kepler, Go to File>New>SAP Mobile Platform OData Implementation Project

 



 

2. Give any project name. Make sure to select proper server as Target Runtime. (I have installed SMP 3.0 SP03 on my machine so i have chosen respective option).

 



 

3. Give a Model name and click>Finish.

 

4. Create a new Entity>Give some name.

 

5. Make sure EntitySet should have same name as Table name > SMP_NOTIFICATION_TARGET

And its properties name should match as above table's column names. (as per first screenshot)

 



 

Note: There is no need of implement the OData service (as in Eclipse JUNO) since odatasrv has already been generated at the time of project creation.

 

6. Right click DerbyModel.odatasrv> Select Data source> select JDBC>Finish

 



 

7.  Right Click project>Generate and deploy Integration content

 

Note: There is no need to deploy the JDBC driver for apache derby, because it is already on the build path (by SMP system). So do not deploy again the jdbc driver inside the pickup folder..

 

8. Logon to Gateway cockpit: https://smpserverip:8083/gateway/cockpit



    • Create a new destination under DESTINATIONS tab>Create a new Destination

    • Provide below details:






 

 





































Property Value
Destination Name DerbyDB
Destination Type DATABASE
Destination URL jdbc:derby://localhost:1527/F:\SAP\MobilePlatform3\Server\db\derby\smp3
Database Driver org.apache.derby.jdbc.ClientDriver
Authentication Type Basic Authentication
User Name gomobile
Password secret

 

9. Switch to "SERVICES" tab, Click the deployed OData service and then Click on "Add Destinations"

 



 

10. Click on "Open service document"

 

http://localhost:8080/gateway/odata/SAP/DERBYDBODATA;v=1

 



 

11. To get EntitySet details, add SMP_NOTIFICATION_TARGET at the end of above URL.

 

http://localhost:8080/gateway/odata/SAP/DERBYDBODATA;v=1/SMP_NOTIFICATION_TARGET

 

To get the list of device id and Device notification key against an application id

 

http://localhost:8080/gateway/odata/SAP/DERBYDBODATA;v=1/SMP_NOTIFICATION_TARGET?$filter=CONFIGID%20...

 



 

ℹ To get list of all Application Connection ids against all Application IDs registered in admin cockpit then look for SMP_APPLN_CONNECTION_INFO table. It will also show if Application connection status is ACTIVE or DELETED.

 

Tips: When an entity type is created in an OData implementation project, there is one property key parameter gets created by default. Make sure to remove/rename it. Otherwise you may encounter with below error while opening EntitySet URL. As this key parameter is not present in database table.

 

"An exception occurred".

 



 

 

Big thanks to marvin.hoffmann for his valuable inputs.

6 Comments