123: from pay_payroll_actions ppa
124: , pay_assignment_actions paa
125: , pay_action_information pai_1
126: , pay_action_information pai_2
127: , hr_organization_information hoi
128: where ppa.business_group_id = P_BUSINESS_GROUP_ID
129: and ppa.action_type='X'
130: and ppa.report_type='ZA_TYE'
131: and ppa.action_status='C'
183: select max(substr(pai.action_information1,23,8)) max_serial_num
184: from pay_payroll_actions ppa
185: , pay_assignment_actions paa
186: , pay_action_information pai
187: , hr_organization_information hoi
188: where ppa.business_group_id = P_BUSINESS_GROUP_ID
189: and ppa.action_type='X'
190: and ppa.report_type='ZA_TYE'
191: and ppa.action_status='C'
239: select distinct paa.assignment_action_id prev_assact
240: from pay_payroll_actions ppa
241: , pay_assignment_actions paa
242: , pay_action_information pai_1
243: , hr_organization_information hoi
244: where ppa.business_group_id = P_BUSINESS_GROUP_ID
245: and ppa.action_type='X'
246: and ppa.report_type='ZA_TYE'
247: and ppa.action_status='C'
277: FUNCTION BEFOREREPORT RETURN BOOLEAN IS
278:
279: cursor csr_paye_ref (p_legal_entity_id number) is
280: select lpad(org_information3,10,'0')
281: from hr_organization_information
282: where organization_id = p_legal_entity_id
283: and org_information_context = 'ZA_LEGAL_ENTITY';
284:
285: type t_csr_employee is ref cursor;