DBA Data[Home] [Help]

APPS.CSI_INV_TRXS_PKG dependencies on FND_API

Line 23: l_commit VARCHAR2(1) := FND_API.G_FALSE;

19:
20: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
21: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_RECEIPT';
22: l_api_version NUMBER := 1.0;
23: l_commit VARCHAR2(1) := FND_API.G_FALSE;
24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;

Line 24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;

20: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
21: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_RECEIPT';
22: l_api_version NUMBER := 1.0;
23: l_commit VARCHAR2(1) := FND_API.G_FALSE;
24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
28: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

Line 25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

21: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_RECEIPT';
22: l_api_version NUMBER := 1.0;
23: l_commit VARCHAR2(1) := FND_API.G_FALSE;
24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
28: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
29: l_transaction_id NUMBER := NULL;

Line 26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;

22: l_api_version NUMBER := 1.0;
23: l_commit VARCHAR2(1) := FND_API.G_FALSE;
24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
28: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
29: l_transaction_id NUMBER := NULL;
30: l_object_version_number NUMBER := 1;

Line 27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;

23: l_commit VARCHAR2(1) := FND_API.G_FALSE;
24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
28: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
29: l_transaction_id NUMBER := NULL;
30: l_object_version_number NUMBER := 1;
31: l_sysdate DATE := SYSDATE;

Line 28: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

24: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
25: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
26: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
27: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
28: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
29: l_transaction_id NUMBER := NULL;
30: l_object_version_number NUMBER := 1;
31: l_sysdate DATE := SYSDATE;
32: l_master_organization_id NUMBER;

Line 52: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

48: l_account_tbl CSI_DATASTRUCTURES_PUB.PARTY_ACCOUNT_TBL;
49: l_pricing_attrib_tbl CSI_DATASTRUCTURES_PUB.PRICING_ATTRIBS_TBL;
50: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
51: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
52: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
53: l_fnd_warning VARCHAR2(1) := 'W';
54: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
55: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
56: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;

Line 54: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

50: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
51: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
52: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
53: l_fnd_warning VARCHAR2(1) := 'W';
54: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
55: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
56: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
57: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
58: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;

Line 55: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

51: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
52: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
53: l_fnd_warning VARCHAR2(1) := 'W';
54: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
55: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
56: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
57: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
58: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;
59: l_out_of_enterprise VARCHAR2(25) := 'OUT_OF_ENTERPRISE';

Line 160: RAISE fnd_api.g_exc_error;

156: debug('Inventory Records Found: '||l_tbl_count);
157:
158: IF NOT l_return_status = l_fnd_success THEN
159: debug('You have encountered an error in CSI_INV_TRXS_PKG.get_transaction_recs, Transaction ID: '||p_transaction_id);
160: RAISE fnd_api.g_exc_error;
161: END IF;
162:
163: -- Determine Trasaction Type
164: IF l_mtl_item_tbl(i).transaction_type_id = 8 THEN

Line 210: RAISE fnd_api.g_exc_error;

206: debug('Master Organization is: '||l_master_organization_id);
207:
208: IF NOT l_return_status = l_fnd_success THEN
209: debug('You have encountered an error in csi_inv_trxs_pkg.get_master_organization, Organization ID: '||l_mtl_item_tbl(i).organization_id);
210: RAISE fnd_api.g_exc_error;
211: END IF;
212:
213: -- Call get_fnd_employee_id and get the employee id
214:

Line 287: RAISE fnd_api.g_exc_error;

283:
284: IF NOT l_return_status = l_fnd_success THEN
285: debug('Redeploy Flag: '||l_redeploy_flag);
286: debug('You have encountered an error in csi_inv_trxs_pkg.get_redeploy_flag: '||l_error_message);
287: RAISE fnd_api.g_exc_error;
288: END IF;
289:
290: debug('Redeploy Flag: '||l_redeploy_flag);
291: debug('Trans Status Code: '||l_txn_rec.transaction_status_code);

Line 344: RAISE fnd_api.g_exc_error;

340: debug('CSI Transaction Created: '||l_txn_rec.transaction_id);
341:
342: IF NOT l_return_status = l_fnd_success THEN
343: debug('You have encountered an error in csi_inv_trxs_pkg.create_csi_txn: '||p_transaction_id);
344: RAISE fnd_api.g_exc_error;
345: END IF;
346:
347: -- Now loop through the PL/SQL Table.
348: j := 1;

Line 399: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

395: IF NOT l_return_status = l_fnd_success then
396: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
397: l_msg_index := 1;
398: WHILE l_msg_count > 0 loop
399: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
400: l_msg_index := l_msg_index + 1;
401: l_msg_count := l_msg_count - 1;
402: END LOOP;
403: RAISE fnd_api.g_exc_error;

Line 403: RAISE fnd_api.g_exc_error;

399: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
400: l_msg_index := l_msg_index + 1;
401: l_msg_count := l_msg_count - 1;
402: END LOOP;
403: RAISE fnd_api.g_exc_error;
404: END IF;
405:
406: IF l_src_instance_header_tbl.count = 0 THEN -- No Records found so Create Serialized record
407: debug('No Records found so Create a Serialized Record');

Line 466: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

462: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
463: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
464: l_msg_index := 1;
465: WHILE l_msg_count > 0 loop
466: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
467: l_msg_index := l_msg_index + 1;
468: l_msg_count := l_msg_count - 1;
469: END LOOP;
470: RAISE fnd_api.g_exc_error;

Line 470: RAISE fnd_api.g_exc_error;

466: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
467: l_msg_index := l_msg_index + 1;
468: l_msg_count := l_msg_count - 1;
469: END LOOP;
470: RAISE fnd_api.g_exc_error;
471: END IF;
472:
473: debug('Item Instance Created: '||l_new_instance_rec.instance_id);
474:

Line 550: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

546: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
547: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
548: l_msg_index := 1;
549: WHILE l_msg_count > 0 loop
550: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
551: l_msg_index := l_msg_index + 1;
552: l_msg_count := l_msg_count - 1;
553: END LOOP;
554: RAISE fnd_api.g_exc_error;

Line 554: RAISE fnd_api.g_exc_error;

550: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
551: l_msg_index := l_msg_index + 1;
552: l_msg_count := l_msg_count - 1;
553: END LOOP;
554: RAISE fnd_api.g_exc_error;
555: END IF;
556:
557: ELSIF l_src_instance_header_tbl(i).instance_usage_code in (l_out_of_enterprise,l_in_relationship,l_in_wip) THEN
558:

Line 571: RAISE fnd_api.g_exc_error;

567:
568: IF NOT l_return_status = l_fnd_success then
569: debug('You encountered an error in the se_inv_trxs_pkg.check_and_break_relation');
570: l_error_message := csi_t_gen_utility_pvt.dump_error_stack;
571: RAISE fnd_api.g_exc_error;
572: END IF;
573:
574: debug('Object Version originally from instance: '||l_src_instance_header_tbl(i).object_version_number);
575:

Line 653: fnd_api.g_true, -- Get Parties

649: l_commit,
650: l_init_msg_list,
651: l_validation_level,
652: l_instance_header_rec,
653: fnd_api.g_true, -- Get Parties
654: l_party_header_tbl,
655: fnd_api.g_false, -- Get Accounts
656: l_account_header_tbl,
657: fnd_api.g_false, -- Get Org Assi.

Line 655: fnd_api.g_false, -- Get Accounts

651: l_validation_level,
652: l_instance_header_rec,
653: fnd_api.g_true, -- Get Parties
654: l_party_header_tbl,
655: fnd_api.g_false, -- Get Accounts
656: l_account_header_tbl,
657: fnd_api.g_false, -- Get Org Assi.
658: l_org_header_tbl,
659: fnd_api.g_false, -- Get Price Att

Line 657: fnd_api.g_false, -- Get Org Assi.

