DBA Data[Home] [Help]

APPS.PER_CAGR_EVALUATION_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 137

 SELECT asg.COLLECTIVE_AGREEMENT_ID
        ,asg.ASSIGNMENT_ID
        ,asg.PERSON_ID
        ,res.VALUE
        ,res.RANGE_FROM
        ,res.RANGE_TO
        ,res.GRADE_SPINE_ID
        ,res.PARENT_SPINE_ID
        ,res.STEP_ID
        ,res.FROM_STEP_ID
        ,res.TO_STEP_ID
        ,res.CHOSEN_FLAG
        ,res.BENEFICIAL_FLAG
  FROM per_all_assignments_f asg, per_cagr_entitlement_results res
  WHERE asg.assignment_id = res.assignment_id
  AND asg.primary_flag = 'Y'
  AND p_process_date between asg.effective_start_date and asg.effective_end_date
  AND res.cagr_entitlement_item_id = p_entitlement_item_id
  AND p_process_date between res.start_date and nvl(res.end_date, hr_general.end_of_time)
  AND (p_collective_agreement_id is null or asg.collective_agreement_id = p_collective_agreement_id)
  AND (p_value is null or res.value = p_value)
  AND (p_step_id is null or res.step_id = p_step_id)
  order by asg.PERSON_ID;
Line: 211

     SELECT item.opt_id
     FROM per_cagr_entitlement_items item
     WHERE item.cagr_entitlement_item_id = p_params.entitlement_item_id
     AND exists (select 'x'
                 from per_collective_agreements cagr, per_all_assignments_f asg
                 where cagr.status = 'A'
                 and p_params.effective_date >= cagr.start_date
                 and cagr.collective_agreement_id in (select distinct(pce.collective_agreement_id)
                                                      from per_cagr_entitlements pce, per_cagr_entitlement_lines_f pcel
                                                      where pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID
                                                      and pce.STATUS = 'A'
                                                      and p_params.effective_date between pce.start_date
                                                      and nvl(pce.end_date,hr_general.end_of_time)
                                                      and pcel.STATUS = 'A'
                                                      and pcel.OIPL_ID <> 0 and pcel.ELIGY_PRFL_ID <> 0
                                                      and p_params.effective_date between pcel.effective_start_date
                                                                                  and pcel.effective_end_date
                                                      and pce.cagr_entitlement_item_id = p_params.entitlement_item_id
                                                      and (p_params.collective_agreement_id is null or
                                                           pce.collective_agreement_id = p_params.collective_agreement_id))
                 and cagr.collective_agreement_id = asg.collective_agreement_id
                 and asg.PRIMARY_FLAG = 'Y'
                 and p_params.effective_date BETWEEN asg.effective_start_date
                                             AND asg.effective_end_date);
Line: 237

     SELECT agr.pl_id
     FROM per_collective_agreements agr
     WHERE agr.collective_agreement_id = p_params.collective_agreement_id;
Line: 244

      SELECT cagr.collective_agreement_id, asg.assignment_id, asg.grade_id, asg.person_id
      FROM per_collective_agreements cagr, per_all_assignments_f asg
      WHERE cagr.status = 'A'
      AND p_params.effective_date >= cagr.start_date
      AND cagr.collective_agreement_id in (select distinct(pce.collective_agreement_id)
                                          from per_cagr_entitlements pce
                                          where pce.cagr_entitlement_item_id = p_params.entitlement_item_id
                                          and pce.STATUS = 'A'
                                          and p_params.effective_date between pce.start_date
                                                                      and nvl(pce.end_date,hr_general.end_of_time)
                                          and (p_params.collective_agreement_id is null or
                                               pce.collective_agreement_id = p_params.collective_agreement_id))
      AND cagr.collective_agreement_id = asg.collective_agreement_id
      AND asg.PRIMARY_FLAG = 'Y'
      AND p_params.effective_date BETWEEN asg.effective_start_date
                                        AND asg.effective_end_date
      ORDER BY cagr.collective_agreement_id;
Line: 267

     SELECT pl_id
     FROM per_collective_agreements  cagr
     WHERE cagr.COLLECTIVE_AGREEMENT_ID = p_params.COLLECTIVE_AGREEMENT_ID
     AND   p_params.effective_date BETWEEN cagr.START_DATE
                                   AND nvl(cagr.END_DATE, hr_general.end_of_time)
     AND   cagr.STATUS = 'A'
     AND exists (select 'x'
                 from per_all_assignments_f asg
                 where  p_params.effective_date BETWEEN asg.effective_start_date
                                                AND asg.effective_end_date
                 and asg.COLLECTIVE_AGREEMENT_ID = p_params.COLLECTIVE_AGREEMENT_ID
                 and asg.PRIMARY_FLAG = 'Y')
     AND exists (select 'x'
                 from per_cagr_entitlements pce, per_cagr_entitlement_lines_f pcel
                 where pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID
                 and pce.STATUS = 'A'
                 and p_params.effective_date between pce.start_date
                                             and nvl(pce.end_date,hr_general.end_of_time)
                 and pcel.STATUS = 'A'
                 and pcel.OIPL_ID <> 0 and pcel.ELIGY_PRFL_ID <> 0
                 and p_params.effective_date between pcel.effective_start_date and pcel.effective_end_date
                 and pce.collective_agreement_id = p_params.COLLECTIVE_AGREEMENT_ID);
