Skip to Content
author's profile photo Former Member
Former Member

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

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 11:05 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 03:56 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 04:02 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2014 at 04:42 AM

    Hi All,

    Thanks for you inputs.

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.