You are on page 1of 5

Structure relationship values within table HRP1001

Here is a diagram detailing the org structure relationship values within table HRP1001. I.e. If you have an org unit and what to now its parent org unit you would look for an 002 relationship(RELAT) of specification(RSIGN) equal to A. If your wanted to know it child org unit you would use the same relationship of 002 but of specification B.

The following ABAP code shows how this information would be used to retireve data within SAP. So if you start with and org unit and want to find its parent you would implement the following SAP code. ld_orgeh = Current Org Unit, SOBID would then contain the parent Org Unit. * Get next level up in org structure select relat sobid from hrp1001 into CORRESPONDING FIELDS OF TABLE it_hrp1001 WHERE otype = 'O' AND objid = ld_orgeh AND plvar = '01' AND RSIGN = 'A' AND RELAT = '002' AND istat = '1' AND begda LE sy-datum AND endda GE sy-datum. The same as if you want to find the child Org Unit it would be the same code and relationship, but working the other way and using the B specification. ld_orgeh = Current Org Unit, SOBID would then contain the Child Org Unit. * Get next level up in org structure

select relat sobid from hrp1001 into CORRESPONDING FIELDS OF TABLE it_hrp1001 WHERE otype = 'O' AND objid = ld_orgeh AND plvar = '01' AND RSIGN = 'B' AND RELAT = '002' AND istat = '1' AND begda LE sy-datum AND endda GE sy-datum.

OTYPE:

Transacciones:
S_AHR_61016493 - Organizational Structure S_AHR_61016494 - Organizational Structure with Positions S_AHR_61016495 - Organizational Structure with Persons S_AHR_61016496 - Organizational Structure with Work Centers

Job-->PO03 Position-->PO13 Work center--->PO01 PFCT---> Task Catalogue PPO1--> general

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 .

down )

Relationships (such as A003 (belongs to) bottom up or B003 (belongs to) top

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.

You might also like