Showing posts with label Hrp1001. Show all posts
Showing posts with label Hrp1001. Show all posts

Organization structure in SAP HR


Organization structure in SAP HR

Structural profiles use the data model in an organization for Personnel Management components Organizational Management, Personnel Development and Training and Event Management to build hierarchies using objects and relationships. Different types of objects (Object Types) and different types of relationships are used in this process.



  • Objects (such as O (Organizational Unit), S (Position), P (Person)) ,R Resource type,T Task etc .
  • Relationships (such as A003 (belongs to) bottom up or B003 (belongs to) top down )

  • Evaluation Paths (such as O-S-P Staffing Assignments along Organizational Structure)
Example:Go to se11 àHRP1001 give object type = S (position ),Object id (found in PPOSE)
The above we can see in PPOSE tcode (Organization and staffing display) and PPOSA (attribute in organization management display)

PPOSE

Example:
Here we will get the employee belongs to which org unit or dept (based on the org unit structure)
·         Get the employee Id based on the sap user ID
    SELECT SINGLE pernr FROM pa0105
      
INTO l_pernr WHERE subty EQ '0001'  "Get Personal no. of emp
         
AND  endda GE sy-datum
         
AND  begda LE sy-datum
         
AND  usrid EQ sy-uname.

·         Pass l_pernr from the above into the FM
      CALL FUNCTION 'HR_READ_INFOTYPE'
       
EXPORTING
        pernr                 
= l_pernr
        infty                 
'0001'
        begda                 
sy-datum
        endda                 
sy-datum
      
TABLES
        infty_tab             
it_p0001[]
     
EXCEPTIONS
       infty_not_found       
1
       
OTHERS                2
Now read it_p0001 table to the get the org unit orgeh
(Org unit can be anything department, group it depend the organization structure How a organization structure is managed)

·         Now if we like to the above departments use FM RH_STRUC_GET
CALL FUNCTION 'RH_STRUC_GET'
        
EXPORTING
          act_otype      
'O' “Org Unit
          act_objid      
= orgeh “Org unit object id
          act_wegid      
'O-O' “Evaluation path (Org to Org)
          act_plvar      
'01' “Plan version 01 = current version
          act_begda      
sy-datum
          act_endda      
sy-datum
        
TABLES
          result_tab     
it_org[]     
        
EXCEPTIONS
          no_plvar_found 
1
          no_entry_found 
2
          
OTHERS         3.

free plagiarism checker

free plagiarism checker