none
FIM Location / SAP Location Code RRS feed

  • Question

  • Hello,

    I was wondering if there's a way you can sync the SAP location code with FIM for whenever I go to create a new user. SAP has a location code, and whenever I create a new user in FIM, I want to be able to put in that code so the Address automatically gets filled in. 

    Or if that's not possible, is there a way to automatically fill in the address in FIM?

    Monday, August 3, 2015 6:39 PM

All replies

  • I am not sure what this attribute looks like (Long time I don't deal with SAP) but any attribute available can be mapped, I think.

    Nosh Mernacaj, Identity Management Specialist

    Monday, August 3, 2015 7:01 PM
  • They're SAP personnel area codes, like the codes are abbreviated, just how states are ex: CA for California. They are in letter forms not in numbers. If I have these codes, I can just map it by creating a new attribute for each MA right, SAP and FIM.
    Monday, August 3, 2015 7:11 PM
  • Yes and yes.

    Nosh Mernacaj, Identity Management Specialist

    Monday, August 3, 2015 7:14 PM
  • When I select the code in FIM, I want FIM to auto-fill the address according to that Location Code, I'm a bit confused on how I can do THAT.
    Monday, August 3, 2015 7:28 PM
  • Many options. 

    1. Classical Rules

    In this option, you need an advanced flow rule in import mapping for the attribute in question.

    You can hard code the values, if the are not going to change, or put them in a sql table or flat file and read from it. 

    In the code, you can simply create a select case or if else.

    A Sharp snipped of If-Else handing.

    If csentry["Location Code"].IsPresent and If !(csentry["Location Code"].Value.Equals (null))

    If csentry["Location Code"].Value.toLower="1"

    {

    mventry["LocationCode"].Value = "CA"

    }

    else If csentry["Location Code"].Value.toLower="2"

    {

    mventry["LocationCode"].Value = "NY"

    }

    .......

    .......

    .......

    else

    {

    Throw expectation ("This code is not recognized")

    //Or Do something else

    }

    2. Codeless, you can do similar thing with a huge IIF statement.


    Nosh Mernacaj, Identity Management Specialist

    • Proposed as answer by Nosh Mernacaj Tuesday, August 4, 2015 3:47 PM
    Monday, August 3, 2015 8:31 PM
  • If you can import the SAP location data via your SAP connector, and update the Person object I believe that would be the most direct.  

    A common pattern here is to use a Location Object in FIMService.  On that location object you have the Location Code, and other metadata associated with the location (Address, State, country, etc.)

    So when you set the location code on the FIM user,  you use an Action Workflow to look up the Location Object based on the code and update the target users attributes when it changes.

    The approach all depends on your source data.

    Jef


    ----- http://jeftek.com

    Tuesday, August 4, 2015 10:01 PM
  • Nosh,

    How would I be able to hard code this, where would the code go?

    Thursday, January 21, 2016 7:59 PM
  • Advance import flow classical rule in the SAP MA in Sync Server.


    Nosh Mernacaj, Identity Management Specialist

    Thursday, January 21, 2016 8:08 PM
  • I'm not so familiar with classical rules in the SAP MA, could you possibly guide me on to how I would go about doing that? Thank you.

    Friday, January 22, 2016 6:52 PM
  • On the management agent, right click and select "Create Extension Projects...", then Rules Extension.  Launch Visual Studio and go to the MapAttributesForImport method and enter in the .NET code --example has been provided in the thread.  Build the DLL and verify the file exists in Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Extensions.  Go back to the management agent, in the Configure Extensions, and verify the DLL is selected. Run a full sync preview on an object first to test behavior and if OK, run a full sync on the management agent.

    Here's a resource that may help -- its slightly out of date and uses VB.NET, but all the concepts are there. 

    https://technet.microsoft.com/en-us/library/cc720667(v=ws.10).aspx

    Best,

    Jeff Ingalls

     
    Sunday, January 24, 2016 9:16 PM
  • Is this the only way to do this, on my test server, I do not have Visual Studio installed, so I'm assuming this can't be done without Visual Studio?
    Tuesday, January 26, 2016 2:20 PM
  • You can create the package without having VS, but you need Visual Studio to develop, eventually.  You can develop and debug remotely.  You will need to copy the .DLL file to the extensions folder. 


    Nosh Mernacaj, Identity Management Specialist

    Tuesday, January 26, 2016 3:39 PM
  • Visual Studio Community Edition is free to download:

    https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

    Best,

    Jeff Ingalls

    Wednesday, January 27, 2016 7:36 PM