143: CURSOR ORG
144: IS
145: SELECT
146: COST_ALLOCATION_KEYFLEX_ID
147: FROM HR_ALL_ORGANIZATION_UNITS
148: WHERE ORGANIZATION_ID = l_organization_id;
149:
150: CURSOR SOB(p_set_of_books_id in number)
151: IS
154: WHERE SET_OF_BOOKS_ID = p_set_of_books_id;
155:
156: CURSOR OFA IS
157: SELECT hr.COST_ALLOCATION_KEYFLEX_ID
158: FROM HR_ALL_ORGANIZATION_UNITS hr ,
159: PER_ALL_ASSIGNMENTS_F asg
160: WHERE hr.organization_id = asg.organization_id and
161: asg.organization_id = p_organization_id and
162: asg.assignment_id = p_assignment_id and
164: asg.effective_end_date;
165:
166: CURSOR SPO IS
167: SELECT hr.COST_ALLOCATION_KEYFLEX_ID
168: FROM HR_ALL_ORGANIZATION_UNITS hr ,
169: OTA_EVENTS EVT
170: WHERE hr.organization_id = evt.organization_id and
171: evt.event_id = p_event_id;
172:
219: IF from_rec.HR_COST_SEGMENT is not null THEN
220: BEGIN
221:
222: SELECT COST_ALLOCATION_KEYFLEX_ID INTO l_cost_allocation_keyflex_id
223: FROM HR_ALL_ORGANIZATION_UNITS WHERE organization_id = p_business_group_id_from;
224:
225:
226: l_dynamicSqlString := 'SELECT '|| l_hr_cost_segment ||' FROM PAY_COST_ALLOCATION_KEYFLEX
227: WHERE COST_ALLOCATION_KEYFLEX_ID = :txn ' ;
289: OPEN OFA;
290: FETCH OFA INTO l_cost_allocation_keyflex_id ;
291: CLOSE OFA;
292: /* SELECT hr.COST_ALLOCATION_KEYFLEX_ID INTO l_cost_allocation_keyflex_id
293: FROM HR_ALL_ORGANIZATION_UNITS hr ,
294: PER_ALL_ASSIGNMENTS_F asg
295: WHERE hr.organization_id = asg.organization_id and
296: asg.organization_id = p_organization_id and
297: asg.assignment_id = p_assignment_id ; */
332: FETCH SPO INTO l_cost_allocation_keyflex_id ;
333: CLOSE SPO;
334:
335: /* SELECT hr.COST_ALLOCATION_KEYFLEX_ID INTO l_cost_allocation_keyflex_id
336: FROM HR_ALL_ORGANIZATION_UNITS hr ,
337: OTA_EVENTS EVT
338: WHERE hr.organization_id = evt.organization_id and
339: evt.event_id = p_event_id; */
340: l_dynamicSqlString := 'SELECT '||l_hr_cost_segment || ' FROM PAY_COST_ALLOCATION_KEYFLEX
455: IF to_rec.hr_data_source = 'BGP' THEN
456: IF to_rec.HR_COST_SEGMENT is not null THEN
457: BEGIN
458: SELECT COST_ALLOCATION_KEYFLEX_ID INTO l_cost_allocation_keyflex_id
459: FROM HR_ALL_ORGANIZATION_UNITS WHERE organization_id = p_business_group_id_to;
460:
461:
462: l_dynamicSqlString := 'SELECT '||l_hr_cost_segment || ' FROM PAY_COST_ALLOCATION_KEYFLEX
463: WHERE COST_ALLOCATION_KEYFLEX_ID = :txn ' ;
528: OPEN OFA;
529: FETCH OFA INTO l_cost_allocation_keyflex_id ;
530: CLOSE OFA;
531: /* SELECT hr.COST_ALLOCATION_KEYFLEX_ID INTO l_cost_allocation_keyflex_id
532: FROM HR_ALL_ORGANIZATION_UNITS hr ,
533: PER_ALL_ASSIGNMENTS_F asg
534: WHERE hr.organization_id = asg.organization_id and
535: asg.organization_id = p_organization_id and
536: asg.assignment_id = p_assignment_id ; */
570: FETCH SPO INTO l_cost_allocation_keyflex_id ;
571: CLOSE SPO;
572:
573: /* SELECT hr.COST_ALLOCATION_KEYFLEX_ID INTO l_cost_allocation_keyflex_id
574: FROM HR_ALL_ORGANIZATION_UNITS hr ,
575: OTA_EVENTS EVT
576: WHERE hr.organization_id = evt.organization_id and
577: evt.event_id = p_event_id; */
578: l_dynamicSqlString := 'SELECT '||l_hr_cost_segment || ' FROM PAY_COST_ALLOCATION_KEYFLEX