I need to put this in best possible method
The highest organization unit is XXXXXXX.
Now the next immediate levels for this org unit are retrieved from hrp10001.
[select * into table lT_hrp_lev1 from HRP1001 where otype = 'O' and objid = LC_ORG and plvar = '01' and rsign = 'B' and subty = 'B002'.]
This returns suppose 3 org units.for each of these 3 org unit there can be n org units reporting to it[based on the same selection criteria as used above].
Suppose I put all this into an internal table T1.
Now I have an employee for whom I have to find out the Vice president org unit .as there is no specific field indicator for the level.
We can loop at the T1 and put a select statement for hrp1001 within a do while loop till the sobid [which will have the vp org unit] = T1-org.
may be there is some function module to retreive the right level from the entire Oranazation Structure
Message was edited by:
Jyostna Hota
Edited by: Jyostna Hota on Jan 4, 2008 8:36 AM