DBA Data[Home] [Help]

APPS.CSI_DIAGNOSTICS_PKG dependencies on CSI_ITEM_INSTANCES_H

Line 289: select CSI_ITEM_INSTANCES_H_S.nextval

285: ,p_inst_hist_tbl IN OUT NOCOPY csi_diagnostics_pkg.T_NUM
286: ) IS
287: BEGIN
288: FOR i in p_inst_tbl.FIRST .. p_inst_tbl.LAST LOOP
289: select CSI_ITEM_INSTANCES_H_S.nextval
290: into p_inst_hist_tbl(i) from dual;
291: --
292: p_inst_rec_tab.INSTANCE_ID(i) := p_inst_tbl(i).INSTANCE_ID;
293: p_inst_rec_tab.INSTANCE_NUMBER(i) := p_inst_tbl(i).INSTANCE_NUMBER;

Line 1846: INSERT INTO CSI_ITEM_INSTANCES_H(

1842: l_ctr := l_inst_rec_tab.instance_id.count;
1843: -- Insert into History
1844: log('Before Inserting into Instances history..');
1845: FORALL i in 1 .. l_inst_rec_tab.instance_id.count
1846: INSERT INTO CSI_ITEM_INSTANCES_H(
1847: INSTANCE_HISTORY_ID,
1848: INSTANCE_ID,
1849: TRANSACTION_ID,
1850: NEW_INSTANCE_NUMBER,

Line 9605: DELETE FROM CSI_ITEM_INSTANCES_H WHERE transaction_id = l_txn_tbl(j);

9601: DELETE FROM CSI_I_PARTIES WHERE instance_id = l_instance_tbl(j);
9602: FORALL j in l_instance_tbl.FIRST .. l_instance_tbl.LAST
9603: DELETE FROM CSI_I_VERSION_LABELS WHERE instance_id = l_instance_tbl(j);
9604: FORALL j in l_txn_tbl.FIRST .. l_txn_tbl.LAST
9605: DELETE FROM CSI_ITEM_INSTANCES_H WHERE transaction_id = l_txn_tbl(j);
9606: FORALL j in l_txn_tbl.FIRST .. l_txn_tbl.LAST
9607: DELETE FROM CSI_I_PARTIES_H WHERE transaction_id = l_txn_tbl(j);
9608: FORALL j in l_txn_tbl.FIRST .. l_txn_tbl.LAST
9609: DELETE FROM CSI_I_VERSION_LABELS_H WHERE transaction_id = l_txn_tbl(j);

Line 9824: update csi_item_instances_h

9820: loop
9821: if v_instance_id <> j.instance_id then
9822: v_duplicate_count := v_duplicate_count + 1;
9823:
9824: update csi_item_instances_h
9825: set old_serial_number = i.serial_number
9826: ,new_serial_number = new_serial_number||'-DUP'||to_char(v_duplicate_count)
9827: ,last_updated_by = fnd_global.user_id
9828: ,last_update_date = sysdate

Line 9832: from csi_item_instances_h

9828: ,last_update_date = sysdate
9829: ,old_instance_status_id = j.instance_status_id
9830: ,new_instance_status_id = v_instance_status_id
9831: where instance_history_id = (select max(instance_history_id)
9832: from csi_item_instances_h
9833: where instance_id = j.instance_id);
9834: --
9835: update csi_item_instances
9836: set serial_number = serial_number||'-DUP'||to_char(v_duplicate_count)

Line 9948: Update CSI_ITEM_INSTANCES_H

9944: --
9945: commit;
9946: --
9947: FORALL j in 1 .. instance_id_mig.count
9948: Update CSI_ITEM_INSTANCES_H
9949: set new_last_vld_organization_id = vld_org_id_mig(j)
9950: where instance_history_id = (select max(instance_history_id) from CSI_ITEM_INSTANCES_H
9951: where instance_id = instance_id_mig(j));
9952: --

Line 9950: where instance_history_id = (select max(instance_history_id) from CSI_ITEM_INSTANCES_H

9946: --
9947: FORALL j in 1 .. instance_id_mig.count
9948: Update CSI_ITEM_INSTANCES_H
9949: set new_last_vld_organization_id = vld_org_id_mig(j)
9950: where instance_history_id = (select max(instance_history_id) from CSI_ITEM_INSTANCES_H
9951: where instance_id = instance_id_mig(j));
9952: --
9953: commit;
9954: --

Line 10072: Update CSI_ITEM_INSTANCES_H

10068: WHERE instance_id = instance_id_mig(j);
10069: commit;
10070: --
10071: FORALL j in 1 .. instance_id_mig.count
10072: Update CSI_ITEM_INSTANCES_H
10073: set new_inventory_revision = revision_mig(j)
10074: where instance_history_id = (select max(instance_history_id) from CSI_ITEM_INSTANCES_H
10075: where instance_id = instance_id_mig(j));
10076: --

Line 10074: where instance_history_id = (select max(instance_history_id) from CSI_ITEM_INSTANCES_H

10070: --
10071: FORALL j in 1 .. instance_id_mig.count
10072: Update CSI_ITEM_INSTANCES_H
10073: set new_inventory_revision = revision_mig(j)
10074: where instance_history_id = (select max(instance_history_id) from CSI_ITEM_INSTANCES_H
10075: where instance_id = instance_id_mig(j));
10076: --
10077: commit;
10078: --

Line 10158: from csi_item_instances_h

10154: order by instance_id desc;
10155: --
10156: cursor c6(p_inst_id1 number,p_inst_id2 number) is
10157: select transaction_id
10158: from csi_item_instances_h
10159: where instance_id = p_inst_id1
10160: intersect
10161: select transaction_id
10162: from csi_item_instances_h

Line 10162: from csi_item_instances_h

10158: from csi_item_instances_h
10159: where instance_id = p_inst_id1
10160: intersect
10161: select transaction_id
10162: from csi_item_instances_h
10163: where instance_id = p_inst_id2;
10164:
10165: v_commit_count NUMBER := 0;
10166: v_instance_status_id NUMBER;

Line 10232: DELETE FROM CSI_ITEM_INSTANCES_H WHERE transaction_id = l_del_txn_tbl(j);

10228: DELETE FROM CSI_I_PARTIES WHERE instance_id = l_del_inst_tbl(j);
10229: FORALL j in l_del_inst_tbl.FIRST .. l_del_inst_tbl.LAST
10230: DELETE FROM CSI_I_VERSION_LABELS WHERE instance_id = l_del_inst_tbl(j);
10231: FORALL j in l_del_txn_tbl.FIRST .. l_del_txn_tbl.LAST
10232: DELETE FROM CSI_ITEM_INSTANCES_H WHERE transaction_id = l_del_txn_tbl(j);
10233: FORALL j in l_del_txn_tbl.FIRST .. l_del_txn_tbl.LAST
10234: DELETE FROM CSI_I_PARTIES_H WHERE transaction_id = l_del_txn_tbl(j);
10235: FORALL j in l_del_txn_tbl.FIRST .. l_del_txn_tbl.LAST
10236: DELETE FROM CSI_I_VERSION_LABELS_H WHERE transaction_id = l_del_txn_tbl(j);

Line 10389: update csi_item_instances_h

10385: ,last_update_date = sysdate
10386: where instance_id = j.instance_id;
10387: --
10388: if v_txn_id is null then
10389: update csi_item_instances_h
10390: set instance_id = v_instance_id
10391: ,new_external_reference = i.serial_number
10392: ,old_serial_number = nvl(new_serial_number,i.serial_number)
10393: ,new_serial_number = to_char(j.instance_id)||'-DUP'||to_char(v_duplicate_count)

Line 10398: update csi_item_instances_h

10394: ,last_updated_by = fnd_global.user_id
10395: ,last_update_date = sysdate
10396: where instance_id = j.instance_id;
10397: else -- common txn found
10398: update csi_item_instances_h
10399: set new_external_reference = i.serial_number
10400: ,old_serial_number = nvl(new_serial_number,i.serial_number)
10401: ,new_serial_number = to_char(j.instance_id)||'-DUP'||to_char(v_duplicate_count)
10402: ,last_updated_by = fnd_global.user_id

Line 10405: from csi_item_instances_h

10401: ,new_serial_number = to_char(j.instance_id)||'-DUP'||to_char(v_duplicate_count)
10402: ,last_updated_by = fnd_global.user_id
10403: ,last_update_date = sysdate
10404: where instance_history_id = (select max(instance_history_id)
10405: from csi_item_instances_h
10406: where instance_id = j.instance_id
10407: and creation_date < v_freeze_date);
10408: end if;
10409: end if;

Line 10952: UPDATE CSI_ITEM_INSTANCES_H

10948: where instance_id = instance_id_mig(i);
10949: commit;
10950: --
10951: FORALL i in 1..instance_id_mig.count
10952: UPDATE CSI_ITEM_INSTANCES_H
10953: set old_inv_master_organization_id = decode(old_inv_master_organization_id,null,null,inv_master_org_id_mig(i)),
10954: new_inv_master_organization_id = decode(new_inv_master_organization_id,null,null,inv_master_org_id_mig(i))
10955: where instance_id = instance_id_mig(i);
10956: commit;

Line 11404: select CSI_ITEM_INSTANCES_H_S.nextval

11400: --
11401: l_ctr := l_ctr + 1;
11402: l_inst_tbl(l_ctr) := instance_id_mig(i);
11403: --
11404: select CSI_ITEM_INSTANCES_H_S.nextval
11405: into l_inst_hist_tbl(l_ctr) from dual;
11406: --
11407: -- For this instance_id get the children
11408: l_child_tbl.DELETE;

Line 11420: select CSI_ITEM_INSTANCES_H_S.nextval

11416: FOR rel_count in l_child_tbl.FIRST .. l_child_tbl.LAST LOOP
11417: l_ctr := l_ctr + 1;
11418: l_inst_tbl(l_ctr) := l_child_tbl(rel_count).subject_id;
11419: --
11420: select CSI_ITEM_INSTANCES_H_S.nextval
11421: into l_inst_hist_tbl(l_ctr) from dual;
11422: END LOOP;
11423: END IF;
11424: Exception

Line 11453: INSERT INTO CSI_ITEM_INSTANCES_H

11449: where instance_id = l_inst_tbl(j);
11450: --
11451: -- Tie the Transaction to the history
11452: FORALL j in l_inst_tbl.FIRST .. l_inst_tbl.LAST
11453: INSERT INTO CSI_ITEM_INSTANCES_H
11454: (
11455: INSTANCE_HISTORY_ID
11456: ,TRANSACTION_ID
11457: ,INSTANCE_ID

Line 11804: select CSI_ITEM_INSTANCES_H_S.nextval

11800: l_ctr := l_ctr + 1;
11801: l_inst_tbl(l_ctr) := instance_id_mig(i);
11802: l_srl_tbl(l_ctr) := serial_number_mig(i);
11803: --
11804: select CSI_ITEM_INSTANCES_H_S.nextval
11805: into l_inst_hist_tbl(l_ctr) from dual;
11806: END IF;
11807: --
11808: END LOOP;

Line 11822: INSERT INTO CSI_ITEM_INSTANCES_H

11818: where instance_id = l_inst_tbl(j);
11819: --
11820: -- Tie the Transaction to the history
11821: FORALL j in l_inst_tbl.FIRST .. l_inst_tbl.LAST
11822: INSERT INTO CSI_ITEM_INSTANCES_H
11823: (
11824: INSTANCE_HISTORY_ID
11825: ,TRANSACTION_ID
11826: ,INSTANCE_ID

Line 11888: select CSI_ITEM_INSTANCES_H_S.nextval

11884: l_ctr := l_ctr + 1;
11885: l_inst_tbl(l_ctr) := instance_id_mig(i);
11886: l_lot_tbl(l_ctr) := lot_number_mig(i);
11887: --
11888: select CSI_ITEM_INSTANCES_H_S.nextval
11889: into l_inst_hist_tbl(l_ctr) from dual;
11890: END IF;
11891: END LOOP;
11892: --

Line 11905: INSERT INTO CSI_ITEM_INSTANCES_H

11901: where instance_id = l_inst_tbl(j);
11902: --
11903: -- Tie the Transaction to the history
11904: FORALL j in l_inst_tbl.FIRST .. l_inst_tbl.LAST
11905: INSERT INTO CSI_ITEM_INSTANCES_H
11906: (
11907: INSTANCE_HISTORY_ID
11908: ,TRANSACTION_ID
11909: ,INSTANCE_ID

Line 11969: select CSI_ITEM_INSTANCES_H_S.nextval

11965: IF nvl(v_srl_ctl,1) = 1 THEN
11966: l_ctr := l_ctr + 1;
11967: l_inst_tbl(l_ctr) := instance_id_mig(i);
11968: --
11969: select CSI_ITEM_INSTANCES_H_S.nextval
11970: into l_inst_hist_tbl(l_ctr) from dual;
11971: END IF;
11972: END LOOP;
11973: IF l_inst_tbl.count > 0 THEN

Line 11986: INSERT INTO CSI_ITEM_INSTANCES_H

11982: where instance_id = l_inst_tbl(j);
11983: --
11984: -- Tie the Transaction to the history
11985: FORALL j in l_inst_tbl.FIRST .. l_inst_tbl.LAST
11986: INSERT INTO CSI_ITEM_INSTANCES_H
11987: (
11988: INSTANCE_HISTORY_ID
11989: ,TRANSACTION_ID
11990: ,INSTANCE_ID

Line 12047: select CSI_ITEM_INSTANCES_H_S.nextval

12043: IF nvl(v_lot_ctl,1) = 1 THEN
12044: l_ctr := l_ctr + 1;
12045: l_inst_tbl(l_ctr) := instance_id_mig(i);
12046: --
12047: select CSI_ITEM_INSTANCES_H_S.nextval
12048: into l_inst_hist_tbl(l_ctr) from dual;
12049: END IF;
12050: END LOOP;
12051: --

Line 12065: INSERT INTO CSI_ITEM_INSTANCES_H

12061: where instance_id = l_inst_tbl(j);
12062: --
12063: -- Tie the Transaction to the history
12064: FORALL j in l_inst_tbl.FIRST .. l_inst_tbl.LAST
12065: INSERT INTO CSI_ITEM_INSTANCES_H
12066: (
12067: INSTANCE_HISTORY_ID
12068: ,TRANSACTION_ID
12069: ,INSTANCE_ID

Line 12428: INSERT INTO CSI_ITEM_INSTANCES_H

12424: last_vld_organization_id = organization_id_mig(i)
12425: where instance_id = v_instance_id;
12426: --
12427: -- Tie the Transaction to the history
12428: INSERT INTO CSI_ITEM_INSTANCES_H
12429: (
12430: INSTANCE_HISTORY_ID
12431: ,TRANSACTION_ID
12432: ,INSTANCE_ID

Line 12442: CSI_ITEM_INSTANCES_H_S.nextval

12438: ,OBJECT_VERSION_NUMBER
12439: )
12440: VALUES
12441: (
12442: CSI_ITEM_INSTANCES_H_S.nextval
12443: ,v_txn_id
12444: ,v_instance_id
12445: ,SYSDATE
12446: ,SYSDATE

Line 12581: select CSI_ITEM_INSTANCES_H_S.nextval

12577: Raise;
12578: End;
12579: -- Use the same instance record to create the history
12580: Begin
12581: select CSI_ITEM_INSTANCES_H_S.nextval
12582: into v_ins_history_id
12583: from DUAL;
12584: End;
12585: --

Line 12587: INSERT INTO CSI_ITEM_INSTANCES_H(

12583: from DUAL;
12584: End;
12585: --
12586: Begin
12587: INSERT INTO CSI_ITEM_INSTANCES_H(
12588: INSTANCE_HISTORY_ID
12589: ,INSTANCE_ID
12590: ,TRANSACTION_ID
12591: ,OLD_INSTANCE_NUMBER

Line 12712: ||' into CSI_ITEM_INSTANCES_H Using the Same Instance '||SUBSTR(sqlerrm,1,1000);

12708: );
12709: Exception
12710: when others then
12711: v_err_msg := 'Unable to Insert Item ID '||to_char(inventory_item_id_mig(i))
12712: ||' into CSI_ITEM_INSTANCES_H Using the Same Instance '||SUBSTR(sqlerrm,1,1000);
12713: raise_application_error(-20000, v_err_msg );
12714: Raise;
12715: End;
12716: --

Line 12910: INSERT INTO CSI_ITEM_INSTANCES_H

12906: last_vld_organization_id = organization_id_mig(i)
12907: where instance_id = v_instance_id;
12908: --
12909: -- Tie the Transaction to the history
12910: INSERT INTO CSI_ITEM_INSTANCES_H
12911: (
12912: INSTANCE_HISTORY_ID
12913: ,TRANSACTION_ID
12914: ,INSTANCE_ID

Line 12924: CSI_ITEM_INSTANCES_H_S.nextval

12920: ,OBJECT_VERSION_NUMBER
12921: )
12922: VALUES
12923: (
12924: CSI_ITEM_INSTANCES_H_S.nextval
12925: ,v_txn_id
12926: ,v_instance_id
12927: ,SYSDATE
12928: ,SYSDATE

Line 13067: select CSI_ITEM_INSTANCES_H_S.nextval

13063: Raise;
13064: End;
13065: -- Use the same instance record to create the history
13066: Begin
13067: select CSI_ITEM_INSTANCES_H_S.nextval
13068: into v_ins_history_id
13069: from DUAL;
13070: End;
13071: --

Line 13073: INSERT INTO CSI_ITEM_INSTANCES_H(

13069: from DUAL;
13070: End;
13071: --
13072: Begin
13073: INSERT INTO CSI_ITEM_INSTANCES_H(
13074: INSTANCE_HISTORY_ID
13075: ,INSTANCE_ID
13076: ,TRANSACTION_ID
13077: ,OLD_INSTANCE_NUMBER

Line 13206: ||' into CSI_ITEM_INSTANCES_H Using the Same Instance '||SUBSTR(sqlerrm,1,1000);

13202: );
13203: Exception
13204: when others then
13205: v_err_msg := 'Unable to Insert Item ID '||to_char(inventory_item_id_mig(i))
13206: ||' into CSI_ITEM_INSTANCES_H Using the Same Instance '||SUBSTR(sqlerrm,1,1000);
13207: raise_application_error(-20000, v_err_msg );
13208: Raise;
13209: End;
13210: --

Line 13886: INSERT INTO CSI_ITEM_INSTANCES_H

13882: raise_application_error(-20000, v_err_msg );
13883: Raise;
13884: End;
13885: -- Tie the Transaction with the instance history
13886: INSERT INTO CSI_ITEM_INSTANCES_H
13887: (
13888: INSTANCE_HISTORY_ID
13889: ,TRANSACTION_ID
13890: ,INSTANCE_ID

Line 13902: CSI_ITEM_INSTANCES_H_S.nextval

13898: ,OBJECT_VERSION_NUMBER
13899: )
13900: VALUES
13901: (
13902: CSI_ITEM_INSTANCES_H_S.nextval
13903: ,v_txn_id
13904: ,v_instance_id
13905: ,v_ins_qty
13906: ,quantity_mig(i)

Line 14092: select CSI_ITEM_INSTANCES_H_S.nextval

14088: Raise;
14089: End;
14090: -- Use the same instance record to create the history
14091: Begin
14092: select CSI_ITEM_INSTANCES_H_S.nextval
14093: into v_ins_history_id
14094: from DUAL;
14095: End;
14096: --

Line 14098: INSERT INTO CSI_ITEM_INSTANCES_H(

14094: from DUAL;
14095: End;
14096: --
14097: Begin
14098: INSERT INTO CSI_ITEM_INSTANCES_H(
14099: INSTANCE_HISTORY_ID
14100: ,INSTANCE_ID
14101: ,TRANSACTION_ID
14102: ,OLD_INSTANCE_NUMBER

Line 14255: ||' into CSI_ITEM_INSTANCES_H Using the Same Instance '||SUBSTR(sqlerrm,1,1000);

14251: );
14252: Exception
14253: when others then
14254: v_err_msg := 'Unable to Insert Item ID '||to_char(inventory_item_id_mig(i))
14255: ||' into CSI_ITEM_INSTANCES_H Using the Same Instance '||SUBSTR(sqlerrm,1,1000);
14256: raise_application_error(-20000, v_err_msg );
14257: Raise;
14258: End;
14259: --

Line 14672: INSERT INTO CSI_ITEM_INSTANCES_H

14668: last_updated_by = l_user_id
14669: where instance_id = instance_id_mig(i);
14670: --
14671: -- Tie this instance with the transaction
14672: INSERT INTO CSI_ITEM_INSTANCES_H
14673: (
14674: INSTANCE_HISTORY_ID
14675: ,TRANSACTION_ID
14676: ,INSTANCE_ID

Line 14686: CSI_ITEM_INSTANCES_H_S.nextval

14682: ,OBJECT_VERSION_NUMBER
14683: )
14684: VALUES
14685: (
14686: CSI_ITEM_INSTANCES_H_S.nextval
14687: ,l_txn_id
14688: ,instance_id_mig(i)
14689: ,SYSDATE
14690: ,SYSDATE

Line 14923: DELETE FROM csi_item_instances_h

14919: p_instance_tbl(m).inv_locator_id:=i.inv_locator_id;
14920: p_instance_tbl(m).lot_number:=i.lot_number;
14921: p_instance_tbl(m).attribute1:=i.owner_party_id;
14922:
14923: DELETE FROM csi_item_instances_h
14924: WHERE instance_id=i.instance_id;
14925: --
14926: DELETE FROM csi_i_parties_h
14927: WHERE instance_party_id in (select instance_party_id from csi_i_parties

Line 15890: DELETE FROM csi_item_instances_h

15886:
15887: DELETE FROM csi_item_instances
15888: WHERE instance_id = dup_inst_rec.instance_id;
15889:
15890: DELETE FROM csi_item_instances_h
15891: WHERE instance_id = dup_inst_rec.instance_id;
15892:
15893: END IF;
15894: END LOOP;