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 15925: select coah.* from csi_i_org_assignments_h coah,

15921: and relationship_type_code = p_rel_type_code
15922: order by creation_date asc;
15923: --
15924: cursor csi_org_hist_cur(p_instance_id in number,p_rel_type_code in varchar2) is
15925: select coah.* from csi_i_org_assignments_h coah,
15926: csi_i_org_assignments coa
15927: where coa.instance_id = p_instance_id
15928: and coa.relationship_type_code = p_rel_type_code
15929: and coah.instance_ou_id = coa.instance_ou_id

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

15937: l_row_count NUMBER;
15938: l_del_count NUMBER := 0;
15939: TYPE NumList IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
15940: l_del_tbl NumList;
15941: TYPE ORG_HIST_TBL IS TABLE OF CSI_I_ORG_ASSIGNMENTS_H%ROWTYPE INDEX BY BINARY_INTEGER;
15942: l_org_hist_tbl ORG_HIST_TBL;
15943: l_hist_count NUMBER;
15944: v_ret_ou_id NUMBER;
15945: l_prev_rec csi_org_hist_cur%ROWTYPE;

Line 16152: update csi_i_org_assignments_h

16148: END IF;
16149: --
16150: ELSE -- Txn id not same
16151: IF l_flag = 'Y' THEN
16152: update csi_i_org_assignments_h
16153: set old_operating_unit_id = l_prev_rec.old_operating_unit_id,
16154: new_operating_unit_id = l_prev_rec.new_operating_unit_id,
16155: old_relationship_type_code = l_prev_rec.old_relationship_type_code,
16156: new_relationship_type_code = l_prev_rec.new_relationship_type_code,

Line 16197: delete from csi_i_org_assignments_h

16193: last_update_date = sysdate
16194: where instance_ou_history_id = l_prev_rec.instance_ou_history_id;
16195: --
16196: FORALL i in 1..l_del_ou_hist_tbl.count
16197: delete from csi_i_org_assignments_h
16198: where instance_ou_history_id = l_del_ou_hist_tbl(i);
16199: --
16200: l_flag := 'N';
16201: l_del_ou_hist_tbl.DELETE;

Line 16209: update csi_i_org_assignments_h

16205: END IF;
16206: END LOOP;
16207: -- Update the instance_ou_id with the one that is retained
16208: IF l_flag = 'Y' THEN -- Just in case the last record in the loop matches with prev txn
16209: update csi_i_org_assignments_h
16210: set old_operating_unit_id = l_prev_rec.old_operating_unit_id,
16211: new_operating_unit_id = l_prev_rec.new_operating_unit_id,
16212: old_relationship_type_code = l_prev_rec.old_relationship_type_code,
16213: new_relationship_type_code = l_prev_rec.new_relationship_type_code,

Line 16254: delete from csi_i_org_assignments_h

16250: last_update_date = sysdate
16251: where instance_ou_history_id = l_prev_rec.instance_ou_history_id;
16252: --
16253: FORALL i in 1..l_del_ou_hist_tbl.count
16254: delete from csi_i_org_assignments_h
16255: where instance_ou_history_id = l_del_ou_hist_tbl(i);
16256: --
16257: l_flag := 'N';
16258: l_del_ou_hist_tbl.DELETE;

Line 16262: update csi_i_org_assignments_h

16258: l_del_ou_hist_tbl.DELETE;
16259: END IF;
16260: --
16261: FOR x in l_org_hist_tbl.FIRST .. l_org_hist_tbl.LAST LOOP
16262: update csi_i_org_assignments_h
16263: set instance_ou_id = v_ret_ou_id,
16264: last_update_date = sysdate
16265: where instance_ou_history_id = l_org_hist_tbl(x).instance_ou_history_id;
16266: END LOOP;