653: fnd_api.g_true, -- Get Parties
654: l_party_header_tbl,
655: fnd_api.g_false, -- Get Accounts
656: l_account_header_tbl,
657: fnd_api.g_false, -- Get Org Assi.
658: l_org_header_tbl,
659: fnd_api.g_false, -- Get Price Att
660: l_pricing_header_tbl,
661: fnd_api.g_false, -- Get Ext Attr

Line 659: fnd_api.g_false, -- Get Price Att

655: fnd_api.g_false, -- Get Accounts
656: l_account_header_tbl,
657: fnd_api.g_false, -- Get Org Assi.
658: l_org_header_tbl,
659: fnd_api.g_false, -- Get Price Att
660: l_pricing_header_tbl,
661: fnd_api.g_false, -- Get Ext Attr
662: l_ext_attrib_header_tbl,
663: l_ext_attrib_def_tbl,

Line 661: fnd_api.g_false, -- Get Ext Attr

657: fnd_api.g_false, -- Get Org Assi.
658: l_org_header_tbl,
659: fnd_api.g_false, -- Get Price Att
660: l_pricing_header_tbl,
661: fnd_api.g_false, -- Get Ext Attr
662: l_ext_attrib_header_tbl,
663: l_ext_attrib_def_tbl,
664: fnd_api.g_false, -- Get Asset Assi
665: l_asset_header_tbl,

Line 664: fnd_api.g_false, -- Get Asset Assi

660: l_pricing_header_tbl,
661: fnd_api.g_false, -- Get Ext Attr
662: l_ext_attrib_header_tbl,
663: l_ext_attrib_def_tbl,
664: fnd_api.g_false, -- Get Asset Assi
665: l_asset_header_tbl,
666: fnd_api.g_false, -- Resolve IDs
667: NULL, -- Time Stamp
668: l_return_status,

Line 666: fnd_api.g_false, -- Resolve IDs

662: l_ext_attrib_header_tbl,
663: l_ext_attrib_def_tbl,
664: fnd_api.g_false, -- Get Asset Assi
665: l_asset_header_tbl,
666: fnd_api.g_false, -- Resolve IDs
667: NULL, -- Time Stamp
668: l_return_status,
669: l_msg_count,
670: l_msg_data);

Line 734: RAISE fnd_api.g_exc_error;

730: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
731: fnd_message.set_token('STATUS',l_status);
732: l_error_message := fnd_message.get;
733: l_return_status := l_fnd_error;
734: RAISE fnd_api.g_exc_error;
735: ELSE
736: l_party_tbl.delete;
737: END IF;
738: END IF;

Line 781: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

777: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
778: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
779: l_msg_index := 1;
780: WHILE l_msg_count > 0 loop
781: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
782: l_msg_index := l_msg_index + 1;
783: l_msg_count := l_msg_count - 1;
784: END LOOP;
785: RAISE fnd_api.g_exc_error;

Line 785: RAISE fnd_api.g_exc_error;

781: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
782: l_msg_index := l_msg_index + 1;
783: l_msg_count := l_msg_count - 1;
784: END LOOP;
785: RAISE fnd_api.g_exc_error;
786: END IF;
787: ELSE
788: l_status := 'In Inventory, Out of Service, Out of Enterprise, In Relationship, Installed, In Service or In Process';
789: debug('Serialized Item with Out of Enterprise or In Relationship exists however the ownership_override_at_txn flag is set to N so we will NOT bring this back into inventory');

Line 795: RAISE fnd_api.g_exc_error;

791: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
792: fnd_message.set_token('STATUS',l_status);
793: l_error_message := fnd_message.get;
794: l_return_status := l_fnd_error;
795: RAISE fnd_api.g_exc_error;
796: END IF;
797: ELSE
798: l_status := 'In Inventory, Out of Service, Installed, In Service or In Process';
799: debug('Serialized Item with Status other then Out Of Service, In Inventory, Installed, or In Process already exists in Install Base');

Line 805: RAISE fnd_api.g_exc_error;

801: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
802: fnd_message.set_token('STATUS',l_status);
803: l_error_message := fnd_message.get;
804: l_return_status := l_fnd_error;
805: RAISE fnd_api.g_exc_error;
806: END IF;
807: ELSE -- No API Records so create a new serialized record
808: l_new_instance_rec := csi_inv_trxs_pkg.init_instance_create_rec;
809: l_new_instance_rec.inventory_item_id := l_mtl_item_tbl(j).inventory_item_id;

Line 863: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

859: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
860: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
861: l_msg_index := 1;
862: WHILE l_msg_count > 0 loop
863: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
864: l_msg_index := l_msg_index + 1;
865: l_msg_count := l_msg_count - 1;
866: END LOOP;
867: RAISE fnd_api.g_exc_error;

Line 867: RAISE fnd_api.g_exc_error;

863: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
864: l_msg_index := l_msg_index + 1;
865: l_msg_count := l_msg_count - 1;
866: END LOOP;
867: RAISE fnd_api.g_exc_error;
868: END IF;
869:
870: debug('Item Instance Created: '||l_new_instance_rec.instance_id);
871:

Line 919: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

915: IF NOT l_return_status = l_fnd_success then
916: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
917: l_msg_index := 1;
918: WHILE l_msg_count > 0 loop
919: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
920: l_msg_index := l_msg_index + 1;
921: l_msg_count := l_msg_count - 1;
922: END LOOP;
923: RAISE fnd_api.g_exc_error;

Line 923: RAISE fnd_api.g_exc_error;

919: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
920: l_msg_index := l_msg_index + 1;
921: l_msg_count := l_msg_count - 1;
922: END LOOP;
923: RAISE fnd_api.g_exc_error;
924: END IF;
925:
926: IF l_src_instance_header_tbl.count = 0 THEN -- No Records found so Create either Serialized or Non Serialized
927: debug('No Records found so Create a Record for Non-Serialized');

Line 983: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

979: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
980: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
981: l_msg_index := 1;
982: WHILE l_msg_count > 0 loop
983: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
984: l_msg_index := l_msg_index + 1;
985: l_msg_count := l_msg_count - 1;
986: END LOOP;
987: RAISE fnd_api.g_exc_error;

Line 987: RAISE fnd_api.g_exc_error;

983: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
984: l_msg_index := l_msg_index + 1;
985: l_msg_count := l_msg_count - 1;
986: END LOOP;
987: RAISE fnd_api.g_exc_error;
988: END IF;
989: debug('Item Instance Created: '||l_new_instance_rec.instance_id);
990:
991: ELSIF l_src_instance_header_tbl.count = 1 THEN

Line 1042: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1038: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
1039: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
1040: l_msg_index := 1;
1041: WHILE l_msg_count > 0 loop
1042: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1043: l_msg_index := l_msg_index + 1;
1044: l_msg_count := l_msg_count - 1;
1045: END LOOP;
1046: RAISE fnd_api.g_exc_error;

Line 1046: RAISE fnd_api.g_exc_error;

1042: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1043: l_msg_index := l_msg_index + 1;
1044: l_msg_count := l_msg_count - 1;
1045: END LOOP;
1046: RAISE fnd_api.g_exc_error;
1047: END IF;
1048:
1049: ELSIF l_src_instance_header_tbl.count > 1 THEN
1050: -- Multiple Instances were found so throw error

Line 1058: RAISE fnd_api.g_exc_error;

1054: fnd_message.set_token('SUBINV',l_mtl_item_tbl(j).subinventory_code);
1055: fnd_message.set_token('INV_ORG_ID',l_mtl_item_tbl(j).organization_id);
1056: fnd_message.set_token('LOCATOR',l_mtl_item_tbl(j).locator_id);
1057: l_error_message := fnd_message.get;
1058: RAISE fnd_api.g_exc_error;
1059:
1060: END IF; -- End of Source Record If
1061: END IF; -- End of Serialized Item If
1062: END LOOP; -- End of For Loop

Line 1068: WHEN fnd_api.g_exc_error THEN

1064: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
1065: debug('*****End of csi_inv_trxs_pkg.misc_receipt Transaction*****');
1066:
1067: EXCEPTION
1068: WHEN fnd_api.g_exc_error THEN
1069: debug('You have encountered a "fnd_api.g_exc_error" exception');
1070: x_return_status := l_fnd_error;
1071:
1072: IF l_mtl_item_tbl.count > 0 THEN

