160: -- -------------------------------------------------------------------+
161: -- {Start Of Comments}
162:
163: -- Description:
164: -- - Checks that the specified objective_id exists in per_objectives
165: -- for the same business group.
166: -- - Checks that the appraisal date in per_appraisals is between the
167: -- effective start/end dates in per_objectives
168: -- - Validates that the objective_id is unique for the appraisal_id
163: -- Description:
164: -- - Checks that the specified objective_id exists in per_objectives
165: -- for the same business group.
166: -- - Checks that the appraisal date in per_appraisals is between the
167: -- effective start/end dates in per_objectives
168: -- - Validates that the objective_id is unique for the appraisal_id
169:
170: -- Pre-requisites:
171: -- - None
176: -- - p_appraisal_id
177:
178: -- Post Success:
179: -- - Process continues if:
180: -- * The objective_id exists in per_objectives
181: -- * The appraisal date is between the effective start and end dates
182: -- * The objective_id is unique for appraisal_id
183:
184: -- Post Failure:
183:
184: -- Post Failure:
185: -- - An application error is raised and processing is terminated if any of
186: -- the following cases are found:
187: -- * The specified objective_id does not exists in per_objectives
188: -- * The appraisal date is not between the effective start and end dates
189: -- * The objective_id is not unique for the appraisal_id
190:
191: -- Developer/Implementation Notes:
207:
208: l_api_updating boolean;
209: l_proc varchar2(72) := g_package||'chk_objective_id';
210: l_exists varchar2(1);
211: l_business_group_id per_objectives.business_group_id%TYPE;
212:
213: -- Cursor to check that the specified objective_id exists in per_objectives
214: -- where the business_group_id in per_objectives exists in per_appraisals
215:
209: l_proc varchar2(72) := g_package||'chk_objective_id';
210: l_exists varchar2(1);
211: l_business_group_id per_objectives.business_group_id%TYPE;
212:
213: -- Cursor to check that the specified objective_id exists in per_objectives
214: -- where the business_group_id in per_objectives exists in per_appraisals
215:
216: cursor csr_id_exists is
217: select o.business_group_id
210: l_exists varchar2(1);
211: l_business_group_id per_objectives.business_group_id%TYPE;
212:
213: -- Cursor to check that the specified objective_id exists in per_objectives
214: -- where the business_group_id in per_objectives exists in per_appraisals
215:
216: cursor csr_id_exists is
217: select o.business_group_id
218: from per_objectives o
214: -- where the business_group_id in per_objectives exists in per_appraisals
215:
216: cursor csr_id_exists is
217: select o.business_group_id
218: from per_objectives o
219: where o.objective_id = p_objective_id;
220:
221: cursor csr_bg_exists (l_business_group_id IN per_objectives.business_group_id%TYPE) is
222: select null
217: select o.business_group_id
218: from per_objectives o
219: where o.objective_id = p_objective_id;
220:
221: cursor csr_bg_exists (l_business_group_id IN per_objectives.business_group_id%TYPE) is
222: select null
223: from per_appraisals a
224: where a.appraisal_id = p_appraisal_id
225: and a.business_group_id = l_business_group_id;
896: cursor csr_leg_code is
897: select legislation_code
898: from per_business_groups pbg,
899: per_performance_ratings ppr,
900: per_objectives pob
901: where ppr.performance_rating_id = p_performance_rating_id
902: and ppr.objective_id = pob.objective_id
903: and pbg.business_group_id = pob.business_group_id;
904:
935:
936: -- flemonni
937:
938: FUNCTION Get_PR_Data
939: ( p_objective_id IN per_objectives.objective_id%TYPE
940: )
941: RETURN r_objpr_rec
942: IS
943: l_record r_objpr_rec;
941: RETURN r_objpr_rec
942: IS
943: l_record r_objpr_rec;
944: CURSOR csr_objpr
945: ( p_objective_id per_objectives.objective_id%TYPE
946: )
947: IS
948: SELECT performance_rating_id, object_version_number
949: FROM per_performance_ratings