How to Verify Custom Database functional with SMP 3.0
Just to share my experience with SAP Mobile Platform 3.0, as we all know that from SMP 3.0 onwards there is not standard configuration for the Database file like in the previous versions wherein the setup used to create a Database file, be it a development system or a production system. From SMP 3.0 onwards, we have two versions the development system and the production system, both differing in the installation process.
For the development system the installation is straight forward as we can install it over the Derby Database, but for Production system we need to proceed with a custom Database, though i have tried the production installation on Derby Database and it worked but its been advised from SAP not to run Production systems on Derby Databases. So now the only option left with us is to carry on with the Custom Database which would be an additional pain for the Basis team to install a Database Server first and then install the SAP Mobile Platform server. The supported database as of now are
- Oracle DB
- Adaptive Server Enterprise
- IBM DB2
Once this is installed, SAP provides a pre coded script that we just need to run in order to create users, password and the database file (phewww that saves some amount of effort) but again sometimes the scripts runs fine but we are not able to connect the database to SAP Mobile Platform. This is actually where the actual pain starts because the entire installation went through properly still it does not work. When we try to view data by running an OData service on the Gateway Management Cockpit we receive an error “Could not send a message” this is a place where we need to worry coz this is the point when SMP is not able to communicate with the custom Database.
So i am writing this blog post to just verify that everything went through properly before actually investing our time in development prior to verification.
First step is to login to the SAP Gateway Cockpit from the url http://smpserveraddress:smpport/gateway/cockpit
By default you will see a service by the name ESPM Service.
This guy is our helper who will tell us are we on the path or off it.
So we start taking help with the helper.
Step 1 : Go to the Destinations tab and click on Create a new Destination
A Window will pop up. We will create a JPA2 Destination
Enter the below details
Destination Type : JPA
Persistence Unit : com.sap.espm.model
Authentication Type : Basic Authentication
Username : the same you used in the DDL file for running the script. If you didn’t change the script it will be gomobile
Password : the same you used in the DDL file for running the script. If you didn’t change the script it will be secret.
Step 2 : Adding the Destination to the ESPM Service
Navigate back to the services tab and click on the ESPM Service.
It will open up the detail window of the ESPM Service.
At the bottom you will see a small rectangular section mentioning DESTINATIONS.
Click on Add Destination and a small window will pop up fetching the destination which you recently created in step 1, in the drop down. Select your destination and click on Save.
Step 3 : Checking if the SMP Server is able to communicate with the Custom Database.
Go back to the Services tab and against the ESPM Service on the right you have a hyperlink which states Open Service Document which will open up the list of services for the ESPM Service.
Now to check if the server is communicating with the Database.
Pick up any of the methods of the choice and run it in the url
For eg If i am wanting to see Sales Order Items data from the sample database the url will be something like this https://smpserverip:gatewayport(8080/8081)/gateway/odata/sap/ESPMService;v=1/SalesOrderItems
Click enter to see the response. If all works good and SMP is able to communicate to the custom DB you will see a response like below
If you see a message like below or any other message , it means the SAP Mobile Platform is nt able to communicate with the Custom Database and you need to re install SAP Mobile Platform Server and reconfigure the Custom Database and re run the custom script.
Hope this helps,