DBA Data[Home] [Help]

APPS.PAY_SE_HOLIDAY_PAY SQL Statements

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

Line: 33

  SELECT substr(hoi4.ORG_INFORMATION1,4,2),substr(hoi4.ORG_INFORMATION2,4,2)
          FROM HR_ORGANIZATION_UNITS o1
          ,HR_ORGANIZATION_INFORMATION hoi1
          ,HR_ORGANIZATION_INFORMATION hoi2
          ,HR_ORGANIZATION_INFORMATION hoi3
          ,HR_ORGANIZATION_INFORMATION hoi4
          ,( SELECT TRIM(SCL.SEGMENT2) AS ORG_ID
          FROM PER_ALL_ASSIGNMENTS_F ASG
               ,HR_SOFT_CODING_KEYFLEX SCL
         WHERE ASG.ASSIGNMENT_ID = p_assignment_id
           AND ASG.SOFT_CODING_KEYFLEX_ID = SCL.SOFT_CODING_KEYFLEX_ID
           AND p_effective_date BETWEEN ASG.EFFECTIVE_START_DATE  AND ASG.EFFECTIVE_END_DATE ) X
         WHERE o1.business_group_id = l_business_group_id
      AND hoi1.organization_id = o1.organization_id
      AND hoi1.organization_id = X.ORG_ID
      AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
      AND hoi1.org_information_context = 'CLASS'
      AND o1.organization_id = hoi2.org_information1
      AND hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
      AND hoi2.organization_id =  hoi3.organization_id
      AND hoi3.ORG_INFORMATION_CONTEXT='CLASS'
      AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
      AND hoi3.organization_id = hoi4.organization_id
      AND hoi4.ORG_INFORMATION_CONTEXT='SE_HOLIDAY_YEAR_DEFN'  'SE_LE_HOLIDAY_PAY_DETAILS'
      AND hoi4.org_information1 IS NOT NULL;*/
Line: 60

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 67

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 74

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 104

         SELECT DISTINCT eev1.screen_entry_value attendance_type_id
                    FROM per_all_assignments_f asg1
                         --,per_all_assignments_f      asg2
                        -- ,per_all_people_f         per
         ,               pay_element_links_f el
                        ,pay_element_types_f et
                        ,pay_input_values_f iv1
                        ,pay_element_entries_f ee
                        ,pay_element_entry_values_f eev1
                   WHERE asg1.assignment_id = p_assignment_id
                     AND p_effective_date BETWEEN asg1.effective_start_date
                                              AND asg1.effective_end_date
      --AND p_effective_date BETWEEN asg2.effective_start_date AND asg2.effective_end_date
   --   AND  per.person_id  = asg1.person_id
     -- AND  asg2.person_id    = per.person_id
--      AND  asg2.primary_flag    = 'Y'
                     AND et.element_name = 'Absence Details'
                     AND et.legislation_code = 'SE'
                     --OR et.business_group_id=3261     ) --checking for the business  group, it should be removed
                     AND iv1.element_type_id = et.element_type_id
                     AND iv1.NAME = 'Absence Category'        --l_inp_val_name
                     AND el.business_group_id = asg1.business_group_id
                     AND el.element_type_id = et.element_type_id
                     AND ee.assignment_id = asg1.assignment_id
                     AND ee.element_link_id = el.element_link_id
                     AND eev1.element_entry_id = ee.element_entry_id
                     AND eev1.input_value_id = iv1.input_value_id
                     AND ee.effective_start_date >= l_earning_start_date
                     AND ee.effective_end_date <= l_earning_end_date
                     AND eev1.effective_start_date >= l_earning_start_date
                     AND eev1.effective_end_date <= l_earning_end_date;
Line: 140

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 151

         SELECT information2 generate
               ,information3 max_days
           FROM per_absence_attendance_types
          WHERE absence_attendance_type_id = csr_v_absence_type_id;
