1 PACKAGE BODY PQH_DE_DETACH_WP_SP_PKG as
2 /* $Header: pqhdedsp.pkb 115.0 2002/04/03 02:32:08 pkm ship $ */
3
4 PROCEDURE DELETE_STELLEN_PLAN(pWrkplc_id IN NUMBER ,pStellen_Plan_id IN NUMBER) is
5
6 -- cursor to find stellens attached to workplace
7
8 cursor extra_info_id(Wid Number, Sid Number) is
9 select
10 position_extra_info_id
11 ,object_version_number
12 from per_position_extra_info
13 where information_type='DE_PQH_WRKPLC_STELLE_LINK'
14 and position_id=Wid
15 and to_number(poei_information3)=Sid;
16
17 -- cursor to a find stellens in stellen plan item
18
19 cursor stelle_in_plan(SpId number) is
20 select
21 position_id
22 from hr_all_positions_f
23 where
24 information1='ST'
25 and to_number(information6)=SpId;
26
27
28 begin
29
30 FOR C1 in stelle_in_plan(pStellen_Plan_id)
31 LOOP
32 FOR C2 in extra_info_id(pWrkplc_id, C1.position_id)
33 LOOP
34 hr_position_extra_info_api.delete_position_extra_info
35 (
36 p_position_extra_info_id => C2. position_extra_info_id
37 ,p_object_version_number=>C2.object_version_number
38 );
39 End Loop;
40 End Loop;
41 end DELETE_STELLEN_PLAN;
42 END PQH_DE_DETACH_WP_SP_PKG;