[Home] [Help]
393: END LOOP;
394:
395: -- -------------------------------------------------------------+
396: -- E4. Stamp event_id on source table (pa_budget_lines for
397: -- Budgets, pa_bc_packets for FC)
398: IF g_debug_mode = 'Y' THEN
399: pa_debug.g_err_stage:= 'Create Events: Tieback Processing';
400: pa_debug.write('create_events ' || g_debug_module,pa_debug.g_err_stage, g_debug_level5);
401: END IF;
1500: xla_transaction_entities txn
1501: where evt.entity_id = txn.entity_id
1502: and evt.event_id in
1503: (select distinct pbc1.bc_event_id
1504: from pa_bc_packets pbc1
1505: where pbc1.packet_id <> p_data_set_id1
1506: and (pbc1.document_header_id,
1507: pbc1.document_distribution_id,
1508: pbc1.document_type) in
1508: pbc1.document_type) in
1509: (select pbc2.document_header_id,
1510: pbc2.document_distribution_id,
1511: pbc2.document_type
1512: from pa_bc_packets pbc2
1513: where pbc2.packet_id = p_data_set_id1
1514: and pbc2.status_code = 'I'
1515: and pbc2.ext_bdgt_flag = 'Y')
1516: and pbc1.status_code in ('S','F','T','R')
2067: xla_transaction_entities txn
2068: where evt.entity_id = txn.entity_id
2069: and evt.event_id in
2070: (select distinct source_event_id
2071: from pa_bc_packets
2072: where packet_id = g_data_set_id
2073: and status_code = 'I'
2074: and ext_bdgt_flag = 'Y'
2075: --and burden_method_code in ('S','D')
2198: END IF;
2199:
2200:
2201: forall i in t_event_id.FIRST..t_event_id.LAST
2202: Update pa_bc_packets pb
2203: set pb.bc_event_id = t_event_id(i)
2204: where pb.packet_id = g_data_set_id
2205: and pb.source_event_id = t_source_event_id(i)
2206: and pb.status_code = 'I'