95: begin
96: g_package :='pqp_pl_vehicle_repository_api.';
97: l_proc := g_package||'create_pl_vehicle';
98:
99: hr_utility.set_location('Entering:'|| l_proc, 5);
100: --
101: -- Validation in addition to Row Handlers
102: --
103: -- Check that the specified business group is valid.
106: fetch csr_bg
107: into l_legislation_code;
108: if csr_bg%notfound then
109: close csr_bg;
110: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
111: hr_utility.raise_error;
112: end if;
113: close csr_bg;
114: --
107: into l_legislation_code;
108: if csr_bg%notfound then
109: close csr_bg;
110: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
111: hr_utility.raise_error;
112: end if;
113: close csr_bg;
114: --
115: -- Check that the legislation of the specified business group is 'PL'.
114: --
115: -- Check that the legislation of the specified business group is 'PL'.
116: --
117: if l_legislation_code <> 'PL' then
118: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
119: hr_utility.set_message_token('LEG_CODE','PL');
120: hr_utility.raise_error;
121: end if;
122:
115: -- Check that the legislation of the specified business group is 'PL'.
116: --
117: if l_legislation_code <> 'PL' then
118: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
119: hr_utility.set_message_token('LEG_CODE','PL');
120: hr_utility.raise_error;
121: end if;
122:
123:
116: --
117: if l_legislation_code <> 'PL' then
118: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
119: hr_utility.set_message_token('LEG_CODE','PL');
120: hr_utility.raise_error;
121: end if;
122:
123:
124: hr_utility.set_location(l_proc, 6);
120: hr_utility.raise_error;
121: end if;
122:
123:
124: hr_utility.set_location(l_proc, 6);
125:
126:
127: --
128: -- Call the Vehicle business process
306: begin
307: g_package :='pqp_pl_vehicle_repository_api.';
308: l_proc := g_package||'update_pl_vehicle';
309:
310: hr_utility.set_location('Entering:'|| l_proc, 5);
311: --
312: -- Validation in addition to Row Handlers
313: --
314: -- Check that the specified business group is valid.
317: fetch csr_bg into l_legislation_code;
318:
319: if csr_bg%notfound then
320: close csr_bg;
321: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
322: hr_utility.raise_error;
323: end if;
324: close csr_bg;
325: --
318:
319: if csr_bg%notfound then
320: close csr_bg;
321: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
322: hr_utility.raise_error;
323: end if;
324: close csr_bg;
325: --
326: -- Check that the legislation of the specified business group is 'PL'.
325: --
326: -- Check that the legislation of the specified business group is 'PL'.
327: --
328: if l_legislation_code <> 'PL' then
329: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
330: hr_utility.set_message_token('LEG_CODE','PL');
331: hr_utility.raise_error;
332: end if;
333:
326: -- Check that the legislation of the specified business group is 'PL'.
327: --
328: if l_legislation_code <> 'PL' then
329: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
330: hr_utility.set_message_token('LEG_CODE','PL');
331: hr_utility.raise_error;
332: end if;
333:
334:
327: --
328: if l_legislation_code <> 'PL' then
329: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
330: hr_utility.set_message_token('LEG_CODE','PL');
331: hr_utility.raise_error;
332: end if;
333:
334:
335: hr_utility.set_location(l_proc, 6);
331: hr_utility.raise_error;
332: end if;
333:
334:
335: hr_utility.set_location(l_proc, 6);
336: -- Call for Update Vehicle business process
337: pqp_vehicle_repository_api.update_vehicle
338: (p_validate => p_validate
339: ,p_effective_date => p_effective_date