Line 1069: debug('You have encountered a "fnd_api.g_exc_error" exception');

1065: debug('*****End of csi_inv_trxs_pkg.misc_receipt Transaction*****');
1066:
1067: EXCEPTION
1068: WHEN fnd_api.g_exc_error THEN
1069: debug('You have encountered a "fnd_api.g_exc_error" exception');
1070: x_return_status := l_fnd_error;
1071:
1072: IF l_mtl_item_tbl.count > 0 THEN
1073: x_trx_error_rec.serial_number := l_mtl_item_tbl(j).serial_number;

Line 1136: l_commit VARCHAR2(1) := FND_API.G_FALSE;

1132:
1133: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
1134: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.RECEIPT_INVENTORY';
1135: l_api_version NUMBER := 1.0;
1136: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;

Line 1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;

1133: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
1134: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.RECEIPT_INVENTORY';
1135: l_api_version NUMBER := 1.0;
1136: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1141: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

Line 1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

1134: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.RECEIPT_INVENTORY';
1135: l_api_version NUMBER := 1.0;
1136: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1141: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1142: l_transaction_id NUMBER := NULL;

Line 1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;

1135: l_api_version NUMBER := 1.0;
1136: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1141: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1142: l_transaction_id NUMBER := NULL;
1143: l_object_version_number NUMBER := 1;

Line 1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;

1136: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1141: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1142: l_transaction_id NUMBER := NULL;
1143: l_object_version_number NUMBER := 1;
1144: l_sysdate DATE := SYSDATE;

Line 1141: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

1137: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1138: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1139: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1140: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1141: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1142: l_transaction_id NUMBER := NULL;
1143: l_object_version_number NUMBER := 1;
1144: l_sysdate DATE := SYSDATE;
1145: l_master_organization_id NUMBER;

Line 1166: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

1162: l_account_tbl CSI_DATASTRUCTURES_PUB.PARTY_ACCOUNT_TBL;
1163: l_pricing_attrib_tbl CSI_DATASTRUCTURES_PUB.PRICING_ATTRIBS_TBL;
1164: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
1165: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
1166: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1167: l_fnd_warning VARCHAR2(1) := 'W';
1168: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
1169: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
1170: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;

Line 1168: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

1164: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
1165: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
1166: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1167: l_fnd_warning VARCHAR2(1) := 'W';
1168: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
1169: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
1170: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
1171: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
1172: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;

Line 1169: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

1165: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
1166: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1167: l_fnd_warning VARCHAR2(1) := 'W';
1168: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
1169: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
1170: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
1171: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
1172: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;
1173: l_out_of_enterprise VARCHAR2(25) := 'OUT_OF_ENTERPRISE';

Line 1265: RAISE fnd_api.g_exc_error;

1261: debug('Source Records Found: '||l_tbl_count);
1262:
1263: IF NOT l_return_status = l_fnd_success THEN
1264: debug('You have encountered an error in CSI_INV_TRXS_PKG.get_transaction_recs, Transaction ID: '||p_transaction_id);
1265: RAISE fnd_api.g_exc_error;
1266: END IF;
1267:
1268: -- Get the Master Organization ID
1269:

Line 1279: RAISE fnd_api.g_exc_error;

1275: l_error_message);
1276:
1277: IF NOT l_return_status = l_fnd_success THEN
1278: debug('You have encountered an error in csi_inv_trxs_pkg.get_master_organization, Organization ID: '||l_mtl_item_tbl(i).organization_id);
1279: RAISE fnd_api.g_exc_error;
1280: END IF;
1281:
1282: -- Call get_fnd_employee_id and get the employee id
1283:

Line 1365: RAISE fnd_api.g_exc_error;

1361:
1362: IF NOT l_return_status = l_fnd_success THEN
1363: debug('Redeploy Flag: '||l_redeploy_flag);
1364: debug('You have encountered an error in csi_inv_trxs_pkg.get_redeploy_flag: '||l_error_message);
1365: RAISE fnd_api.g_exc_error;
1366: END IF;
1367:
1368: debug('Redeploy Flag: '||l_redeploy_flag);
1369: debug('Trans Status Code: '||l_txn_rec.transaction_status_code);

Line 1397: RAISE fnd_api.g_exc_error;

1393: debug('CSI Transaction Created: '||l_txn_rec.transaction_id);
1394:
1395: IF NOT l_return_status = l_fnd_success THEN
1396: debug('You have encountered an error in csi_inv_trxs_pkg.create_csi_txn: '||p_transaction_id);
1397: RAISE fnd_api.g_exc_error;
1398: END IF;
1399:
1400: -- Now loop through the PL/SQL Table.
1401: j := 1;

Line 1454: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1450: IF NOT l_return_status = l_fnd_success then
1451: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
1452: l_msg_index := 1;
1453: WHILE l_msg_count > 0 loop
1454: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1455: l_msg_index := l_msg_index + 1;
1456: l_msg_count := l_msg_count - 1;
1457: END LOOP;
1458: RAISE fnd_api.g_exc_error;

Line 1458: RAISE fnd_api.g_exc_error;

1454: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1455: l_msg_index := l_msg_index + 1;
1456: l_msg_count := l_msg_count - 1;
1457: END LOOP;
1458: RAISE fnd_api.g_exc_error;
1459: END IF;
1460:
1461: IF l_src_instance_header_tbl.count < 1 THEN -- No Records found so Create either Serialized Item
1462:

Line 1527: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1523: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
1524: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
1525: l_msg_index := 1;
1526: WHILE l_msg_count > 0 loop
1527: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1528: l_msg_index := l_msg_index + 1;
1529: l_msg_count := l_msg_count - 1;
1530: END LOOP;
1531: RAISE fnd_api.g_exc_error;

Line 1531: RAISE fnd_api.g_exc_error;

1527: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1528: l_msg_index := l_msg_index + 1;
1529: l_msg_count := l_msg_count - 1;
1530: END LOOP;
1531: RAISE fnd_api.g_exc_error;
1532: END IF;
1533:
1534: --ELSIF l_src_instance_header_tbl.count > 0 THEN -- Records Found
1535: ELSIF l_src_instance_header_tbl.count = 1 THEN -- Records Found

Line 1613: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1609: debug('Message Count: '||l_msg_count);
1610: debug('Return Status: '||l_return_status);
1611: l_msg_index := 1;
1612: WHILE l_msg_count > 0 loop
1613: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1614: l_msg_index := l_msg_index + 1;
1615: l_msg_count := l_msg_count - 1;
1616: END LOOP;
1617: RAISE fnd_api.g_exc_error;

Line 1617: RAISE fnd_api.g_exc_error;

1613: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1614: l_msg_index := l_msg_index + 1;
1615: l_msg_count := l_msg_count - 1;
1616: END LOOP;
1617: RAISE fnd_api.g_exc_error;
1618: END IF;
1619:
1620: ELSIF l_src_instance_header_tbl(i).instance_usage_code in (l_out_of_enterprise,l_in_relationship,l_in_wip) THEN
1621:

Line 1635: RAISE fnd_api.g_exc_error;

1631:
1632: IF NOT l_return_status = l_fnd_success then
1633: debug('You encountered an error in the se_inv_trxs_pkg.check_and_break_relation');
1634: l_error_message := csi_t_gen_utility_pvt.dump_error_stack;
1635: RAISE fnd_api.g_exc_error;
1636: END IF;
1637:
1638: debug('Object Version originally from instance: '||l_src_instance_header_tbl(i).object_version_number);
1639:

Line 1693: fnd_api.g_true, -- Get Parties

1689: l_commit,
1690: l_init_msg_list,
1691: l_validation_level,
1692: l_instance_header_rec,
1693: fnd_api.g_true, -- Get Parties
1694: l_party_header_tbl,
1695: fnd_api.g_false, -- Get Accounts
1696: l_account_header_tbl,
1697: fnd_api.g_false, -- Get Org Assi.