Line: 292

     SELECT assignment_id, grade_id, person_id
	FROM per_all_assignments_f asg
	WHERE collective_agreement_id = p_params.collective_agreement_id
	AND p_params.effective_date BETWEEN asg.effective_start_date
					AND asg.effective_end_date
        AND asg.PRIMARY_FLAG = 'Y';
Line: 301

     SELECT cagr.NAME,
          cagr.PL_ID,
	  pce.CAGR_ENTITLEMENT_ITEM_ID,
	  pce.CAGR_ENTITLEMENT_ID,
	  pce.FORMULA_CRITERIA,
	  pce.FORMULA_ID,
	  pcei.ITEM_NAME,
	  pcei.BUSINESS_GROUP_ID,
	  pcei.FLEX_VALUE_SET_ID,
	  pcei.BENEFICIAL_RULE,
	  pcei.UOM       "UNITS_OF_MEASURE",
	  pcei.CAGR_API_ID,
	  pcei.CAGR_API_PARAM_ID,
	  pcei.ELEMENT_TYPE_ID,
	  pcei.INPUT_VALUE_ID,
	  pcei.CATEGORY_NAME,
	  pcei.COLUMN_TYPE,
	  pcei.COLUMN_SIZE,
	  pcei.MULTIPLE_ENTRIES_ALLOWED_FLAG,
	  pcei.BENEFICIAL_RULE_VALUE_SET_ID,
	  pcel.CAGR_ENTITLEMENT_LINE_ID,
	  pcel.VALUE,
	  pcel.RANGE_FROM,
	  pcel.RANGE_TO,
	  pcel.GRADE_SPINE_ID,
	  pcel.PARENT_SPINE_ID,
	  pcel.STEP_ID,
	  pcel.FROM_STEP_ID,
	  pcel.TO_STEP_ID,
	  pcel.OIPL_ID,
	  pcel.ELIGY_PRFL_ID                           -- BEN elig profile
     FROM per_collective_agreements     cagr,
         per_cagr_entitlements          pce,
         per_cagr_entitlement_items     pcei,
	 per_cagr_entitlement_lines_f   pcel
     WHERE cagr.COLLECTIVE_AGREEMENT_ID = p_params.collective_agreement_id
     AND   p_params.effective_date BETWEEN cagr.START_DATE
	                           AND nvl(cagr.END_DATE, hr_general.end_of_time)
     AND   cagr.STATUS = 'A'
     AND   cagr.COLLECTIVE_AGREEMENT_ID = pce.COLLECTIVE_AGREEMENT_ID
     AND   pce.STATUS = 'A'
     AND   p_params.effective_date BETWEEN pce.START_DATE
				   AND nvl(pce.END_DATE,hr_general.end_of_time)
     AND   pce.CAGR_ENTITLEMENT_ITEM_ID = pcei.CAGR_ENTITLEMENT_ITEM_ID
     AND   pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID (+)
     AND   ((pcel.CAGR_ENTITLEMENT_ID IS NOT NULL
	     AND p_params.effective_date BETWEEN pcel.effective_start_date
	                                 AND pcel.effective_end_date
             AND pcel.STATUS = 'A'
	    OR pcel.CAGR_ENTITLEMENT_ID IS NULL))
     ORDER BY pce.CAGR_ENTITLEMENT_ITEM_ID;
Line: 360

     SELECT asg.COLLECTIVE_AGREEMENT_ID,
            asg.PERSON_ID,
            cagr.PL_ID
     FROM per_all_assignments_f asg, per_collective_agreements cagr
     WHERE asg.ASSIGNMENT_ID = p_params.assignment_id
     AND   p_params.effective_date BETWEEN asg.effective_start_date
                                   AND asg.effective_end_date
     AND   asg.PRIMARY_FLAG = 'Y'
     AND   asg.COLLECTIVE_AGREEMENT_ID = cagr.COLLECTIVE_AGREEMENT_ID
     AND   p_params.effective_date BETWEEN cagr.START_DATE
                                   AND nvl(cagr.END_DATE, hr_general.end_of_time)
     AND   cagr.STATUS = 'A'
     AND exists (select 'x'
                 from per_cagr_entitlements pce, per_cagr_entitlement_lines_f pcel
                 where pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID
                 and pce.STATUS = 'A'
                 and p_params.effective_date between pce.start_date
                                             and nvl(pce.end_date,hr_general.end_of_time)
                 and pcel.STATUS = 'A'
                 and pcel.OIPL_ID <> 0 and pcel.ELIGY_PRFL_ID <> 0
                 and p_params.effective_date between pcel.effective_start_date and pcel.effective_end_date
                 and pce.collective_agreement_id = asg.COLLECTIVE_AGREEMENT_ID);
