79: where pbg.business_group_id = l_business_group_id;
80: --
81: begin
82:
83: hr_utility.set_location('Entering:'|| l_proc, 10);
84: --
85: -- Issue a savepoint if operating in validation only mode
86: --
87: savepoint create_no_contract;
85: -- Issue a savepoint if operating in validation only mode
86: --
87: savepoint create_no_contract;
88: --
89: hr_utility.set_location(l_proc, 20);
90: --
91: -- Process Logic
92: --
93: -- Get person details.
97: into l_business_group_id;
98: --
99: if csr_get_business_group_id%NOTFOUND then
100: close csr_get_business_group_id;
101: hr_utility.set_location(l_proc, 30);
102: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
103: hr_utility.raise_error;
104: end if;
105: close csr_get_business_group_id;
98: --
99: if csr_get_business_group_id%NOTFOUND then
100: close csr_get_business_group_id;
101: hr_utility.set_location(l_proc, 30);
102: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
103: hr_utility.raise_error;
104: end if;
105: close csr_get_business_group_id;
106: --
99: if csr_get_business_group_id%NOTFOUND then
100: close csr_get_business_group_id;
101: hr_utility.set_location(l_proc, 30);
102: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
103: hr_utility.raise_error;
104: end if;
105: close csr_get_business_group_id;
106: --
107: hr_utility.set_location(l_proc, 40);
103: hr_utility.raise_error;
104: end if;
105: close csr_get_business_group_id;
106: --
107: hr_utility.set_location(l_proc, 40);
108: --
109: -- Check that the specified business group is valid.
110: --
111: open csr_bg;
112: fetch csr_bg
113: into l_legislation_code;
114: if csr_bg%notfound then
115: close csr_bg;
116: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
117: hr_utility.raise_error;
118: end if;
119: close csr_bg;
120: hr_utility.set_location(l_proc, 50);
113: into l_legislation_code;
114: if csr_bg%notfound then
115: close csr_bg;
116: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
117: hr_utility.raise_error;
118: end if;
119: close csr_bg;
120: hr_utility.set_location(l_proc, 50);
121: --
116: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
117: hr_utility.raise_error;
118: end if;
119: close csr_bg;
120: hr_utility.set_location(l_proc, 50);
121: --
122: -- Check that the legislation of the specified business group is 'no'.
123: --
124: if l_legislation_code <> 'NO' then
121: --
122: -- Check that the legislation of the specified business group is 'no'.
123: --
124: if l_legislation_code <> 'NO' then
125: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
126: hr_utility.set_message_token('LEG_CODE','NO');
127: hr_utility.raise_error;
128: end if;
129: hr_utility.set_location(l_proc, 60);
122: -- Check that the legislation of the specified business group is 'no'.
123: --
124: if l_legislation_code <> 'NO' then
125: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
126: hr_utility.set_message_token('LEG_CODE','NO');
127: hr_utility.raise_error;
128: end if;
129: hr_utility.set_location(l_proc, 60);
130: --
123: --
124: if l_legislation_code <> 'NO' then
125: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
126: hr_utility.set_message_token('LEG_CODE','NO');
127: hr_utility.raise_error;
128: end if;
129: hr_utility.set_location(l_proc, 60);
130: --
131: -- Call the contract business process
125: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
126: hr_utility.set_message_token('LEG_CODE','NO');
127: hr_utility.raise_error;
128: end if;
129: hr_utility.set_location(l_proc, 60);
130: --
131: -- Call the contract business process
132: --
133: hr_contract_api.create_contract
178: ,p_attribute19 => p_attribute19
179: ,p_attribute20 => p_attribute20
180: ,p_effective_date => p_effective_date);
181: --
182: hr_utility.set_location(' Leaving:'||l_proc, 70);
183: --
184: end create_no_contract;
185: --
186: -- ----------------------------------------------------------------------
256: where pbg.business_group_id = l_business_group_id;
257: --
258: begin
259: --
260: hr_utility.set_location('Entering:'|| l_proc, 10);
261: --
262: -- Issue a savepoint if operating in validation only mode
263: --
264: savepoint update_no_contract;
262: -- Issue a savepoint if operating in validation only mode
263: --
264: savepoint update_no_contract;
265: --
266: hr_utility.set_location(l_proc, 20);
267: --
268: -- Process Logic
269: --
270: -- Get person details.
274: into l_business_group_id;
275: --
276: if csr_get_business_group_id%NOTFOUND then
277: close csr_get_business_group_id;
278: hr_utility.set_location(l_proc, 30);
279: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
280: hr_utility.raise_error;
281: end if;
282: close csr_get_business_group_id;
275: --
276: if csr_get_business_group_id%NOTFOUND then
277: close csr_get_business_group_id;
278: hr_utility.set_location(l_proc, 30);
279: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
280: hr_utility.raise_error;
281: end if;
282: close csr_get_business_group_id;
283: --
276: if csr_get_business_group_id%NOTFOUND then
277: close csr_get_business_group_id;
278: hr_utility.set_location(l_proc, 30);
279: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
280: hr_utility.raise_error;
281: end if;
282: close csr_get_business_group_id;
283: --
284: hr_utility.set_location(l_proc, 40);
280: hr_utility.raise_error;
281: end if;
282: close csr_get_business_group_id;
283: --
284: hr_utility.set_location(l_proc, 40);
285: --
286: -- Check that the specified business group is valid.
287: --
288: open csr_bg;
289: fetch csr_bg
290: into l_legislation_code;
291: if csr_bg%notfound then
292: close csr_bg;
293: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
294: hr_utility.raise_error;
295: end if;
296: close csr_bg;
297: --
290: into l_legislation_code;
291: if csr_bg%notfound then
292: close csr_bg;
293: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
294: hr_utility.raise_error;
295: end if;
296: close csr_bg;
297: --
298: hr_utility.set_location(l_proc, 50);
294: hr_utility.raise_error;
295: end if;
296: close csr_bg;
297: --
298: hr_utility.set_location(l_proc, 50);
299: --
300: -- Check that the legislation of the specified business group is 'no'.
301: --
302: if l_legislation_code <> 'NO' then
299: --
300: -- Check that the legislation of the specified business group is 'no'.
301: --
302: if l_legislation_code <> 'NO' then
303: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
304: hr_utility.set_message_token('LEG_CODE','NO');
305: hr_utility.raise_error;
306: end if;
307: hr_utility.set_location(l_proc, 60);
300: -- Check that the legislation of the specified business group is 'no'.
301: --
302: if l_legislation_code <> 'NO' then
303: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
304: hr_utility.set_message_token('LEG_CODE','NO');
305: hr_utility.raise_error;
306: end if;
307: hr_utility.set_location(l_proc, 60);
308: --
301: --
302: if l_legislation_code <> 'NO' then
303: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
304: hr_utility.set_message_token('LEG_CODE','NO');
305: hr_utility.raise_error;
306: end if;
307: hr_utility.set_location(l_proc, 60);
308: --
309: -- Call the contract business process
303: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
304: hr_utility.set_message_token('LEG_CODE','NO');
305: hr_utility.raise_error;
306: end if;
307: hr_utility.set_location(l_proc, 60);
308: --
309: -- Call the contract business process
310: --
311: hr_contract_api.update_contract
357: ,p_attribute20 => p_attribute20
358: ,p_effective_date => p_effective_date
359: ,p_datetrack_mode => p_datetrack_mode);
360: --
361: hr_utility.set_location(' Leaving:'||l_proc, 70);
362: --
363: end update_no_contract;
364: --
365: end hr_no_contract_api;