‎2005 Sep 08 11:04 AM
Hi Friends,
Is there any function module which can return name of Manager based on employee's userid i.e. pass employee User id as import parameter and get Manager details as export parameter.
Thanks and Warm Regards.
Pras
‎2005 Sep 08 12:01 PM
Hello,
You can use FM SWX_GET_MANAGER for that. When you want to use this in a workflow step then use rule 168.
This FM makes use of the FM RH_ACT_LEADING_POSITION.
Hopefully it helps you a bit further
Kind regards,
Peter
‎2005 Sep 08 12:01 PM
Hello,
You can use FM SWX_GET_MANAGER for that. When you want to use this in a workflow step then use rule 168.
This FM makes use of the FM RH_ACT_LEADING_POSITION.
Hopefully it helps you a bit further
Kind regards,
Peter
‎2005 Sep 08 12:07 PM
RH_GET_LEADING_POSITION is the function module that is used to get the info, provided you maiantained your org structure.
Cheers,
Ramki Maley.
‎2005 Sep 08 12:59 PM
Hi Peter / Ramki,
Thanks for the tips. Yes, I am using RH_GET_LEADING_POSITION. When I pass all values required for the above function module, I get a table LEADING_POS having columns PLVAR, OTYPE and OBJID. Thats fine.
My original question is how do I find USERID for OBJID returned in this function module. For example -
PLVAR = 01
OTYPE = S
OBJID = 50000131 ( I want userid associated with it - i.e. MANAGER).
Hope it is clear.
Thanks and Warm Regards.
Pras
‎2005 Sep 08 1:04 PM
Use the fm RH_STRUC_GET
with
act_otype = S in your case
act_objid = 50000131 in your case
act_wegid = 'SAP_US_S'
act_int_flag = ' '
table result_tab return found values
‎2005 Sep 08 1:09 PM
Thanks Peter,
It worked. You are a star.
I am awarding full points to you buddy.
Warm Regards.
Pras
‎2005 Sep 08 1:09 PM
As Peter pointed out Rule 168 does exactly that. If you look at the code in the rule FM SWX_MANAGER, you would see that FM RH_STRUC_GET is called to convert the objid to user id.
Cheers,
Ramki Maley.
‎2005 Sep 08 1:12 PM
Thanks Ramki.
As always, I know you are there to help me.
Warm Regards.
Pras