The steps below guide you through the process of configuring a new ERP MA for full import. The ERP MA Configuration Tool is used to create the configuration. Depending on your SAP environment, you may be able to use the default template instead of following these steps. If possible, it is recommended to either use or start with the default template. The steps outlined in this section, describe the process for creating a new Full Import operation for the User Object Type.

The approach

The default configuration for Full Import for the User Object Type is to execute the first function (BAPI_USER_GETLIST) and collect a list of user IDs. Next, the collected user IDs are passed to the 2nd function (BAPI_USER_GET_DETAILS) one at a time in order to retrieve the individual user details. When the 2nd function call returns, the data flows from the function output parameters into FIM attributes by setting up some mappings between the two.

The default functions used for importing users from SAP are:

  • BAPI_USER_GETLIST - returns a list of users that currently exists in SAP.

  • BAPI_USER_GET_DETAIL - returns the details for that user, given a user ID.

For this example, we'll configure the minimum set of attributes:

  • username - anchor attribute (defines the user)

  • firstname

  • lastname

To configure GETLIST operation
  1. To begin, start the ERP Configuration Tool. This will bring you to the main window. Click the connect button to connect to your SAP server.

  2. Click the "Add ObjectType" action button. Enter the name of the CS object to be created in FIM (i.e. users, employee, etc). Click Next to move to the 'Add Operations for ObjectType' form.

  3. Click the "Add" button to add new operations for this object type. Doing so will start the "Define Operation" wizard. Select "full" for the operation by clicking and selecting from the standard FIM operations in the drop-down combo box.

  4. Enter BAPI_USER_GET* in the search dialog box to lookup the definition for all functions beginning with "BAPI_USER_GET"Select BAPI_USER_GETLIST from the list and click OK.

  5. Define an alias to use to reference all the user ID's returned from this function. Click the edit button to edit the details for this function.

    • Expand the parameter USERLIST.USERNAME and edit this parameter. Click the edit button

    • In the alias edit box, enter the letter "x" NOTE: This denotes that anywhere else in this configuration "x" will refer to the list of users returned.

    • Complete the wizard by clicking Next until you return to the "Define Operations for Object Type" with one operation configured.

To configure GETDETAILS operation
  1. Repeat the process to create a new operation named getDetails with function BAPI_USER_GET_DETAIL.

  2. Click the Add ObjectType button to start the "Define Operation" wizard. Enter a operation name getDetails. You will have to type in the user defined operation "getDetails" as this is not one of the default FIM operations.

  3. Search for and select the function "BAPI_USER_GET_DETAIL".

  4. Edit the details for this function by clicking the "Edit". This will open the Edit Function properties form.

  5. Flag that you want to username (referenced as alias x) to be moved onto the username parameter of the 2nd function. So select the username parameter and click Edit.

    • Select the alias reference combo box and select "x" from the list.

    • Click OK to return to the edit operations wizard.

    • Completed the wizard now by clicking Next until the you are back to the Define operations for object type wizard. You should now have two operations defined.

To call GETDETAILS after GETLIST operation
  1. To call our user-defined getDetails operation, we must call it from one of the standard FIM operations. So, we'll need to edit the "full" operation again and add getDetails to the list of steps to execute.

  2. Select the "full" operation again and click Edit. This will bring you back to the 'Define Operation' form.

  3. Click the Add button to add a new user-defined operation to the list of functions to execute. This will take you to the search dialog box again, now select user defined operation at the top of this form to get a list of the user defined-functions in this configuration.

  4. Select the 'getDetails' operation from the list and click OK. This will take you back to the 'Define operation' form.

    getDetails is now in the list of execution steps. You can reorder this list as needed by using the arrow keys to the right side of the form
  5. Click the Next to complete the wizard and return to the main tree view.

Adding attribute 'username'

  1. Click the Add Attribute action button on the main window. This will start the 'Add New Attribute' wizard.

    • username will be the anchor attribute, so it should be set to required.

    • Mapping a to parameter which has an alias defined for it will automatically map to the alias value; in this case username will be mapped to alias 'x'.

  2. Map the username attribute to the function/parameter 'BAPI_USER_GET_DETAIL.USERNAME' which will return the data needed.

This will flow data from attribute 'username' to the username parameter on the function.

Adding attribute 'firstname'

  • Repeat the Add Attribute procedure outlined above to create a new string attribute named 'firstname'.

  • Map this attribute to the function/parameter 'BAPI_USER_GET_DETAIL.ADDRESS.FIRSTNAME' which returns 'firstname' information for a user.

Adding attribute 'lastname'

  • Repeat the Add Attribute procedure outlined above to create a new string attribute named 'lastname'.

  • Map this attribute to the function/parameter 'BAPI_USER_GET_DETAIL.ADDRESS.LASTNAME' which returns 'lastname' information for a user.

Save configuration as MA

  • Save the configuration to the FIMInstallDirectory/Extensions folder. Remember to use a name which will be the name of you MA within FIM.