cancel
Showing results for 
Search instead for 
Did you mean: 

How to Populate Supervisor ID field(IT0001) with the employee's manager's PERNR automatically based on the information in HRP1001(B 002 relationship)?

Former Member
0 Kudos

As per the current Client requirement we want to populate the Supervisor Area feild in IT0001 with the employees manager's PERNR. As a result the data in table PA0001 and HRP1001 should be the same with no inconsistencies.

I tried doing this by creating relationships B 012(O-S cheif relation), A 008(Holder relation O-S), B 002 (Reports to S - S) but still the supervisor area field does'nt get populated with the manager's PERNR. Could you please suggest How this can be done?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi  All,

Thanks for you inputs.

@ Albert - Thanks a lot for your solution. It works well in our system

Former Member
0 Kudos

We have had a similar requirement to place the manager ID/ name in IT0001. Basically we have created a Z program which pulls the PERNR supervisor from the relationship's based on the position number assigned to the employee.

First check S to A003 Org unit

2. Org unit O to A012 Managers position

3. Manager's position to A008 holder relationship.

you can create a batch job to update the managers name when there is a new entry/transfer/relocation of the employee. Align the table return value to the Z field which you create in IT0001.

Former Member
0 Kudos

O.k. so another way to view this issue?  Why Infotype 0001, Org Assignment, why not place the supervisor in the header of infotypes?  (well, one shortfall of course is that the only information shared then is as of today, no historical information).

One can use in Table T588J (Infotype Headers) the fields OMNGR_NR and OMNGR_NA to pull this detail into the header.  By default the chief is shown, but should one maintain an A002 relationship this entry will override the chief and show it instead in the header.  Typically one only needs to store A002 for the exceptions, as most of the time the chief is the sole supervisor.

For OMNGR_NR use the field type:  DAT and for OMNGR_NA use DD1.  Field lengths respectively are 8 and 40.

This is a fine alternative to what you are asking to do.

Cheers, Al

Former Member
0 Kudos

Hi Aastha,

If you want to populate the PERNR of the particular employee while you are creating the 0001 infotype then make use of the User Exit / Enhancement - PBAS0001 and make use of the functional module EXIT_SAPFP50M_002 and include your logic here and then the required PERNR will be displayed in 0001 infotype.

Logic would be check for the latest position id in 0001 infotype for an employee number then with the help of this position id  we can get the PERNR of the reporting officer by fetching the data from HRP1001 table.

Pass the position id to HRP1001 table and get the position id of the supervisor then with this you can get the PERNR by checking for the A008 relationship against the reporting officer position id.

Then display the same in Supervisor Area field here.Hope this solves the issue.

Regards,

Mithun k

Former Member
0 Kudos

Hi Mithun,

Thanks for your response.

But could you please suggest if there is some standard SAP functionality to enable this. As coding might not be possible now.

Regards

Aastha

Former Member
0 Kudos

Hi Aastha,

There is no other go you must go ahead with the user exit to default the PERNR of the supervisor in that field while creation as there is no other standard functionality which caters the requirement.

But this code is bit easy do implement it with the help of ABAP consultant. Hope this work out.

Regards,

Mithun K