DBA Data[Home] [Help]

APPS.PAY_AE_GENERAL SQL Statements

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

Line: 18

			Select Org_Information1
			Into l_nationality_cd
			From HR_ORGANIZATION_INFORMATION
			Where ORG_INFORMATION_CONTEXT = 'AE_BG_DETAILS'
			And ORGANIZATION_ID = l_organization_id;
Line: 45

			Select person_id
			Into l_person_id
			From PER_ALL_ASSIGNMENTS_F
			Where ASSIGNMENT_ID = p_assignment_id
			AND p_date_earned between EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE;
Line: 55

			Select per_information18
			Into l_nationality_person
			From PER_ALL_PEOPLE_F
			Where PERSON_ID = l_person_id
			AND p_date_earned between EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE;
Line: 89

	SELECT org_information6
	FROM hr_organization_information
	WHERE organization_id = l_tax_unit_id
	AND org_information_context = 'AE_LEGAL_EMPLOYER_DETAILS';
Line: 169

			 SELECT user_table_id
			 FROM   pay_user_tables
			 WHERE  legislation_code='AE'
	  		 AND    UPPER(user_table_name) = UPPER(l_table_name);
Line: 174

			 SELECT MIN(to_number(row_low_range_or_name))
			 FROM   pay_user_rows_f
			 WHERE  user_table_id = l_user_table_id
			 AND    legislation_code = 'AE'
	  		 AND    l_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 180

			 SELECT MIN(to_number(row_high_range))
			 FROM   pay_user_rows_f
			 WHERE  user_table_id = l_user_table_id
			 AND    legislation_code = 'AE'
	  		 AND    l_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 186

			 SELECT MAX(to_number(row_high_range))
			 FROM   pay_user_rows_f
			 WHERE  user_table_id = l_user_table_id
			 AND    legislation_code = 'AE'
  		 	 AND    l_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 262

   SELECT count(DISTINCT paf.assignment_id)
   FROM   per_all_assignments_f paf
         ,per_assignment_status_types pas
   WHERE  paf.assignment_type    = 'E'
   AND    paf.PERSON_ID          = p_person_id
   AND    p_effective_date between effective_start_date and effective_end_date
   AND    paf.assignment_status_type_id = pas.assignment_status_type_id
   AND    pas.per_system_status in ('ACTIVE_ASSIGN', 'SUSP_ASSIGN');
Line: 285

  SELECT COUNT(*)
  FROM  per_assignments_f            paf
        ,per_people_f                 pef
        ,pay_pre_payments             ppp
        ,pay_assignment_actions       paa
        ,pay_payroll_actions          ppa
  WHERE  paa.payroll_action_id          =
         pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID')
  AND    paa.pre_payment_id             = ppp.pre_payment_id
  AND    paa.payroll_action_id          = ppa.payroll_action_id
  AND    paa.assignment_id              = paf.assignment_id
  AND    paf.person_id                  = pef.person_id
  AND    ppp.value                      <> 0
  AND    ppa.effective_date BETWEEN paf.effective_start_date
                                AND paf.effective_end_date
  AND    ppa.effective_date BETWEEN pef.effective_start_date
                                AND pef.effective_end_date;
Line: 312

  SELECT SUM(ppp.value)
  FROM  per_assignments_f            paf
        ,per_people_f                 pef
        ,pay_pre_payments             ppp
        ,pay_assignment_actions       paa
        ,pay_payroll_actions          ppa
  WHERE  paa.payroll_action_id          =
         pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID')
  AND    paa.pre_payment_id             = ppp.pre_payment_id
  AND    paa.payroll_action_id          = ppa.payroll_action_id
  AND    paa.assignment_id              = paf.assignment_id
  AND    paf.person_id                  = pef.person_id
  AND    ppp.value                      <> 0
  AND    ppa.effective_date BETWEEN paf.effective_start_date
                                AND paf.effective_end_date
  AND    ppa.effective_date BETWEEN pef.effective_start_date
                                AND pef.effective_end_date;
Line: 340

  SELECT SUM(ppp.value)
  FROM  per_assignments_f            paf
        ,per_people_f                 pef
        ,pay_pre_payments             ppp
        ,pay_assignment_actions       paa
        ,pay_payroll_actions          ppa
  WHERE  paa.payroll_action_id          =
         pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID')
  AND    paa.pre_payment_id             = ppp.pre_payment_id
  AND    paa.payroll_action_id          = ppa.payroll_action_id
  AND    paa.assignment_id              = paf.assignment_id
  AND    paf.person_id                  = pef.person_id
  AND    ppp.value                      > 0
  AND    ppa.effective_date BETWEEN paf.effective_start_date
                                AND paf.effective_end_date
  AND    ppa.effective_date BETWEEN pef.effective_start_date
                                AND pef.effective_end_date;
