DBA Data[Home] [Help]

APPS.PAY_SG_IRAS_MAGTAPE SQL Statements

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

Line: 18

    p_sql := 'select distinct person_id ' ||
             'from   per_people_f ppf, ' ||
                    'pay_payroll_actions ppa ' ||
             'where ppa.payroll_action_id = :payroll_action_id ' ||
             'and ppa.business_group_id = ppf.business_group_id ' ||
             'order by ppf.person_id';
Line: 53

    SELECT SUBSTR(legislative_parameters,
                   INSTR(legislative_parameters,p_token)+(LENGTH(p_token)+1),
                    INSTR(legislative_parameters,' ',
                           INSTR(legislative_parameters,p_token))
                     - (INSTR(legislative_parameters,p_token)+LENGTH(p_token)))
           ,business_group_id
      FROM  pay_payroll_actions
     WHERE  payroll_action_id = p_pact_id;
Line: 109

      select pay_assignment_actions_s.nextval
      from   dual;
Line: 117

    select distinct a.assignment_id,
           pay_core_utils.get_parameter('ARCHIVE_RUN_ID', pa.legislative_parameters) archive_run_id,
           pay_core_utils.get_parameter('LEGAL_ENTITY_ID', pa.legislative_parameters) legal_entity_id
    from   per_assignments_f a,   /* Bug# 2920732 */
           per_people_f p,
           pay_payroll_actions pa
    where  pa.payroll_action_id = c_payroll_action_id
    and    p.person_id    between c_start_person_id and c_end_person_id
    and    p.person_id          = a.person_id
    and    p.business_group_id  = pa.business_group_id
    and    exists /* Bug No : 2242653 */
           (select null
            from
                   pay_payroll_actions ppa,
                   pay_assignment_actions pac
            where  ppa.payroll_action_id = pay_core_utils.get_parameter('ARCHIVE_RUN_ID', pa.legislative_parameters)
            and    ppa.action_type = 'X'
            and    ppa.action_status = 'C'
            and    ppa.payroll_action_id = pac.payroll_action_id
            and    pac.assignment_id = a.assignment_id
           )
    and    ((g_report_type = 'O' and not exists/*Bug:2858063*/
           (
	        select pai.locking_action_id
		from
		pay_action_interlocks pai,
		pay_assignment_actions paa1,--assignment action id of the action that locks archive
		pay_assignment_actions paa2, -- assignment action id of the magtape
		pay_payroll_actions ppa1, -- payroll action id of the process that locks archive
		pay_payroll_actions ppa2 -- payroll action id of the magtape process
		where pai.locked_action_id = paa1.assignment_action_id -- archive is locked
		and  pai.locking_action_id = paa2.assignment_action_id -- mgtape is looking the archive
		and  paa1.assignment_id = paa2.assignment_id
		and  paa1.assignment_id = a.assignment_id
		and  ppa1.action_type = 'X'
		and  ppa1.action_status = 'C'
		and  ppa1.report_type = 'SG_IRAS_ARCHIVE'
		and  ppa2.action_type = 'X'
		and  ppa2.action_status = 'C'
		and  ppa2.report_type = pa.report_type /* Bug#2833530 */
        and  pay_core_utils.get_parameter('LEGAL_ENTITY_ID', pa.legislative_parameters) = pay_core_utils.get_parameter('LEGAL_ENTITY_ID', ppa2.legislative_parameters) /* Bug 8240839 */
   		and  ppa1.payroll_action_id = paa1.payroll_action_id
		and  ppa2.payroll_action_id = paa2.payroll_action_id
                and  ppa2.report_qualifier='SG'
                and  to_char(ppa2.effective_date, 'YYYY') =
                     (
                      select
                         pay_core_utils.get_parameter('BASIS_YEAR', ppa_arch.legislative_parameters)
                      from
                         pay_payroll_actions ppa_arch
                      where
                         ppa_arch.payroll_action_id =
                              pay_core_utils.get_parameter('ARCHIVE_RUN_ID', pa.legislative_parameters)
                     )   /* Bug#4888368 */
           ))
       or (g_report_type='A' AND exists (select '' from
           pay_assignment_actions aacs,
           pay_payroll_Actions ppas,
       ff_archive_items    ffis,
           ff_database_items  fdis
       where ffis.context1        = aacs.assignment_action_id
           and a.assignment_id = aacs.assignment_id
       and aacs.payroll_action_id = ppas.payroll_action_id
    and    fdis.user_name         = c_type
    AND    ffis.VALUE = 'Y'
    and ppas.payroll_action_id = pay_core_utils.get_parameter('ARCHIVE_RUN_ID', pa.legislative_parameters)
            and    ppas.action_type = 'X'
            and    ppas.action_status = 'C'
    and    ffis.user_entity_id    = fdis.user_entity_id )))
    and    not exists
           (select null
            from   per_people_extra_info pei
            where  pei.person_id = p.person_id
            and    pei.pei_information1 is not null
            and    pei.information_type = 'HR_IR21_PROCESSING_DATES_SG');
Line: 196

      select pac.assignment_action_id
      from   pay_assignment_actions pac
      where  pac.assignment_id = c_assignment_id
      and    pac.payroll_action_id = c_payroll_action_id;
Line: 206

    select decode(g_file,'IR8A', 'X_IR8A_AMEND_INDICATOR','IR8S', 'X_IR8S_AMEND_INDICATOR','A8A','X_A8A_AMEND_INDICATOR','A8B','X_A8B_AMEND_INDICATOR')
    into v_type from dual;