Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function module to get manager of a user

Former Member
0 Kudos

hi,

I am desparatly looking for a BAPI / RFC giving be a list of all directly managed subordinates of an user.

using HCM_GET_ORGSTRUCTURE_AS_XML is great but since I do not have information about relationships, I can' tell for sure who is manager of whom. It gives me this (originally hex-encoded!) output:

...

<Child>

<Type>O</Type>

<ID>50000172</ID>

<Relation>B002</Relation>

<RelationBeginDate>2005-07-21</RelationBeginDate>

<RelationEndDate>9999-12-31</RelationEndDate>

<Child>

<Type>S</Type>

<ID>50000173</ID>

<Relation>B003</Relation>

<RelationBeginDate>2005-07-21</RelationBeginDate>

<RelationEndDate>9999-12-31</RelationEndDate>

<Child>

<Type>P</Type>

<ID>00000026</ID>

<Relation>A008</Relation>

<RelationBeginDate>2005-07-22</RelationBeginDate>

<RelationEndDate>9999-12-31</RelationEndDate>

</Child>

</Child>

<Child>

<Type>S</Type>

<ID>50000300</ID>

<Relation>B003</Relation>

<RelationBeginDate>2005-08-08</RelationBeginDate>

<RelationEndDate>9999-12-31</RelationEndDate>

<Child>

<Type>P</Type>

<ID>00000043</ID>

<Relation>A008</Relation>

<RelationBeginDate>2005-08-01</RelationBeginDate>

<RelationEndDate>9999-12-31</RelationEndDate>

<Name>Fred Bloggs</Name>

<BeginDate>2005-08-01</BeginDate>

<EndDate>9999-12-31</EndDate>

<AdditionalData>

<Key>ORG_BEGDA</Key>

<Value>2005-08-01</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_ENDDA</Key>

<Value>9999-12-31</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_RTEXT</Key>

<Value>Holder</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_SHORT</Key>

<Value>Bloggs</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_STEXT</Key>

<Value>Fred Bloggs</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_VBEGDA</Key>

<Value>2005-08-01</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_VENDDA</Key>

<Value>9999-12-31</Value>

</AdditionalData>

<AdditionalData>

<Key>ORG_VPROZT</Key>

<Value>100,00</Value>

</AdditionalData>

</Child>

</Child>

...

do you know of a RFC I can use for retrieving the direct

subordinates of a user or -even better- to get a full, hierarchical representation of all subordinates? With the RFC above I can tell, who is a member of a certain organisational unit but not who the members linemanager is.

Thanks alot.

tobi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I don't know about RFC, but have a look at this thread and may be you can create an RFC wrapping the one in this thread.

Srinivas

2 REPLIES 2

Former Member
0 Kudos

I don't know about RFC, but have a look at this thread and may be you can create an RFC wrapping the one in this thread.

Srinivas

0 Kudos

Thanks Srinivas, indeed, that took me further, but what I am trying to achive is to put the cart before the horse:

I need to get a list of all subordinates of a manager, the RH_STRUC_GET with act_wegid = 'BOSSONLY' returns the manager of a organisational unit.

I could assemble the information myself using RH_STRUC_GET and HCM_GET_ORGSTRUCTURE_AS_XML if the following assumtion is true:

Is it true, that a manager of an Orgaisational unit is the linemanager of each other Person in this Org unit?

Thanks alot

tobi