SAP Knowledge Base Article - Public

2285359 - Adding an Association from Custom Foundation Object to MDF Foundation Object (GO to GO) - Employee Central

Symptom

How do you add an association mapping to filter the selection in a Custom Foundation Object (Child) field with an MDF Foundation Object (Parent) field? For example, we have created a Custom Foundation Object called "Sub Department" and we wish to filter Sub Department based on the Department selection. How can we do this?

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental. 

Environment

  • SAP SuccessFactors HXM Suite
  • Employee Central

Resolution

It may be required that the list of values available for your Custom Foundation Object require filtering based on the selection made in another Object field. For example, Sub Department will require filtering based on the Department selection made. For this we can add an Association between the objects. This is done always in the direction from the Child to the Parent. In other words, the association is added to the Sub Department object configuration (not to Department).

  • Department = Parent Object
  • Sub Department = Child Object

The following actions do not require a Support Incident, and can be executed by an Admin User. A few things to remember here before getting started -:

  1. Start Simple! Try not to do everything at once on your 1st try. Keep it simple, get the basic configuration working, and then work to expand to the more complex scenarios.
  2. Always start in your Test/Sandbox instance - never start in a QA/Production instance. 
  3. Ensure that you follow the below steps and create your working object first, before trying any custom configurations, as it is much simpler to get the basic object working and then build up to the intended configuration instead of doing it all in 1 step (as mistakes can be made which could lead to errors/inconsistent behaviours).

You will need the following Administrative Permission to access the following Admin Center UI's to complete this task -:

  • Configure Object Definitions
  • Manage Data
  • Manage Business Configuration

Example Association Configuration - Sub Department (Child) to Department (Parent)

1) Navigate to Admin Center > Configure Object Definitions > choose "Object Definition" in the 1st drop-down menu and then select the Object in question from the 2nd drop-down menu. In our example, we are using "Sub Department". Then choose Take Action > Make Correction -:

EditObject.JPG

2) Scroll down to the "Associations" section and add in an Association. Make sure to call it something sensible and recognizable - here we use "toDepartment" to be clear. Also fill in -:

  • Multiplicity = This should always be set to "One To Many"
  • Destination Object = This is where you select the Parent object - in our case it is Department
  • Type = Should be set to "Valid When"
  • Details = You can set the Label in here, which will display as the Association Title in Manage Data when adding Departments to Sub Departments

ObjectAssociation.JPG

3) Once done, scroll to the bottom of the Object and click Save. Note down the Association Name - as per above our example is "cust_toDepartment" - you will need this later on when we add Field Criteria to the Job Info field - please remember this is case sensitive.

4) Next we need to find out what is the internalCode field name from the Department object, as we will need this for later also. NOTE: When associating an MDF object with another MDF object, you will always be using the internalCode "Name" value in your Field Criteria.  So, in Configure Object Definition page, look for the object Department. Then look down the list of "Database Field Name" values to identify the internalCode field, then note the value down that is under "Name" (not the Database Field Name) as we will need this for later also. In our example, the value we note down is "InternalId" -:

internalCode.JPG

5) Next, we need to add Field Criteria to the Sub Department field in Job Information (as this is required for the filtering to work). Navigate to Admin Center > Manage Business Configuration > select jobInfo element. Scroll down and find the Sub Department field (in our example, this is custom-string18). Click on Details for this field, and in the Details menu, scroll down to Field Criteria section.

6) The Field Criteria in this scenario, is made up of Destination Field Value and Source Field Name. This means -:

  • Destination Field Value = This is the field id for the Parent of the association (in our case the Department field). Here you must enter the "Identifier" for the field, in this case "department".
  • Source Field Name = Is made up from 2 values. First part "cust_toDepartment" is the Association Name on the Sub Department (Child) object, which we added in step 2 above. The second part is the field "Name" value for internalCode from the "Department" object.

The Values are added as such -:

  • Destination Field Value = department
  • Source Field Name = cust_toDepartment.internalId

FieldCriteria.JPG

Note: In the source field name you will also point it to the internal ID but according to each object this field might have different names for example (internalCode or mdfSystemInternalCode) in order to configure this correctly you must go to the parent object (in this example here department) and search for the internal ID field, then copy and paste the field name (see a different example in the image below).

salesDemo1.jpg

Following this image example the Source Field Name would be cust_toDepartment.mdfSystemInternalCode

7) Once the values have been added, click "Finished" then scroll down and click "Save"

Important note: If step 5, 6 and 7 is not in place system will invert the association in the employee level (e.g. will be Department Child Object and Sub Department will became Parent Object)

8) Next, navigate to Admin Center > Manage Data. Search for the Sub Department object. Here you will need to update the Sub Departments that are already created and add one or more Departments. As per the below the Sub Department "SD10000" will only display in the Sub Department field if one of the 4 associated Departments is selected.

Things to note -:

  • It is a good idea to add the association data from the initial historic record (below dated 01/01/2000) of the Sub Department, and not in a new Inserted record. This makes life easier when working with multiple object associations and Effective Dating
  • The 1st statement is simply to make the configuration and deployment simple. Of course you can make the associations effective from whatever date you choose.

DeptAssoc_ManageData.JPG

9) Navigate to My Employee Files > Search for a Test user and navigate to their Employment Information page. Final check to make is to ensure your association is working correctly. You can use History > Insert New Record/Make Correction for a quick test. Select a Department and then choose a Sub Department option

JobInfoTest.JPG

10) Before deploying the same solution to a Production instances, please ensure you thoroughly test the changes thoroughly. Meaning, ensure the field works in all available UI's (History, MSS UI, etc). Make sure that when assigning permission that the relative roles have access to view/edit data in this field. And verify any workflows triggered off of changing this field are triggered accordingly.

 

If you have further configuration questions please review the Employee Central Master Implementation Guide

See Also

Keywords

Custom Foundation Object, Legacy Foundation Object, Parent, Child, Create Custom FO, association, value help, go, fo, mfo, associations, GO to FO, GO to mFO, GO to GO, mFO to mFO, , KBA , LOD-SF-EC-FOO , Foundation Objects (Organisation, Pay and Job Structures) , LOD-SF-EC-MDF , MDF & EC2MDF Migration , LOD-SF-EC-JOB , Job Information , How To

Product

SAP SuccessFactors HXM Suite all versions