109:
110: g_payroll_id PAY_PAYROLLS_F.PAYROLL_ID%TYPE;
111: g_organization_id per_all_assignments.ORGANIZATION_ID%TYPE;
112: g_full_name per_all_people_f.full_name%type;
113: g_org_name hr_organization_units.name%type;
114: g_street_address hr_locations.ADDRESS_LINE_1%type;
115: g_city hr_locations.TOWN_OR_CITY%type;
116: g_state hr_locations.REGION_1%type;
117: g_county hr_locations.REGION_2%type;
166: hrorgu.organization_id ,
167: opm.pmeth_information6
168: FROM pay_payroll_actions ppa , -- Add here to allow join directly to ORG_PAYMENT_METHOD_ID
169: pay_org_payment_methods_f opm,
170: hr_organization_units hrorgu ,
171: hr_organization_information hroinf
172: WHERE ppa.payroll_action_id = p_payroll_action_id -- New clause to allow primary key access
173: AND ppa.org_payment_method_id = opm.org_payment_method_id -- join PPA to OPM to narrow to one method
174: AND p_effective_date BETWEEN opm.effective_start_date AND opm.effective_end_date