cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Organizational Unit One level up

Former Member
0 Kudos

Hi

Does any one know any function module to get the org unit one level up by giving the current Organizational unit as input. Please reply very urgent.

View Entire Topic
suresh_datti
Active Contributor
0 Kudos

You can use RH_STRUC_GET or use the following piece of code..

data w_sobid type sobid.
parameters:p_objid like hrp1001-objid
select sobid into w_sobid
             up to 1 rows
             from HRP1001
             where otype = 'O'
               and objid = p_objid
               and plvar = '01'
               and istat = 1
               and rsign = 'A'
               and relat = '002'
               and begda le sy-datum
               and endda ge sy-datum.
endselect.
if sy-subrc ne 0.
write: / w_sobid.
endif.

~Suresh