‎2010 Feb 01 7:27 AM
Hi All,
We have some developed applications in which we need to get line managers for approval processing. For that we are using
the standard Function Module : HR_ASR_GET_LEADER. As we have HR Structural Authorizations maintained, this function module is not displaying Line Managers for some employees (even SAP_ALL is there)as it is performing authorization checks on structural profiles.
So we have developed a custom FM : ZGetApprs in which are retrieving Line managers from the table HRP1001.
We need to get clarification on the following:
1) In future if upgrades are done, will this custom Function module will affect in any areas.
2) Is there any function module like HR_ASR_GET_LEADER which will not perfrom unnecessary checking on structural profiles for simply getting Line managers.
Mustafa
‎2010 Feb 01 7:45 AM
Hi Shareef,
Use one of below given FM according to your convenience... Give necessary inputs.. One is get the chief position and one is to get the immediate supervisor.
RH_ACT_LEADING_POSITION
SWX_GET_MANAGER
Cheers,
Sanil
‎2010 Feb 01 7:45 AM
Hi Shareef,
Use one of below given FM according to your convenience... Give necessary inputs.. One is get the chief position and one is to get the immediate supervisor.
RH_ACT_LEADING_POSITION
SWX_GET_MANAGER
Cheers,
Sanil
‎2010 Feb 01 11:54 AM
Hi Sanil,
Can u please be more clear about the parameters we have to pass to the above function modules to get the line managers of the particular employee?
I tried but it is giving null results and unable to pass the input parameters.
Thanks
Shareef
‎2010 Feb 01 12:08 PM
Hi mustafa,
If you are enhancing the standard function module or trying to change the authorizations in you function module , then there is a chance of affect during upgrades, otherwise as Azam mentioned there will not be any affect unless you are trying to change even HRP1001 structure of the table. Simply retrieving has no affect.
Rgds,
Surya
‎2010 Feb 01 12:16 PM
Hi
Use this code
FUNCTION ZWF_FIND_USERS.
*"-----------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" ACTOR_TAB STRUCTURE SWHACTOR
*" AC_CONTAINER STRUCTURE SWCONT
*" EXCEPTIONS
*" NOAGENT_FOUND
*"----------------------------------------------------------- INCLUDE <CNTN01>.
DATA : POSITION_ID LIKE ZBUSAREA-OBJID,
LT_HOLDERS TYPE STANDARD TABLE OF SWHACTOR,
LWA_HOLDERS TYPE SWHACTOR,
LWA_USERS TYPE STANDARD TABLE OF HRP1001,
WA_USERS TYPE HRP1001,
NUM_LINES TYPE I.
*Read values assigned to the rule criteria
SWC_GET_ELEMENT AC_CONTAINER 'POSITION_ID' POSITION_ID. SELECT * FROM HRP1001 INTO table LWA_USERS
WHERE OBJID = POSITION_ID.
IF NOT LWA_USERS IS INITIAL.
REFRESH LT_HOLDERS[]. loop at LWA_USERS into WA_USERS. Condense WA_USERS-SOBID.
LWA_HOLDERS-OTYPE = 'US'.
LWA_HOLDERS-OBJID = WA_USERS-SOBID.
APPEND LWA_HOLDERS TO LT_HOLDERS.
APPEND LINES OF LT_HOLDERS TO ACTOR_TAB.
endloop. ENDIF.
DESCRIBE TABLE ACTOR_TAB LINES NUM_LINES.
IF NUM_LINES IS INITIAL.
RAISE NOAGENT_FOUND.
ENDIF.ENDFUNCTION.Regards
vijay
‎2010 Feb 01 12:47 PM
Hi vijay,
We have already developed the custom fucntion module using the table HRP1001 to retreive the line managers.
We only want to know wat is the effect of using this custom develop function module during an upgrade.
We want to know is there any standard function module which will not perform the authorizations on the structual profiles.
Thanks
Mustafa
‎2010 Feb 08 6:30 AM
Hi
SWX_GET_MANGER wont do authorization check. i have used this only in my project. Use the same thing.
Regards
vijay
‎2010 Feb 01 10:56 AM
Hi Mustafa,
1. Z function module will not effect anything during upgrades as I have developed so many custom function modules and infotypes in our organization to meet the requirements.
The Standard fucntion module also retreive the data from the Table HRP1001, therefore it will not have any negative impact on the system during upgrades.
2.As per my knowledge there is no such standard function module which will not check the structural authorizations to get the data from the organization structure.
Best Regards
Azam uddin
‎2010 Feb 01 10:58 AM
Hello Musthafa,
future upgradation won't affect your developed function module or your system ,as it is a z development.
Regards
Abdul Hameed Hussain
‎2010 Feb 08 7:09 AM
Hi Shareef,
Check in forum or just try like below given... check in PPOM_OLD transaction and find out the org structure.
The table AC_CONTAINER needs to filled and passed.
ELEMENT = ORG_OBJECT
TAB_INDEX = 000001
ELEMLENGTH = 012(Length of User Id concatenated with US in front)
TYPE = C
VALUE = US concatenated with User ID
The table ACTOR_TAB will contain the output.
Cheers,
Sanil
‎2010 Feb 08 8:39 AM
Check this link:[http://sapprograms.blogspot.com/]
Just hit ctrl+F and find for "get manager details"
‎2010 Oct 02 11:43 AM