Line: 368

  SELECT SUM(ppp.value)
  FROM  per_assignments_f            paf
        ,per_people_f                 pef
        ,pay_pre_payments             ppp
        ,pay_assignment_actions       paa
        ,pay_payroll_actions          ppa
  WHERE  paa.payroll_action_id          =
         pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID')
  AND    paa.pre_payment_id             = ppp.pre_payment_id
  AND    paa.payroll_action_id          = ppa.payroll_action_id
  AND    paa.assignment_id              = paf.assignment_id
  AND    paf.person_id                  = pef.person_id
  AND    ppp.value                      < 0
  AND    ppa.effective_date BETWEEN paf.effective_start_date
                                AND paf.effective_end_date
  AND    ppa.effective_date BETWEEN pef.effective_start_date
                                AND pef.effective_end_date;
Line: 417

      SELECT cont.type
      INTO   l_contract
      FROM   per_contracts_f cont
             ,per_all_assignments_f asg
      WHERE  asg.assignment_id = p_assignment_id
      AND    asg.contract_id = cont.contract_id
      AND    p_date_earned BETWEEN asg.effective_start_date AND asg.effective_end_date
      AND    p_date_earned BETWEEN cont.effective_start_date AND cont.effective_end_date;
Line: 446

      SELECT cont.type, fnd_date.canonical_to_date(cont.ctr_information2)
      INTO   l_contract, l_expiry_date
      FROM   per_contracts_f cont
             ,per_all_assignments_f asg
      WHERE  asg.assignment_id = p_assignment_id
      AND    asg.contract_id = cont.contract_id
      AND    p_date_earned BETWEEN asg.effective_start_date AND asg.effective_end_date
      AND    p_date_earned BETWEEN cont.effective_start_date AND cont.effective_end_date;
Line: 481

      SELECT pos.leaving_reason
      INTO   l_leav_reason
      FROM   per_all_assignments_f   assign
             ,per_periods_of_service pos
      WHERE  p_date_earned BETWEEN assign.effective_start_date AND assign.effective_end_date
      AND    assign.assignment_id = p_assignment_id
      AND    assign.period_of_service_id = pos.period_of_service_id;