Line 1695: fnd_api.g_false, -- Get Accounts

1691: l_validation_level,
1692: l_instance_header_rec,
1693: fnd_api.g_true, -- Get Parties
1694: l_party_header_tbl,
1695: fnd_api.g_false, -- Get Accounts
1696: l_account_header_tbl,
1697: fnd_api.g_false, -- Get Org Assi.
1698: l_org_header_tbl,
1699: fnd_api.g_false, -- Get Price Att

Line 1697: fnd_api.g_false, -- Get Org Assi.

1693: fnd_api.g_true, -- Get Parties
1694: l_party_header_tbl,
1695: fnd_api.g_false, -- Get Accounts
1696: l_account_header_tbl,
1697: fnd_api.g_false, -- Get Org Assi.
1698: l_org_header_tbl,
1699: fnd_api.g_false, -- Get Price Att
1700: l_pricing_header_tbl,
1701: fnd_api.g_false, -- Get Ext Attr

Line 1699: fnd_api.g_false, -- Get Price Att

1695: fnd_api.g_false, -- Get Accounts
1696: l_account_header_tbl,
1697: fnd_api.g_false, -- Get Org Assi.
1698: l_org_header_tbl,
1699: fnd_api.g_false, -- Get Price Att
1700: l_pricing_header_tbl,
1701: fnd_api.g_false, -- Get Ext Attr
1702: l_ext_attrib_header_tbl,
1703: l_ext_attrib_def_tbl,

Line 1701: fnd_api.g_false, -- Get Ext Attr

1697: fnd_api.g_false, -- Get Org Assi.
1698: l_org_header_tbl,
1699: fnd_api.g_false, -- Get Price Att
1700: l_pricing_header_tbl,
1701: fnd_api.g_false, -- Get Ext Attr
1702: l_ext_attrib_header_tbl,
1703: l_ext_attrib_def_tbl,
1704: fnd_api.g_false, -- Get Asset Assi
1705: l_asset_header_tbl,

Line 1704: fnd_api.g_false, -- Get Asset Assi

1700: l_pricing_header_tbl,
1701: fnd_api.g_false, -- Get Ext Attr
1702: l_ext_attrib_header_tbl,
1703: l_ext_attrib_def_tbl,
1704: fnd_api.g_false, -- Get Asset Assi
1705: l_asset_header_tbl,
1706: fnd_api.g_false, -- Resolve IDs
1707: NULL, -- Time Stamp
1708: l_return_status,

Line 1706: fnd_api.g_false, -- Resolve IDs

1702: l_ext_attrib_header_tbl,
1703: l_ext_attrib_def_tbl,
1704: fnd_api.g_false, -- Get Asset Assi
1705: l_asset_header_tbl,
1706: fnd_api.g_false, -- Resolve IDs
1707: NULL, -- Time Stamp
1708: l_return_status,
1709: l_msg_count,
1710: l_msg_data);

Line 1770: RAISE fnd_api.g_exc_error;

1766: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
1767: fnd_message.set_token('STATUS',l_status);
1768: l_error_message := fnd_message.get;
1769: l_return_status := l_fnd_error;
1770: RAISE fnd_api.g_exc_error;
1771: ELSE
1772: l_party_tbl.delete;
1773: END IF;
1774: END IF;

Line 1820: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1816: debug('Message Count: '||l_msg_count);
1817: debug('Return Status: '||l_return_status);
1818: l_msg_index := 1;
1819: WHILE l_msg_count > 0 loop
1820: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1821: l_msg_index := l_msg_index + 1;
1822: l_msg_count := l_msg_count - 1;
1823: END LOOP;
1824: RAISE fnd_api.g_exc_error;

Line 1824: RAISE fnd_api.g_exc_error;

1820: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1821: l_msg_index := l_msg_index + 1;
1822: l_msg_count := l_msg_count - 1;
1823: END LOOP;
1824: RAISE fnd_api.g_exc_error;
1825: END IF;
1826:
1827: ELSE
1828: l_status := 'In Inventory, Out of Service, Out of Enterprise, In Relationship, Installed, In Service or In Process';

Line 1835: RAISE fnd_api.g_exc_error;

1831: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
1832: fnd_message.set_token('STATUS',l_status);
1833: l_error_message := fnd_message.get;
1834: l_return_status := l_fnd_error;
1835: RAISE fnd_api.g_exc_error;
1836: END IF;
1837: ELSE
1838: l_status := 'In Inventory, Out of Service, Installed, In Service or In Process';
1839: debug('Serialized Item with Status other then Out Of Service, In Inventory, Installed, or In Process already exists in Install Base');

Line 1845: RAISE fnd_api.g_exc_error;

1841: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
1842: fnd_message.set_token('STATUS',l_status);
1843: l_error_message := fnd_message.get;
1844: l_return_status := l_fnd_error;
1845: RAISE fnd_api.g_exc_error;
1846: END IF; -- Usage IF
1847:
1848: END IF; -- Serialized Source Records
1849:

Line 1895: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1891: IF NOT l_return_status = l_fnd_success then
1892: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
1893: l_msg_index := 1;
1894: WHILE l_msg_count > 0 loop
1895: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1896: l_msg_index := l_msg_index + 1;
1897: l_msg_count := l_msg_count - 1;
1898: END LOOP;
1899: RAISE fnd_api.g_exc_error;

Line 1899: RAISE fnd_api.g_exc_error;

1895: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1896: l_msg_index := l_msg_index + 1;
1897: l_msg_count := l_msg_count - 1;
1898: END LOOP;
1899: RAISE fnd_api.g_exc_error;
1900: END IF;
1901:
1902: IF l_src_instance_header_tbl.count = 0 THEN -- No Records found so Create Non Serialized Item
1903:

Line 1965: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

1961: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
1962: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
1963: l_msg_index := 1;
1964: WHILE l_msg_count > 0 loop
1965: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1966: l_msg_index := l_msg_index + 1;
1967: l_msg_count := l_msg_count - 1;
1968: END LOOP;
1969: RAISE fnd_api.g_exc_error;

Line 1969: RAISE fnd_api.g_exc_error;

1965: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1966: l_msg_index := l_msg_index + 1;
1967: l_msg_count := l_msg_count - 1;
1968: END LOOP;
1969: RAISE fnd_api.g_exc_error;
1970: END IF;
1971:
1972: ELSIF l_src_instance_header_tbl.count = 1 THEN -- Records Found
1973:

Line 2027: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

2023: debug('Message Count: '||l_msg_count);
2024: debug('Return Status: '||l_return_status);
2025: l_msg_index := 1;
2026: WHILE l_msg_count > 0 loop
2027: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2028: l_msg_index := l_msg_index + 1;
2029: l_msg_count := l_msg_count - 1;
2030: END LOOP;
2031: RAISE fnd_api.g_exc_error;

Line 2031: RAISE fnd_api.g_exc_error;

2027: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2028: l_msg_index := l_msg_index + 1;
2029: l_msg_count := l_msg_count - 1;
2030: END LOOP;
2031: RAISE fnd_api.g_exc_error;
2032: END IF;
2033:
2034: ELSIF l_src_instance_header_tbl.count > 1 THEN -- Records Found
2035: -- Multiple Instances were found so throw error

Line 2044: RAISE fnd_api.g_exc_error;

2040: fnd_message.set_token('SUBINV',l_mtl_item_tbl(j).subinventory_code);
2041: fnd_message.set_token('INV_ORG_ID',l_mtl_item_tbl(j).organization_id);
2042: fnd_message.set_token('LOCATOR',l_mtl_item_tbl(j).locator_id);
2043: l_error_message := fnd_message.get;
2044: RAISE fnd_api.g_exc_error;
2045: END IF; -- End of Source Record If
2046: END IF; -- End of Serial Number if
2047: END LOOP; -- End of For Loop
2048:

Line 2053: WHEN fnd_api.g_exc_error THEN

