DBA Data[Home] [Help]

APPS.HR_US_W2_REP SQL Statements

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

Line: 172

        select nvl(fnd_number.canonical_to_number(fai.value),0) into l_bal_amt
          from ff_archive_items fai,
               ff_archive_item_contexts fic1,
               ff_archive_item_contexts fic2
         where fai.context1 = w2_asg_act_id
           and fai.user_entity_id = l_user_entity_id
           and fai.archive_item_id = fic1.archive_item_id
           and fic1.context_id = l_tax_context_id
           and ltrim(rtrim(fic1.context)) = w2_tax_unit_id
           and fai.archive_item_id = fic2.archive_item_id
           and fic2.context_id = l_jd_context_id
           and substr(ltrim(rtrim(fic2.context)),1,w2_jurisdiction_level) = substr(w2_jurisdiction_code,1,w2_jurisdiction_level);
Line: 186

         select nvl(fnd_number.canonical_to_number(fai.value),0) into l_bal_amt
           from ff_archive_items fai,
                ff_archive_item_contexts fic
          where fai.context1 = w2_asg_act_id
            and fai.user_entity_id = l_user_entity_id
            and fai.archive_item_id = fic.archive_item_id
            and fic.context_id = l_tax_context_id
            and ltrim(rtrim(fic.context)) = w2_tax_unit_id;
Line: 198

        select nvl(fnd_number.canonical_to_number(fai.value),0) into l_bal_amt
          from ff_archive_items fai,
               ff_archive_item_contexts fic
         where fai.context1 = w2_asg_act_id
           and fai.user_entity_id = l_user_entity_id
           and fai.archive_item_id = fic.archive_item_id
           and fic.context_id = l_jd_context_id
           and substr(ltrim(rtrim(fic.context)),1,w2_jurisdiction_level) = substr(w2_jurisdiction_code,1,w2_jurisdiction_level);
Line: 208

        select nvl(fnd_number.canonical_to_number(fai.value),0) into l_bal_amt
          from ff_archive_items fai
         where fai.context1 = w2_asg_act_id
           and fai.user_entity_id = l_user_entity_id;
Line: 229

   select fdi.user_entity_id into l_user_entity_id
     from ff_database_items fdi,
          ff_user_entities fue
     where user_name = w2_balance_name
       and fdi.user_entity_id = fue.user_entity_id
       and fue.legislation_code = 'US';
Line: 250

      select context_id into l_context_id
      from ff_contexts
      where context_name = w2_context_name;
Line: 269

   SELECT TO_CHAR(effective_date,'YYYY')
     FROM pay_assignment_actions paa,pay_payroll_actions ppa
    WHERE ppa.payroll_action_id = paa.payroll_action_id
      AND paa.assignment_action_id = p_assign_action_id;
Line: 275

   SELECT 'Y'
     FROM FF_ARCHIVE_ITEMS FAI,
          FF_DATABASE_ITEMS FDI
     WHERE p_assign_action_id = FAI.CONTEXT1
       AND FAI.USER_ENTITY_ID = FDI.USER_ENTITY_ID
       AND FDI.USER_NAME IN
           ('A_FIT_SUBJ_WHABLE_PER_GRE_YTD',
            'A_FIT_SUBJ_NWHABLE_PER_GRE_YTD',
            'A_FIT_PRE_TAX_REDNS_PER_GRE_YTD')
       AND ROWNUM = 1;
Line: 318

       select nvl(hoi.org_information1, 'Y')
         from hr_organization_information hoi,
              hr_organization_units hou
        where hoi.organization_id =  hou.business_group_id
          and hou.organization_id = cp_tax_unit_id
          and hoi.org_information_context = 'US State Tax Info';
Line: 821

	select paf.organization_id
	into   l_org_id
	from   per_assignments_f paf
	where  paf.assignment_id = w2_asg_id
	and    w2_effective_date between paf.effective_start_date
			         and     paf.effective_end_date;
