1 PACKAGE HR_ASSIGNMENT_ATT AUTHID CURRENT_USER as
2 /* $Header: peasgati.pkh 115.5 2004/03/07 19:27:12 sgudiwad ship $ */
3 -- ----------------------------------------------------------------------------
4 -- |-----------------------------< update_asg >-------------------------------|
5 -- ----------------------------------------------------------------------------
6 --
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This API updates the assignment record as identified by p_assignment_id
11 -- and p_object_version_number using the pseudo datetrack modes of
12 -- ATTRIBUTE_UPDATE or ATTRIBUTE_CORRECTION. Depending on the pseudo mode
13 -- specified, the hr_assignment_api.update_assignment API is called with
14 -- true datetrack modes of either UPDATE, CORRECTION or UPDATE_CHANGE_INSERT.
15 -- It is important to note that the pseudo modes are not part of DateTrack
16 -- core. The pseudo mode corresponds to the p_attribute_update_mode
17 -- parameter.
18 --
19 -- The ATTRIBUTE_UPDATE will update the current and all rows in the future
20 -- where the attribute(s) have the same value. The future update of the
21 -- attribute(s) will only be completed when either the last row is selected
22 -- or the attribute(s) value has changed.
23 --
24 -- The ATTRIBUTE_CORRECTION works by first updating all rows in the
25 -- future where the attribute(s) have the same value. The future update of
26 -- the attribute will only be completed when either the last row is
27 -- selected or the attribute(s) value has changed. Next, the change has to
28 -- be applied in the past using the same logic as future rows except
29 -- it is only complete when either the first row is selected or the
30 -- attribute value has changed.
31 --
32 -- Prerequisites
33 -- The assignment record, identified by p_assignment_id and
34 -- p_object_version_number, must already exist.
35 --
36 -- In Parameters:
37 -- Name Reqd Type Description
38 -- p_validate boolean If true, the database remains
39 -- unchanged. If false a valid
40 -- assignment is created in
41 -- the database.
42 -- p_effective_date Yes date The effective date of the
43 -- change
44 -- p_attribute_update_mode Yes varchar2 Update attribute mode
45 -- Valid values are;
46 -- ATTRIBUTE_UPDATE,
47 -- ATTRIBUTE_CORRECTION
48 -- p_assignment_id number ID of the assignment
49 -- p_object_version_number Yes number Version number of the
50 -- assignment record
51 -- p_supervisor_id number Supervisor
52 -- p_assignment_number number Assignment number
53 -- p_change_reason varchar2 Reason for the change
54 -- p_comments varchar2 Comments
55 -- p_date_probation_end date End date of probation period
56 -- p_default_code_comb_id number Foreign key to
57 -- GL_CODE_COMBINATIONS
58 -- p_frequency varchar2 Frequency for quoting working hours (eg per week)
59 -- p_internal_address_line varchar2 Internal address line
60 -- p_manager_flag varchar2 Indicates whether the
61 -- employee is a manager
62 -- p_normal_hours number Normal working hours
63 -- p_perf_review_period number Performance review period
64 -- p_perf_review_period_frequency varchar2 Units for quoting performance
65 -- review period (eg months)
66 -- p_probation_period number Length of probation period
67 -- p_probation_unit varchar2 Units for quoting probation period (eg months)
68 -- p_sal_review_period number Salary review period
69 -- p_sal_review_period_frequency varchar2 Units for quoting salary review
70 -- period (eg months)
71 -- p_set_of_books_id number Set of books (GL)
72 -- p_source_type varchar2 Recruitment activity source
73 -- p_time_normal_finish varchar2 Normal work finish time
74 -- p_time_normal_start varchar2 Normal work start time
75 -- p_ass_attribute_category varchar2 Descriptive flexfield
76 -- attribute category
77 -- p_ass_attribute1 varchar2 Descriptive flexfield
78 -- p_ass_attribute2 varchar2 Descriptive flexfield
79 -- p_ass_attribute3 varchar2 Descriptive flexfield
80 -- p_ass_attribute4 varchar2 Descriptive flexfield
81 -- p_ass_attribute5 varchar2 Descriptive flexfield
82 -- p_ass_attribute6 varchar2 Descriptive flexfield
83 -- p_ass_attribute7 varchar2 Descriptive flexfield
84 -- p_ass_attribute8 varchar2 Descriptive flexfield
85 -- p_ass_attribute9 varchar2 Descriptive flexfield
86 -- p_ass_attribute10 varchar2 Descriptive flexfield
87 -- p_ass_attribute11 varchar2 Descriptive flexfield
88 -- p_ass_attribute12 varchar2 Descriptive flexfield
89 -- p_ass_attribute13 varchar2 Descriptive flexfield
90 -- p_ass_attribute14 varchar2 Descriptive flexfield
91 -- p_ass_attribute15 varchar2 Descriptive flexfield
92 -- p_ass_attribute16 varchar2 Descriptive flexfield
93 -- p_ass_attribute17 varchar2 Descriptive flexfield
94 -- p_ass_attribute18 varchar2 Descriptive flexfield
95 -- p_ass_attribute19 varchar2 Descriptive flexfield
96 -- p_ass_attribute20 varchar2 Descriptive flexfield
97 -- p_ass_attribute21 varchar2 Descriptive flexfield
98 -- p_ass_attribute22 varchar2 Descriptive flexfield
99 -- p_ass_attribute23 varchar2 Descriptive flexfield
100 -- p_ass_attribute24 varchar2 Descriptive flexfield
101 -- p_ass_attribute25 varchar2 Descriptive flexfield
102 -- p_ass_attribute26 varchar2 Descriptive flexfield
103 -- p_ass_attribute27 varchar2 Descriptive flexfield
104 -- p_ass_attribute28 varchar2 Descriptive flexfield
105 -- p_ass_attribute29 varchar2 Descriptive flexfield
106 -- p_ass_attribute30 varchar2 Descriptive flexfield
107 -- p_title varchar2 Title -must be NULL
108 -- p_project_title varchar2 Project Title
109 -- p_vendor_assignment_number varchar2 Vendor Assignment Number
110 -- p_vendor_employee_number varchar2 Vendor Employee Number
111 -- p_vendor_id number Vendor Id
112 -- p_assignment_type varchar2 Assignment Type
113 --
114 -- Post Success:
115 --
116 -- The API sets the following out parameters:
117 --
118 -- Name Type Description
119 -- p_object_version_number number New version number of the
120 -- assignment
121 -- p_comment_id number If p_validate is false and any
122 -- comment text exists, set to the id
123 -- of the corresponding person
124 -- comment row. If p_validate is
125 -- true, or no comment text exists
126 -- this will be null.
127 -- p_effective_start_date date The effective start date for the
128 -- assignment changes
129 -- p_effective_end_date date The effective end date for the
130 -- assignment changes
131 -- p_no_managers_warning boolean Set to true if manager_flag is
132 -- updated from 'Y' to 'N' and no
133 -- other manager exists in
134 -- p_organization_id.
135 -- Set to false if another manager
136 -- exists in p_organization_id.
137 -- This parameter is always set
138 -- to false if manager_flag is
139 -- not updated. The warning value
140 -- only applies as of
141 -- p_effective_date.
142 -- p_other_manager_warning boolean Set to true if manager_flag is
143 -- changed from 'N' to 'Y' and a
144 -- manager already exists in the
145 -- organization, p_organization_id,
146 -- at p_effective_date.
147 -- Set to false if no other managers
148 -- exist in p_organization_id.
149 -- This is always set to false
150 -- if manager_flag is not updated.
151 -- The warning value only applies as
152 -- of p_effective_date.
153 -- Post Failure:
154 -- The API does not update the assignment and raises an error.
155 --
156 -- Access Status:
157 -- Internal Development Use Only.
158 --
159 -- {End Of Comments}
160 --
161 procedure update_asg
162 (p_validate in boolean default false
163 ,p_effective_date in date
164 ,p_attribute_update_mode in varchar2
165 ,p_assignment_id in number
166 ,p_object_version_number in out nocopy number
167 ,p_supervisor_id in number default hr_api.g_number
168 -- Assignment Security
169 ,p_supervisor_assignment_id in number default hr_api.g_number
170
171 ,p_assignment_number in varchar2 default hr_api.g_varchar2
172 ,p_change_reason in varchar2 default hr_api.g_varchar2
173 ,p_comments in varchar2 default hr_api.g_varchar2
174 ,p_date_probation_end in date default hr_api.g_date
175 ,p_default_code_comb_id in number default hr_api.g_number
176 ,p_frequency in varchar2 default hr_api.g_varchar2
177 ,p_internal_address_line in varchar2 default hr_api.g_varchar2
178 ,p_manager_flag in varchar2 default hr_api.g_varchar2
179 ,p_normal_hours in number default hr_api.g_number
180 ,p_perf_review_period in number default hr_api.g_number
181 ,p_perf_review_period_frequency in varchar2 default hr_api.g_varchar2
182 ,p_probation_period in number default hr_api.g_number
183 ,p_probation_unit in varchar2 default hr_api.g_varchar2
184 ,p_sal_review_period in number default hr_api.g_number
185 ,p_sal_review_period_frequency in varchar2 default hr_api.g_varchar2
186 ,p_set_of_books_id in number default hr_api.g_number
187 ,p_source_type in varchar2 default hr_api.g_varchar2
188 ,p_time_normal_finish in varchar2 default hr_api.g_varchar2
189 ,p_time_normal_start in varchar2 default hr_api.g_varchar2
190 ,p_ass_attribute_category in varchar2 default hr_api.g_varchar2
191 ,p_ass_attribute1 in varchar2 default hr_api.g_varchar2
192 ,p_ass_attribute2 in varchar2 default hr_api.g_varchar2
193 ,p_ass_attribute3 in varchar2 default hr_api.g_varchar2
194 ,p_ass_attribute4 in varchar2 default hr_api.g_varchar2
195 ,p_ass_attribute5 in varchar2 default hr_api.g_varchar2
196 ,p_ass_attribute6 in varchar2 default hr_api.g_varchar2
197 ,p_ass_attribute7 in varchar2 default hr_api.g_varchar2
198 ,p_ass_attribute8 in varchar2 default hr_api.g_varchar2
199 ,p_ass_attribute9 in varchar2 default hr_api.g_varchar2
200 ,p_ass_attribute10 in varchar2 default hr_api.g_varchar2
201 ,p_ass_attribute11 in varchar2 default hr_api.g_varchar2
202 ,p_ass_attribute12 in varchar2 default hr_api.g_varchar2
203 ,p_ass_attribute13 in varchar2 default hr_api.g_varchar2
204 ,p_ass_attribute14 in varchar2 default hr_api.g_varchar2
205 ,p_ass_attribute15 in varchar2 default hr_api.g_varchar2
206 ,p_ass_attribute16 in varchar2 default hr_api.g_varchar2
207 ,p_ass_attribute17 in varchar2 default hr_api.g_varchar2
208 ,p_ass_attribute18 in varchar2 default hr_api.g_varchar2
209 ,p_ass_attribute19 in varchar2 default hr_api.g_varchar2
210 ,p_ass_attribute20 in varchar2 default hr_api.g_varchar2
211 ,p_ass_attribute21 in varchar2 default hr_api.g_varchar2
212 ,p_ass_attribute22 in varchar2 default hr_api.g_varchar2
213 ,p_ass_attribute23 in varchar2 default hr_api.g_varchar2
214 ,p_ass_attribute24 in varchar2 default hr_api.g_varchar2
215 ,p_ass_attribute25 in varchar2 default hr_api.g_varchar2
216 ,p_ass_attribute26 in varchar2 default hr_api.g_varchar2
217 ,p_ass_attribute27 in varchar2 default hr_api.g_varchar2
218 ,p_ass_attribute28 in varchar2 default hr_api.g_varchar2
219 ,p_ass_attribute29 in varchar2 default hr_api.g_varchar2
220 ,p_ass_attribute30 in varchar2 default hr_api.g_varchar2
221 ,p_title in varchar2 default hr_api.g_varchar2
222 ,p_project_title in varchar2 default hr_api.g_varchar2
223 ,p_vendor_assignment_number in varchar2 default hr_api.g_varchar2
224 ,p_vendor_employee_number in varchar2 default hr_api.g_varchar2
225 ,p_vendor_id in number default hr_api.g_number
226 ,p_assignment_type in varchar2
227 ,p_comment_id out nocopy number
228 ,p_effective_start_date out nocopy date
229 ,p_effective_end_date out nocopy date
230 ,p_no_managers_warning out nocopy boolean
231 ,p_other_manager_warning out nocopy boolean
232 );
233 --
234 -- ----------------------------------------------------------------------------
235 -- |------------------------< update_asg_criteria >---------------------------|
236 -- ----------------------------------------------------------------------------
237 --
238 -- {Start Of Comments}
239 --
240 -- Description:
241 -- This API updates the assignment record as identified by p_assignment_id
242 -- and p_object_version_number using the pseudo datetrack modes of
243 -- ATTRIBUTE_UPDATE or ATTRIBUTE_CORRECTION. Depending on the pseudo mode
244 -- specified, the hr_assignment_api.update_assignment API is called with
245 -- true datetrack modes of either UPDATE, CORRECTION or UPDATE_CHANGE_INSERT.
246 -- It is important to note that the pseudo modes are not part of DateTrack
247 -- core. The pseudo mode corresponds to the p_attribute_update_mode
248 -- parameter.
249 --
250 -- The ATTRIBUTE_UPDATE will update the current and all rows in the future
251 -- where the attribute(s) have the same value. The future update of the
252 -- attribute(s) will only be completed when either the last row is selected
253 -- or the attribute(s) value has changed.
254 --
255 -- The ATTRIBUTE_CORRECTION works by first updating all rows in the
256 -- future where the attribute(s) have the same value. The future update of
257 -- the attribute will only be completed when either the last row is
258 -- selected or the attribute(s) value has changed. Next, the change has to
259 -- be applied in the past using the same logic as future rows except
260 -- it is only complete when either the first row is selected or the
261 -- attribute value has changed.
262 --
263 -- Prerequisites
264 -- The assignment record, identified by p_assignment_id and
265 -- p_object_version_number, must already exist.
266 --
267 -- In Parameters:
271 -- assignment is created in
268 -- Name Reqd Type Description
269 -- p_validate boolean If true, the database remains
270 -- unchanged. If false a valid
272 -- the database.
273 -- p_effective_date Yes date The effective date of the
274 -- change
275 -- p_attribute_update_mode Yes varchar2 Update attribute mode
276 -- Valid values are;
277 -- ATTRIBUTE_UPDATE,
278 -- ATTRIBUTE_CORRECTION
279 -- p_assignment_id number ID of the assignment
280 -- p_object_version_number Yes number Version number of the
281 -- assignment record
282 -- p_grade_id number Grade
283 -- p_position_id number Position
284 -- p_job_id number Job
285 -- p_payroll_id number Payroll
286 -- p_location_id number Location
287 -- p_special_ceiling_step_id number Special ceiling step as of
288 -- p_effective_date
289 -- p_organization_id number Organization
290 -- p_pay_basis_id number Salary basis
291 -- p_employment_category varchar2 Employment category
292 --
293 -- Post Success:
294 --
295 -- The API sets the following out parameters:
296 --
297 -- Name Type Description
298 -- p_object_version_number number New version number of the
299 -- assignment
300 -- p_comment_id number If p_validate is false and any
301 -- comment text exists, set to the id
302 -- of the corresponding person
303 -- comment row. If p_validate is
304 -- true, or no comment text exists
305 -- this will be null.
306 -- p_effective_start_date date The effective start date for the
307 -- assignment changes
308 -- p_effective_end_date date The effective end date for the
309 -- assignment changes
310 -- p_no_managers_warning boolean Set to true if manager_flag is
311 -- updated from 'Y' to 'N' and no
312 -- other manager exists in
313 -- p_organization_id.
314 -- Set to false if another manager
315 -- exists in p_organization_id.
316 -- This parameter is always set
317 -- to false if manager_flag is
318 -- not updated. The warning value
319 -- only applies as of
320 -- p_effective_date.
321 -- p_other_manager_warning boolean Set to true if manager_flag is
322 -- changed from 'N' to 'Y' and a
323 -- manager already exists in the
324 -- organization, p_organization_id,
325 -- at p_effective_date.
326 -- Set to false if no other managers
327 -- exist in p_organization_id.
328 -- This is always set to false
329 -- if manager_flag is not updated.
330 -- The warning value only applies as
331 -- of p_effective_date.
332 -- p_spp_delete_warning boolean Set to true when grade step and
333 -- point placements are date
334 -- effectively ended or purged
335 -- by this process.
336 -- Both types of change occur
337 -- when grade_id is changed and
338 -- spinal point placement rows exist
339 -- over the updated date range.
340 -- Set to false when no grade step
341 -- and point placements are affected.
342 -- p_entries_changed_warning varchar2 Set to 'Y' when one or more
343 -- element entries are changed due
344 -- to the assignment change.
345 -- Set to 'S' if at least one
346 -- salary element entry is affected.
347 -- ('S' is a more specific case of
348 -- 'Y')
349 -- Set to 'N' when no element entries
350 -- are changed.
351 -- p_tax_district_changed_warning boolean Set to true if the assignment
355 -- Set to false, if the assignment is
352 -- is for a GB legislation business
353 -- group and the old and new payrolls
354 -- are in different tax districts.
356 -- not for a GB legislation business
357 -- group, or the payroll was not
358 -- updated, or the old and new
359 -- payrolls are in the same tax
360 -- district.
361 --
362 -- Post Failure:
363 -- The API does not update the assignment and raises an error.
364 --
365 -- Access Status:
366 -- Internal Development Use Only.
367 --
368 -- {End Of Comments}
369 --
370 procedure update_asg_criteria
371 (p_validate in boolean default false
372 ,p_effective_date in date
373 ,p_attribute_update_mode in varchar2
374 ,p_assignment_id in number
375 ,p_object_version_number in out nocopy number
376 ,p_grade_id in number default hr_api.g_number
377 ,p_position_id in number default hr_api.g_number
378 ,p_job_id in number default hr_api.g_number
379 ,p_payroll_id in number default hr_api.g_number
380 ,p_location_id in number default hr_api.g_number
381 ,p_special_ceiling_step_id in out nocopy number
382 ,p_organization_id in number default hr_api.g_number
383 ,p_pay_basis_id in number default hr_api.g_number
384 ,p_employment_category in varchar2 default hr_api.g_varchar2
385 ,p_assignment_type in varchar2
386 ,p_effective_start_date out nocopy date
387 ,p_effective_end_date out nocopy date
388 ,p_no_managers_warning out nocopy boolean
389 ,p_other_manager_warning out nocopy boolean
390 ,p_spp_delete_warning out nocopy boolean
391 ,p_entries_changed_warning out nocopy varchar2
392 ,p_tax_district_changed_warning out nocopy boolean
393 );
394 --
395 end hr_assignment_att;