2049: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
2050: debug('*****End of csi_inv_trxs_pkg.receipt_inventory Transaction*****');
2051:
2052: EXCEPTION
2053: WHEN fnd_api.g_exc_error THEN
2054: debug('You have encountered a "fnd_api.g_exc_error" exception');
2055: x_return_status := l_fnd_error;
2056:
2057: IF l_mtl_item_tbl.count > 0 THEN

Line 2054: debug('You have encountered a "fnd_api.g_exc_error" exception');

2050: debug('*****End of csi_inv_trxs_pkg.receipt_inventory Transaction*****');
2051:
2052: EXCEPTION
2053: WHEN fnd_api.g_exc_error THEN
2054: debug('You have encountered a "fnd_api.g_exc_error" exception');
2055: x_return_status := l_fnd_error;
2056:
2057: IF l_mtl_item_tbl.count > 0 THEN
2058: x_trx_error_rec.serial_number := l_mtl_item_tbl(j).serial_number;

Line 2121: l_commit VARCHAR2(1) := FND_API.G_FALSE;

2117:
2118: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
2119: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_ISSUE';
2120: l_api_version NUMBER := 1.0;
2121: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2122: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2123: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2124: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2125: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

Line 2122: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;

2118: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
2119: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_ISSUE';
2120: l_api_version NUMBER := 1.0;
2121: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2122: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2123: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2124: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2125: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2126: l_transaction_id NUMBER := NULL;

Line 2123: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

2119: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_ISSUE';
2120: l_api_version NUMBER := 1.0;
2121: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2122: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2123: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2124: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2125: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2126: l_transaction_id NUMBER := NULL;
2127: l_object_version_number NUMBER := 1;

Line 2124: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;

2120: l_api_version NUMBER := 1.0;
2121: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2122: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2123: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2124: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2125: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2126: l_transaction_id NUMBER := NULL;
2127: l_object_version_number NUMBER := 1;
2128: l_sysdate DATE := SYSDATE;

Line 2125: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

2121: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2122: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2123: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2124: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2125: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2126: l_transaction_id NUMBER := NULL;
2127: l_object_version_number NUMBER := 1;
2128: l_sysdate DATE := SYSDATE;
2129: l_master_organization_id NUMBER;

Line 2152: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

2148: l_account_tbl CSI_DATASTRUCTURES_PUB.PARTY_ACCOUNT_TBL;
2149: l_pricing_attrib_tbl CSI_DATASTRUCTURES_PUB.PRICING_ATTRIBS_TBL;
2150: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
2151: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
2152: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2153: l_fnd_warning VARCHAR2(1) := 'W';
2154: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2155: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2156: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;

Line 2154: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

2150: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
2151: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
2152: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2153: l_fnd_warning VARCHAR2(1) := 'W';
2154: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2155: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2156: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
2157: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
2158: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;

Line 2155: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

2151: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
2152: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2153: l_fnd_warning VARCHAR2(1) := 'W';
2154: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2155: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2156: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
2157: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
2158: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;
2159: l_in_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_SERVICE;

Line 2236: RAISE fnd_api.g_exc_error;

2232: debug('Inventory Records Found: '||l_tbl_count);
2233:
2234: IF NOT l_return_status = l_fnd_success THEN
2235: debug('You have encountered an error in CSI_INV_TRXS_PKG.get_transaction_recs, Transaction ID: '||p_transaction_id);
2236: RAISE fnd_api.g_exc_error;
2237: END IF;
2238:
2239: -- Determine Trasaction Type
2240: IF l_mtl_item_tbl(i).transaction_type_id = 8 THEN

Line 2291: RAISE fnd_api.g_exc_error;

2287: debug('Master Organization is: '||l_master_organization_id);
2288:
2289: IF NOT l_return_status = l_fnd_success THEN
2290: debug('You have encountered an error in csi_inv_trxs_pkg.get_master_organization, Organization ID: '||l_mtl_item_tbl(i).organization_id);
2291: RAISE fnd_api.g_exc_error;
2292: END IF;
2293:
2294: -- Call get_fnd_employee_id and get the employee id
2295: l_employee_id := csi_inv_trxs_pkg.get_fnd_employee_id(l_mtl_item_tbl(i).last_updated_by);

Line 2324: l_instance_status := FND_API.G_FALSE;

2320: l_neg_code := csi_inv_trxs_pkg.get_neg_inv_code(
2321: l_mtl_item_tbl(i).organization_id);
2322:
2323: IF l_neg_code = 1 AND l_mtl_item_tbl(i).serial_number is NULL THEN
2324: l_instance_status := FND_API.G_FALSE;
2325: ELSE
2326: l_instance_status := FND_API.G_TRUE;
2327: END IF;
2328:

Line 2326: l_instance_status := FND_API.G_TRUE;

2322:
2323: IF l_neg_code = 1 AND l_mtl_item_tbl(i).serial_number is NULL THEN
2324: l_instance_status := FND_API.G_FALSE;
2325: ELSE
2326: l_instance_status := FND_API.G_TRUE;
2327: END IF;
2328:
2329: debug('Negative Code is - 1 = Yes, 2 = No: '||l_neg_code);
2330:

Line 2356: RAISE fnd_api.g_exc_error;

2352:
2353: IF NOT l_return_status = l_fnd_success THEN
2354: debug('Redeploy Flag: '||l_redeploy_flag);
2355: debug('You have encountered an error in csi_inv_trxs_pkg.get_redeploy_flag: '||l_error_message);
2356: RAISE fnd_api.g_exc_error;
2357: END IF;
2358:
2359: debug('Redeploy Flag: '||l_redeploy_flag);
2360: debug('Trans Status Code: '||l_txn_rec.transaction_status_code);

Line 2423: RAISE fnd_api.g_exc_error;

2419: debug('CSI Transaction Created: '||l_txn_rec.transaction_id);
2420:
2421: IF NOT l_return_status = l_fnd_success THEN
2422: debug('You have encountered an error in csi_inv_trxs_pkg.create_csi_txn: '||p_transaction_id);
2423: RAISE fnd_api.g_exc_error;
2424: END IF;
2425:
2426: -- Now loop through the PL/SQL Table.
2427: j := 1;

Line 2483: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

2479: -- Check for any errors and add them to the message stack to pass out to be put into the error log table.
2480: IF NOT l_return_status = l_fnd_success then
2481: l_msg_index := 1;
2482: WHILE l_msg_count > 0 loop
2483: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2484: l_msg_index := l_msg_index + 1;
2485: l_msg_count := l_msg_count - 1;
2486: END LOOP;
2487: RAISE fnd_api.g_exc_error;

Line 2487: RAISE fnd_api.g_exc_error;

2483: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2484: l_msg_index := l_msg_index + 1;
2485: l_msg_count := l_msg_count - 1;
2486: END LOOP;
2487: RAISE fnd_api.g_exc_error;
2488: END IF;
2489:
2490: IF l_mtl_item_tbl(j).serial_number is NULL THEN
2491: IF l_src_instance_header_tbl.count = 0 THEN

Line 2553: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

2549: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2550: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
2551: l_msg_index := 1;
2552: WHILE l_msg_count > 0 loop
2553: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2554: l_msg_index := l_msg_index + 1;
2555: l_msg_count := l_msg_count - 1;
2556: END LOOP;
2557: RAISE fnd_api.g_exc_error;

Line 2557: RAISE fnd_api.g_exc_error;

2553: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2554: l_msg_index := l_msg_index + 1;
2555: l_msg_count := l_msg_count - 1;
2556: END LOOP;
2557: RAISE fnd_api.g_exc_error;
2558: END IF;
2559:
2560: ELSE -- No Records were found and Neg Qtys Not Allowed
2561: debug('No Records were found in Install Base and Neg Qtys not allowed to error');

Line 2564: RAISE fnd_api.g_exc_error;

2560: ELSE -- No Records were found and Neg Qtys Not Allowed
2561: debug('No Records were found in Install Base and Neg Qtys not allowed to error');
2562: fnd_message.set_name('CSI','CSI_NO_NEG_BAL_ALLOWED');
2563: l_error_message := fnd_message.get;
2564: RAISE fnd_api.g_exc_error;
2565:
2566: END IF; -- Neg Qty IF
2567:
2568: ELSE -- Non Serialized Instances Found so Update