Line: 488

      SELECT NVL(i.value,'EE')
      INTO   l_initiator
      FROM   pay_user_column_instances_f i
             ,pay_user_rows_f r
             ,pay_user_columns c
             ,pay_user_tables t
      WHERE  ((i.legislation_code = 'AE' AND i.business_group_id IS NULL) OR
               (i.legislation_code IS NULL AND i.business_group_id = FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID')))
      AND    ((r.legislation_code = 'AE' AND r.business_group_id IS NULL) OR
               (r.legislation_code IS NULL AND r.business_group_id = FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID')))
      AND    c.legislation_code = 'AE'
      AND    t.legislation_code = 'AE'
      AND    UPPER(t.user_table_name) = UPPER('AE_TERMINATION_INITIATOR')
      AND    t.user_table_id = r.user_table_id
      AND    t.user_table_id = c.user_table_id
      AND    r.row_low_range_or_name = l_leav_reason
      AND    r.user_row_id = i.user_row_id
      AND    UPPER(c.user_column_name) = UPPER('INITIATOR')
      AND    c.user_column_id = i.user_column_id
      AND    p_date_earned BETWEEN r.effective_start_date AND r.effective_end_date
      AND    p_date_earned BETWEEN i.effective_start_date AND i.effective_end_date;
Line: 524

    select  HOI2.org_information1
    from    hr_organization_units HOU
            ,hr_organization_information HOI1
            ,hr_organization_information HOI2
            ,hr_soft_coding_keyflex HSCK
            ,per_all_assignments_f PAA
    where   HOU.business_group_id = PAA.business_group_id
    and    trunc(p_date_earned) between HOU.date_from and nvl(HOU.date_to,
	to_date('4712/12/31','YYYY/MM/DD'))
    and   HOU.organization_id = HOI1.organization_id
    and   HOI1.org_information_context = 'CLASS'
    and   HOI1.org_information1 = 'HR_LEGAL_EMPLOYER'
    and   HOI1.organization_id = HOI2.organization_id
    and   PAA.assignment_id = p_assignment_id
    and   trunc(p_date_earned) between PAA.effective_start_date and PAA.effective_end_date
    and   PAA.soft_coding_keyflex_id = HSCK.soft_coding_keyflex_id
    /*and   HSCK.id_flex_num = 20
    and   decode(HSCK.id_flex_num,20,to_number(HSCK.segment1),-9999) = HOU.organization_id*/
    and   hsck.segment1 = hou.organization_id
    and   HOI2.org_information_context = 'AE_GRATUITY_REF_FORMULA';
Line: 630

    select  HOI2.org_information2
    from    hr_organization_units HOU
            ,hr_organization_information HOI1
            ,hr_organization_information HOI2
            ,hr_soft_coding_keyflex HSCK
            ,per_all_assignments_f PAA
    where   HOU.business_group_id = PAA.business_group_id
    and    trunc(p_date_earned) between HOU.date_from and nvl(HOU.date_to,
	to_date('4712/12/31','YYYY/MM/DD'))
    and   HOU.organization_id = HOI1.organization_id
    and   HOI1.org_information_context = 'CLASS'
    and   HOI1.org_information1 = 'HR_LEGAL_EMPLOYER'
    and   HOI1.organization_id = HOI2.organization_id
    and   PAA.assignment_id = p_assignment_id
    and   trunc(p_date_earned) between PAA.effective_start_date and PAA.effective_end_date
    and   PAA.soft_coding_keyflex_id = HSCK.soft_coding_keyflex_id
    /*and   HSCK.id_flex_num = 20
    and   decode(HSCK.id_flex_num,20,to_number(HSCK.segment1),-9999) = HOU.organization_id*/
    and   hsck.segment1 = hou.organization_id
    and   HOI2.org_information_context = 'AE_REFERENCE_FF';
Line: 716

    select  HOI2.org_information3
    from    hr_organization_units HOU
            ,hr_organization_information HOI1
            ,hr_organization_information HOI2
            ,hr_soft_coding_keyflex HSCK
            ,per_all_assignments_f PAA
    where   HOU.business_group_id = PAA.business_group_id
    and    trunc(p_date_earned) between HOU.date_from and nvl(HOU.date_to,
	to_date('4712/12/31','YYYY/MM/DD'))
    and   HOU.organization_id = HOI1.organization_id
    and   HOI1.org_information_context = 'CLASS'
    and   HOI1.org_information1 = 'HR_LEGAL_EMPLOYER'
    and   HOI1.organization_id = HOI2.organization_id
    and   PAA.assignment_id = p_assignment_id
    and   trunc(p_date_earned) between PAA.effective_start_date and PAA.effective_end_date
    and   PAA.soft_coding_keyflex_id = HSCK.soft_coding_keyflex_id
    /*and   HSCK.id_flex_num = 20
    and   decode(HSCK.id_flex_num,20,to_number(HSCK.segment1),-9999) = HOU.organization_id*/
    and   hsck.segment1 = hou.organization_id
    and   HOI2.org_information_context = 'AE_REFERENCE_FF';
Line: 803

    SELECT SUM(paa.absence_days) --(NVL(paa.absence_days, (paa.DATE_END - paa.DATE_START))
    INTO   l_days
    FROM   per_absence_attendances paa
           ,per_absence_attendance_types paat
           ,per_all_assignments_f asg
    WHERE  paat.absence_category ='UL'
    AND    paat.business_group_id = paa.business_group_id
    AND    paat.business_group_id = p_business_group_id
    AND    paat.absence_attendance_type_id = paa.absence_attendance_type_id
    AND    paa.person_id = asg.person_id
    AND    asg.assignment_id = p_assignment_id
    AND    TRUNC(p_date_earned) BETWEEN asg.effective_start_date AND asg.effective_end_date
    AND    TRUNC(p_date_earned) >= TRUNC(paa.date_end,'MM') ;
Line: 836

    select  NVL(HOI2.org_information1,'X')
    from    hr_organization_units HOU
            ,hr_organization_information HOI1
            ,hr_organization_information HOI2
            ,hr_soft_coding_keyflex HSCK
            ,per_all_assignments_f PAA
    where   HOU.business_group_id = PAA.business_group_id
    and    trunc(p_date_earned) between HOU.date_from and nvl(HOU.date_to,
	to_date('4712/12/31','YYYY/MM/DD'))
    and   HOU.organization_id = HOI1.organization_id
    and   HOI1.org_information_context = 'CLASS'
    and   HOI1.org_information1 = 'HR_LEGAL_EMPLOYER'
    and   HOI1.organization_id = HOI2.organization_id
    and   PAA.assignment_id = p_assignment_id
    and   trunc(p_date_earned) between PAA.effective_start_date and PAA.effective_end_date
    and   PAA.soft_coding_keyflex_id = HSCK.soft_coding_keyflex_id
    and   hsck.segment1 = hou.organization_id
    and   HOI2.org_information_context = 'AE_GRATUITY_DETAILS';