Line: 389

    SELECT asg.COLLECTIVE_AGREEMENT_ID,
           asg.GRADE_ID,                                  -- for PYS eligibility
           cagr.NAME,
           cagr.PL_ID,                                   -- BEN comp obj
           pce.CAGR_ENTITLEMENT_ITEM_ID,
           pce.CAGR_ENTITLEMENT_ID,
           pce.FORMULA_CRITERIA,
           pce.FORMULA_ID,
           pcei.ITEM_NAME,
           pcei.BUSINESS_GROUP_ID,
           pcei.FLEX_VALUE_SET_ID,
           pcei.BENEFICIAL_RULE,
           pcei.UOM       "UNITS_OF_MEASURE",
           pcei.CAGR_API_ID,                            -- set for denorm item
           pcei.CAGR_API_PARAM_ID,
           pcei.ELEMENT_TYPE_ID,
           pcei.INPUT_VALUE_ID,
           pcei.CATEGORY_NAME,
           pcei.COLUMN_TYPE,
           pcei.COLUMN_SIZE,
           pcei.MULTIPLE_ENTRIES_ALLOWED_FLAG,
           pcei.BENEFICIAL_RULE_VALUE_SET_ID,
           pcel.CAGR_ENTITLEMENT_LINE_ID,
           pcel.VALUE,
           pcel.RANGE_FROM,
           pcel.RANGE_TO,
           pcel.GRADE_SPINE_ID,
           pcel.PARENT_SPINE_ID,
           pcel.STEP_ID,
           pcel.FROM_STEP_ID,
           pcel.TO_STEP_ID,
           pcel.OIPL_ID,                                -- BEN comp obj
           pcel.ELIGY_PRFL_ID                           -- BEN elig profile
    FROM per_all_assignments_f          asg,
         per_collective_agreements      cagr,
         per_cagr_entitlements          pce,
         per_cagr_entitlement_items     pcei,
         per_cagr_entitlement_lines_f   pcel
    WHERE asg.ASSIGNMENT_ID = p_params.assignment_id
    AND   p_params.effective_date BETWEEN asg.effective_start_date
                                  AND asg.effective_end_date
    AND   asg.PRIMARY_FLAG = 'Y'
    AND   asg.COLLECTIVE_AGREEMENT_ID = cagr.COLLECTIVE_AGREEMENT_ID
    AND   p_params.effective_date BETWEEN cagr.START_DATE
                                  AND nvl(cagr.END_DATE, hr_general.end_of_time)
    AND   cagr.STATUS = 'A'
    AND   asg.COLLECTIVE_AGREEMENT_ID = pce.COLLECTIVE_AGREEMENT_ID
    AND   pce.STATUS = 'A'
    AND   p_params.effective_date BETWEEN pce.START_DATE
                                  AND nvl(pce.END_DATE,hr_general.end_of_time)
    AND   pce.CAGR_ENTITLEMENT_ITEM_ID = pcei.CAGR_ENTITLEMENT_ITEM_ID
    AND   pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID (+)
    AND   ((pcel.CAGR_ENTITLEMENT_ID IS NOT NULL
            AND p_params.effective_date BETWEEN pcel.effective_start_date
                                        AND pcel.effective_end_date
            AND pcel.STATUS = 'A'
           OR pcel.CAGR_ENTITLEMENT_ID IS NULL))
    ORDER BY pce.CAGR_ENTITLEMENT_ITEM_ID;
