Introduction
The integration of SAP HANA with SalesForce.com (SFDC) will provide an unique solution that will harness the user experience of SFDC with real time analysis of data using SAP HANA. In this blog we explain the POC developed using SalesForce adapter provided by SAP Business Object Data Services (BODS) to extract information from SalesForce.com, normalizing and storing the data in SAP HANA and expose processed data via SAP HANA Extended Application Services Server (XS Server).
Business Value
Statistical analysis of the customer data will help business pinpoint the inconsistencies and take corrective action. It will also help track customer behavior; identify trends and potential business opportunities. SAP HANA provides statistical functions as part of Predictive Analysis Library (PAL). These statistical functions can be used to analyze customer data from SFDC and develop a statistical control process to support client’s business objective.
Steps to integrate SAP HANA with SalesForce.com
In addition to the data analysis the other steps that go into building this solution are:
There are multiple options available to import data from SFDC into SAP, in this blog we focus on SalesForce adapter provided by SAP BODS as –
SAP HANA XS Server provides the 3 options for web clients to consume data –
The diagram below shows the components and dataflow for HANA to SalesForce integration.
Importing data using BODS Sales Force Adapter
To use the Adapter for Salesforce.com from SAP BusinessObjects Data Services please follow the following steps.
Develop OData WebService using HANA Extentded Application Service
OData is a resource-based Web protocol for querying and updating data that maps the persistence model to consumption models. An OData application running in SAP HANA XS can be used to provide the consumption model for client applications exchanging OData queries with the SAP HANA database.
OData enables clients to consume authorized data stored in the SAP HANA database. OData defines operations on resources using RESTful HTTP commands (for example, GET, PUT, POST, and DELETE). Data is transferred over HTTP using either the Atom (XML) or the JSON (JavaScript) format.
Given below are steps to create an ODATA Webservice for HANA XS Engine:
2. Create a XS Project - A new XS Project – xs_order_prj created using Development Perspective.
a) Create a new project | b) Select project type as – XS Project |
c) Project xs_order_prj is created with location in workspace folder xsandas3. Please note the default location option is unchecked. The workspace folder name is same as the package where the analytical view was created. | |
d) The project- xs_order_prj that was created in the above step needs to be shared. It was shared by right clicking the project name and selecting Team -> Share project option. | |
3. Set up ODATA Service files - Application descriptor (.xsapp) and application access (.xsaccess) files created.
Application descriptor (.xsapp) is a blank file.
a) Right click on project created and use New -> File option to create .xsapp, .xsaccess and order.xsodata files.
b) Application access (.xsaccess) file is created as shown below. This file is used define what is to be exposed as web service and who has access.
c) Create file order.xsodata to expose the analytical view – AN_ORDERS as a web service. The ODATA Service is defined as –
service {
"xsandas3/AN_ORDERS.analyticview" as "orders1" keys generate local "GID" aggregates always;
}
4. Commit and activate service – Commit and activate the .xsapp, .xsaccess and order.xsodata file.
After the files are committed and activated successfully the orange bubble icon appears
5. Testing Odata Services - OData webservices provide multiple parameters and syntax to support multiple operation such as retrieving the metadata definition, apply filter, selecting a subset of record.
ODATA URL: The ODATA URL is based on the server name, instance number of the HANA system, package name, xsodata filename and entity set name.
The actual server name, instance number, package and xsodata filename can be replaced in the URL - http://<servername>:80<instance number>/<package>/<xsodata filename> to determine the URL string.
The below table provides sample URLs and output assuming server name is acmecorp.com, instance number is 00, package – xsandas3, xsodata filename is order.xsodata and entity set name = orders1 .
Operation | URL and Output |
Retrieve Metadata | |
Get records in JSON format | http://acmecorp.com:8000/xsandas3/order.xsodata/orders1?$format=json |
Get records in atom format | |
Apply filter | http://acmecorp.com:8000/xsandas3/order.xsodata/orders1?$filter=startswith(CUSTOMER,'901') |
Building SOAP based web service using XMLA
XMLA enables the exchange of analytical data between a client application and a multi-dimensional data provider working over the Web, using SOAP based web service. Implementing XMLA in SAP HANA enables third-party reporting tools that are connected to the SAP HANA database to communicate directly with the MDX interface. I will provide details regarding building a XMLA service in next edition of my blog.
Accessing Webservice in SalesForce.com
Salesforce.com provides APIs that support both SOAP and REST based webservice. The Webservices defined in HANA can easily be accessed and consumed.
Reference Links -
BODS Sales Force adapter guide - http://help.sap.com/businessobject/product_guides/sboDS41/en/sbo41_ds_salesforce_en.pdf
SAP HANA Developer Guide –
http://help.sap.com/hana/hana_dev_en.pdf
Contribution
The following team developed the POC and the blog:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |