[Home] [Help]
388: END LOOP;
389:
390: -- -------------------------------------------------------------+
391: -- E4. Stamp event_id on source table (pa_budget_lines for
392: -- Budgets, pa_bc_packets for FC)
393: IF g_debug_mode = 'Y' THEN
394: pa_debug.g_err_stage:= 'Create Events: Tieback Processing';
395: pa_debug.write('create_events ' || g_debug_module,pa_debug.g_err_stage, g_debug_level5);
396: END IF;
1490: xla_transaction_entities txn
1491: where evt.entity_id = txn.entity_id
1492: and evt.event_id in
1493: (select distinct pbc1.bc_event_id
1494: from pa_bc_packets pbc1
1495: where pbc1.packet_id <> p_data_set_id1
1496: and (pbc1.document_header_id,
1497: pbc1.document_distribution_id,
1498: pbc1.document_type) in
1498: pbc1.document_type) in
1499: (select pbc2.document_header_id,
1500: pbc2.document_distribution_id,
1501: pbc2.document_type
1502: from pa_bc_packets pbc2
1503: where pbc2.packet_id = p_data_set_id1
1504: and pbc2.status_code = 'I'
1505: and pbc2.ext_bdgt_flag = 'Y')
1506: and pbc1.status_code in ('S','F','T','R')
2057: xla_transaction_entities txn
2058: where evt.entity_id = txn.entity_id
2059: and evt.event_id in
2060: (select distinct source_event_id
2061: from pa_bc_packets
2062: where packet_id = g_data_set_id
2063: and status_code = 'I'
2064: and ext_bdgt_flag = 'Y'
2065: --and burden_method_code in ('S','D')
2188: END IF;
2189:
2190:
2191: forall i in t_event_id.FIRST..t_event_id.LAST
2192: Update pa_bc_packets pb
2193: set pb.bc_event_id = t_event_id(i)
2194: where pb.packet_id = g_data_set_id
2195: and pb.source_event_id = t_source_event_id(i)
2196: and pb.status_code = 'I'