RH_PM_GET_STRUCTURE FM to retrieve HR Organisation StructureThe below ABAP code shows how RH_PM_GET_STRUCTURE is used. You pass it an Organisation
Unit(OBJID) and it will retrieve all the units below it in the org. tree (including idividual personnel). Also
'RH_DIR_ORG_STRUC_GET' is an alternative but seems to be much slower.
data: objec_tab like objec occurs 0 with header line.
data: zorg_unit type p0001-orgeh.
data: t_org_tab like rhldapp occurs 0 with header line.
call function 'RH_PM_GET_STRUCTURE'
exporting
plvar = '01' "p0000-plvar
otype = 'O' "0001-otype
objid = zorg_unit
begda = pn-begda
endda = pn-endda
status = '1'
wegid = 'SBESX'
77aw_int = ' '
tables
objec_tab = objec_tab
exceptions
not_found = 1
ppway_not_found = 2
others = 3.
***************************
Alternative, but very slow*
***************************
* call function 'RH_DIR_ORG_STRUC_GET'
* exporting
* act_orgunit = zorg_unit
* act_plvar = '01'
* act_date = pn-begda
* tables
* org_units = t_org_tab
* exceptions
* no_active_plvar = 1
* others = 2.
Website Navigation to related information
|
||||||||||