10-25-2007 9:41 AM
hallow
1)i wont to now how i find the org.unit valid dates begda & ennda
i now that i have to take it from hep1000 or 1001,
2)i wont to now how i now if org unit is valid or not
regards
10-25-2007 9:53 AM
Hi,
First fo to Infotype 0001 get ORGEH for given PERNR.
using this go to HRP1001 object type O and check ORG unit date.
Regards,
Atish
10-25-2007 9:44 AM
tables : hrp1000.
parameters : p_orgeh like hrp1000-objid,
p_begda like hrp1000-begdda,
p_endda like hrp1000-endda.
data : v_orgeh like hrp1000-objid.
select single objid from hrp1000 into v_orgeh where otype = 'O' and objid = p_orgeh.
if sy-subrc = 0.
*valid....
else.
message e000 with 'org. unit invalid'.
endif.
select single objid from hrp1000 into v_orgeh where otype = 'O' and objid = p_orgeh and begda le p_endda and endda ge p_begda.
if sy-subrc = 0.
*valid....
else.
message e000 with 'org. unit invalid in specified date range'.
endif.
10-25-2007 9:53 AM
Hi,
First fo to Infotype 0001 get ORGEH for given PERNR.
using this go to HRP1001 object type O and check ORG unit date.
Regards,
Atish
10-25-2007 10:09 AM
if u have pernr as input parameter....
tables : pa0000.
parameters : p_pernr like pa0000-pernr,
p_begda like pa0000-begda,
p_endda like pa0000-endda.
data : v_orgeh like hrp1000-orgeh,
v1_orgeh like hrp1000-orgeh.
select orgeh from pa0001 into v_orgeh where pernr = p_pernr and begda le p_endda and endda ge p_begda.
if sy-subrc = 0.
select single objid from hrp1000 into v1_orgeh
where objid = v_orgeh and otype = 'O' and begda le p_endda
and endda ge p_begda.
if sy-subrc <> 0.
message e000 with 'invalid org unit for pernr in specified date range'.
endif.
endif.
select orgeh from pa0001 into v_orgeh where pernr = p_pernr and begda le p_endda and endda ge p_begda.
if sy-subrc = 0.
select single objid from hrp1000 into v1_orgeh
where objid = v_orgeh and otype = 'O' .
if sy-subrc <> 0.
message e000 with 'invalid org unit for pernr'.
endif.
endif.
Regards
Vasu
10-25-2007 10:15 AM
hi vasu
i dont have pernr i just have table with lot of org.unit num and plavr 01 otype 'o'
and i wont to find from that table which org are <b>valid</b> for today,
and remove the org that are not valid.
regards