SAP SharePoint and Office 365 Integration via NetWeaver / OData
SAP integration into Office 365
and SharePoint is a typical project requirement, but sometimes not easy
to solve. It is not only about data migration, it is about permanent integration
in a hybrid scenario. And integration is not about displaying data in
SharePoint, e.g. using Web Parts or BCS. It's about FULL integration, e.g. in
SharePoint search, content categorization, change notifications, workflows to
start business processes right in SharePoint in case of external data changes in
SAP. This article shows how easy full SAP to SharePoint and Office 365
integration is today using the Layer2 Cloud Connector and
the Layer2 Data Provider for OData via SAP
NetWeaver without any coding. It just needs a few minutes of
In this example we are going to
create a new connection in the Layer2 Cloud Connector, or copy from the
existing SAP to SharePoint sample connection. It should be uni-directional SAP
to SharePoint. Generally bi-directional connections are supported as well. You
can enable background scheduling later on to update the SharePoint list
At this time the connection should look like this:
Fig. SAP to
SharePoint connection defined in the Layer2 Cloud Connector.
We are going to use the new SAP NetWeaver demo portal as a data source. Please
note that you must register to gain access. You will find a service description
here after login. If you don't have
access yet, please
register here before. Now it is easy to configure the SAP data source in the
Layer2 Cloud Connector. It should look like this:
Fig.:SAP data source defined in the Layer2 Cloud Connector.
To access the SAP data please
select the OData Provider from the list of available providers. If not
available, please install. It comes as part of the Layer2 Cloud Connector
installation package (license is included). Please specify URL, collection,
authentication method, user and password in the connection string section. You
will find a specification of supported attributes in the Layer2 Data Provider for OData specification. You can also use
valid OData expressions as a select statement to filter the source data for
specific criteria or remove unwanted fields. Please verify the connection
In case of the SAP Demo portal we are using:
Collection=TravelAgencies; Authentication=Windows; User=P***; Password=***
You can also add parameters to the query like this:
After successfull verification, please display the data preview. As you can
see, there is a unique ID field agencynum in the data set. Please set as primary
key for data synchronization as shown above.
Note - Connecting to SAP may require an additional authentication method:
SAPHeader. This secondary authentication re-enables writing access to SAP
systems after the addition of the cross-site request forgery token. It has to be
attached to an existing authentication as it won't work by itself. See the User
Documentation included with the Connector for more details.
Now lets connect the data destination, a SharePoint Online contact list in
Office 365 in this example. Current SharePoint on-premises Editions are supported as well. Please
select the CSOM provider to connect. Please add a connection string that
contains the URL to the SharePoint site, list and view, also the authentication
method and user / password. See a full CSOM connection string specification here.
Fig. SharePoint Online list as data
destination for SAP queries defined in the Layer2 Cloud Connector.
The list must be created manually
before connect in SharePoint. As in our sample we have address data, we create a
new contact list to have some more contact-specific features later on - like
Outlook offline replication or mobile access. We additionally create a column
SAP-ID to have any hint, where the item data exactly comes from. No primary key
must given for SharePoint, item ID is always used automatically by the provider.
Please verify the connection.
Now we have to map the SAP data fields with the SharePoint list columns. We
cannot use the auto-mapping feature of the Layer2 Cloud Connector in this case,
because SharePoint contact columns have specific names, different from
The mapping section should look like this (you can map more columns later):
Fig. Field / Column mapping for data
source and destination in the Layer2 Cloud Connector.
Please note the field "name" is
mapped to the SharePoint "title" column (actually the Lastname of a SharePoint
contact list). Also our primary key agencynum is mapped to our additional column
SAP-ID. Please verify the mapping before continue.
Now we are prepared to run the first sync. The Layer2 Cloud Connector now
talks to SAP (via Netweaver/Odata) and to SharePoint / Office 365 (via CSOM) and
syncs the data entities as required.
Fig. First sync of SAP data source
and SharePoint list via the Layer2 Cloud Connector.
Now take a look at our connected SharePoint list.
Fig. Native SharePoint contact list
connected to SAP data via the Layer2 Cloud Connector. The contact list can be
connected to Microsoft Outlook for offline sync and has all other features of a
native SharePoint list.