09-16-2008 1:03 PM
Hi experts,
For HR, is there a FM to find out all the positions (S) which belong to a defined orgnization (O) ?
Thanks!
09-16-2008 1:15 PM
Hi,
I am not sure of the function modules, but you can get the positions corresponds to an orgnization in tables HRP1000 and HRP1001.
Regards,
Venkat
09-16-2008 1:17 PM
Hi Nata,
Try this code :
Tables :
hrp1001.
select-options :
s_otype for hrp1001-otype no-extension
no intervals,
s_objid for hrp1001-objid,
s_plvar for hrp1001-plvar no-extension
no intervals,
s_rsign for hrp1001-rsign no-extension
no intervals,
s_relat for hrp1001-relat no-extension
no intervals,
s_sclas for hrp1001-sclas no-extension
no intervals.
data :
fs_hrp1001 type hrp1001.
data :
t_hrp1001 like
standard table
of fs_hrp1001.
initialization.
s_plvar-low = '01'.
append s_plvar.
at selection-screen output.
loop at screen.
if screen-name cs 's_plvar'.
screen-input = 0.
modify screen.
endif.
endloop.
start-of-selection.
select *
from hrp1001
into table t_hrp1001
where otype in s_otype
and objid in s_objid
and plvar in s_plvar
and rsign in s_rsign
and relat in s_relat
and sclas in s_sclas.
loop at t_hrp1001 into fs_hrp1001.
write 😕 fs_hrp1001-otype,
fs_hrp1001-objid,
fs_hrp1001-plvar,
fs_hrp1001-rsign,
fs_hrp1001-relat,
fs_hrp1001-sclas.
endloop.
Refer to the infotype HRP1001 and give the selection accordingly on the selection screen of this report.
Regards,
Swapna.
09-16-2008 1:21 PM
Hello,
Try using FM HR_GET_POSITIONS_IN_ORGUNIT . I don't know how it works so you have to test it, but probably should return what you need.
Regards
Marcin