Line: 845

        select paf.location_id
        into   l_loc_id
        from   per_assignments_f paf
        where  paf.assignment_id = w2_asg_id
        and    w2_effective_date between paf.effective_start_date
                                 and     paf.effective_end_date;
Line: 869

        select pa.postal_code
        into   l_postal_code
        from   per_addresses pa
        where  pa.person_id = w2_person_id
	and    pa.primary_flag = 'Y'
        and    w2_effective_date between pa.date_from
                                 and     nvl(pa.date_to,w2_effective_date);
Line: 888

SELECT ppf.last_name|| ' ' || ppf.first_name || ' ' || substr(ppf.middle_names,1,1) emp_name
FROM per_all_people_f ppf
WHERE ppf.person_id = w2_person_id
AND w2_effective_date BETWEEN ppf.effective_start_date AND ppf.effective_end_date;
Line: 911

		select 	ORG_INFORMATION3
		from	hr_organization_information
 		where 	organization_id 	= w2_tax_unit_id
 		and	org_information_context = 'State Tax Rules'
		and 	org_information1 	= w2_state_abbrev;
Line: 941

		select 	nvl(ORG_INFORMATION2,'NO STATE UI#')
		from	hr_organization_information
 		where 	organization_id 	= w2_tax_unit_id
 		and	org_information_context = 'State Tax Rules'
		and 	org_information1 	= w2_state_abbrev;
Line: 1025

 select decode(fai.value, 'Y', 1, 'D', 1, 0)
   from ff_archive_items fai
  where fai.context1 = w2_asg_act_id
    and fai.user_entity_id = l_user_entity_id;
Line: 1222

                     select fai.value
                     from   ff_archive_item_contexts faic,
                            ff_contexts              fc,
                            ff_archive_items         fai,
                            ff_database_items        fdi
                     where  fdi.user_name        = w2_tax_unit_item
                       and  fdi.user_entity_id   = fai.user_entity_id
                       and  fai.context1         = w2_payroll_action_id
                       and  fc.context_name      = 'TAX_UNIT_ID'
                       and  fai.archive_item_id  = faic.archive_item_id
                       and  faic.context_id      = fc.context_id
                       and  faic.context         = to_char(w2_tax_unit_id);
Line: 1252

                   select decode(w2_addr_item,
                      'ADDR1' ,address_line_1,
                      'ADDR2' ,address_line_2,
                      'ADDR3' ,address_line_3,
                      'CITY'  ,town_or_city,
                      'STATE' ,region_2,
                      'COUNTRY',country,
                      'ZIP'   ,postal_code,null)
        from   hr_locations_all hl, /*Bug:2380518 fix */
               hr_organization_units hou
        where  hou.organization_id = w2_tax_unit_id
          and  hou.location_id     = hl.location_id;
Line: 1283

        select
               business_group_id
        from   hr_organization_units hou
        where  hou.organization_id = w2_tax_unit_id;
Line: 1307

        select
               fai.value
        from   ff_archive_items   fai,
               ff_database_items  fdi
        where  fdi.user_name      = w2_per_item
          and  fdi.user_entity_id = fai.user_entity_id
          and  fai.context1       = w2_assignment_action_id;
Line: 1342

        select
          fai.value
        from
          ff_archive_item_contexts faic2,
          ff_archive_item_contexts faic1,
          ff_contexts              fc2,
          ff_contexts              fc1,
          ff_archive_items         fai,
          ff_database_items        fdi
        where fdi.user_name       = w2_state_item
          and fdi.user_entity_id  = fai.user_entity_id
          and fai.context1        = w2_payroll_action_id
          and fc2.context_name    = 'TAX_UNIT_ID'
          and fc1.context_name    = 'JURISDICTION_CODE'
          and fai.archive_item_id = faic2.archive_item_id
          and faic2.context_id    = fc2.context_id
          and faic2.context       = to_char(w2_tax_unit_id)
          and fai.archive_item_id = faic1.archive_item_id
          and faic1.context_id    = fc1.context_id
          and faic1.context       = w2_jurisdiction_code;
