on 09-11-2016 5:21 AM
Hi,
I want to develop a report/ interface to change supervisor/ manager of an employee using incoming file from third-party system.
I have checked different ways to update manager field and still the only way I find is update table HRP1001 but updating a standard table directly seems to be not a good idea and it is also not advisable. I didn't get any BAPI/ FM to achieve this output.
Is there any BAPI/ FM which can be used to update manager id for an employee?
Regards,
Nilesh
Hi Nilesh,
Try using FM RH_RELATION_MAINTAIN to update HRP1001. Using this you can achieve updating Manager ID.
thanks,
naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naren,
Thanks for the information. I have checked in HRP1001 table and there is an employee: 50000003 with Object Type: 'O', relationship A002, with SOBID: 50000001, so with use of RH_RELATION_MAINTAIN it has updated SOBID, is that sufficient to change manager of an employee?
Regards,
Nilesh
Hi Naren,
I am using FM RH_RELATION_MAINTAIN to change manager of an employee (for requirement to assign manager of different Org. unit).
I am passing details as given below and
1. it is adding a new record in HRP1001 table with Start date: sy-datum and end date: 31.12.9999 (same as passed to FM)
2. It is updating already existing current record End date with: sy-datum - 1 (as we passed sy-datum in FM)
Is this the only thing we need to update to change manager of an Org. Unit?
CALL FUNCTION 'RH_RELATION_MAINTAIN'
EXPORTING
act_fcode = 'INSE'
act_plvar = '01'
act_otype = 'O'
act_objid = objid " HRP1001 - OBJID
act_istat = 1
act_rsign = 'A'
act_relat = '002'
act_sclas = 'O'
act_sobid = sobid " HRP1001-SOBID - ID of Related Object(manager id)
act_begda = sy-datum
act_endda = '99991231'
act_priox = priox "HRP1001-PRIOX
IMPORTING
rel_istat = rel_istat
rel_rsign = rel_rsign
rel_relat = rel_relat
rel_sclas = rel_sclas
rel_sobid = rel_sobid
rel_begda = rel_begda
rel_endda = rel_endda
EXCEPTIONS
maintainance_failed = 1
others = 2.
yes. If you chnage the manager of the org unit, it chnages for all employees under that org unit.
For this you need to map below relationship in this FM,
act_otype = 'O'
act_objid = objid " Org unit ID
act_istat = 1
act_rsign = 'B'
act_relat = '012'
act_sclas = 'S'
act_sobid = sobid " new manager's position number
okay, I checked it in system, so this means it will directly assign position to Org. Unit and as this position is for manager all employee will directly report to it, rgt?
But I don't see any change in previous B012 relationship(for previous manager), there should be some change in that records also, rgt?
There are sooooooo many considerations you need to make and questions Narendra is not asking (or just assuming).
1. Are you sure you have OM-to-PA synchronization turned on?
2. Do you re-use positions or are you trying to create a new position, move the manager there and then updated relations off that "new" position?
3. Do you use inheritance in OM?
4. Do you allow multiple "chiefs" per employee?
5. Do you allow managers to be "chief" of multiple orgs? (ie. if assigning them as manager of another org, do you have to end date all other "chief" assignments they hold?
.....and that's just a few off the top of my head as I am waking up with my morning coffee.
I think for you initial question....what function to use....you got your answer. Past that, you requirements and own configuration will dictate a lot more. Just curious....have you looked at HCM Processes and Forms to handle this and put some control around the process? It also has "mass change" capabilities you might want as well. Even if coming from a 3rd party interface, you could have that "kick off" your HCM P&F process.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.