cancel
Showing results for 
Search instead for 
Did you mean: 

OrgChart 3.0 Dynamic Hierarchy and Listing

Former Member
0 Kudos

Hi Experts

We are using OrgChart 3.0 SP2 Staged, Build 0702019400.

My requirement is similar to other posts but I have not found a definitive answer.

There are over 10 Org Structures, each with it's own company code.

There is a Root OU at the top of all the structures but the requirement is that each employee can only have visibility to the Structure within their own company code. Rather than create over 10 Hierarchies and associated Listings and try to link with specific roles I would like to have a more dynamic solution if possible.

In the OrgChart Hierarchy I would set the dynamic root based on employee data (per admin guide) but i need to limit the amount of Structure visible and searchable.

Is it possible to use the Data Connection->Data Filter field to limit access to OrgUnitHierachy2 by say adding a company code field to the table and adding a filter to the CURRENTUSER data i,e. COMPANYCODE = [CURRENTUSER.COMPANYCODE], and do something similar in the Listings?

If possible what would the syntax of the filter be and how do I add the Company Code field to the currentuser data?

Has anyone tried this or have a better suggestion on how to proceed.

Regards

Stuart

Accepted Solutions (1)

Accepted Solutions (1)

lukemarson
Active Contributor
0 Kudos

Hi Stuart,

I'm sure this can be achieved, but it could be a bit tricky. If you can edit the NakisaRFC function SAP_UserPopulation.xml and add a field that is the root company code ID for an employee (this function returns the logged-in user's information) then you can use dynamic rooting for the orgchart and use this new field as the field that the orgchart takes the root ID from.

Does it sound like it works for your requirement?

Best regards,

Luke

Former Member
0 Kudos

Hi Luke

Thanks for the response. It is a tricky requirement since I can't leverage backend struc auths. Does

your suggestion set the root org unit at the top of the company code structure but still allow the users to navgiate up passed the root and down another company code structure?

In other words if you set a root does that limit how far a user can navigate upwards?

Also does it prevent the user from searching other company structures in the Listings?

 

Have a nice weekend.

Stuart

lukemarson
Active Contributor
0 Kudos

Hi Stuart,

The method will just start the chart at their company code. If they have authorization to navigate up and into other structures in SAP then they will be able to do this in OrgChart (assuming that you are using the Live version). Searches will still be the same, since they are also controlled by SAP authorizations and not by  root that the chart starts with.

Best regards,

Luke

Former Member
0 Kudos

Hi Luke

We are using Staged OrgChart which makes my choices more difficult. I need to limit access to a certain part of the structure from a Root OU downwards in the Hierarchy and the Listings.

Does the SAP_UserPopulation.xml file control the CURRENTUSER values? If I want to reference a CURRENTUSER value what is the syntax for that i.e. [CURRENTUSER[ORG_ID]]? Or am I wasting my time with this vein? I intend to use your suggestion on adding fields to this file in anycase and will let you know how i get on.

Regards

Stuart

Former Member
0 Kudos

Hi

Hopefully I can put something back here..

I now have the OrgChart displaying only Org Units associated with the Company code assigned to the Users Org Unit. I also only allow org units in the users company code to appear in the Org Unit Listing.

This required a new field on OrgUnitHierarchy2 (COMPANYCODE) which i popluate in the Extractor for every org unit using an SQL procedure.

I then changed the OrgUnitHierarchyDataElement and SAPOrgUnitSearchDataElement files to add dynamic filters as below;

<dynamicfilter><![CDATA[COMPANYCODE IN (SELECT COMPANYCODE FROM ORGUNITHIERARCHY2 WHERE OBJECTID = '[![CURRENTUSER['ORGUNIT']]!]')]]></dynamicfilter>

This seems to work perfectly, though it may not be the best solution possible. I would have liked to add the Company Code as an attribute to the CURRENTUSER selection from data element UserPopulationInfo but that will have to wait for another time.

I now have to remove Positons from the Positon Listing based on users Conpany Code and also consider for the future where users may have access to more than one company code.

Hope this helps others

Regards

Stuart

lukemarson
Active Contributor
0 Kudos

Hi Stuart,

Thanks for posting this - it's very useful for the community. If your question is answered, please mark it as so. You can assign a Correct Answer to yourself so that users know that was the solution.

Best regards,

Luke

Answers (0)