on 09-22-2006 6:23 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nirmal
I am usually using the following function module to read to OM:
* SAP_SORG
* OrgStructure with assigned orgunits)
REFRESH: lt_struc.
CALL FUNCTION 'RHPH_STRUCTURE_READ'
EXPORTING
plvar = '01' " active Planvar.
otype = 'O' " OrgUnit
objid = l_wa_cb1-objid " Toplevel-Node
wegid = 'SAP_SORG'
begda = iw_begda
endda = iw_endda
pup_info = 'X'
with_stext = 'X'
tdepth = 0 " alle Sub-Levels
TABLES
stru_tab = lt_struc
EXCEPTIONS
catalogue_problem = 1
root_not_found = 2
wegid_not_found = 3.
The parameter <b>WEGID</b> is the crucial on which determines the objects that are read from the OM. In your case you will need <b>WEGID = 'A002'</b> (reports (line) to).
To understand the <i>evaluation path</i> (WEGID) better have a look at transaction <b>PPST</b>.
Regards
Uwe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nirmal,
Go through the sample code,
http://www.sapdevelopment.co.uk/fmodules/fms_orgstruc.htm
Regards,
Azaz Ali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.