Line: 453

    SELECT asg.COLLECTIVE_AGREEMENT_ID,
           asg.PERSON_ID,
           cagr.PL_ID
    FROM  per_all_assignments_f asg, per_collective_agreements cagr
    WHERE asg.assignment_id = p_params.assignment_id
    AND   p_params.effective_date BETWEEN asg.effective_start_date
                                  AND asg.effective_end_date
    AND   asg.PRIMARY_FLAG = 'Y'
    AND   asg.collective_agreement_id = cagr.collective_agreement_id
    AND   p_params.effective_date BETWEEN cagr.start_date
                                  AND nvl(cagr.end_date, hr_general.end_of_time)
    AND   cagr.status = 'A'
    AND exists (select 'x'
                from per_cagr_entitlements pce, per_cagr_entitlement_lines_f pcel
                where pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID
                and pce.CAGR_ENTITLEMENT_ITEM_ID = p_params.entitlement_item_id   -- only 1 entitlement
                and pce.STATUS = 'A'
                and p_params.effective_date between pce.start_date
                                            and nvl(pce.end_date,hr_general.end_of_time)
                and pcel.STATUS = 'A'
                and pcel.OIPL_ID <> 0 and pcel.ELIGY_PRFL_ID <> 0             -- ignore default elig lines
                and p_params.effective_date between pcel.effective_start_date
                                            and pcel.effective_end_date);
Line: 482

    SELECT asg.COLLECTIVE_AGREEMENT_ID,
           asg.GRADE_ID,                                 -- for PYS eligibility
           cagr.NAME,
           cagr.PL_ID,                                   -- BEN comp obj
           pce.CAGR_ENTITLEMENT_ITEM_ID,
           pce.CAGR_ENTITLEMENT_ID,
           pce.FORMULA_CRITERIA,
           pce.FORMULA_ID,
           pcei.ITEM_NAME,
           pcei.BUSINESS_GROUP_ID,
           pcei.FLEX_VALUE_SET_ID,
           pcei.BENEFICIAL_RULE,
           pcei.UOM       "UNITS_OF_MEASURE",
           pcei.CAGR_API_ID,                            -- set for denorm item
           pcei.CAGR_API_PARAM_ID,
           pcei.ELEMENT_TYPE_ID,
           pcei.INPUT_VALUE_ID,
           pcei.CATEGORY_NAME,
           pcei.COLUMN_TYPE,
           pcei.COLUMN_SIZE,
           pcei.MULTIPLE_ENTRIES_ALLOWED_FLAG,
           pcei.BENEFICIAL_RULE_VALUE_SET_ID,
           pcel.CAGR_ENTITLEMENT_LINE_ID,
           pcel.VALUE,
           pcel.RANGE_FROM,
           pcel.RANGE_TO,
           pcel.GRADE_SPINE_ID,
           pcel.PARENT_SPINE_ID,
           pcel.STEP_ID,
           pcel.FROM_STEP_ID,
           pcel.TO_STEP_ID,
           pcel.OIPL_ID,                                -- BEN comp obj
           pcel.ELIGY_PRFL_ID                           -- BEN elig profile
    FROM per_all_assignments_f          asg,
         per_collective_agreements      cagr,
         per_cagr_entitlements          pce,
         per_cagr_entitlement_items     pcei,
         per_cagr_entitlement_lines_f   pcel
    WHERE asg.ASSIGNMENT_ID = p_params.assignment_id
    AND   p_params.effective_date BETWEEN asg.effective_start_date
                                  AND asg.effective_end_date
    AND   asg.PRIMARY_FLAG = 'Y'
    AND   asg.COLLECTIVE_AGREEMENT_ID = cagr.COLLECTIVE_AGREEMENT_ID
    AND   p_params.effective_date BETWEEN cagr.START_DATE
                                  AND nvl(cagr.END_DATE, hr_general.end_of_time)
    AND   cagr.STATUS = 'A'
    AND   asg.COLLECTIVE_AGREEMENT_ID = pce.COLLECTIVE_AGREEMENT_ID
    AND   pce.STATUS = 'A'
    AND   pce.CAGR_ENTITLEMENT_ITEM_ID = p_params.entitlement_item_id   -- only 1 entitlement
    AND   p_params.effective_date BETWEEN pce.START_DATE
                                  AND nvl(pce.END_DATE,hr_general.end_of_time)
    AND   pce.CAGR_ENTITLEMENT_ITEM_ID = pcei.CAGR_ENTITLEMENT_ITEM_ID
    AND   pce.CAGR_ENTITLEMENT_ID = pcel.CAGR_ENTITLEMENT_ID (+)
    AND   ((pcel.CAGR_ENTITLEMENT_ID IS NOT NULL
            AND p_params.effective_date BETWEEN pcel.effective_start_date
                                        AND pcel.effective_end_date
            AND pcel.STATUS = 'A'
           OR pcel.CAGR_ENTITLEMENT_ID IS NULL))
    ORDER BY pce.CAGR_ENTITLEMENT_ITEM_ID;
Line: 544

     SELECT 'X'
     FROM per_all_assignments_f asg
     WHERE asg.assignment_id = p_params.assignment_id
     AND p_params.effective_date BETWEEN asg.effective_start_date AND asg.effective_end_date
     AND asg.primary_flag = 'Y';
Line: 584

   l_update_cache                BOOLEAN         := FALSE;