Line: 158

         SELECT SUBSTR (hoi4.org_information1, 4, 2)
               ,SUBSTR (hoi4.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi4.org_information1 IS NOT NULL;
Line: 187

    SELECT min(EFFECTIVE_START_DATE) FROM
    per_all_assignments_f
    WHERE assignment_id=p_assignment_id;*/
Line: 191

      SELECT papf.business_group_id
            ,papf.person_id
        INTO l_business_group_id
            ,l_person_id
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_effective_date BETWEEN paaf.effective_start_date
                                  AND paaf.effective_end_date
         AND p_effective_date BETWEEN papf.effective_start_date
                                  AND papf.effective_end_date;
Line: 309

         SELECT SUBSTR (hoi4.org_information1, 4, 2)
               ,SUBSTR (hoi4.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi4.org_information1 IS NOT NULL;
Line: 340

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id;
Line: 344

      SELECT papf.business_group_id
        INTO l_business_group_id
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_effective_date BETWEEN paaf.effective_start_date
                                  AND paaf.effective_end_date
         AND p_effective_date BETWEEN papf.effective_start_date
                                  AND papf.effective_end_date;
Line: 458

  SELECT substr(hoi4.ORG_INFORMATION1,4,2),substr(hoi4.ORG_INFORMATION2,4,2)
          FROM HR_ORGANIZATION_UNITS o1
          ,HR_ORGANIZATION_INFORMATION hoi1
          ,HR_ORGANIZATION_INFORMATION hoi2
          ,HR_ORGANIZATION_INFORMATION hoi3
          ,HR_ORGANIZATION_INFORMATION hoi4
          ,( SELECT TRIM(SCL.SEGMENT2) AS ORG_ID
          FROM PER_ALL_ASSIGNMENTS_F ASG
               ,HR_SOFT_CODING_KEYFLEX SCL
         WHERE ASG.ASSIGNMENT_ID = p_assignment_id
           AND ASG.SOFT_CODING_KEYFLEX_ID = SCL.SOFT_CODING_KEYFLEX_ID
           AND p_effective_date BETWEEN ASG.EFFECTIVE_START_DATE  AND ASG.EFFECTIVE_END_DATE ) X
         WHERE o1.business_group_id = l_business_group_id
      AND hoi1.organization_id = o1.organization_id
      AND hoi1.organization_id = X.ORG_ID
      AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
      AND hoi1.org_information_context = 'CLASS'
      AND o1.organization_id = hoi2.org_information1
      AND hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
      AND hoi2.organization_id =  hoi3.organization_id
      AND hoi3.ORG_INFORMATION_CONTEXT='CLASS'
      AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
      AND hoi3.organization_id = hoi4.organization_id
      AND hoi4.ORG_INFORMATION_CONTEXT='SE_HOLIDAY_YEAR_DEFN'  'SE_LE_HOLIDAY_PAY_DETAILS'
      AND hoi4.org_information1 IS NOT NULL;*/
Line: 485

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 492

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 499

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 529

         SELECT DISTINCT eev1.screen_entry_value attendance_category_id
                    FROM per_all_assignments_f asg1
                         --,per_all_assignments_f      asg2
                        -- ,per_all_people_f         per
         ,               pay_element_links_f el
                        ,pay_element_types_f et
                        ,pay_input_values_f iv1
                        ,pay_element_entries_f ee
                        ,pay_element_entry_values_f eev1
                   WHERE asg1.assignment_id = p_assignment_id
                     AND p_effective_date BETWEEN asg1.effective_start_date
                                              AND asg1.effective_end_date
      --AND p_effective_date BETWEEN asg2.effective_start_date AND asg2.effective_end_date
   --   AND  per.person_id  = asg1.person_id
     -- AND  asg2.person_id    = per.person_id
--      AND  asg2.primary_flag    = 'Y'
      --AND  et.element_name   = 'Absence Details'
                     AND et.legislation_code = 'SE'
                     --OR et.business_group_id=3261     ) --checking for the business  group, it should be removed
                     AND iv1.element_type_id = et.element_type_id
                     AND iv1.NAME = 'Absence Category'        --l_inp_val_name
                     AND el.business_group_id = asg1.business_group_id
                     AND el.element_type_id = et.element_type_id
                     AND ee.assignment_id = asg1.assignment_id
                     AND ee.element_link_id = el.element_link_id
                     AND eev1.element_entry_id = ee.element_entry_id
                     AND eev1.input_value_id = iv1.input_value_id
                     AND ee.effective_start_date <= p_earning_end_date
                     AND ee.effective_end_date >= p_earning_start_date
                     AND eev1.effective_start_date <= p_earning_end_date
                     AND eev1.effective_end_date >= p_earning_start_date
                     AND et.element_name NOT IN
                            ('Advance Holiday Details', 'Advance Holiday Pay');
Line: 567

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 578

         /*SELECT INFORMATION2 Generate
         ,INFORMATION3 Max_Days
         FROM PER_ABSENCE_ATTENDANCE_TYPES
         WHERE ABSENCE_ATTENDANCE_TYPE_ID=csr_v_absence_type_id;*/
Line: 582

         SELECT hoi4.org_information2
               ,hoi4.org_information3
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            --AND   hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_ABSENCE_CATEGORY_LIMIT'
            AND hoi4.org_information1 IS NOT NULL
            AND hoi4.org_information1 = l_attendance_category_id;
Line: 614

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id;
Line: 618

      SELECT papf.business_group_id
            ,papf.person_id
            ,segment9
        INTO l_business_group_id
            ,l_person_id
            ,l_working_perc
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id                      --15381
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_effective_date BETWEEN paaf.effective_start_date
                                  AND paaf.effective_end_date
         AND p_effective_date BETWEEN papf.effective_start_date
                                  AND papf.effective_end_date;
Line: 791

         SELECT NVL (SUM (peevf2.screen_entry_value), 0)
           FROM per_all_assignments_f paaf
               ,pay_element_types_f et
               ,pay_element_entries_f ee
               ,pay_element_entry_values_f peevf1
               ,pay_element_entry_values_f peevf2
               ,pay_input_values_f pivf1
               ,pay_input_values_f pivf2
          WHERE paaf.assignment_id = p_assignment_id
            AND p_effective_date BETWEEN paaf.effective_start_date
                                     AND paaf.effective_end_date
            AND et.element_name = 'Absence Details'
            AND et.legislation_code = 'SE'
            AND ee.assignment_id = paaf.assignment_id
            AND ee.element_type_id = et.element_type_id
            AND ee.effective_start_date >= p_payroll_start_date
            AND ee.effective_end_date <= p_payroll_end_date
            AND ee.element_entry_id = peevf1.element_entry_id
            AND pivf1.element_type_id = et.element_type_id
            AND pivf1.NAME = 'Absence Category'
            AND peevf1.input_value_id = pivf1.input_value_id
            AND peevf1.screen_entry_value = 'V'
            AND ee.element_entry_id = peevf2.element_entry_id
            AND pivf2.element_type_id = et.element_type_id
            AND pivf2.NAME = 'Days'
            AND peevf2.input_value_id = pivf2.input_value_id
            AND p_payroll_start_date BETWEEN et.effective_start_date
                                         AND et.effective_end_date
            AND p_payroll_end_date BETWEEN et.effective_start_date
                                       AND et.effective_end_date
                                                                --AND  peevf1.effective_start_date >= to_date('01-jan-2000')
                                                                --AND  peevf1.effective_end_date <= to_date('31-jan-2000')
                                                                --AND  peevf2.effective_start_date >= to_date('01-jan-2000')
                                                                --AND  peevf2.effective_end_date <= to_date('31-jan-2000')
      ;
Line: 831

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 867

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 874

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 881

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 909

      SELECT papf.business_group_id
            ,papf.person_id
        INTO l_business_group_id
            ,l_person_id
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id                      --15381
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_effective_date BETWEEN paaf.effective_start_date
                                  AND paaf.effective_end_date
         AND p_effective_date BETWEEN papf.effective_start_date
                                  AND papf.effective_end_date;
Line: 1002

         SELECT 1
           FROM per_all_assignments_f asg
               ,pay_element_links_f el
               ,pay_element_types_f et
               ,pay_element_entries_f ee
          WHERE asg.assignment_id = p_assignment_id
            AND et.element_name = p_element_name
            AND et.legislation_code = 'SE'
            AND el.business_group_id = asg.business_group_id
            AND el.element_type_id = et.element_type_id
            AND ee.assignment_id = asg.assignment_id
            AND ee.element_link_id = el.element_link_id
            AND p_effective_date BETWEEN ee.effective_start_date
                                     AND ee.effective_end_date
            AND p_effective_date BETWEEN asg.effective_start_date
                                     AND asg.effective_end_date
            AND p_effective_date BETWEEN et.effective_start_date
                                     AND et.effective_end_date
            AND p_effective_date BETWEEN el.effective_start_date
                                     AND el.effective_end_date;
Line: 1055

         SELECT prd_information1
               ,prd_information3
               ,prd_information4
               ,prd_information6
               ,prd_information8
               ,prd_information9
           FROM per_time_periods
          WHERE payroll_id = p_payroll_id
            AND p_date_earned BETWEEN start_date AND end_date;
Line: 1106

         SELECT aei_information3
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 1113

         SELECT pei_information3
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 1120

         SELECT hoi4.org_information3
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 1150

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 1157

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 1164

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_effective_date BETWEEN asg.effective_start_date
                                              AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 1192

      SELECT papf.business_group_id
            ,papf.person_id
        INTO l_business_group_id
            ,l_person_id
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id                      --15381
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_effective_date BETWEEN paaf.effective_start_date
                                  AND paaf.effective_end_date
         AND p_effective_date BETWEEN papf.effective_start_date
                                  AND papf.effective_end_date;
Line: 1267

         SELECT SUBSTR (hoi2.org_information1, 4, 2)
               ,SUBSTR (hoi2.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
          WHERE hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = p_tax_unit_id                    --3134
            AND hoi1.org_information_context = 'CLASS'
            AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi1.organization_id = hoi2.organization_id
            AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi2.org_information1 IS NOT NULL;
Line: 1330

         SELECT prd_information4
           FROM per_time_periods
          WHERE payroll_id = p_payroll_id
            AND p_effective_date BETWEEN start_date AND end_date;
Line: 1337

         SELECT SUBSTR (hoi2.org_information1, 4, 2)
               ,SUBSTR (hoi2.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
          WHERE hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = p_tax_unit_id                    --3134
            AND hoi1.org_information_context = 'CLASS'
            AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi1.organization_id = hoi2.organization_id
            AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi2.org_information1 IS NOT NULL;
Line: 1354

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 1436

         SELECT NVL (hourly_salaried_code, '##') hsc
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id_id
            AND p_date_earned BETWEEN effective_start_date AND effective_end_date;
Line: 1471

         SELECT prd_information1
               ,prd_information3
               ,prd_information4
               ,prd_information5
               ,prd_information7
               ,prd_information8
           FROM per_time_periods
          WHERE payroll_id = p_payroll_id
            AND p_date_earned BETWEEN start_date AND end_date;
Line: 1503

   FUNCTION update_entitlement_ran (p_tax_unit_id IN NUMBER)
      RETURN NUMBER
   IS
   BEGIN
      UPDATE hr_organization_information
         SET org_information5 = 'Y'
       WHERE org_information_id =
                (SELECT hoi2.org_information_id
                   FROM hr_organization_units o1
                       ,hr_organization_information hoi1
                       ,hr_organization_information hoi2
                  WHERE hoi1.organization_id = o1.organization_id
                    AND hoi1.organization_id = p_tax_unit_id            --3134
                    AND hoi1.org_information_context = 'CLASS'
                    AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
                    AND hoi1.organization_id = hoi2.organization_id
                    AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
                    AND hoi2.org_information1 IS NOT NULL);
Line: 1527

   END update_entitlement_ran;
Line: 1550

         SELECT SUBSTR (hoi2.org_information1, 4, 2)
               ,SUBSTR (hoi2.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
          WHERE hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = p_tax_unit_id
            AND hoi1.org_information_context = 'CLASS'
            AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi1.organization_id = hoi2.organization_id
            AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi2.org_information1 IS NOT NULL;
Line: 1565

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id;
Line: 1640

         SELECT paaf.effective_start_date effective_start_date
           FROM per_all_assignments_f paaf
          WHERE paaf.business_group_id = p_business_group_id
            AND paaf.assignment_id = p_asg_id
            AND paaf.assignment_status_type_id = 3;
Line: 1708

         SELECT DISTINCT eev1.screen_entry_value attendance_category_id
                    FROM per_all_assignments_f asg1
                         --,per_all_assignments_f      asg2
                        -- ,per_all_people_f         per
         ,               pay_element_links_f el
                        ,pay_element_types_f et
                        ,pay_input_values_f iv1
                        ,pay_element_entries_f ee
                        ,pay_element_entry_values_f eev1
                   WHERE asg1.assignment_id = p_assignment_id
                     AND p_date_earned BETWEEN asg1.effective_start_date
                                           AND asg1.effective_end_date
      --AND p_effective_date BETWEEN asg2.effective_start_date AND asg2.effective_end_date
   --   AND  per.person_id  = asg1.person_id
     -- AND  asg2.person_id    = per.person_id
--      AND  asg2.primary_flag    = 'Y'
      --AND  et.element_name   = 'Absence Details'
                     AND et.legislation_code = 'SE'
                     --OR et.business_group_id=3261     ) --checking for the business  group, it should be removed
                     AND iv1.element_type_id = et.element_type_id
                     AND iv1.NAME = 'Absence Category'        --l_inp_val_name
                     AND el.business_group_id = asg1.business_group_id
                     AND el.element_type_id = et.element_type_id
                     AND ee.assignment_id = asg1.assignment_id
                     AND ee.element_link_id = el.element_link_id
                     AND eev1.element_entry_id = ee.element_entry_id
                     AND eev1.input_value_id = iv1.input_value_id
                     AND ee.effective_start_date > p_earn_end_date
                     AND ee.effective_end_date <= p_termination_date
                     AND eev1.effective_start_date > p_earn_end_date
                     AND eev1.effective_end_date <= p_termination_date;
Line: 1742

         SELECT hoi4.org_information2
               ,hoi4.org_information3
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_date_earned BETWEEN asg.effective_start_date
                                           AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            --AND   hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_ABSENCE_CATEGORY_LIMIT'
            AND hoi4.org_information1 IS NOT NULL
            AND hoi4.org_information1 = l_attendance_category_id;
Line: 1774

         SELECT SUBSTR (hoi2.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
          WHERE hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = p_tax_unit_id
            AND hoi1.org_information_context = 'CLASS'
            AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi1.organization_id = hoi2.organization_id
            AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi2.org_information1 IS NOT NULL;
Line: 1790

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 1801

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 1808

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 1815

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_date_earned BETWEEN asg.effective_start_date
                                           AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 1843

      SELECT papf.business_group_id
            ,papf.person_id
            ,segment9
        INTO l_business_group_id
            ,l_person_id
            ,l_working_perc
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id                      --15381
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_date_earned BETWEEN paaf.effective_start_date
                               AND paaf.effective_end_date
         AND p_date_earned BETWEEN papf.effective_start_date
                               AND papf.effective_end_date;
Line: 2026

         SELECT hoi4.org_information2
               ,hoi4.org_information3
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_date_earned BETWEEN asg.effective_start_date
                                           AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            --AND   hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_ABSENCE_CATEGORY_LIMIT'
            AND hoi4.org_information1 IS NOT NULL
            AND hoi4.org_information1 = 'S';
Line: 2058

         SELECT SUBSTR (hoi2.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
          WHERE hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = p_tax_unit_id
            AND hoi1.org_information_context = 'CLASS'
            AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi1.organization_id = hoi2.organization_id
            AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi2.org_information1 IS NOT NULL;
Line: 2074

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 2085

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 2092

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 2099

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
               , (SELECT TRIM (scl.segment2) AS org_id
                    FROM per_all_assignments_f asg
                        ,hr_soft_coding_keyflex scl
                   WHERE asg.assignment_id = p_assignment_id
                     AND asg.soft_coding_keyflex_id =
                                                    scl.soft_coding_keyflex_id
                     AND p_date_earned BETWEEN asg.effective_start_date
                                           AND asg.effective_end_date) x
          WHERE o1.business_group_id = l_business_group_id
            AND hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = x.org_id
            AND hoi1.org_information1 = 'SE_LOCAL_UNIT'
            AND hoi1.org_information_context = 'CLASS'
            AND o1.organization_id = hoi2.org_information1
            AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
            AND hoi2.organization_id = hoi3.organization_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 2195

         SELECT global_value
           FROM ff_globals_f fgf
          WHERE csr_v_effective_date BETWEEN effective_start_date
                                         AND effective_end_date
            AND GLOBAL_NAME = 'SE_ADVANCE_HOLIDAY_YEAR_LIMIT';
Line: 2203

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f paaf
          WHERE paaf.assignment_id = csr_v_assignment_id;
Line: 2263

         SELECT SUBSTR (hoi4.org_information1, 4, 2)
               ,SUBSTR (hoi4.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = l_business_group_id
            AND o1.organization_id = hoi3.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi4.org_information1 IS NOT NULL;
Line: 2279

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id;
Line: 2285

         SELECT payroll_id
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id
            AND p_effective_date BETWEEN effective_start_date
                                     AND effective_end_date;
Line: 2293

         SELECT MIN (start_date)
           FROM per_time_periods
          WHERE payroll_id = v_payroll_id AND start_date >= v_date;
Line: 2406

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 2413

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 2420

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = l_business_group_id
            AND o1.organization_id = hoi3.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 2435

         SELECT papf.business_group_id
               ,papf.person_id
           FROM per_all_assignments_f paaf
               ,per_all_people_f papf
               ,hr_soft_coding_keyflex hsck
          WHERE paaf.assignment_id = p_assignment_id                   --15381
            --AND paaf.soft_coding_keyflex_id=hsck.soft_coding_keyflex_id
            AND papf.person_id = paaf.person_id
            AND p_effective_date BETWEEN paaf.effective_start_date
                                     AND paaf.effective_end_date
            AND p_effective_date BETWEEN papf.effective_start_date
                                     AND papf.effective_end_date;
Line: 2522

         SELECT aei_information1
           FROM per_assignment_extra_info
          WHERE assignment_id = p_assignment_id
            AND information_type = 'SE_ASSIGN_HOLIDAY_PAY_DETAILS';
Line: 2529

         SELECT pei_information1
           FROM per_people_extra_info
          WHERE person_id = l_person_id
            AND information_type = 'SE_PERSON_HOLIDAY_PAY_DETAILS';
Line: 2536

         SELECT hoi4.org_information1
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = l_business_group_id
            AND o1.organization_id = hoi3.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 2551

         SELECT DISTINCT eev1.screen_entry_value attendance_category_id
                    FROM per_all_assignments_f asg1
                        ,pay_element_links_f el
                        ,pay_element_types_f et
                        ,pay_input_values_f iv1
                        ,pay_element_entries_f ee
                        ,pay_element_entry_values_f eev1
                   WHERE asg1.assignment_id = p_assignment_id
                     AND p_effective_date BETWEEN asg1.effective_start_date
                                              AND asg1.effective_end_date
                     AND et.legislation_code = 'SE'
                     AND iv1.element_type_id = et.element_type_id
                     AND iv1.NAME = 'Absence Category'        --l_inp_val_name
                     AND el.business_group_id = asg1.business_group_id
                     AND el.element_type_id = et.element_type_id
                     AND ee.assignment_id = asg1.assignment_id
                     AND ee.element_link_id = el.element_link_id
                     AND eev1.element_entry_id = ee.element_entry_id
                     AND eev1.input_value_id = iv1.input_value_id
                     AND ee.effective_start_date <= p_cy_end_date
                     AND ee.effective_end_date >= p_cy_start_date
                     AND eev1.effective_start_date <= p_cy_end_date
                     AND eev1.effective_end_date >= p_cy_start_date
                     AND et.element_name NOT IN
                            ('Advance Holiday Details', 'Advance Holiday Pay');
Line: 2581

         SELECT ue.creator_id
           FROM ff_user_entities ue
               ,ff_database_items di
          WHERE di.user_name = csr_v_balance_name
            AND ue.user_entity_id = di.user_entity_id
            AND ue.legislation_code = 'SE'
            AND ue.business_group_id IS NULL
            AND ue.creator_type = 'B';
Line: 2592

         SELECT hoi4.org_information2
               ,hoi4.org_information3
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = l_business_group_id
            AND hoi3.organization_id = o1.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_ABSENCE_CATEGORY_LIMIT'
            AND hoi4.org_information1 IS NOT NULL
            AND hoi4.org_information1 = l_attendance_category_id;
Line: 2609

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id;
Line: 2613

      SELECT papf.business_group_id
            ,papf.person_id
            ,segment9
        INTO l_business_group_id
            ,l_person_id
            ,l_working_perc
        FROM per_all_assignments_f paaf
            ,per_all_people_f papf
            ,hr_soft_coding_keyflex hsck
       WHERE paaf.assignment_id = p_assignment_id
         AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         AND papf.person_id = paaf.person_id
         AND p_effective_date BETWEEN paaf.effective_start_date
                                  AND paaf.effective_end_date
         AND p_effective_date BETWEEN papf.effective_start_date
                                  AND papf.effective_end_date;
Line: 2778

         SELECT SUBSTR (hoi2.org_information1, 4, 2)
               ,SUBSTR (hoi2.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi1
               ,hr_organization_information hoi2
          WHERE hoi1.organization_id = o1.organization_id
            AND hoi1.organization_id = p_tax_unit_id                    --3134
            AND hoi1.org_information_context = 'CLASS'
            AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi1.organization_id = hoi2.organization_id
            AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi2.org_information1 IS NOT NULL;
Line: 2831

         SELECT employee_category
           FROM per_all_assignments_f
          WHERE assignment_id = p_asg_id
            AND csr_v_effective_date BETWEEN effective_start_date
                                         AND effective_end_date;
Line: 2857

         SELECT hoi4.org_information6
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = p_business_group_id
            AND o1.organization_id = hoi3.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi4.org_information1 IS NOT NULL;
Line: 2885

      SELECT MIN (effective_start_date)
        INTO l_return
        FROM per_all_assignments_f
       WHERE assignment_id = p_assignment_id;
Line: 2909

         SELECT nvl(TRUNC
                   (fnd_number.canonical_to_number (segment13)),l_full_time)
/* change this to the field which we are going to add for part time employee */
           FROM per_all_assignments_f paaf
               ,
-- per_all_people_f papf,
                hr_soft_coding_keyflex hsck
          WHERE paaf.assignment_id = csr_v_assignment_id               --15381
            AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
            --AND papf.person_id=paaf.person_id
            AND csr_v_effective_date BETWEEN paaf.effective_start_date
                                         AND paaf.effective_end_date;
Line: 2957

         SELECT segment12
           FROM per_all_assignments_f paaf
               ,hr_soft_coding_keyflex hsck
          WHERE paaf.assignment_id = csr_v_assignment_id
            AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
            AND csr_v_effective_date BETWEEN paaf.effective_start_date
                                         AND paaf.effective_end_date;
Line: 2967

         SELECT r.row_low_range_or_name
           FROM pay_user_rows_f r
               ,pay_user_tables t
          WHERE r.legislation_code IS NULL
            AND t.legislation_code = 'SE'
            AND UPPER (t.user_table_name) = UPPER ('SE_HOLIDAY_PAY_AGREEMENT')
            AND t.user_table_id = r.user_table_id
            AND r.business_group_id = p_business_group_id
            AND r.user_row_id = csr_v_row_id
            AND csr_v_effective_date BETWEEN r.effective_start_date
                                         AND r.effective_end_date;
Line: 3017

         SELECT SUBSTR (hoi4.org_information1, 4, 2)
               ,SUBSTR (hoi4.org_information2, 4, 2)
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = l_business_group_id
            AND o1.organization_id = hoi3.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
            AND hoi4.org_information1 IS NOT NULL;
Line: 3088

   SELECT paaf.business_group_id,
      paaf.person_id,
      segment9
      FROM per_all_assignments_f paaf,
      hr_soft_coding_keyflex hsck
      WHERE paaf.assignment_id = p_assignment_id --15381
      AND paaf.soft_coding_keyflex_id=hsck.soft_coding_keyflex_id
   AND paaf.effective_start_date <= l_ey_end_date
    AND paaf.effective_end_date >= l_ey_start_date;
Line: 3101

         SELECT ROUND (SUM (perc * days) / sum(days)
                      ,2
                      )
           FROM (SELECT
--      paaf.business_group_id,
--    paaf.person_id,
--    greatest(paaf.effective_start_date,'01-Apr-2000'),
--    least(paaf.effective_end_date,'31-Mar-2001'),
                        fnd_number.canonical_to_number (segment9) perc  --segment9 perc --Existing bug fixed as part of 9747212
                       ,   LEAST (paaf.effective_end_date, csr_v_ey_end)
                         - GREATEST (paaf.effective_start_date
                                    ,csr_v_ey_start)
                         + 1 "DAYS"
                   FROM per_all_assignments_f paaf
                       ,hr_soft_coding_keyflex hsck
                  WHERE paaf.assignment_id = p_assignment_id
                    AND paaf.soft_coding_keyflex_id =
                                                   hsck.soft_coding_keyflex_id
                    AND paaf.effective_start_date <= csr_v_ey_end
                    AND paaf.effective_end_date >= csr_v_ey_start);
Line: 3160

         SELECT MIN (effective_start_date)
           FROM per_all_assignments_f
          WHERE assignment_id = p_assignment_id;
Line: 3166

         SELECT TRUNC (MONTHS_BETWEEN (p_effective_date, papf.date_of_birth))
           FROM per_all_assignments_f paaf
               ,per_all_people_f papf
          WHERE paaf.assignment_id = p_assignment_id
            AND papf.person_id = paaf.person_id
            AND p_effective_date BETWEEN paaf.effective_start_date
                                     AND paaf.effective_end_date
            AND p_effective_date BETWEEN papf.effective_start_date
                                     AND papf.effective_end_date;
Line: 3178

         SELECT SUM (end_date - start_date)
           FROM per_previous_job_usages
          WHERE assignment_id = p_assignment_id;
Line: 3248

         SELECT hoi4.org_information2
           FROM hr_organization_units o1
               ,hr_organization_information hoi3
               ,hr_organization_information hoi4
          WHERE o1.business_group_id = p_business_group_id
            AND o1.organization_id = hoi3.organization_id
            AND hoi3.organization_id = p_tax_unit_id
            AND hoi3.org_information_context = 'CLASS'
            AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
            AND hoi3.organization_id = hoi4.organization_id
            AND hoi4.org_information_context = 'SE_LE_HOLIDAY_PAY_DETAILS'
            AND hoi4.org_information1 IS NOT NULL;
Line: 3411

      SELECT FLOOR (csr_end_date - csr_start_date) + 1
        FROM DUAL;
Line: 3416

      SELECT REPLACE (TRIM (l_time), ':', '.')
        FROM DUAL;
Line: 3487

      SELECT ROUND (SUM (perc * in_hours) / 100, 2)
        FROM (SELECT segment9 perc
                    ,   LEAST (paaf.effective_end_date, csr_v_ey_end)
                      - GREATEST (paaf.effective_start_date, csr_v_ey_start)
                      + 1 "DAYS"
                    ,normal_hours
                    ,frequency
                    ,segment13 days_in_week
                    ,CASE
                        WHEN frequency = 'D'
                           THEN   (  LEAST (paaf.effective_end_date
                                           ,csr_v_ey_end
                                           )
                                   - GREATEST (paaf.effective_start_date
                                              ,csr_v_ey_start
                                              )
                                   + 1
                                  )
                                * normal_hours
                        WHEN frequency = 'W'
                           THEN   (  LEAST (paaf.effective_end_date
                                           ,csr_v_ey_end
                                           )
                                   - GREATEST (paaf.effective_start_date
                                              ,csr_v_ey_start
                                              )
                                   + 1
                                  )
                                * (normal_hours / segment13)
                        WHEN frequency = 'M'
                           THEN   (  LEAST (paaf.effective_end_date
                                           ,csr_v_ey_end
                                           )
                                   - GREATEST (paaf.effective_start_date
                                              ,csr_v_ey_start
                                              )
                                   + 1
                                  )
                                * (  (normal_hours * 12)
                                   / (  (   (csr_v_ey_end)
                                         -  (csr_v_ey_start)
                                        )
                                      + 1
                                     )
                                  )
                     END "IN_HOURS"
                FROM per_all_assignments_f paaf
                    ,hr_soft_coding_keyflex hsck
               WHERE paaf.assignment_id = p_assignment_id
                 AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
                 AND paaf.effective_start_date <= csr_v_ey_end
                 AND paaf.effective_end_date >= csr_v_ey_start);
Line: 3602

      SELECT SUBSTR (hoi2.org_information1, 4, 2)
            ,SUBSTR (hoi2.org_information2, 4, 2)
        FROM hr_organization_units o1
            ,hr_organization_information hoi1
            ,hr_organization_information hoi2
       WHERE hoi1.organization_id = o1.organization_id
         AND hoi1.organization_id = p_tax_unit_id                       --3134
         AND hoi1.org_information_context = 'CLASS'
         AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
         AND hoi1.organization_id = hoi2.organization_id
         AND hoi2.org_information_context = 'SE_HOLIDAY_YEAR_DEFN'
         AND hoi2.org_information1 IS NOT NULL;
Line: 3617

      SELECT MIN (effective_start_date)
        FROM per_all_assignments_f
       WHERE assignment_id = p_assignment_id;