In the first part of the blog, we have seen how the basic connection with SAP can be set up :
Connecting-SAP-employee-information with SharePoint user profile services Part 1
Now let we see how the BCS side can be configured :
STEP 2 : Creating BCS.
1. Create an empty SharePoint 2013 Project in the same solution add a Business Data Connectivity Model to the Project and do not forget to refernce the project of the old command promt application, fo course ony after that you set the project output type to class library :
2. configure in the package, that both the solution dlls and the SAP Connector dlls are deliverd to the GAC (rscp4n.dll, sapnco.dll, sapnco_utils.dll)
3. Add a static Connection class to have a reference on the connection itself :
4. Update the employee to cover the basic properties.
5. Implement the finder and specific finder methods to get the employee infromation:
In this example specific finder is simply the name of an employee, that is pretty much general configured to match. We certainly use the Employee wrapper class that was implemented in the first part of this blog to capture the SAP information,
6. Configure BCS either with the help of the editor or directly the xml to contain the properties and the Name property as an indexer :
7. After building and deploying, you can test if it works as well, like creating an external list in one of the sites and populating SAPUserProfil EmployeeEntity external type (do not forget giving rights to the external content type at the central administration) :
STEP 3: So, last but not least, the external content type has to be configured in the user profil sync:
1. In the User Profile Service Application by Configure Syncronisation Connection create a new connection from the type Business Data Connectivity, and configure a matching based on the AccountName or PreferedName (basicaly the specific finder is pretty flexible configured, so all of these conbinations should work). In this example we already have one connection to syncronise the basic accounts and user related information from Active Directory.
2. Create two new properties in the user profile service application for SAP Job and SAP Organisation infromation (like SAPJob2 and SAPOrg2) and configure them to get the information from the newly configured syncronisation connection.
3. Start a full User Profile syncronisation.
4. Check if the user profile has got the information in the extended properties, like
...
The end.