Line: 611

    SELECT cagr_entitlement_item_id,
           cagr_entitlement_id,
           cagr_entitlement_line_id,
           value,
           grade_spine_id,
           parent_spine_id,
           step_id
    FROM per_cagr_entitlement_results res
    WHERE res.assignment_id = p_assignment_id
    AND p_effective_date between res.START_DATE and nvl(res.END_DATE, hr_general.end_of_time)
    AND chosen_flag = 'Y';
Line: 733

  SELECT erl.VALUE
        ,erl.RANGE_FROM
        ,erl.RANGE_TO
        ,erl.GRADE_SPINE_ID
        ,erl.PARENT_SPINE_ID
        ,erl.STEP_ID
        ,erl.FROM_STEP_ID
        ,erl.TO_STEP_ID
        ,erl.BENEFICIAL_FLAG
    FROM  per_cagr_entitlement_results erl
    WHERE erl.ASSIGNMENT_ID = p_assignment_id
      AND erl.COLLECTIVE_AGREEMENT_ID = p_cagr_id
      AND erl.CAGR_ENTITLEMENT_ITEM_ID = p_entitlement_item_id
      AND p_effective_date BETWEEN erl.START_DATE
                           AND nvl(erl.END_DATE,hr_general.end_of_time);
Line: 807

  SELECT gs.grade_id
  FROM per_grade_spines_f gs
  WHERE gs.grade_spine_id = p_grade_spine_id
  AND p_effective_date between gs.effective_start_date and gs.effective_end_date;
Line: 852

       INSERT INTO per_cagr_entitlement_results(CAGR_ENTITLEMENT_RESULT_ID
                                            ,CAGR_REQUEST_ID
                                            ,START_DATE
                                            ,END_DATE
                                            ,COLLECTIVE_AGREEMENT_ID
                                            ,CAGR_ENTITLEMENT_ITEM_ID
                                            ,ELEMENT_TYPE_ID
                                            ,INPUT_VALUE_ID
                                            ,CAGR_API_ID
                                            ,CAGR_API_PARAM_ID
                                            ,CATEGORY_NAME
                                            ,CAGR_ENTITLEMENT_ID
                                            ,CAGR_ENTITLEMENT_LINE_ID
                                            ,ASSIGNMENT_ID
                                            ,VALUE
                                            ,UNITS_OF_MEASURE
                                            ,RANGE_FROM
                                            ,RANGE_TO
                                            ,GRADE_SPINE_ID
                                            ,PARENT_SPINE_ID
                                            ,STEP_ID
                                            ,FROM_STEP_ID
                                            ,TO_STEP_ID
                                            ,BENEFICIAL_FLAG
                                            ,OIPL_ID
                                            ,ELIGY_PRFL_ID
                                            ,FORMULA_ID
                                            ,CHOSEN_FLAG
                                            ,COLUMN_TYPE
                                            ,COLUMN_SIZE
                                            ,MULTIPLE_ENTRIES_ALLOWED_FLAG
                                            ,BUSINESS_GROUP_ID
                                            ,FLEX_VALUE_SET_ID
                                            ,RETAINED_ENT_RESULT_ID
                                            ,OBJECT_VERSION_NUMBER)
                                     VALUES (PER_CAGR_ENTITLEMENT_RESULTS_S.nextval
                                            ,p_cagr_request_id
                                            ,p_effective_date
                                            ,p_end_date
                                            ,p_structure(i).COLLECTIVE_AGREEMENT_ID
                                            ,p_structure(i).CAGR_ENTITLEMENT_ITEM_ID
                                            ,p_structure(i).ELEMENT_TYPE_ID
                                            ,p_structure(i).INPUT_VALUE_ID
                                            ,p_structure(i).CAGR_API_ID
                                            ,p_structure(i).CAGR_API_PARAM_ID
                                            ,p_structure(i).CATEGORY_NAME
                                            ,p_structure(i).CAGR_ENTITLEMENT_ID
                                            ,p_structure(i).CAGR_ENTITLEMENT_LINE_ID
                                            ,p_structure(i).ASSIGNMENT_ID
                                            ,p_structure(i).VALUE
                                            ,p_structure(i).UNITS_OF_MEASURE
                                            ,p_structure(i).RANGE_FROM
                                            ,p_structure(i).RANGE_TO
                                            ,p_structure(i).GRADE_SPINE_ID
                                            ,p_structure(i).PARENT_SPINE_ID
                                            ,p_structure(i).STEP_ID
                                            ,p_structure(i).FROM_STEP_ID
                                            ,p_structure(i).TO_STEP_ID
                                            ,p_structure(i).BENEFICIAL_FLAG
                                            ,p_structure(i).OIPL_ID
                                            ,p_structure(i).ELIGY_PRFL_ID
                                            ,p_structure(i).FORMULA_ID
                                            ,p_structure(i).CHOSEN_FLAG
                                            ,p_structure(i).COLUMN_TYPE
                                            ,p_structure(i).COLUMN_SIZE
                                            ,p_structure(i).MULTIPLE_ENTRIES_ALLOWED_FLAG
                                            ,p_structure(i).BUSINESS_GROUP_ID
                                            ,p_structure(i).FLEX_VALUE_SET_ID
                                            ,p_structure(i).RETAINED_ENT_RESULT_ID
                                            ,l_ovn);