Line 2619: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

2615: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2616: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
2617: l_msg_index := 1;
2618: WHILE l_msg_count > 0 loop
2619: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2620: l_msg_index := l_msg_index + 1;
2621: l_msg_count := l_msg_count - 1;
2622: END LOOP;
2623: RAISE fnd_api.g_exc_error;

Line 2623: RAISE fnd_api.g_exc_error;

2619: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2620: l_msg_index := l_msg_index + 1;
2621: l_msg_count := l_msg_count - 1;
2622: END LOOP;
2623: RAISE fnd_api.g_exc_error;
2624: END IF;
2625: END IF; -- IF Src Non Serial Recs found
2626:
2627: ELSIF l_mtl_item_tbl(j).serial_number is NOT NULL THEN

Line 2696: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

2692: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2693: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
2694: l_msg_index := 1;
2695: WHILE l_msg_count > 0 loop
2696: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2697: l_msg_index := l_msg_index + 1;
2698: l_msg_count := l_msg_count - 1;
2699: END LOOP;
2700: RAISE fnd_api.g_exc_error;

Line 2700: RAISE fnd_api.g_exc_error;

2696: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2697: l_msg_index := l_msg_index + 1;
2698: l_msg_count := l_msg_count - 1;
2699: END LOOP;
2700: RAISE fnd_api.g_exc_error;
2701: END IF;
2702: ELSIF l_src_instance_header_tbl.count > 1 THEN
2703: -- Multiple Instances were found so throw error
2704: debug('Multiple Instances were Found in Install Base-30');

Line 2711: RAISE fnd_api.g_exc_error;

2707: fnd_message.set_token('SUBINV',l_mtl_item_tbl(j).subinventory_code);
2708: fnd_message.set_token('INV_ORG_ID',l_mtl_item_tbl(j).organization_id);
2709: fnd_message.set_token('LOCATOR',l_mtl_item_tbl(j).locator_id);
2710: l_error_message := fnd_message.get;
2711: RAISE fnd_api.g_exc_error;
2712:
2713: ELSIF l_src_instance_header_tbl.count = 0 THEN
2714: debug('No Records were found in Install Base');
2715: fnd_message.set_name('CSI','CSI_IB_RECORD_NOTFOUND');

Line 2720: RAISE fnd_api.g_exc_error;

2716: fnd_message.set_token('ITEM',l_mtl_item_tbl(j).inventory_item_id);
2717: fnd_message.set_token('SUBINVENTORY',l_mtl_item_tbl(j).subinventory_code);
2718: fnd_message.set_token('ORG_ID',l_mtl_item_tbl(j).organization_id);
2719: l_error_message := fnd_message.get;
2720: RAISE fnd_api.g_exc_error;
2721: END IF; -- End of Source Record IF
2722: END IF; -- End of Serial IF
2723: END LOOP; -- End of For Loop
2724:

Line 2729: WHEN fnd_api.g_exc_error THEN

2725: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
2726: debug('*****End of csi_inv_trxs_pkg.misc_issue Transaction*****');
2727:
2728: EXCEPTION
2729: WHEN fnd_api.g_exc_error THEN
2730: debug('You have encountered a "fnd_api.g_exc_error" exception');
2731: x_return_status := l_fnd_error;
2732:
2733: IF l_mtl_item_tbl.count > 0 THEN

Line 2730: debug('You have encountered a "fnd_api.g_exc_error" exception');

2726: debug('*****End of csi_inv_trxs_pkg.misc_issue Transaction*****');
2727:
2728: EXCEPTION
2729: WHEN fnd_api.g_exc_error THEN
2730: debug('You have encountered a "fnd_api.g_exc_error" exception');
2731: x_return_status := l_fnd_error;
2732:
2733: IF l_mtl_item_tbl.count > 0 THEN
2734: x_trx_error_rec.serial_number := l_mtl_item_tbl(j).serial_number;

Line 2798: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

2794: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.CYCLE_COUNT';
2795: l_return_status VARCHAR2(1);
2796: l_error_code VARCHAR2(50);
2797: l_error_message VARCHAR2(4000);
2798: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2799: l_fnd_warning VARCHAR2(1) := 'W';
2800: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2801: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2802: l_sql_error VARCHAR2(2000);

Line 2800: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

2796: l_error_code VARCHAR2(50);
2797: l_error_message VARCHAR2(4000);
2798: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2799: l_fnd_warning VARCHAR2(1) := 'W';
2800: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2801: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2802: l_sql_error VARCHAR2(2000);
2803: r_quantity NUMBER := 0;
2804: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;

Line 2801: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

2797: l_error_message VARCHAR2(4000);
2798: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2799: l_fnd_warning VARCHAR2(1) := 'W';
2800: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2801: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2802: l_sql_error VARCHAR2(2000);
2803: r_quantity NUMBER := 0;
2804: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;
2805:

Line 2832: RAISE fnd_api.g_exc_error;

2828: l_trx_error_rec);
2829:
2830: IF NOT l_return_status = l_fnd_success THEN
2831: debug('You have encountered an error in CSI_INV_TRXS_PKG.cycle_count');
2832: RAISE fnd_api.g_exc_error;
2833: END IF;
2834: ELSIF r_quantity < 0 then
2835: csi_inv_trxs_pkg.misc_issue(p_transaction_id,
2836: p_message_id,

Line 2842: RAISE fnd_api.g_exc_error;

2838: l_trx_error_rec);
2839:
2840: IF NOT l_return_status = l_fnd_success THEN
2841: debug('You have encountered an error in CSI_INV_TRXS_PKG.cycle_count');
2842: RAISE fnd_api.g_exc_error;
2843: END IF;
2844: END IF;
2845:
2846: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));

Line 2850: WHEN fnd_api.g_exc_error THEN

2846: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
2847: debug('*****End of csi_inv_trxs_pkg.cycle_count Transaction*****');
2848:
2849: EXCEPTION
2850: WHEN fnd_api.g_exc_error THEN
2851: debug('You have encountered a "fnd_api.g_exc_error" exception');
2852: x_return_status := l_fnd_error;
2853: l_trx_error_rec.source_type := 'CSICYCNT';
2854: x_trx_error_rec := l_trx_error_rec;

Line 2851: debug('You have encountered a "fnd_api.g_exc_error" exception');

2847: debug('*****End of csi_inv_trxs_pkg.cycle_count Transaction*****');
2848:
2849: EXCEPTION
2850: WHEN fnd_api.g_exc_error THEN
2851: debug('You have encountered a "fnd_api.g_exc_error" exception');
2852: x_return_status := l_fnd_error;
2853: l_trx_error_rec.source_type := 'CSICYCNT';
2854: x_trx_error_rec := l_trx_error_rec;
2855:

Line 2886: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

2882: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.PHYSICAL_INVENTORY';
2883: l_return_status VARCHAR2(1);
2884: l_error_code VARCHAR2(50);
2885: l_error_message VARCHAR2(4000);
2886: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2887: l_fnd_warning VARCHAR2(1) := 'W';
2888: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2889: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2890: l_sql_error VARCHAR2(2000);

Line 2888: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

2884: l_error_code VARCHAR2(50);
2885: l_error_message VARCHAR2(4000);
2886: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2887: l_fnd_warning VARCHAR2(1) := 'W';
2888: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2889: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2890: l_sql_error VARCHAR2(2000);
2891: r_quantity NUMBER := 0;
2892: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;

Line 2889: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

2885: l_error_message VARCHAR2(4000);
2886: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2887: l_fnd_warning VARCHAR2(1) := 'W';
2888: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2889: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2890: l_sql_error VARCHAR2(2000);
2891: r_quantity NUMBER := 0;
2892: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;
2893:

Line 2919: RAISE fnd_api.g_exc_error;

