Search This Blog

Showing posts with label Oracle HRMS Script. Show all posts
Showing posts with label Oracle HRMS Script. Show all posts

Tuesday, March 20, 2012

Delete Positions in Oracle HRMS through API

declare
ld_edds_date date;
ld_edde_date date;
ln_ovn       NUMBER;
cursor c is
select * from hr_all_positions_f   where trunc(creation_date) = trunc(sysdate);
begin
for i in c
loop
ln_ovn := i.OBJECT_VERSION_NUMBER;
hr_position_api.delete_position
  (p_validate                       => false
  ,p_position_id                    => i.position_id
  ,p_effective_start_date           => ld_edds_date
  ,p_effective_end_date             => ld_edde_date
  ,p_object_version_number          => ln_ovn
  ,p_effective_date                 => '01-Jan-1980'
  ,p_datetrack_mode                 => 'ZAP'
  --,p_security_profile_id        in number      default hr_security.get_security_profile
  );
end LOOP;
end;