Line: 940

 PROCEDURE insert_result_set (p_structure        IN             results_table
                             ,p_params           IN             control_structure)  IS

  --
  -- Accept table of result records for an item and insert new records into the cache table
  -- starting on the effctive date (end_date may be EOT or start_date -1 of any future result)
  --
  -- (Calls write_results to insert new set as no results exist for the item-asg-date combination.)
  --

  -- test if any future result(s) exists for the item
  -- and return the start_date of earliest future result set
  CURSOR csr_future_results IS
   SELECT min(er.start_date)
   FROM per_cagr_entitlement_results er
   WHERE er.cagr_entitlement_item_id = p_params.entitlement_item_id
   AND er.assignment_id =  p_params.assignment_id
   AND p_params.effective_date < er.START_DATE;
Line: 959

   l_proc constant               VARCHAR2(61)    := g_pkg || '.insert_result_set';
Line: 967

    per_cagr_utility_pkg.put_log('   Executing insert_result_set');
Line: 980

   per_cagr_utility_pkg.put_log('   Completed insert_result_set');
Line: 983

 END insert_result_set;
Line: 989

 PROCEDURE update_result_set (p_structure           IN    results_table
                             ,p_params              in    control_structure
                             ,p_switch              IN    VARCHAR2) IS
 --
 --  This routine performs two distinct functions, controlled by params supplied:
 --  1) 'Clean' results cache by end_dating (to eff_date - 1) all item results for the asg that are
 --   found on effective_date. This is used prior to starting a new engine run (except SE or BE)
 --   or when cagr has been removed (nullified) from the asg.
 --  2) 'Write' calls write_results to write new records when 'updating' existing records for an item.
 --   This is used by all modes (but check_cache determines whether called by SE or BE).
 --

	-- Bug 12621959
	l_element_entry_id pay_element_entries_f.element_entry_id%type;
Line: 1005

	l_delete_warning boolean;
Line: 1011

	SELECT ee.element_entry_id,ee.object_version_number
	FROM   pay_element_entries_f ee,per_cagr_entitlement_results cer
	WHERE  ee.assignment_id = p_assignment_id
	AND    ee.assignment_id = cer.assignment_id
	AND    ee.element_type_id = cer.element_type_id
	AND    ee.effective_start_date = p_params.effective_date
	AND    ee.element_type_id = p_element_type_id;
Line: 1023

   SELECT er.start_date, er.cagr_request_id, er.element_type_id
   FROM per_cagr_entitlement_results er
   WHERE er.assignment_id =  v_assignment_id
   AND p_params.effective_date BETWEEN er.START_DATE AND nvl(er.END_DATE,hr_general.END_OF_TIME)
   ORDER BY er.cagr_request_id
   FOR UPDATE OF END_DATE NOWAIT;
Line: 1033

   SELECT er.start_date, er.cagr_request_id
   FROM per_cagr_entitlement_results er
   WHERE er.assignment_id = p_params.assignment_id
   AND er.cagr_entitlement_item_id = p_params.entitlement_item_id
   AND p_params.effective_date BETWEEN er.START_DATE AND nvl(er.END_DATE,hr_general.END_OF_TIME)
   FOR UPDATE OF END_DATE NOWAIT;
Line: 1044

   SELECT min(er.start_date)
   FROM per_cagr_entitlement_results er
   WHERE er.cagr_entitlement_item_id = v_entitlement_item_id
   AND er.assignment_id =  v_assignment_id
   AND p_params.effective_date < er.START_DATE;
Line: 1055

   l_proc constant               VARCHAR2(61)    := g_pkg || '.update_result_set';
Line: 1062

   v_delete_cagr_request_id      NUMBER(15);
Line: 1081

        fetch csr_item_results into v_start_date, v_delete_cagr_request_id;
Line: 1084

          update per_cagr_entitlement_results set end_date = p_params.effective_date -1
           where current of csr_item_results;
Line: 1089

            update per_cagr_entitlement_results set end_date = p_params.effective_date -1
              where current of csr_item_results;
Line: 1094

          delete from per_cagr_entitlement_results
            where current of csr_item_results;