2915: l_trx_error_rec);
2916:
2917: IF NOT l_return_status = l_fnd_success THEN
2918: debug('You have encountered an error in CSI_INV_TRXS_PKG.physical_inventory');
2919: RAISE fnd_api.g_exc_error;
2920: END IF;
2921: ELSIF r_quantity < 0 then
2922: csi_inv_trxs_pkg.misc_issue(p_transaction_id,
2923: p_message_id,

Line 2929: RAISE fnd_api.g_exc_error;

2925: l_trx_error_rec);
2926:
2927: IF NOT l_return_status = l_fnd_success THEN
2928: debug('You have encountered an error in CSI_INV_TRXS_PKG.physical_inventory');
2929: RAISE fnd_api.g_exc_error;
2930: END IF;
2931: END IF;
2932:
2933: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));

Line 2937: WHEN fnd_api.g_exc_error THEN

2933: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
2934: debug('*****End of csi_inv_trxs_pkg.physical_inventory Transaction*****');
2935:
2936: EXCEPTION
2937: WHEN fnd_api.g_exc_error THEN
2938: debug('You have encountered a "fnd_api.g_exc_error" exception');
2939: x_return_status := l_fnd_error;
2940: l_trx_error_rec.source_type := 'CSIPHYIN';
2941: x_trx_error_rec := l_trx_error_rec;

Line 2938: debug('You have encountered a "fnd_api.g_exc_error" exception');

2934: debug('*****End of csi_inv_trxs_pkg.physical_inventory Transaction*****');
2935:
2936: EXCEPTION
2937: WHEN fnd_api.g_exc_error THEN
2938: debug('You have encountered a "fnd_api.g_exc_error" exception');
2939: x_return_status := l_fnd_error;
2940: l_trx_error_rec.source_type := 'CSIPHYIN';
2941: x_trx_error_rec := l_trx_error_rec;
2942:

Line 2970: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

2966: x_error_message OUT NOCOPY VARCHAR2)
2967: IS
2968:
2969: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_TRANSACTION_RECS';
2970: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2971: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2972: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2973: l_sql_error VARCHAR2(2000);
2974: i PLS_INTEGER;

Line 2971: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

2967: IS
2968:
2969: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_TRANSACTION_RECS';
2970: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2971: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2972: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2973: l_sql_error VARCHAR2(2000);
2974: i PLS_INTEGER;
2975:

Line 2972: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

2968:
2969: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_TRANSACTION_RECS';
2970: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2971: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2972: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2973: l_sql_error VARCHAR2(2000);
2974: i PLS_INTEGER;
2975:
2976: CURSOR c_items IS

Line 3188: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

3184: x_error_message OUT NOCOPY VARCHAR2,
3185: x_mtl_trx_rec OUT NOCOPY CSI_INV_TRXS_PKG.MTL_TRX_TYPE) IS
3186:
3187: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.DECODE_MESSAGE';
3188: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3189: l_sql_error VARCHAR2(2000);
3190:
3191: BEGIN
3192: xnp_xml_utils.decode(P_Msg_Text, 'MTL_TRANSACTION_ID', X_MTL_TRX_REC.MTL_TRANSACTION_ID);

Line 3195: (X_MTL_TRX_REC.MTL_TRANSACTION_ID = FND_API.G_MISS_NUM) THEN

3191: BEGIN
3192: xnp_xml_utils.decode(P_Msg_Text, 'MTL_TRANSACTION_ID', X_MTL_TRX_REC.MTL_TRANSACTION_ID);
3193:
3194: IF (X_MTL_TRX_REC.MTL_TRANSACTION_ID is NULL) or
3195: (X_MTL_TRX_REC.MTL_TRANSACTION_ID = FND_API.G_MISS_NUM) THEN
3196: RAISE fnd_api.g_exc_error;
3197: END IF;
3198:
3199: EXCEPTION

Line 3196: RAISE fnd_api.g_exc_error;

3192: xnp_xml_utils.decode(P_Msg_Text, 'MTL_TRANSACTION_ID', X_MTL_TRX_REC.MTL_TRANSACTION_ID);
3193:
3194: IF (X_MTL_TRX_REC.MTL_TRANSACTION_ID is NULL) or
3195: (X_MTL_TRX_REC.MTL_TRANSACTION_ID = FND_API.G_MISS_NUM) THEN
3196: RAISE fnd_api.g_exc_error;
3197: END IF;
3198:
3199: EXCEPTION
3200: WHEN fnd_api.g_exc_error THEN

Line 3200: WHEN fnd_api.g_exc_error THEN

3196: RAISE fnd_api.g_exc_error;
3197: END IF;
3198:
3199: EXCEPTION
3200: WHEN fnd_api.g_exc_error THEN
3201: fnd_message.set_name('CSI','CSI_DECODE_MGS_ERROR');
3202: fnd_message.set_token('MESSAGE_ID',p_msg_header.message_id);
3203: fnd_message.set_token('MESSAGE_CODE',p_msg_header.message_code);
3204: x_error_message := fnd_message.get;

Line 3375: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

3371: IS
3372:
3373: l_sql_error VARCHAR2(500);
3374: l_org_code VARCHAR2(3);
3375: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3376: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3377: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3378: l_error_message VARCHAR2(2000);
3379: e_procedure_error EXCEPTION;

Line 3376: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

3372:
3373: l_sql_error VARCHAR2(500);
3374: l_org_code VARCHAR2(3);
3375: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3376: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3377: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3378: l_error_message VARCHAR2(2000);
3379: e_procedure_error EXCEPTION;
3380:

Line 3377: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

3373: l_sql_error VARCHAR2(500);
3374: l_org_code VARCHAR2(3);
3375: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3376: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3377: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3378: l_error_message VARCHAR2(2000);
3379: e_procedure_error EXCEPTION;
3380:
3381: CURSOR c_name is

Line 3603: l_Txn_Status_Code VARCHAR2(30) DEFAULT FND_API.G_MISS_CHAR;

3599: RETURN l_Txn_Type_Code;
3600: END Get_Txn_Type_Code;
3601:
3602: FUNCTION Get_Txn_Status_Code(P_Txn_Status IN VARCHAR2) RETURN VARCHAR2 IS
3603: l_Txn_Status_Code VARCHAR2(30) DEFAULT FND_API.G_MISS_CHAR;
3604: BEGIN
3605: RETURN l_Txn_Status_Code;
3606: END Get_Txn_Status_Code;
3607:

Line 3668: l_Txn_Action_Code VARCHAR2(30) DEFAULT FND_API.G_MISS_CHAR;

3664: RETURN l_transaction_id;
3665: END Get_Default_Status_id;
3666:
3667: FUNCTION Get_Txn_Action_Code(P_Txn_Action IN VARCHAR2) RETURN VARCHAR2 IS
3668: l_Txn_Action_Code VARCHAR2(30) DEFAULT FND_API.G_MISS_CHAR;
3669:
3670: BEGIN
3671: RETURN l_Txn_Action_Code;
3672: END Get_Txn_Action_Code;

Line 3863: l_commit VARCHAR2(1) := FND_API.G_FALSE;

3859:
3860: PROCEDURE log_csi_error(p_trx_error_rec IN CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC) IS
3861:
3862: l_api_version NUMBER := 1.0;
3863: l_commit VARCHAR2(1) := FND_API.G_FALSE;
3864: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
3865: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
3866: l_msg_count NUMBER;
3867: l_msg_data VARCHAR2(2000);

Line 3864: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;

3860: PROCEDURE log_csi_error(p_trx_error_rec IN CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC) IS
3861:
3862: l_api_version NUMBER := 1.0;
3863: l_commit VARCHAR2(1) := FND_API.G_FALSE;
3864: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
3865: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
3866: l_msg_count NUMBER;
3867: l_msg_data VARCHAR2(2000);
3868: l_txn_error_id NUMBER;

Line 3865: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

3861:
3862: l_api_version NUMBER := 1.0;
3863: l_commit VARCHAR2(1) := FND_API.G_FALSE;
3864: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
3865: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
3866: l_msg_count NUMBER;
3867: l_msg_data VARCHAR2(2000);
3868: l_txn_error_id NUMBER;
3869: l_return_status VARCHAR2(1);

