1 PACKAGE ghr_position_copy AUTHID CURRENT_USER AS
2 /* $Header: ghrwspoc.pkh 120.0.12010000.3 2009/05/26 12:09:34 utokachi noship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |--------------------------< get_seq_location >---------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start of Comments}
8 --
9 -- Description:
10 -- Retrieve location of sequence number in Position Key Flex.
11 --
12 -- Prerequisites:
13 -- Organization Id.
14 --
15 -- In Parameters:
16 -- p_org_id.
17 --
18 -- Post Success:
19 -- Returns segment name of sequence number data item.
20 --
21 -- Post Failure:
22 -- An application error will be raised and processing is terminated.
23 --
24 -- Developer Implementation Notes:
25 --
26 -- Access Status:
27 --
28 --
29 -- {End of Comments}
30 -- ---------------------------------------------------------------------------
31 function get_seq_location
32 (p_org_id in NUMBER default NULL)
33 return VARCHAR2;
34 --
35 --
36 -- ---------------------------------------------------------------------------
37 -- |--------------------------< get_max_seq>--------------------------|
38 -- ---------------------------------------------------------------------------
39 -- {Start of Comments}
40 --
41 -- Description:
42 -- Retrieve the maximum existing sequence value from the Position Key Flexfield
43 -- where all other segments are the same as position being created.
44 --
45 -- Prerequisites:
46 --
47 --
48 -- In Parameters:
49 -- p_segment1 - p_segment30.
50 --
51 -- Post Success:
52 -- Returns max value of existing combination or returns 1.
53 --
54 -- Post Failure:
55 -- An application error will be raised and processing is terminated.
56 --
57 -- Developer Implementation Notes:
58 --
59 -- Access Status:
60 --
61 --
62 -- {End of Comments}
63 -- ---------------------------------------------------------------------------
64 function get_max_seq
65 (p_seq_location in VARCHAR2,
66 p_segment1 in VARCHAR2 default NULL,
67 p_segment2 in VARCHAR2 default NULL,
68 p_segment3 in VARCHAR2 default NULL,
69 p_segment4 in VARCHAR2 default NULL,
70 p_segment5 in VARCHAR2 default NULL,
71 p_segment6 in VARCHAR2 default NULL,
72 p_segment7 in VARCHAR2 default NULL,
73 p_segment8 in VARCHAR2 default NULL,
74 p_segment9 in VARCHAR2 default NULL,
75 p_segment10 in VARCHAR2 default NULL,
76 p_segment11 in VARCHAR2 default NULL,
77 p_segment12 in VARCHAR2 default NULL,
78 p_segment13 in VARCHAR2 default NULL,
79 p_segment14 in VARCHAR2 default NULL,
80 p_segment15 in VARCHAR2 default NULL,
81 p_segment16 in VARCHAR2 default NULL,
82 p_segment17 in VARCHAR2 default NULL,
83 p_segment18 in VARCHAR2 default NULL,
84 p_segment19 in VARCHAR2 default NULL,
85 p_segment20 in VARCHAR2 default NULL,
86 p_segment21 in VARCHAR2 default NULL,
87 p_segment22 in VARCHAR2 default NULL,
88 p_segment23 in VARCHAR2 default NULL,
89 p_segment24 in VARCHAR2 default NULL,
90 p_segment25 in VARCHAR2 default NULL,
91 p_segment26 in VARCHAR2 default NULL,
92 p_segment27 in VARCHAR2 default NULL,
93 p_segment28 in VARCHAR2 default NULL,
94 p_segment29 in VARCHAR2 default NULL,
95 p_segment30 in VARCHAR2 default NULL)
96 return VARCHAR2;
97
98 ----------------------------------------------------------------------------
99 --
100 -- Given a position id this function will create a position record only
101 -- and pass back the new position id
102 PROCEDURE create_posn (p_pos_id IN NUMBER
103 ,p_effective_date_from IN DATE
104 ,p_effective_date_to IN DATE
105 ,p_template_flag IN VARCHAR2
106 ,p_new_pos_id OUT NOCOPY NUMBER
107 ,p_new_pos_name OUT NOCOPY VARCHAR2
108 ,p_ovn OUT NOCOPY NUMBER);
109 --
110 -- Given a from position id this procedure will create ALL the extra info
111 -- details associated with the form position id onto the to position id
112 -- For position copy we will explicity exclude types:
113 -- GHR_US_POS_MASS_ACTIONS
114 -- GHR_US_POS_OBLIG
115 PROCEDURE create_all_posn_ei (p_pos_id_from IN NUMBER
116 ,p_effective_date_from IN DATE
117 ,p_pos_id_to IN NUMBER
118 ,p_effective_date_to IN DATE);
119 --
120 -- Given a from position id and information type this procedure will create the extra info
121 -- details for associated with the form position id onto the to position id
122 PROCEDURE create_posn_ei (p_pos_id_from IN NUMBER
123 ,p_effective_date_from IN DATE
124 ,p_pos_id_to IN NUMBER
125 ,p_effective_date_to IN DATE
126 ,p_info_type IN VARCHAR2);
127 --
128 -- Given a position id this function will create a position record
129 -- and its associated details (currently just EI) and pass back the new position id
130 PROCEDURE create_full_posn (p_pos_id IN NUMBER
131 ,p_effective_date_from IN DATE
132 ,p_effective_date_to IN DATE
133 ,p_template_flag IN VARCHAR2
134 ,p_new_pos_id OUT NOCOPY NUMBER
135 ,p_new_pos_name OUT NOCOPY VARCHAR2
136 ,p_ovn OUT NOCOPY NUMBER);
137 --
138 -- Update the Template Position's Organization and Job at the session date
139 -- This is coded because the API does not support updating these data items.
140 --
141 FUNCTION update_position (p_pos_id IN NUMBER
142 ,p_new_org_id IN NUMBER
143 ,p_new_job_id IN NUMBER)
144 return NUMBER;
145 --
146 --
147 END ghr_position_copy;
148