Line: 1100

            delete from per_cagr_entitlement_results
              where current of csr_item_results;
Line: 1106

          per_cagr_utility_pkg.remove_log_entries(v_delete_cagr_request_id);
Line: 1144

         update per_cagr_entitlement_results set end_date = p_params.effective_date -1
         where current of csr_all_results;
Line: 1152

pay_element_entry_api.delete_element_entry
(  p_datetrack_delete_mode         => 'ZAP'
  ,p_effective_date                => p_params.effective_date
  ,p_element_entry_id              => l_element_entry_id
  ,p_object_version_number         => l_ovn
  ,p_effective_start_date          => l_effective_start_date
  ,p_effective_end_date            => l_effective_end_date
  ,p_delete_warning                => l_delete_warning);
Line: 1164

          delete from per_cagr_entitlement_results
          where current of csr_all_results;
Line: 1166

          if v_delete_cagr_request_id is null then
            v_delete_cagr_request_id := v_cagr_request_id;
Line: 1169

            t_cagr_request(i) := v_delete_cagr_request_id;
Line: 1170

          elsif v_delete_cagr_request_id <> v_cagr_request_id then
            v_delete_cagr_request_id := v_cagr_request_id;
Line: 1173

            t_cagr_request(i) := v_delete_cagr_request_id;
Line: 1200

 END update_result_set;
Line: 1304

      SELECT batch_elig_id,
             BENEFIT_ACTION_ID,
             PERSON_ID,
             PGM_ID,
             PL_ID,
             OIPL_ID,
             ELIG_FLAG
      from ben_batch_elig_info bbe
      where bbe.BENEFIT_ACTION_ID = p_benefit_action_id
      and bbe.OIPL_ID is not null;
Line: 1361

      SELECT  person_id
      FROM    ben_batch_elig_info bbe
      WHERE   bbe.benefit_action_id = g_benefit_action_id
      AND     oipl_id = p_oipl_id
      AND     person_id = p_person_id
      AND     elig_flag = 'Y'
      AND     oipl_id IS NOT NULL;
Line: 1371

      SELECT  oipl_id
      FROM    ben_batch_elig_info bbe
      WHERE   bbe.benefit_action_id = g_benefit_action_id
      AND     oipl_id = p_oipl_id
      AND     oipl_id IS NOT NULL;
Line: 1471

    SELECT value_column_type
    FROM fnd_flex_validation_tables
    WHERE flex_value_set_id = vs_id;
Line: 1719

       l_dyn_csr_table.delete;    -- clear pl/sql table
Line: 1765

      SELECT * from per_cagr_retained_rights pcrr
      WHERE pcrr.assignment_id = p_assignment_id
      AND cagr_entitlement_item_id = p_cagr_entitlement_item_id
      AND p_params.effective_date BETWEEN pcrr.START_DATE AND nvl(pcrr.END_DATE,hr_general.end_of_time)
      AND EXISTS (select 'x'
                  from per_collective_agreements pca
                  where pca.collective_agreement_id = pcrr.collective_agreement_id
                  and pca.STATUS = 'A'
                  and p_params.effective_date >= pca.START_DATE)
       AND  EXISTS (select 'x'
                  from per_cagr_entitlements pce
                  where pce.cagr_entitlement_id = pcrr.cagr_entitlement_id
                  and pce.STATUS = 'A'
                  and p_params.effective_date between pce.START_DATE and nvl(pce.END_DATE,hr_general.end_of_time))
       AND ((pcrr.cagr_entitlement_line_id is not null
             and  EXISTS (select 'x'
                        from per_cagr_entitlement_lines_f pcel
                        where pcel.cagr_entitlement_line_id = pcrr.cagr_entitlement_line_id
                        and pcel.STATUS = 'A'
                        and p_params.effective_date between pcel.effective_start_date
                                                            and pcel.effective_end_date))
           OR pcrr.cagr_entitlement_line_id is null);
Line: 1791

      SELECT *
      FROM per_cagr_entitlements pce
      WHERE  pce.CAGR_ENTITLEMENT_ID = v_ent_id;
Line: 1800

      SELECT *
      FROM   per_cagr_entitlement_lines_f pcel
      WHERE  pcel.CAGR_ENTITLEMENT_LINE_ID = v_line_id
      AND    p_effective_date BETWEEN pcel.EFFECTIVE_START_DATE
                           AND nvl(pcel.EFFECTIVE_END_DATE,hr_general.end_of_time);
Line: 2031

           p_structure.delete(v_dup_record);