Line 3886: IF NOT l_return_status = FND_API.G_RET_STS_SUCCESS THEN

3882: (l_api_version, l_init_msg_list, l_commit, l_validation_level,
3883: l_trx_error_rec, l_return_status, l_msg_count,l_msg_data,
3884: l_txn_error_id);
3885:
3886: IF NOT l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3887: raise no_error_logged;
3888: END IF;
3889:
3890: EXCEPTION

Line 3895: p_transaction_id => fnd_api.g_miss_num,

3891: WHEN no_error_logged THEN
3892: BEGIN
3893: csi_txn_errors_pkg.insert_row(
3894: px_transaction_error_id => x_transaction_error_id,
3895: p_transaction_id => fnd_api.g_miss_num,
3896: p_message_id => l_trx_error_rec.message_id,
3897: p_error_text => l_trx_error_rec.error_text,
3898: p_source_type => l_trx_error_rec.source_type,
3899: p_source_id => l_trx_error_rec.source_id,

Line 3942: p_transaction_id => fnd_api.g_miss_num,

3938: WHEN OTHERS THEN
3939: BEGIN
3940: csi_txn_errors_pkg.insert_row(
3941: px_transaction_error_id => x_transaction_error_id,
3942: p_transaction_id => fnd_api.g_miss_num,
3943: p_message_id => l_trx_error_rec.message_id,
3944: p_error_text => SQLERRM,
3945: p_source_type => l_trx_error_rec.source_type,
3946: p_source_id => l_trx_error_rec.source_id,

Line 3999: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;

3995: l_msg_index NUMBER;
3996: l_msg_data VARCHAR2(2000);
3997: l_error_message VARCHAR2(4000);
3998: l_return_status VARCHAR2(1);
3999: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4000: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4001:
4002: BEGIN
4003: px_txn_rec.transaction_date := sysdate;

Line 4000: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

3996: l_msg_data VARCHAR2(2000);
3997: l_error_message VARCHAR2(4000);
3998: l_return_status VARCHAR2(1);
3999: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4000: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4001:
4002: BEGIN
4003: px_txn_rec.transaction_date := sysdate;
4004: px_txn_rec.object_version_number := 1;

Line 4007: fnd_api.g_false,

4003: px_txn_rec.transaction_date := sysdate;
4004: px_txn_rec.object_version_number := 1;
4005:
4006: csi_transactions_pvt.create_transaction(l_api_version,
4007: fnd_api.g_false,
4008: fnd_api.g_false,
4009: fnd_api.g_valid_level_full,
4010: 'N',
4011: px_txn_rec,

Line 4008: fnd_api.g_false,

4004: px_txn_rec.object_version_number := 1;
4005:
4006: csi_transactions_pvt.create_transaction(l_api_version,
4007: fnd_api.g_false,
4008: fnd_api.g_false,
4009: fnd_api.g_valid_level_full,
4010: 'N',
4011: px_txn_rec,
4012: l_return_status,

Line 4009: fnd_api.g_valid_level_full,

4005:
4006: csi_transactions_pvt.create_transaction(l_api_version,
4007: fnd_api.g_false,
4008: fnd_api.g_false,
4009: fnd_api.g_valid_level_full,
4010: 'N',
4011: px_txn_rec,
4012: l_return_status,
4013: l_msg_count,

Line 4021: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);

4017: IF NOT l_return_status = l_fnd_success then
4018: debug('You encountered an error in the csi_transactions_pvt.create_transaction API '||l_msg_data);
4019: l_msg_index := 1;
4020: WHILE l_msg_count > 0 loop
4021: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
4022: l_msg_index := l_msg_index + 1;
4023: l_msg_count := l_msg_count - 1;
4024: END LOOP;
4025: RAISE fnd_api.g_exc_error;

Line 4025: RAISE fnd_api.g_exc_error;

4021: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
4022: l_msg_index := l_msg_index + 1;
4023: l_msg_count := l_msg_count - 1;
4024: END LOOP;
4025: RAISE fnd_api.g_exc_error;
4026: END IF;
4027:
4028: EXCEPTION
4029: WHEN fnd_api.g_exc_error THEN

Line 4029: WHEN fnd_api.g_exc_error THEN

4025: RAISE fnd_api.g_exc_error;
4026: END IF;
4027:
4028: EXCEPTION
4029: WHEN fnd_api.g_exc_error THEN
4030: debug('You have encountered a "fnd_api.g_exc_error" exception');
4031: x_return_status := l_fnd_error;
4032: x_error_message := l_error_message;
4033:

Line 4030: debug('You have encountered a "fnd_api.g_exc_error" exception');

4026: END IF;
4027:
4028: EXCEPTION
4029: WHEN fnd_api.g_exc_error THEN
4030: debug('You have encountered a "fnd_api.g_exc_error" exception');
4031: x_return_status := l_fnd_error;
4032: x_error_message := l_error_message;
4033:
4034: END create_csi_txn;

Line 4064: x_return_status := fnd_api.G_RET_STS_SUCCESS ;

4060: AND ct.transaction_type_id IN (l_out_of_sev, l_proj_insev,
4061: l_issue_hz, l_misc_issue_hz) ;
4062:
4063: BEGIN
4064: x_return_status := fnd_api.G_RET_STS_SUCCESS ;
4065: x_redeploy_flag := 'N' ;
4066:
4067: l_out_of_sev := get_txn_type_id('OUT_OF_SERVICE','CSE');
4068: l_proj_insev := get_txn_type_id('PROJECT_ITEM_IN_SERVICE','CSE');

Line 4078: x_return_status := fnd_api.G_RET_STS_ERROR ;

4074: CLOSE get_redeploy_flag_cur ;
4075:
4076: EXCEPTION
4077: WHEN OTHERS THEN
4078: x_return_status := fnd_api.G_RET_STS_ERROR ;
4079: x_error_message := SQLERRM ;
4080: END get_redeploy_flag ;
4081:
4082: FUNCTION valid_ib_txn (p_transaction_id IN NUMBER) RETURN BOOLEAN IS

Line 4085: l_init_msg_list VARCHAR2(1) := FND_API.G_FALSE;

4081:
4082: FUNCTION valid_ib_txn (p_transaction_id IN NUMBER) RETURN BOOLEAN IS
4083:
4084: l_api_version NUMBER := 1.0;
4085: l_init_msg_list VARCHAR2(1) := FND_API.G_FALSE;
4086: l_msg_count NUMBER;
4087: l_msg_data VARCHAR2(2000);
4088: l_logical_trx_attr_values INV_DROPSHIP_GLOBALS.logical_trx_attr_tbl;
4089: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

Line 4089: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

4085: l_init_msg_list VARCHAR2(1) := FND_API.G_FALSE;
4086: l_msg_count NUMBER;
4087: l_msg_data VARCHAR2(2000);
4088: l_logical_trx_attr_values INV_DROPSHIP_GLOBALS.logical_trx_attr_tbl;
4089: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4090: l_ds_return_status VARCHAR2(30);
4091: l_source_type VARCHAR2(50) := NULL;
4092: l_type_id NUMBER := NULL;
4093: l_csi_txn_name VARCHAR2(50) := NULL;

Line 4567: x_return_status := fnd_api.g_ret_sts_success;

4563: l_instance_query_rec csi_datastructures_pub.instance_query_rec;
4564:
4565: BEGIN
4566:
4567: x_return_status := fnd_api.g_ret_sts_success;
4568:
4569: debug('Setting Item Control Attributes on Query Record');
4570:
4571: l_instance_query_rec := csi_inv_trxs_pkg.init_instance_query_rec;

Line 4618: x_return_status := fnd_api.g_ret_sts_error;

4614: debug('Done setting attributes in query passing out to set the rest of the values ');
4615:
4616: EXCEPTION
4617: WHEN others THEN
4618: x_return_status := fnd_api.g_ret_sts_error;
4619:
4620: END set_item_attr_query_values;
4621:
4622: END csi_inv_trxs_pkg;