Line: 1381

      select meaning
      from fnd_lookup_values
      where lookup_type='LEAV_REAS'
      and lookup_code= w2_leaving_reason ;
Line: 1440

       select cnty_information2 occ_tax_rate,
              cnty_information3 mh_tax_rate,
              cnty_information4 mh_tax_limit,
              cnty_information5 occ_mh_tax_limit,
              cnty_information6 occ_mh_wage_limit,
              cnty_information7 mh_tax_wage_limit
         from PAY_US_COUNTY_TAX_INFO_F
        where jurisdiction_code = C_jurisdiction_code
          and (to_date('31-12-'||to_char(C_tax_year), 'DD-MM-YYYY')
                      between effective_start_date and effective_end_date);
Line: 1512

  select hou.organization_id,
         hou.name
  into l_agent_tax_unit_id,
       l_agent_tax_unit_name
  from hr_organization_information hoi,
       hr_organization_units hou
  where hoi.org_information_context = 'W2 Reporting Rules'
   and hou.organization_id = hoi.organization_id
   and hou.business_group_id = p_business_group_id
   and nvl(org_information8, 'N') = 'Y'
   and not exists (
           select  'Y'
             from hr_organization_information
            where organization_id = hou.organization_id
              and org_information_context = '1099R Magnetic Report Rules');
Line: 1530

      select hou.organization_id
       into l_w2_tax_unit_id
      from hr_organization_information hoi,
           hr_organization_units hou
      where hoi.org_information_context = 'W2 Reporting Rules'
       and hou.organization_id = hoi.organization_id
       and hou.business_group_id = p_business_group_id
       and nvl(org_information1, 'N') = 'Y'  -- W2 Transmitter flag
       and not exists (
               select  'Y'
                 from hr_organization_information
                where organization_id = hou.organization_id
                  and org_information_context = '1099R Magnetic Report Rules');
Line: 1550

            select count(*)
            into l_count
            from  pay_us_w2_tax_unit_v
            where tax_unit_id = l_agent_tax_unit_id
             and  year = p_year ;
Line: 1629

       select user_name
         from ff_database_items
        where user_name like 'A_W2_USERRA_'||c_userra_code||'%_PER_GRE_YTD';
Line: 1657

       select nvl(org_information18,'SDI')
       from hr_organization_information
       where organization_id = p_tax_unit_id
         and org_information_context = 'W2 Reporting Rules';
Line: 1715

select fai.value designated_roth_contri
from FF_USER_ENTITIES fue,
FF_ARCHIVE_ITEMS fai
where fai.context1 = cp_action_id
 AND fai.user_entity_id = fue.user_entity_id
 AND upper(fue.user_entity_name) = 'A_FIRST_YEAR_ROTH_CONTRIB' ;
Line: 1739

        SELECT peo.employee_number INTO l_emp_number
        FROM   per_all_people_f peo
        WHERE  peo.national_identifier = w2_nat_ident
        AND    w2_effective_date BETWEEN peo.effective_start_date
                                 AND     peo.effective_end_date;
Line: 1760

  	    SELECT job_id,location_id into l_emp_job,l_emp_loc
 	        FROM per_all_assignments_f
	 	WHERE assignment_id=w2_asg_id
    	AND w2_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 1764

  		SELECT jwc.wc_code INTO l_emp_wc
             FROM pay_job_wc_code_usages jwc,
                  hr_locations_all hl
          WHERE jwc.job_id = l_emp_job
		        AND hl.location_id = l_emp_loc
		        AND jwc.state_code = hl.region_2;
Line: 1785

	SELECT location_code into l_emp_loc
    	FROM per_all_assignments_f paf,
    	     hr_locations_all hl
	WHERE assignment_id=w2_asg_id
    	AND w2_effective_date BETWEEN effective_start_date AND effective_end_date
    	AND paf.location_id=hl.location_id;