My experience is that the configuration steps listed in the ERP MA Help file are incomplete to say the least. This post is an attempt to give step-by-step or rather screen-by-screen instructions on how to configure and use SAP MA with FIM 2010.
The SAP MA that is shipped with FIM 2010 makes use of SAP .NET Connector 2.0. Please note that this is a 32-bit component while FIM 2010 needs a Windows 2008 64-bit server. The .NET connector also has Visual Studio 2003 as one of its installation prerequisite. So installing the complete package on FIM 2010 Synchronization Server is cumbersome to say the least. And since I’ve not tried installing the complete package, I cannot tell if it gets installed on a Window 2008 x64 server at all. Luckily, the SAP MA only needs three runtime files listed below from the package:
Here are the steps to extract and deploy these files on a FIM Sync Server:
It may be helpful to note that running Synchronization Service ERP MA Configuration UI Tool requires following additional permissions:
The user running the ERPMAConfigTool will require the following privileges:
The ERPMAConfigTool also comes with a sample template file called ERPDefaultTemplate.xml. We can use it, along with the help file, to explore how Add, Replace, Delete, Full Import etc. operations are configured on employees and users. If we look at, say, the Full Import configuration for employee or user information, the general pattern is: call GETLIST for all the records and then call GETDETAIL for each of the record returned in the previous call. Needless to say, this does not perform well for a large enterprise. Hence there is always a need to get custom BAPI’s written which will return all the needed information is a single call.
So for this tutorial, we’ll make use of a custom BAPI function ZBAPI_FETCH_EMPLOYEE_DETAILS which has following signature and returns all the employee details of interest to FIM in a single call:
ZBAPI_FETCH_EMPLOYEE_DETAILS RECORD_DATE RFCTYPE_DATE in IT_EMP_DETAILS RFCTYPE_TABLE inout RETURN RFCTYPE_STRUCTURE out
The BAPI is written such that it supports Full Import as well as Delta Import depending on what is passed as RECORD_DATE. The employee records are return in the IT_EMP_DETAILS table. Let’s use this BAPI for configuring the SAP MA.
The first time we connect to a SAP environment through the ERP MA Configuration Tool, a discovery process is launched. Discovery retrieves the set of available BAPIs and caches them for future use. The discovery with the default filter generally takes half an hour or more. Hence the first thing we would do is to narrow down the filter before connecting to the SAP server as shown in the screenshot below:
We make sure we check the “Rebuild discovery cache on next startup” checkbox and close the application. We get a warning as shown below:
We ignore the warning and exit the application.
We now reopen the application and connect to our SAP environment.
Once we enter the correct connection string and user credentials, the BAPI discovery process starts and quickly finishes.
Now we can proceed with the configuration of the employee object.
Now if we think we are done with the configuration and try to save the file, we get following error:
Obviously, we are yet to set the anchor for the employee object and this is where it gets little tricky. Let’s follow the documented instructions and see how far it takes us to.
We can notice that saving the configuration creates following three files in the Extensions folder:
The first xml file is our source code, the second xml file is meant to be provided as an input during the configuration of our management agent while the third DLL file is our compiled binary assembly needed at our management agent run time. The first two .xml files are not needed at run-time so can be removed from the Extensions folder after use.
We can also configure the Delta operation making use of the same BAPI and following the same steps. The only difference here would be to pass ma.lastrundate from the Reference drop-down as the RECORD_DATE instead of hard-coded values of 0000.01.01.
For the sake of completeness, the following screenshot sequence depicts the configuration of SAPHR Employee MA.
Now we are ready to configure a couple of run profiles and see if we get the data in the SAP MA’s connector space.