Line: 2102

      SELECT *
      FROM per_cagr_retained_rights pcrr
      WHERE pcrr.assignment_id = p_params.assignment_id
      AND p_params.effective_date BETWEEN pcrr.START_DATE
                                  AND nvl(pcrr.END_DATE,hr_general.end_of_time)
      AND EXISTS (select 'X' from per_all_assignments_f asg
                  where asg.assignment_id = p_params.assignment_id
                  and p_params.effective_date BETWEEN asg.effective_start_date
                                                  AND asg.effective_end_date
                  and asg.PRIMARY_FLAG = 'Y')
      AND EXISTS (select 'x'
                  from per_collective_agreements pca
                  where pca.collective_agreement_id = pcrr.collective_agreement_id
                  and pca.STATUS = 'A'
                  and p_params.effective_date >= pca.START_DATE)
      AND    EXISTS (select 'x'
                    from per_cagr_entitlements pce
                    where pce.cagr_entitlement_id = pcrr.cagr_entitlement_id
                    and pce.STATUS = 'A'
                    and p_params.effective_date BETWEEN pce.START_DATE
                                                AND nvl(pce.END_DATE,hr_general.end_of_time))
      AND ((pcrr.cagr_entitlement_line_id is not null
            and  EXISTS (select 'x'
                        from per_cagr_entitlement_lines_f pcel
                        where pcel.cagr_entitlement_line_id = pcrr.cagr_entitlement_line_id
                        and pcel.STATUS = 'A'
                        and p_params.effective_date between pcel.effective_start_date
                                                            and pcel.effective_end_date))
           OR pcrr.cagr_entitlement_line_id is null)
      AND 'N' =  per_cagr_evaluation_pkg.new_entitlement(pcrr.cagr_entitlement_item_id)
      ORDER BY pcrr.cagr_entitlement_item_id;
Line: 2137

      SELECT *
      FROM per_cagr_entitlements pce
      WHERE  pce.CAGR_ENTITLEMENT_ID = v_ent_id
      AND    p_params.effective_date BETWEEN pce.START_DATE
                                    AND nvl(pce.END_DATE,hr_general.end_of_time);
Line: 2146

      SELECT *
      FROM   per_cagr_entitlement_lines_f pcel
      WHERE  pcel.CAGR_ENTITLEMENT_LINE_ID = v_line_id
      AND    p_params.effective_date BETWEEN pcel.EFFECTIVE_START_DATE
                                     AND nvl(pcel.EFFECTIVE_END_DATE,hr_general.end_of_time);
Line: 2155

      SELECT beneficial_rule, beneficial_rule_value_set_id
      from per_cagr_entitlement_items pcei
      where pcei.cagr_entitlement_item_id = l_cagr_entitlement_item_id;
Line: 2234

              update_result_set(t_results_table,p_params,'W');
Line: 2236

              t_results_table.delete;
Line: 2426

         update_result_set(t_results_table,p_params,'W');
Line: 2427

         t_results_table.delete;
Line: 2459

      update_result_set(t_results_table,p_params,'C');
Line: 2532

              update_result_set(t_results_table,p_params,'W');
Line: 2534

              t_results_table.delete;
Line: 2740

          update_result_set(t_results_table,p_params,'W');
Line: 2741

          t_results_table.delete;
Line: 2754

      g_entitlement_items.DELETE;
Line: 2755

      t_chosen_table.DELETE;
Line: 3020

              l_update_cache := TRUE;
Line: 3022

              l_update_cache := FALSE;
Line: 3025

            if l_update_cache then
              -- only write new results to cache if p_commit_flag allows
              BEGIN
              if p_SE_rec.error = 'HR_289577_CAGR_NO_DATA_FOUND' then
                -- write new result set to cache, as none was found
                insert_result_set(t_results_table, p_params);
Line: 3034

                update_result_set(t_results_table,p_params,'W');
Line: 3040

                  per_cagr_utility_pkg.put_log('   Cache was not updated with results, continuing...');
Line: 3073

        g_entitlement_items.DELETE;
Line: 3077

        t_chosen_table.DELETE;
Line: 3079

      t_results_table.DELETE;
Line: 3207

          update_result_set(t_results_table,p_params,'C');
Line: 3256

                  update_result_set(t_results_table,p_params,'W');
Line: 3258

                  t_results_table.delete;
Line: 3465

              update_result_set(t_results_table,p_params,'W');
Line: 3466

              t_results_table.delete;
Line: 3479

          g_entitlement_items.DELETE;
Line: 3480

          t_chosen_table.DELETE;
Line: 3790

                    insert_result_set(t_results_table, p_params);
Line: 3791

                    t_results_table.DELETE;
Line: 3796

                    update_result_set(t_results_table,p_params,'W');
Line: 3797

                    t_results_table.DELETE;
Line: 3805

                    per_cagr_utility_pkg.put_log('   Cache was not updated with results, continuing...');
Line: 3813

            t_chosen_table.DELETE;