DBA Data[Home] [Help]

APPS.CSI_DIAGNOSTICS_PKG dependencies on CSI_I_ORG_ASSIGNMENTS_H

Line 540: select CSI_I_ORG_ASSIGNMENTS_H_S.nextval

536: ,p_org_hist_tbl IN OUT NOCOPY csi_diagnostics_pkg.T_NUM
537: ) IS
538: BEGIN
539: FOR i in p_org_tbl.FIRST .. p_org_tbl.LAST LOOP
540: select CSI_I_ORG_ASSIGNMENTS_H_S.nextval
541: into p_org_hist_tbl(i) from dual;
542: --
543: p_org_units_rec_tab.instance_ou_id(i) := p_org_tbl(i).instance_ou_id;
544: p_org_units_rec_tab.instance_id(i) := p_org_tbl(i).instance_id;

Line 2233: INSERT INTO CSI_I_ORG_ASSIGNMENTS_H(

2229: --
2230: -- Insert into History
2231: log('Before Inserting into Org Assignments history');
2232: FORALL i in 1 .. l_org_units_rec_tab.instance_ou_id.count
2233: INSERT INTO CSI_I_ORG_ASSIGNMENTS_H(
2234: INSTANCE_OU_HISTORY_ID,
2235: INSTANCE_OU_ID,
2236: TRANSACTION_ID,
2237: NEW_OPERATING_UNIT_ID,

Line 15914: select coah.* from csi_i_org_assignments_h coah,

15910: and relationship_type_code = p_rel_type_code
15911: order by creation_date asc;
15912: --
15913: cursor csi_org_hist_cur(p_instance_id in number,p_rel_type_code in varchar2) is
15914: select coah.* from csi_i_org_assignments_h coah,
15915: csi_i_org_assignments coa
15916: where coa.instance_id = p_instance_id
15917: and coa.relationship_type_code = p_rel_type_code
15918: and coah.instance_ou_id = coa.instance_ou_id

Line 15930: TYPE ORG_HIST_TBL IS TABLE OF CSI_I_ORG_ASSIGNMENTS_H%ROWTYPE INDEX BY BINARY_INTEGER;

15926: l_row_count NUMBER;
15927: l_del_count NUMBER := 0;
15928: TYPE NumList IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
15929: l_del_tbl NumList;
15930: TYPE ORG_HIST_TBL IS TABLE OF CSI_I_ORG_ASSIGNMENTS_H%ROWTYPE INDEX BY BINARY_INTEGER;
15931: l_org_hist_tbl ORG_HIST_TBL;
15932: l_hist_count NUMBER;
15933: v_ret_ou_id NUMBER;
15934: l_prev_rec csi_org_hist_cur%ROWTYPE;

Line 16141: update csi_i_org_assignments_h

16137: END IF;
16138: --
16139: ELSE -- Txn id not same
16140: IF l_flag = 'Y' THEN
16141: update csi_i_org_assignments_h
16142: set old_operating_unit_id = l_prev_rec.old_operating_unit_id,
16143: new_operating_unit_id = l_prev_rec.new_operating_unit_id,
16144: old_relationship_type_code = l_prev_rec.old_relationship_type_code,
16145: new_relationship_type_code = l_prev_rec.new_relationship_type_code,

Line 16186: delete from csi_i_org_assignments_h

16182: last_update_date = sysdate
16183: where instance_ou_history_id = l_prev_rec.instance_ou_history_id;
16184: --
16185: FORALL i in 1..l_del_ou_hist_tbl.count
16186: delete from csi_i_org_assignments_h
16187: where instance_ou_history_id = l_del_ou_hist_tbl(i);
16188: --
16189: l_flag := 'N';
16190: l_del_ou_hist_tbl.DELETE;

Line 16198: update csi_i_org_assignments_h

16194: END IF;
16195: END LOOP;
16196: -- Update the instance_ou_id with the one that is retained
16197: IF l_flag = 'Y' THEN -- Just in case the last record in the loop matches with prev txn
16198: update csi_i_org_assignments_h
16199: set old_operating_unit_id = l_prev_rec.old_operating_unit_id,
16200: new_operating_unit_id = l_prev_rec.new_operating_unit_id,
16201: old_relationship_type_code = l_prev_rec.old_relationship_type_code,
16202: new_relationship_type_code = l_prev_rec.new_relationship_type_code,

Line 16243: delete from csi_i_org_assignments_h

16239: last_update_date = sysdate
16240: where instance_ou_history_id = l_prev_rec.instance_ou_history_id;
16241: --
16242: FORALL i in 1..l_del_ou_hist_tbl.count
16243: delete from csi_i_org_assignments_h
16244: where instance_ou_history_id = l_del_ou_hist_tbl(i);
16245: --
16246: l_flag := 'N';
16247: l_del_ou_hist_tbl.DELETE;

Line 16251: update csi_i_org_assignments_h

16247: l_del_ou_hist_tbl.DELETE;
16248: END IF;
16249: --
16250: FOR x in l_org_hist_tbl.FIRST .. l_org_hist_tbl.LAST LOOP
16251: update csi_i_org_assignments_h
16252: set instance_ou_id = v_ret_ou_id,
16253: last_update_date = sysdate
16254: where instance_ou_history_id = l_org_hist_tbl(x).instance_ou_history_id;
16255: END LOOP;