The steps below guide you through the steps required to configure the ERP MA to update/replace users in SAP. 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 Update/Replace operation for the User Object Type.

The approach

The default configuration is to first flow the changed user-data from CS attributes onto the corresponding function/parameters that manage user changes (outlined below) and then execute the changes.

The default functions used for updating users in SAP are:

  • BAPI_USER_CHANGE - Update user information in SAP.

  • BAPI_USER_PROFILES_ASSIGN - Sets the current user's profile to what is passed in.

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

  • username - anchor attribute (defines the user)

  • firstname

  • lastname

To configure a replace user 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. Select remove for the operation by clicking and selecting from the standard FIM operations in the drop-down combo box.

  4. Designate where we want the anchor attribute to flow to. Select the 1st function BAPI_USER_CHANGE and click the Edit button.

  5. Highlight the USERNAME parameter and click edit to display the form used to associate the anchor alias with this parameter. Select the 1st function BAPI_USER_CHANGE and click the Edit button.

  6. Next, define the change-reference structure for this function. To do this click the Define Change Reference button.This will bring up the 'Define change Form'

  7. Repeat the above step to associate the user.anchor alias to BAPI_USER_PROFILES_ASSIGN.USERNAME PARAMETER

  8. Complete the wizard by clicking Next and OK as appropriate until you return to the main screen.

Adding attribute 'username'

  1. Click the Add Attribute action button on the main window. This will start the 'Add New Attribute' wizard.When prompted enter a name='username' then click Next.

  2. Map this attribute the function/parameters

    • 'BAPI_USER_CREATE.USERNAME'

    • 'BAPI_USER_PROFILES_ASSIGN.USERNAME'

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

Adding attribute 'firstname'

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

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

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

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.

Adding attribute 'profile'

  • Click the 'Add Attribute' action button on the main window to start the Add Attribute wizard. When prompted enter the

    1. name = 'profile'

    2. Check the 'multi-value' option for this attribute, since a user may have multiple profiles assigned.

    3. Map this attribute to the function/parameter 'BAPI_USER_PROFILES_ASSIGN.PROFILES.BAPIPROF'

Adding a runtime check condition to 'BAPI_USER_PROFILES_ASSIGN' (optional)

Because a separate function is called to assign profiles to a user, you may not want this function to run when there is no 'profile' data to process. To prevent this, set up a runtime condition to check that the CS attribute "profile" is populated before calling this function.

  1. Edit the 'add' operation by selecting the operation and clicking the edit action button

  2. Select the 'BAPI_USER_PROFILES_ASSIGN' function and click the edit button at the bottom of the form.

  3. Click the edit function properties to the right of the function name. This will open the "Add Condition" form shown below.

    • Check the 'Enable checking runtime condition before executing function' checkbox.

    • select the attribute named 'profiles' in the attribute list

    • In the 'Execute function when' option, check the 'Attribute Value Exists' radio box

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.