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 288: RAISE fnd_api.g_exc_error;

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

Line 345: RAISE fnd_api.g_exc_error;

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

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

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

Line 404: RAISE fnd_api.g_exc_error;

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

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

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

Line 471: RAISE fnd_api.g_exc_error;

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

Line 521: IF NVL(l_update_instance_rec.instance_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR CSI_Item_Instance_vld_pvt.val_inst_ter_flag(l_update_instance_rec.instance_status_id) THEN

517:
518: -- Bug 9091915
519: -- When instance status id is available for a source instance
520: -- the status id should not be updated
521: IF NVL(l_update_instance_rec.instance_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR CSI_Item_Instance_vld_pvt.val_inst_ter_flag(l_update_instance_rec.instance_status_id) THEN
522: l_update_instance_rec.instance_status_id := nvl(csi_inv_trxs_pkg.get_default_status_id(l_txn_rec.transaction_type_id),r_id.instance_status_id);
523: END IF;
524:
525: debug('Before Update Item Instance');

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

553: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
554: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
555: l_msg_index := 1;
556: WHILE l_msg_count > 0 loop
557: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
558: l_msg_index := l_msg_index + 1;
559: l_msg_count := l_msg_count - 1;
560: END LOOP;
561: RAISE fnd_api.g_exc_error;

Line 561: RAISE fnd_api.g_exc_error;

557: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
558: l_msg_index := l_msg_index + 1;
559: l_msg_count := l_msg_count - 1;
560: END LOOP;
561: RAISE fnd_api.g_exc_error;
562: END IF;
563:
564: ELSIF l_src_instance_header_tbl(i).instance_usage_code in (l_out_of_enterprise,l_in_relationship,l_in_wip) THEN
565:

Line 578: RAISE fnd_api.g_exc_error;

574:
575: IF NOT l_return_status = l_fnd_success then
576: debug('You encountered an error in the se_inv_trxs_pkg.check_and_break_relation');
577: l_error_message := csi_t_gen_utility_pvt.dump_error_stack;
578: RAISE fnd_api.g_exc_error;
579: END IF;
580:
581: debug('Object Version originally from instance: '||l_src_instance_header_tbl(i).object_version_number);
582:

Line 661: fnd_api.g_true, -- Get Parties

657: l_commit,
658: l_init_msg_list,
659: l_validation_level,
660: l_instance_header_rec,
661: fnd_api.g_true, -- Get Parties
662: l_party_header_tbl,
663: fnd_api.g_false, -- Get Accounts
664: l_account_header_tbl,
665: fnd_api.g_false, -- Get Org Assi.

Line 663: fnd_api.g_false, -- Get Accounts

659: l_validation_level,
660: l_instance_header_rec,
661: fnd_api.g_true, -- Get Parties
662: l_party_header_tbl,
663: fnd_api.g_false, -- Get Accounts
664: l_account_header_tbl,
665: fnd_api.g_false, -- Get Org Assi.
666: l_org_header_tbl,
667: fnd_api.g_false, -- Get Price Att

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

661: fnd_api.g_true, -- Get Parties
662: l_party_header_tbl,
663: fnd_api.g_false, -- Get Accounts
664: l_account_header_tbl,
665: fnd_api.g_false, -- Get Org Assi.
666: l_org_header_tbl,
667: fnd_api.g_false, -- Get Price Att
668: l_pricing_header_tbl,
669: fnd_api.g_false, -- Get Ext Attr

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

663: fnd_api.g_false, -- Get Accounts
664: l_account_header_tbl,
665: fnd_api.g_false, -- Get Org Assi.
666: l_org_header_tbl,
667: fnd_api.g_false, -- Get Price Att
668: l_pricing_header_tbl,
669: fnd_api.g_false, -- Get Ext Attr
670: l_ext_attrib_header_tbl,
671: l_ext_attrib_def_tbl,

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

665: fnd_api.g_false, -- Get Org Assi.
666: l_org_header_tbl,
667: fnd_api.g_false, -- Get Price Att
668: l_pricing_header_tbl,
669: fnd_api.g_false, -- Get Ext Attr
670: l_ext_attrib_header_tbl,
671: l_ext_attrib_def_tbl,
672: fnd_api.g_false, -- Get Asset Assi
673: l_asset_header_tbl,

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

668: l_pricing_header_tbl,
669: fnd_api.g_false, -- Get Ext Attr
670: l_ext_attrib_header_tbl,
671: l_ext_attrib_def_tbl,
672: fnd_api.g_false, -- Get Asset Assi
673: l_asset_header_tbl,
674: fnd_api.g_false, -- Resolve IDs
675: NULL, -- Time Stamp
676: l_return_status,

Line 674: fnd_api.g_false, -- Resolve IDs

670: l_ext_attrib_header_tbl,
671: l_ext_attrib_def_tbl,
672: fnd_api.g_false, -- Get Asset Assi
673: l_asset_header_tbl,
674: fnd_api.g_false, -- Resolve IDs
675: NULL, -- Time Stamp
676: l_return_status,
677: l_msg_count,
678: l_msg_data);

Line 742: RAISE fnd_api.g_exc_error;

738: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
739: fnd_message.set_token('STATUS',l_status);
740: l_error_message := fnd_message.get;
741: l_return_status := l_fnd_error;
742: RAISE fnd_api.g_exc_error;
743: ELSE
744: l_party_tbl.delete;
745: END IF;
746: END IF;

Line 759: IF NVL(l_update_instance_rec.instance_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR CSI_Item_Instance_vld_pvt.val_inst_ter_flag(l_update_instance_rec.instance_status_id) THEN

755:
756: -- Bug 9091915
757: -- When instance status id is available for a source instance
758: -- the status id should not be updated
759: IF NVL(l_update_instance_rec.instance_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR CSI_Item_Instance_vld_pvt.val_inst_ter_flag(l_update_instance_rec.instance_status_id) THEN
760: l_update_instance_rec.instance_status_id := nvl(csi_inv_trxs_pkg.get_default_status_id(l_txn_rec.transaction_type_id),r_id.instance_status_id);
761: END IF;
762:
763: debug('Before Update Item Instance');

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

790: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
791: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
792: l_msg_index := 1;
793: WHILE l_msg_count > 0 loop
794: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
795: l_msg_index := l_msg_index + 1;
796: l_msg_count := l_msg_count - 1;
797: END LOOP;
798: RAISE fnd_api.g_exc_error;

Line 798: RAISE fnd_api.g_exc_error;

794: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
795: l_msg_index := l_msg_index + 1;
796: l_msg_count := l_msg_count - 1;
797: END LOOP;
798: RAISE fnd_api.g_exc_error;
799: END IF;
800: ELSE
801: l_status := 'In Inventory, Out of Service, Out of Enterprise, In Relationship, Installed, In Service or In Process';
802: 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 808: RAISE fnd_api.g_exc_error;

804: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
805: fnd_message.set_token('STATUS',l_status);
806: l_error_message := fnd_message.get;
807: l_return_status := l_fnd_error;
808: RAISE fnd_api.g_exc_error;
809: END IF;
810: ELSE
811: l_status := 'In Inventory, Out of Service, Installed, In Service or In Process';
812: debug('Serialized Item with Status other then Out Of Service, In Inventory, Installed, or In Process already exists in Install Base');

Line 818: RAISE fnd_api.g_exc_error;

814: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
815: fnd_message.set_token('STATUS',l_status);
816: l_error_message := fnd_message.get;
817: l_return_status := l_fnd_error;
818: RAISE fnd_api.g_exc_error;
819: END IF;
820: ELSE -- No API Records so create a new serialized record
821: l_new_instance_rec := csi_inv_trxs_pkg.init_instance_create_rec;
822: l_new_instance_rec.inventory_item_id := l_mtl_item_tbl(j).inventory_item_id;

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

872: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
873: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
874: l_msg_index := 1;
875: WHILE l_msg_count > 0 loop
876: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
877: l_msg_index := l_msg_index + 1;
878: l_msg_count := l_msg_count - 1;
879: END LOOP;
880: RAISE fnd_api.g_exc_error;

Line 880: RAISE fnd_api.g_exc_error;

876: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
877: l_msg_index := l_msg_index + 1;
878: l_msg_count := l_msg_count - 1;
879: END LOOP;
880: RAISE fnd_api.g_exc_error;
881: END IF;
882:
883: debug('Item Instance Created: '||l_new_instance_rec.instance_id);
884:

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

929: IF NOT l_return_status = l_fnd_success then
930: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
931: l_msg_index := 1;
932: WHILE l_msg_count > 0 loop
933: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
934: l_msg_index := l_msg_index + 1;
935: l_msg_count := l_msg_count - 1;
936: END LOOP;
937: RAISE fnd_api.g_exc_error;

Line 937: RAISE fnd_api.g_exc_error;

933: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
934: l_msg_index := l_msg_index + 1;
935: l_msg_count := l_msg_count - 1;
936: END LOOP;
937: RAISE fnd_api.g_exc_error;
938: END IF;
939:
940: IF l_src_instance_header_tbl.count = 0 THEN -- No Records found so Create either Serialized or Non Serialized
941: debug('No Records found so Create a Record for Non-Serialized');

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

993: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
994: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
995: l_msg_index := 1;
996: WHILE l_msg_count > 0 loop
997: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
998: l_msg_index := l_msg_index + 1;
999: l_msg_count := l_msg_count - 1;
1000: END LOOP;
1001: RAISE fnd_api.g_exc_error;

Line 1001: RAISE fnd_api.g_exc_error;

997: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
998: l_msg_index := l_msg_index + 1;
999: l_msg_count := l_msg_count - 1;
1000: END LOOP;
1001: RAISE fnd_api.g_exc_error;
1002: END IF;
1003: debug('Item Instance Created: '||l_new_instance_rec.instance_id);
1004:
1005: ELSIF l_src_instance_header_tbl.count = 1 THEN

Line 1028: l_update_instance_rec.instance_status_id := FND_API.G_MISS_NUM;

1024: -- Bug 10081555
1025: -- If l_src_instance_header_tbl(i).quantity = 0
1026: -- remove the termination status
1027: IF l_src_instance_header_tbl(i).quantity = 0 THEN
1028: l_update_instance_rec.instance_status_id := FND_API.G_MISS_NUM;
1029: END IF;
1030:
1031: -- Bug 9091915
1032: -- When instance status id is available for a source instance

Line 1034: IF NVL(l_update_instance_rec.instance_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR CSI_Item_Instance_vld_pvt.val_inst_ter_flag(l_update_instance_rec.instance_status_id) THEN

1030:
1031: -- Bug 9091915
1032: -- When instance status id is available for a source instance
1033: -- the status id should not be updated
1034: IF NVL(l_update_instance_rec.instance_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM OR CSI_Item_Instance_vld_pvt.val_inst_ter_flag(l_update_instance_rec.instance_status_id) THEN
1035: l_update_instance_rec.instance_status_id := nvl(csi_inv_trxs_pkg.get_default_status_id(l_txn_rec.transaction_type_id),r_id.instance_status_id);
1036: END IF;
1037:
1038: debug('Before Update Item Instance');

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

1065: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
1066: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
1067: l_msg_index := 1;
1068: WHILE l_msg_count > 0 loop
1069: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1070: l_msg_index := l_msg_index + 1;
1071: l_msg_count := l_msg_count - 1;
1072: END LOOP;
1073: RAISE fnd_api.g_exc_error;

Line 1073: RAISE fnd_api.g_exc_error;

1069: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1070: l_msg_index := l_msg_index + 1;
1071: l_msg_count := l_msg_count - 1;
1072: END LOOP;
1073: RAISE fnd_api.g_exc_error;
1074: END IF;
1075:
1076: ELSIF l_src_instance_header_tbl.count > 1 THEN
1077: -- Multiple Instances were found so throw error

Line 1085: RAISE fnd_api.g_exc_error;

1081: fnd_message.set_token('SUBINV',l_mtl_item_tbl(j).subinventory_code);
1082: fnd_message.set_token('INV_ORG_ID',l_mtl_item_tbl(j).organization_id);
1083: fnd_message.set_token('LOCATOR',l_mtl_item_tbl(j).locator_id);
1084: l_error_message := fnd_message.get;
1085: RAISE fnd_api.g_exc_error;
1086:
1087: END IF; -- End of Source Record If
1088: END IF; -- End of Serialized Item If
1089: END LOOP; -- End of For Loop

Line 1095: WHEN fnd_api.g_exc_error THEN

1091: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
1092: debug('*****End of csi_inv_trxs_pkg.misc_receipt Transaction*****');
1093:
1094: EXCEPTION
1095: WHEN fnd_api.g_exc_error THEN
1096: debug('You have encountered a "fnd_api.g_exc_error" exception');
1097: x_return_status := l_fnd_error;
1098:
1099: IF l_mtl_item_tbl.count > 0 THEN

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

1092: debug('*****End of csi_inv_trxs_pkg.misc_receipt Transaction*****');
1093:
1094: EXCEPTION
1095: WHEN fnd_api.g_exc_error THEN
1096: debug('You have encountered a "fnd_api.g_exc_error" exception');
1097: x_return_status := l_fnd_error;
1098:
1099: IF l_mtl_item_tbl.count > 0 THEN
1100: x_trx_error_rec.serial_number := l_mtl_item_tbl(j).serial_number;

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

1159:
1160: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
1161: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.RECEIPT_INVENTORY';
1162: l_api_version NUMBER := 1.0;
1163: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1164: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1166: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1167: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;

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

1160: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
1161: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.RECEIPT_INVENTORY';
1162: l_api_version NUMBER := 1.0;
1163: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1164: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1166: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1167: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1168: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

Line 1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

1161: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.RECEIPT_INVENTORY';
1162: l_api_version NUMBER := 1.0;
1163: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1164: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1166: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1167: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1168: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1169: l_transaction_id NUMBER := NULL;

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

1162: l_api_version NUMBER := 1.0;
1163: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1164: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1166: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1167: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1168: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1169: l_transaction_id NUMBER := NULL;
1170: l_object_version_number NUMBER := 1;

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

1163: l_commit VARCHAR2(1) := FND_API.G_FALSE;
1164: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1166: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1167: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1168: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1169: l_transaction_id NUMBER := NULL;
1170: l_object_version_number NUMBER := 1;
1171: l_sysdate DATE := SYSDATE;

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

1164: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
1165: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
1166: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
1167: l_inactive_instance_only VARCHAR2(10) := FND_API.G_FALSE;
1168: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
1169: l_transaction_id NUMBER := NULL;
1170: l_object_version_number NUMBER := 1;
1171: l_sysdate DATE := SYSDATE;
1172: l_master_organization_id NUMBER;

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

1189: l_account_tbl CSI_DATASTRUCTURES_PUB.PARTY_ACCOUNT_TBL;
1190: l_pricing_attrib_tbl CSI_DATASTRUCTURES_PUB.PRICING_ATTRIBS_TBL;
1191: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
1192: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
1193: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1194: l_fnd_warning VARCHAR2(1) := 'W';
1195: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
1196: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
1197: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;

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

1191: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
1192: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
1193: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1194: l_fnd_warning VARCHAR2(1) := 'W';
1195: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
1196: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
1197: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
1198: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
1199: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;

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

1192: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
1193: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1194: l_fnd_warning VARCHAR2(1) := 'W';
1195: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
1196: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
1197: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
1198: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
1199: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;
1200: l_out_of_enterprise VARCHAR2(25) := 'OUT_OF_ENTERPRISE';

Line 1292: RAISE fnd_api.g_exc_error;

1288: debug('Source Records Found: '||l_tbl_count);
1289:
1290: IF NOT l_return_status = l_fnd_success THEN
1291: debug('You have encountered an error in CSI_INV_TRXS_PKG.get_transaction_recs, Transaction ID: '||p_transaction_id);
1292: RAISE fnd_api.g_exc_error;
1293: END IF;
1294:
1295: -- Get the Master Organization ID
1296:

Line 1306: RAISE fnd_api.g_exc_error;

1302: l_error_message);
1303:
1304: IF NOT l_return_status = l_fnd_success THEN
1305: debug('You have encountered an error in csi_inv_trxs_pkg.get_master_organization, Organization ID: '||l_mtl_item_tbl(i).organization_id);
1306: RAISE fnd_api.g_exc_error;
1307: END IF;
1308:
1309: -- Call get_fnd_employee_id and get the employee id
1310:

Line 1393: RAISE fnd_api.g_exc_error;

1389:
1390: IF NOT l_return_status = l_fnd_success THEN
1391: debug('Redeploy Flag: '||l_redeploy_flag);
1392: debug('You have encountered an error in csi_inv_trxs_pkg.get_redeploy_flag: '||l_error_message);
1393: RAISE fnd_api.g_exc_error;
1394: END IF;
1395:
1396: debug('Redeploy Flag: '||l_redeploy_flag);
1397: debug('Trans Status Code: '||l_txn_rec.transaction_status_code);

Line 1425: RAISE fnd_api.g_exc_error;

1421: debug('CSI Transaction Created: '||l_txn_rec.transaction_id);
1422:
1423: IF NOT l_return_status = l_fnd_success THEN
1424: debug('You have encountered an error in csi_inv_trxs_pkg.create_csi_txn: '||p_transaction_id);
1425: RAISE fnd_api.g_exc_error;
1426: END IF;
1427:
1428: -- Now loop through the PL/SQL Table.
1429: j := 1;

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

1478: IF NOT l_return_status = l_fnd_success then
1479: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
1480: l_msg_index := 1;
1481: WHILE l_msg_count > 0 loop
1482: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1483: l_msg_index := l_msg_index + 1;
1484: l_msg_count := l_msg_count - 1;
1485: END LOOP;
1486: RAISE fnd_api.g_exc_error;

Line 1486: RAISE fnd_api.g_exc_error;

1482: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1483: l_msg_index := l_msg_index + 1;
1484: l_msg_count := l_msg_count - 1;
1485: END LOOP;
1486: RAISE fnd_api.g_exc_error;
1487: END IF;
1488:
1489: IF l_src_instance_header_tbl.count < 1 THEN -- No Records found so Create either Serialized Item
1490:

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

1551: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
1552: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
1553: l_msg_index := 1;
1554: WHILE l_msg_count > 0 loop
1555: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1556: l_msg_index := l_msg_index + 1;
1557: l_msg_count := l_msg_count - 1;
1558: END LOOP;
1559: RAISE fnd_api.g_exc_error;

Line 1559: RAISE fnd_api.g_exc_error;

1555: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1556: l_msg_index := l_msg_index + 1;
1557: l_msg_count := l_msg_count - 1;
1558: END LOOP;
1559: RAISE fnd_api.g_exc_error;
1560: END IF;
1561:
1562: --ELSIF l_src_instance_header_tbl.count > 0 THEN -- Records Found
1563: ELSIF l_src_instance_header_tbl.count = 1 THEN -- Records Found

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

1637: debug('Message Count: '||l_msg_count);
1638: debug('Return Status: '||l_return_status);
1639: l_msg_index := 1;
1640: WHILE l_msg_count > 0 loop
1641: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1642: l_msg_index := l_msg_index + 1;
1643: l_msg_count := l_msg_count - 1;
1644: END LOOP;
1645: RAISE fnd_api.g_exc_error;

Line 1645: RAISE fnd_api.g_exc_error;

1641: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1642: l_msg_index := l_msg_index + 1;
1643: l_msg_count := l_msg_count - 1;
1644: END LOOP;
1645: RAISE fnd_api.g_exc_error;
1646: END IF;
1647:
1648: ELSIF l_src_instance_header_tbl(i).instance_usage_code in (l_out_of_enterprise,l_in_relationship,l_in_wip) THEN
1649:

Line 1663: RAISE fnd_api.g_exc_error;

1659:
1660: IF NOT l_return_status = l_fnd_success then
1661: debug('You encountered an error in the se_inv_trxs_pkg.check_and_break_relation');
1662: l_error_message := csi_t_gen_utility_pvt.dump_error_stack;
1663: RAISE fnd_api.g_exc_error;
1664: END IF;
1665:
1666: debug('Object Version originally from instance: '||l_src_instance_header_tbl(i).object_version_number);
1667:

Line 1741: fnd_api.g_true, -- Get Parties

1737: l_commit,
1738: l_init_msg_list,
1739: l_validation_level,
1740: l_instance_header_rec,
1741: fnd_api.g_true, -- Get Parties
1742: l_party_header_tbl,
1743: fnd_api.g_false, -- Get Accounts
1744: l_account_header_tbl,
1745: fnd_api.g_false, -- Get Org Assi.

Line 1743: fnd_api.g_false, -- Get Accounts

1739: l_validation_level,
1740: l_instance_header_rec,
1741: fnd_api.g_true, -- Get Parties
1742: l_party_header_tbl,
1743: fnd_api.g_false, -- Get Accounts
1744: l_account_header_tbl,
1745: fnd_api.g_false, -- Get Org Assi.
1746: l_org_header_tbl,
1747: fnd_api.g_false, -- Get Price Att

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

1741: fnd_api.g_true, -- Get Parties
1742: l_party_header_tbl,
1743: fnd_api.g_false, -- Get Accounts
1744: l_account_header_tbl,
1745: fnd_api.g_false, -- Get Org Assi.
1746: l_org_header_tbl,
1747: fnd_api.g_false, -- Get Price Att
1748: l_pricing_header_tbl,
1749: fnd_api.g_false, -- Get Ext Attr

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

1743: fnd_api.g_false, -- Get Accounts
1744: l_account_header_tbl,
1745: fnd_api.g_false, -- Get Org Assi.
1746: l_org_header_tbl,
1747: fnd_api.g_false, -- Get Price Att
1748: l_pricing_header_tbl,
1749: fnd_api.g_false, -- Get Ext Attr
1750: l_ext_attrib_header_tbl,
1751: l_ext_attrib_def_tbl,

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

1745: fnd_api.g_false, -- Get Org Assi.
1746: l_org_header_tbl,
1747: fnd_api.g_false, -- Get Price Att
1748: l_pricing_header_tbl,
1749: fnd_api.g_false, -- Get Ext Attr
1750: l_ext_attrib_header_tbl,
1751: l_ext_attrib_def_tbl,
1752: fnd_api.g_false, -- Get Asset Assi
1753: l_asset_header_tbl,

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

1748: l_pricing_header_tbl,
1749: fnd_api.g_false, -- Get Ext Attr
1750: l_ext_attrib_header_tbl,
1751: l_ext_attrib_def_tbl,
1752: fnd_api.g_false, -- Get Asset Assi
1753: l_asset_header_tbl,
1754: fnd_api.g_false, -- Resolve IDs
1755: NULL, -- Time Stamp
1756: l_return_status,

Line 1754: fnd_api.g_false, -- Resolve IDs

1750: l_ext_attrib_header_tbl,
1751: l_ext_attrib_def_tbl,
1752: fnd_api.g_false, -- Get Asset Assi
1753: l_asset_header_tbl,
1754: fnd_api.g_false, -- Resolve IDs
1755: NULL, -- Time Stamp
1756: l_return_status,
1757: l_msg_count,
1758: l_msg_data);

Line 1821: RAISE fnd_api.g_exc_error;

1817: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
1818: fnd_message.set_token('STATUS',l_status);
1819: l_error_message := fnd_message.get;
1820: l_return_status := l_fnd_error;
1821: RAISE fnd_api.g_exc_error;
1822: ELSE
1823: l_party_tbl.delete;
1824: END IF;
1825: END IF;

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

1867: debug('Message Count: '||l_msg_count);
1868: debug('Return Status: '||l_return_status);
1869: l_msg_index := 1;
1870: WHILE l_msg_count > 0 loop
1871: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1872: l_msg_index := l_msg_index + 1;
1873: l_msg_count := l_msg_count - 1;
1874: END LOOP;
1875: RAISE fnd_api.g_exc_error;

Line 1875: RAISE fnd_api.g_exc_error;

1871: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1872: l_msg_index := l_msg_index + 1;
1873: l_msg_count := l_msg_count - 1;
1874: END LOOP;
1875: RAISE fnd_api.g_exc_error;
1876: END IF;
1877:
1878: ELSE
1879: l_status := 'In Inventory, Out of Service, Out of Enterprise, In Relationship, Installed, In Service or In Process';

Line 1886: RAISE fnd_api.g_exc_error;

1882: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
1883: fnd_message.set_token('STATUS',l_status);
1884: l_error_message := fnd_message.get;
1885: l_return_status := l_fnd_error;
1886: RAISE fnd_api.g_exc_error;
1887: END IF;
1888: ELSE
1889: l_status := 'In Inventory, Out of Service, Installed, In Service or In Process';
1890: debug('Serialized Item with Status other then Out Of Service, In Inventory, Installed, or In Process already exists in Install Base');

Line 1896: RAISE fnd_api.g_exc_error;

1892: fnd_message.set_name('CSI','CSI_SERIALIZED_ITEM_EXISTS');
1893: fnd_message.set_token('STATUS',l_status);
1894: l_error_message := fnd_message.get;
1895: l_return_status := l_fnd_error;
1896: RAISE fnd_api.g_exc_error;
1897: END IF; -- Usage IF
1898:
1899: END IF; -- Serialized Source Records
1900:

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

1942: IF NOT l_return_status = l_fnd_success then
1943: debug('You encountered an error in the csi_item_instance_pub.get_item_instance API '||l_msg_data);
1944: l_msg_index := 1;
1945: WHILE l_msg_count > 0 loop
1946: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1947: l_msg_index := l_msg_index + 1;
1948: l_msg_count := l_msg_count - 1;
1949: END LOOP;
1950: RAISE fnd_api.g_exc_error;

Line 1950: RAISE fnd_api.g_exc_error;

1946: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
1947: l_msg_index := l_msg_index + 1;
1948: l_msg_count := l_msg_count - 1;
1949: END LOOP;
1950: RAISE fnd_api.g_exc_error;
1951: END IF;
1952:
1953: IF l_src_instance_header_tbl.count = 0 THEN -- No Records found so Create Non Serialized Item
1954:

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

2012: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2013: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
2014: l_msg_index := 1;
2015: WHILE l_msg_count > 0 loop
2016: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2017: l_msg_index := l_msg_index + 1;
2018: l_msg_count := l_msg_count - 1;
2019: END LOOP;
2020: RAISE fnd_api.g_exc_error;

Line 2020: RAISE fnd_api.g_exc_error;

2016: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2017: l_msg_index := l_msg_index + 1;
2018: l_msg_count := l_msg_count - 1;
2019: END LOOP;
2020: RAISE fnd_api.g_exc_error;
2021: END IF;
2022:
2023: ELSIF l_src_instance_header_tbl.count = 1 THEN -- Records Found
2024:

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

2074: debug('Message Count: '||l_msg_count);
2075: debug('Return Status: '||l_return_status);
2076: l_msg_index := 1;
2077: WHILE l_msg_count > 0 loop
2078: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2079: l_msg_index := l_msg_index + 1;
2080: l_msg_count := l_msg_count - 1;
2081: END LOOP;
2082: RAISE fnd_api.g_exc_error;

Line 2082: RAISE fnd_api.g_exc_error;

2078: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2079: l_msg_index := l_msg_index + 1;
2080: l_msg_count := l_msg_count - 1;
2081: END LOOP;
2082: RAISE fnd_api.g_exc_error;
2083: END IF;
2084:
2085: ELSIF l_src_instance_header_tbl.count > 1 THEN -- Records Found
2086: -- Multiple Instances were found so throw error

Line 2095: RAISE fnd_api.g_exc_error;

2091: fnd_message.set_token('SUBINV',l_mtl_item_tbl(j).subinventory_code);
2092: fnd_message.set_token('INV_ORG_ID',l_mtl_item_tbl(j).organization_id);
2093: fnd_message.set_token('LOCATOR',l_mtl_item_tbl(j).locator_id);
2094: l_error_message := fnd_message.get;
2095: RAISE fnd_api.g_exc_error;
2096: END IF; -- End of Source Record If
2097: END IF; -- End of Serial Number if
2098: END LOOP; -- End of For Loop
2099:

Line 2104: WHEN fnd_api.g_exc_error THEN

2100: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
2101: debug('*****End of csi_inv_trxs_pkg.receipt_inventory Transaction*****');
2102:
2103: EXCEPTION
2104: WHEN fnd_api.g_exc_error THEN
2105: debug('You have encountered a "fnd_api.g_exc_error" exception');
2106: x_return_status := l_fnd_error;
2107:
2108: IF l_mtl_item_tbl.count > 0 THEN

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

2101: debug('*****End of csi_inv_trxs_pkg.receipt_inventory Transaction*****');
2102:
2103: EXCEPTION
2104: WHEN fnd_api.g_exc_error THEN
2105: debug('You have encountered a "fnd_api.g_exc_error" exception');
2106: x_return_status := l_fnd_error;
2107:
2108: IF l_mtl_item_tbl.count > 0 THEN
2109: x_trx_error_rec.serial_number := l_mtl_item_tbl(j).serial_number;

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

2168:
2169: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
2170: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_ISSUE';
2171: l_api_version NUMBER := 1.0;
2172: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2173: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2174: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2175: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2176: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;

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

2169: l_mtl_item_tbl CSI_INV_TRXS_PKG.MTL_ITEM_TBL_TYPE;
2170: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_ISSUE';
2171: l_api_version NUMBER := 1.0;
2172: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2173: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2174: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2175: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2176: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2177: l_transaction_id NUMBER := NULL;

Line 2174: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

2170: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.MISC_ISSUE';
2171: l_api_version NUMBER := 1.0;
2172: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2173: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2174: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2175: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2176: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2177: l_transaction_id NUMBER := NULL;
2178: l_object_version_number NUMBER := 1;

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

2171: l_api_version NUMBER := 1.0;
2172: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2173: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2174: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2175: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2176: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2177: l_transaction_id NUMBER := NULL;
2178: l_object_version_number NUMBER := 1;
2179: l_sysdate DATE := SYSDATE;

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

2172: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2173: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
2174: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
2175: l_active_instance_only VARCHAR2(10) := FND_API.G_TRUE;
2176: l_resolve_id_columns VARCHAR2(10) := FND_API.G_FALSE;
2177: l_transaction_id NUMBER := NULL;
2178: l_object_version_number NUMBER := 1;
2179: l_sysdate DATE := SYSDATE;
2180: l_master_organization_id NUMBER;

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

2199: l_account_tbl CSI_DATASTRUCTURES_PUB.PARTY_ACCOUNT_TBL;
2200: l_pricing_attrib_tbl CSI_DATASTRUCTURES_PUB.PRICING_ATTRIBS_TBL;
2201: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
2202: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
2203: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2204: l_fnd_warning VARCHAR2(1) := 'W';
2205: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2206: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2207: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;

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

2201: l_org_assignments_tbl CSI_DATASTRUCTURES_PUB.ORGANIZATION_UNITS_TBL;
2202: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
2203: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2204: l_fnd_warning VARCHAR2(1) := 'W';
2205: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2206: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2207: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
2208: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
2209: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;

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

2202: l_asset_assignment_tbl CSI_DATASTRUCTURES_PUB.INSTANCE_ASSET_TBL;
2203: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2204: l_fnd_warning VARCHAR2(1) := 'W';
2205: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
2206: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
2207: l_in_inventory VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_INVENTORY;
2208: l_in_process VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_PROCESS;
2209: l_out_of_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_OUT_OF_SERVICE;
2210: l_in_service VARCHAR2(25) := CSI_INV_TRXS_PKG.G_IN_SERVICE;

Line 2290: RAISE fnd_api.g_exc_error;

2286: debug('Inventory Records Found: '||l_tbl_count);
2287:
2288: IF NOT l_return_status = l_fnd_success THEN
2289: debug('You have encountered an error in CSI_INV_TRXS_PKG.get_transaction_recs, Transaction ID: '||p_transaction_id);
2290: RAISE fnd_api.g_exc_error;
2291: END IF;
2292:
2293: -- Determine Trasaction Type
2294: IF l_mtl_item_tbl(i).transaction_type_id = 8 THEN

Line 2354: RAISE fnd_api.g_exc_error;

2350: debug('Master Organization is: '||l_master_organization_id);
2351:
2352: IF NOT l_return_status = l_fnd_success THEN
2353: debug('You have encountered an error in csi_inv_trxs_pkg.get_master_organization, Organization ID: '||l_mtl_item_tbl(i).organization_id);
2354: RAISE fnd_api.g_exc_error;
2355: END IF;
2356:
2357: -- Call get_fnd_employee_id and get the employee id
2358: l_employee_id := csi_inv_trxs_pkg.get_fnd_employee_id(l_mtl_item_tbl(i).last_updated_by);

Line 2398: l_instance_status := FND_API.G_FALSE;

2394: l_neg_code := csi_inv_trxs_pkg.get_neg_inv_code(
2395: l_mtl_item_tbl(i).organization_id);
2396:
2397: IF l_neg_code = 1 AND l_mtl_item_tbl(i).serial_number is NULL THEN
2398: l_instance_status := FND_API.G_FALSE;
2399: ELSE
2400: l_instance_status := FND_API.G_TRUE;
2401: END IF;
2402:

Line 2400: l_instance_status := FND_API.G_TRUE;

2396:
2397: IF l_neg_code = 1 AND l_mtl_item_tbl(i).serial_number is NULL THEN
2398: l_instance_status := FND_API.G_FALSE;
2399: ELSE
2400: l_instance_status := FND_API.G_TRUE;
2401: END IF;
2402:
2403: debug('Negative Code is - 1 = Yes, 2 = No: '||l_neg_code);
2404:

Line 2430: RAISE fnd_api.g_exc_error;

2426:
2427: IF NOT l_return_status = l_fnd_success THEN
2428: debug('Redeploy Flag: '||l_redeploy_flag);
2429: debug('You have encountered an error in csi_inv_trxs_pkg.get_redeploy_flag: '||l_error_message);
2430: RAISE fnd_api.g_exc_error;
2431: END IF;
2432:
2433: debug('Redeploy Flag: '||l_redeploy_flag);
2434: debug('Trans Status Code: '||l_txn_rec.transaction_status_code);

Line 2497: RAISE fnd_api.g_exc_error;

2493: debug('CSI Transaction Created: '||l_txn_rec.transaction_id);
2494:
2495: IF NOT l_return_status = l_fnd_success THEN
2496: debug('You have encountered an error in csi_inv_trxs_pkg.create_csi_txn: '||p_transaction_id);
2497: RAISE fnd_api.g_exc_error;
2498: END IF;
2499:
2500: -- Now loop through the PL/SQL Table.
2501: j := 1;

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

2570: -- Check for any errors and add them to the message stack to pass out to be put into the error log table.
2571: IF NOT l_return_status = l_fnd_success then
2572: l_msg_index := 1;
2573: WHILE l_msg_count > 0 loop
2574: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2575: l_msg_index := l_msg_index + 1;
2576: l_msg_count := l_msg_count - 1;
2577: END LOOP;
2578: RAISE fnd_api.g_exc_error;

Line 2578: RAISE fnd_api.g_exc_error;

2574: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2575: l_msg_index := l_msg_index + 1;
2576: l_msg_count := l_msg_count - 1;
2577: END LOOP;
2578: RAISE fnd_api.g_exc_error;
2579: END IF;
2580:
2581: IF l_mtl_item_tbl(j).serial_number is NULL THEN
2582: IF l_src_instance_header_tbl.count = 0 THEN

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

2640: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2641: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
2642: l_msg_index := 1;
2643: WHILE l_msg_count > 0 loop
2644: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2645: l_msg_index := l_msg_index + 1;
2646: l_msg_count := l_msg_count - 1;
2647: END LOOP;
2648: RAISE fnd_api.g_exc_error;

Line 2648: RAISE fnd_api.g_exc_error;

2644: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2645: l_msg_index := l_msg_index + 1;
2646: l_msg_count := l_msg_count - 1;
2647: END LOOP;
2648: RAISE fnd_api.g_exc_error;
2649: END IF;
2650:
2651: ELSE -- No Records were found and Neg Qtys Not Allowed
2652: debug('No Records were found in Install Base and Neg Qtys not allowed to error');

Line 2655: RAISE fnd_api.g_exc_error;

2651: ELSE -- No Records were found and Neg Qtys Not Allowed
2652: debug('No Records were found in Install Base and Neg Qtys not allowed to error');
2653: fnd_message.set_name('CSI','CSI_NO_NEG_BAL_ALLOWED');
2654: l_error_message := fnd_message.get;
2655: RAISE fnd_api.g_exc_error;
2656:
2657: END IF; -- Neg Qty IF
2658:
2659: ELSE -- Non Serialized Instances Found so Update

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

2706: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2707: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
2708: l_msg_index := 1;
2709: WHILE l_msg_count > 0 loop
2710: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2711: l_msg_index := l_msg_index + 1;
2712: l_msg_count := l_msg_count - 1;
2713: END LOOP;
2714: RAISE fnd_api.g_exc_error;

Line 2714: RAISE fnd_api.g_exc_error;

2710: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2711: l_msg_index := l_msg_index + 1;
2712: l_msg_count := l_msg_count - 1;
2713: END LOOP;
2714: RAISE fnd_api.g_exc_error;
2715: END IF;
2716:
2717: END IF; -- IF Src Non Serial Recs found
2718:

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

2786: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2787: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
2788: l_msg_index := 1;
2789: WHILE l_msg_count > 0 loop
2790: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2791: l_msg_index := l_msg_index + 1;
2792: l_msg_count := l_msg_count - 1;
2793: END LOOP;
2794: RAISE fnd_api.g_exc_error;

Line 2794: RAISE fnd_api.g_exc_error;

2790: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2791: l_msg_index := l_msg_index + 1;
2792: l_msg_count := l_msg_count - 1;
2793: END LOOP;
2794: RAISE fnd_api.g_exc_error;
2795: END IF;
2796:
2797: ELSIF l_src_instance_header_tbl.count > 1 THEN
2798: -- Multiple Instances were found so throw error

Line 2806: RAISE fnd_api.g_exc_error;

2802: fnd_message.set_token('SUBINV',l_mtl_item_tbl(j).subinventory_code);
2803: fnd_message.set_token('INV_ORG_ID',l_mtl_item_tbl(j).organization_id);
2804: fnd_message.set_token('LOCATOR',l_mtl_item_tbl(j).locator_id);
2805: l_error_message := fnd_message.get;
2806: RAISE fnd_api.g_exc_error;
2807:
2808: ELSIF l_src_instance_header_tbl.count = 0 THEN
2809: debug('No Records were found in Install Base');
2810: fnd_message.set_name('CSI','CSI_IB_RECORD_NOTFOUND');

Line 2815: RAISE fnd_api.g_exc_error;

2811: fnd_message.set_token('ITEM',l_mtl_item_tbl(j).inventory_item_id);
2812: fnd_message.set_token('SUBINVENTORY',l_mtl_item_tbl(j).subinventory_code);
2813: fnd_message.set_token('ORG_ID',l_mtl_item_tbl(j).organization_id);
2814: l_error_message := fnd_message.get;
2815: RAISE fnd_api.g_exc_error;
2816: END IF; -- End of Source Record IF
2817:
2818: ELSIF l_mtl_item_tbl(j).transaction_type_id in (36,1005) AND l_serial_tagged = 2 THEN
2819: IF l_src_instance_header_tbl.count = 0 AND l_mtl_item_tbl(j).serial_number_control_code = 6 THEN

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

2877: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
2878: debug('You encountered an error in the csi_item_instance_pub.create_item_instance API '||l_msg_data);
2879: l_msg_index := 1;
2880: WHILE l_msg_count > 0 loop
2881: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2882: l_msg_index := l_msg_index + 1;
2883: l_msg_count := l_msg_count - 1;
2884: END LOOP;
2885: RAISE fnd_api.g_exc_error;

Line 2885: RAISE fnd_api.g_exc_error;

2881: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
2882: l_msg_index := l_msg_index + 1;
2883: l_msg_count := l_msg_count - 1;
2884: END LOOP;
2885: RAISE fnd_api.g_exc_error;
2886: END IF;
2887:
2888: ELSE -- No Records were found and Neg Qtys Not Allowed
2889: debug('No Records were found in Install Base and Neg Qtys not allowed to error');

Line 2892: RAISE fnd_api.g_exc_error;

2888: ELSE -- No Records were found and Neg Qtys Not Allowed
2889: debug('No Records were found in Install Base and Neg Qtys not allowed to error');
2890: fnd_message.set_name('CSI','CSI_NO_NEG_BAL_ALLOWED');
2891: l_error_message := fnd_message.get;
2892: RAISE fnd_api.g_exc_error;
2893:
2894: END IF; -- Neg Qty IF
2895:
2896: ELSE

Line 2970: FND_API.G_FALSE,

2966: l_party_query_rec,
2967: l_account_query_rec,
2968: l_transaction_id,
2969: l_resolve_id_columns,
2970: FND_API.G_FALSE,
2971: l_dest_instance_header_tbl,
2972: l_return_status,
2973: l_msg_count,
2974: l_msg_data);

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

3051: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
3052: debug('You encountered an error in the destination csi_item_instance_pub.create_item_instance API '||l_msg_data);
3053: l_msg_index := 1;
3054: WHILE l_msg_count > 0 loop
3055: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
3056: l_msg_index := l_msg_index + 1;
3057: l_msg_count := l_msg_count - 1;
3058: END LOOP;
3059: RAISE fnd_api.g_exc_error;

Line 3059: RAISE fnd_api.g_exc_error;

3055: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
3056: l_msg_index := l_msg_index + 1;
3057: l_msg_count := l_msg_count - 1;
3058: END LOOP;
3059: RAISE fnd_api.g_exc_error;
3060: END IF;
3061:
3062: debug('New instance created is: '||l_new_dest_instance_rec.instance_id);
3063:

Line 3073: l_new_dest_instance_rec.check_for_instance_expiry := FND_API.G_FALSE;

3069: --l_new_dest_instance_rec.inv_master_organization_id := l_dest_instance_header_tbl(1).inv_master_organization_id;
3070: -- Put the quantit as 1 but in expired status
3071: l_new_dest_instance_rec.quantity := 1;
3072: -- Skipping instance expiry check as the update is done only to track RTV history
3073: l_new_dest_instance_rec.check_for_instance_expiry := FND_API.G_FALSE;
3074: l_new_dest_instance_rec.object_version_number := l_dest_instance_header_tbl(1).object_version_number;
3075: END IF;
3076: -- End of Bug 13371469
3077:

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

3116: IF NOT l_return_status in (l_fnd_success,l_fnd_warning) then
3117: debug('You encountered an error in the csi_item_instance_pub.update_item_instance API '||l_msg_data);
3118: l_msg_index := 1;
3119: WHILE l_msg_count > 0 loop
3120: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
3121: l_msg_index := l_msg_index + 1;
3122: l_msg_count := l_msg_count - 1;
3123: END LOOP;
3124: RAISE fnd_api.g_exc_error;

Line 3124: RAISE fnd_api.g_exc_error;

3120: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
3121: l_msg_index := l_msg_index + 1;
3122: l_msg_count := l_msg_count - 1;
3123: END LOOP;
3124: RAISE fnd_api.g_exc_error;
3125: END IF;
3126:
3127: END IF;
3128: END IF; -- End of Serial IF

Line 3135: WHEN fnd_api.g_exc_error THEN

3131: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
3132: debug('*****End of csi_inv_trxs_pkg.misc_issue Transaction*****');
3133:
3134: EXCEPTION
3135: WHEN fnd_api.g_exc_error THEN
3136: debug('You have encountered a "fnd_api.g_exc_error" exception');
3137: x_return_status := l_fnd_error;
3138:
3139: IF l_mtl_item_tbl.count > 0 THEN

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

3132: debug('*****End of csi_inv_trxs_pkg.misc_issue Transaction*****');
3133:
3134: EXCEPTION
3135: WHEN fnd_api.g_exc_error THEN
3136: debug('You have encountered a "fnd_api.g_exc_error" exception');
3137: x_return_status := l_fnd_error;
3138:
3139: IF l_mtl_item_tbl.count > 0 THEN
3140: x_trx_error_rec.serial_number := l_mtl_item_tbl(j).serial_number;

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

3200: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.CYCLE_COUNT';
3201: l_return_status VARCHAR2(1);
3202: l_error_code VARCHAR2(50);
3203: l_error_message VARCHAR2(4000);
3204: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3205: l_fnd_warning VARCHAR2(1) := 'W';
3206: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3207: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3208: l_sql_error VARCHAR2(2000);

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

3202: l_error_code VARCHAR2(50);
3203: l_error_message VARCHAR2(4000);
3204: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3205: l_fnd_warning VARCHAR2(1) := 'W';
3206: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3207: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3208: l_sql_error VARCHAR2(2000);
3209: r_quantity NUMBER := 0;
3210: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;

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

3203: l_error_message VARCHAR2(4000);
3204: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3205: l_fnd_warning VARCHAR2(1) := 'W';
3206: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3207: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3208: l_sql_error VARCHAR2(2000);
3209: r_quantity NUMBER := 0;
3210: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;
3211:

Line 3238: RAISE fnd_api.g_exc_error;

3234: l_trx_error_rec);
3235:
3236: IF NOT l_return_status = l_fnd_success THEN
3237: debug('You have encountered an error in CSI_INV_TRXS_PKG.cycle_count');
3238: RAISE fnd_api.g_exc_error;
3239: END IF;
3240: ELSIF r_quantity < 0 then
3241: csi_inv_trxs_pkg.misc_issue(p_transaction_id,
3242: p_message_id,

Line 3248: RAISE fnd_api.g_exc_error;

3244: l_trx_error_rec);
3245:
3246: IF NOT l_return_status = l_fnd_success THEN
3247: debug('You have encountered an error in CSI_INV_TRXS_PKG.cycle_count');
3248: RAISE fnd_api.g_exc_error;
3249: END IF;
3250: END IF;
3251:
3252: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));

Line 3256: WHEN fnd_api.g_exc_error THEN

3252: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
3253: debug('*****End of csi_inv_trxs_pkg.cycle_count Transaction*****');
3254:
3255: EXCEPTION
3256: WHEN fnd_api.g_exc_error THEN
3257: debug('You have encountered a "fnd_api.g_exc_error" exception');
3258: x_return_status := l_fnd_error;
3259: l_trx_error_rec.source_type := 'CSICYCNT';
3260: x_trx_error_rec := l_trx_error_rec;

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

3253: debug('*****End of csi_inv_trxs_pkg.cycle_count Transaction*****');
3254:
3255: EXCEPTION
3256: WHEN fnd_api.g_exc_error THEN
3257: debug('You have encountered a "fnd_api.g_exc_error" exception');
3258: x_return_status := l_fnd_error;
3259: l_trx_error_rec.source_type := 'CSICYCNT';
3260: x_trx_error_rec := l_trx_error_rec;
3261:

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

3288: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.PHYSICAL_INVENTORY';
3289: l_return_status VARCHAR2(1);
3290: l_error_code VARCHAR2(50);
3291: l_error_message VARCHAR2(4000);
3292: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3293: l_fnd_warning VARCHAR2(1) := 'W';
3294: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3295: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3296: l_sql_error VARCHAR2(2000);

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

3290: l_error_code VARCHAR2(50);
3291: l_error_message VARCHAR2(4000);
3292: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3293: l_fnd_warning VARCHAR2(1) := 'W';
3294: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3295: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3296: l_sql_error VARCHAR2(2000);
3297: r_quantity NUMBER := 0;
3298: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;

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

3291: l_error_message VARCHAR2(4000);
3292: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3293: l_fnd_warning VARCHAR2(1) := 'W';
3294: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3295: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3296: l_sql_error VARCHAR2(2000);
3297: r_quantity NUMBER := 0;
3298: l_trx_error_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC;
3299:

Line 3325: RAISE fnd_api.g_exc_error;

3321: l_trx_error_rec);
3322:
3323: IF NOT l_return_status = l_fnd_success THEN
3324: debug('You have encountered an error in CSI_INV_TRXS_PKG.physical_inventory');
3325: RAISE fnd_api.g_exc_error;
3326: END IF;
3327: ELSIF r_quantity < 0 then
3328: csi_inv_trxs_pkg.misc_issue(p_transaction_id,
3329: p_message_id,

Line 3335: RAISE fnd_api.g_exc_error;

3331: l_trx_error_rec);
3332:
3333: IF NOT l_return_status = l_fnd_success THEN
3334: debug('You have encountered an error in CSI_INV_TRXS_PKG.physical_inventory');
3335: RAISE fnd_api.g_exc_error;
3336: END IF;
3337: END IF;
3338:
3339: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));

Line 3343: WHEN fnd_api.g_exc_error THEN

3339: debug('End time: '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
3340: debug('*****End of csi_inv_trxs_pkg.physical_inventory Transaction*****');
3341:
3342: EXCEPTION
3343: WHEN fnd_api.g_exc_error THEN
3344: debug('You have encountered a "fnd_api.g_exc_error" exception');
3345: x_return_status := l_fnd_error;
3346: l_trx_error_rec.source_type := 'CSIPHYIN';
3347: x_trx_error_rec := l_trx_error_rec;

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

3340: debug('*****End of csi_inv_trxs_pkg.physical_inventory Transaction*****');
3341:
3342: EXCEPTION
3343: WHEN fnd_api.g_exc_error THEN
3344: debug('You have encountered a "fnd_api.g_exc_error" exception');
3345: x_return_status := l_fnd_error;
3346: l_trx_error_rec.source_type := 'CSIPHYIN';
3347: x_trx_error_rec := l_trx_error_rec;
3348:

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

3372: x_error_message OUT NOCOPY VARCHAR2)
3373: IS
3374:
3375: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_RTV_TRANSACTION_RECS';
3376: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3377: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3378: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3379: l_sql_error VARCHAR2(2000);
3380: i PLS_INTEGER;

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

3373: IS
3374:
3375: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_RTV_TRANSACTION_RECS';
3376: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3377: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3378: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3379: l_sql_error VARCHAR2(2000);
3380: i PLS_INTEGER;
3381:

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

3374:
3375: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_RTV_TRANSACTION_RECS';
3376: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3377: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3378: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3379: l_sql_error VARCHAR2(2000);
3380: i PLS_INTEGER;
3381:
3382: CURSOR c_items IS

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

3590: x_error_message OUT NOCOPY VARCHAR2)
3591: IS
3592:
3593: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_TRANSACTION_RECS';
3594: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3595: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3596: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3597: l_sql_error VARCHAR2(2000);
3598: i PLS_INTEGER;

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

3591: IS
3592:
3593: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_TRANSACTION_RECS';
3594: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3595: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3596: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3597: l_sql_error VARCHAR2(2000);
3598: i PLS_INTEGER;
3599:

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

3592:
3593: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.GET_TRANSACTION_RECS';
3594: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3595: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
3596: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3597: l_sql_error VARCHAR2(2000);
3598: i PLS_INTEGER;
3599:
3600: CURSOR c_items IS

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

3813: x_error_message OUT NOCOPY VARCHAR2,
3814: x_mtl_trx_rec OUT NOCOPY CSI_INV_TRXS_PKG.MTL_TRX_TYPE) IS
3815:
3816: l_api_name VARCHAR2(100) := 'CSI_INV_TRXS_PKG.DECODE_MESSAGE';
3817: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
3818: l_sql_error VARCHAR2(2000);
3819:
3820: BEGIN
3821: xnp_xml_utils.decode(P_Msg_Text, 'MTL_TRANSACTION_ID', X_MTL_TRX_REC.MTL_TRANSACTION_ID);

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

3820: BEGIN
3821: xnp_xml_utils.decode(P_Msg_Text, 'MTL_TRANSACTION_ID', X_MTL_TRX_REC.MTL_TRANSACTION_ID);
3822:
3823: IF (X_MTL_TRX_REC.MTL_TRANSACTION_ID is NULL) or
3824: (X_MTL_TRX_REC.MTL_TRANSACTION_ID = FND_API.G_MISS_NUM) THEN
3825: RAISE fnd_api.g_exc_error;
3826: END IF;
3827:
3828: EXCEPTION

Line 3825: RAISE fnd_api.g_exc_error;

3821: xnp_xml_utils.decode(P_Msg_Text, 'MTL_TRANSACTION_ID', X_MTL_TRX_REC.MTL_TRANSACTION_ID);
3822:
3823: IF (X_MTL_TRX_REC.MTL_TRANSACTION_ID is NULL) or
3824: (X_MTL_TRX_REC.MTL_TRANSACTION_ID = FND_API.G_MISS_NUM) THEN
3825: RAISE fnd_api.g_exc_error;
3826: END IF;
3827:
3828: EXCEPTION
3829: WHEN fnd_api.g_exc_error THEN

Line 3829: WHEN fnd_api.g_exc_error THEN

3825: RAISE fnd_api.g_exc_error;
3826: END IF;
3827:
3828: EXCEPTION
3829: WHEN fnd_api.g_exc_error THEN
3830: fnd_message.set_name('CSI','CSI_DECODE_MGS_ERROR');
3831: fnd_message.set_token('MESSAGE_ID',p_msg_header.message_id);
3832: fnd_message.set_token('MESSAGE_CODE',p_msg_header.message_code);
3833: x_error_message := fnd_message.get;

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

4016: IS
4017:
4018: l_sql_error VARCHAR2(500);
4019: l_org_code VARCHAR2(3);
4020: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4021: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4022: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
4023: l_error_message VARCHAR2(2000);
4024: e_procedure_error EXCEPTION;

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

4017:
4018: l_sql_error VARCHAR2(500);
4019: l_org_code VARCHAR2(3);
4020: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4021: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4022: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
4023: l_error_message VARCHAR2(2000);
4024: e_procedure_error EXCEPTION;
4025:

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

4018: l_sql_error VARCHAR2(500);
4019: l_org_code VARCHAR2(3);
4020: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4021: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4022: l_fnd_unexpected VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
4023: l_error_message VARCHAR2(2000);
4024: e_procedure_error EXCEPTION;
4025:
4026: CURSOR c_name is

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

4244: RETURN l_Txn_Type_Code;
4245: END Get_Txn_Type_Code;
4246:
4247: FUNCTION Get_Txn_Status_Code(P_Txn_Status IN VARCHAR2) RETURN VARCHAR2 IS
4248: l_Txn_Status_Code VARCHAR2(30) DEFAULT FND_API.G_MISS_CHAR;
4249: BEGIN
4250: RETURN l_Txn_Status_Code;
4251: END Get_Txn_Status_Code;
4252:

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

4309: RETURN l_transaction_id;
4310: END Get_Default_Status_id;
4311:
4312: FUNCTION Get_Txn_Action_Code(P_Txn_Action IN VARCHAR2) RETURN VARCHAR2 IS
4313: l_Txn_Action_Code VARCHAR2(30) DEFAULT FND_API.G_MISS_CHAR;
4314:
4315: BEGIN
4316: RETURN l_Txn_Action_Code;
4317: END Get_Txn_Action_Code;

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

4506:
4507: PROCEDURE log_csi_error(p_trx_error_rec IN CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC) IS
4508:
4509: l_api_version NUMBER := 1.0;
4510: l_commit VARCHAR2(1) := FND_API.G_FALSE;
4511: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
4512: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
4513: l_msg_count NUMBER;
4514: l_msg_data VARCHAR2(2000);

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

4507: PROCEDURE log_csi_error(p_trx_error_rec IN CSI_DATASTRUCTURES_PUB.TRANSACTION_ERROR_REC) IS
4508:
4509: l_api_version NUMBER := 1.0;
4510: l_commit VARCHAR2(1) := FND_API.G_FALSE;
4511: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
4512: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
4513: l_msg_count NUMBER;
4514: l_msg_data VARCHAR2(2000);
4515: l_txn_error_id NUMBER;

Line 4512: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;

4508:
4509: l_api_version NUMBER := 1.0;
4510: l_commit VARCHAR2(1) := FND_API.G_FALSE;
4511: l_init_msg_list VARCHAR2(1) := FND_API.G_TRUE;
4512: l_validation_level NUMBER := FND_API.G_VALID_LEVEL_FULL;
4513: l_msg_count NUMBER;
4514: l_msg_data VARCHAR2(2000);
4515: l_txn_error_id NUMBER;
4516: l_return_status VARCHAR2(1);

Line 4533: IF NOT l_return_status = FND_API.G_RET_STS_SUCCESS THEN

4529: (l_api_version, l_init_msg_list, l_commit, l_validation_level,
4530: l_trx_error_rec, l_return_status, l_msg_count,l_msg_data,
4531: l_txn_error_id);
4532:
4533: IF NOT l_return_status = FND_API.G_RET_STS_SUCCESS THEN
4534: raise no_error_logged;
4535: END IF;
4536:
4537: EXCEPTION

Line 4542: p_transaction_id => fnd_api.g_miss_num,

4538: WHEN no_error_logged THEN
4539: BEGIN
4540: csi_txn_errors_pkg.insert_row(
4541: px_transaction_error_id => x_transaction_error_id,
4542: p_transaction_id => fnd_api.g_miss_num,
4543: p_message_id => l_trx_error_rec.message_id,
4544: p_error_text => l_trx_error_rec.error_text,
4545: p_source_type => l_trx_error_rec.source_type,
4546: p_source_id => l_trx_error_rec.source_id,

Line 4589: p_transaction_id => fnd_api.g_miss_num,

4585: WHEN OTHERS THEN
4586: BEGIN
4587: csi_txn_errors_pkg.insert_row(
4588: px_transaction_error_id => x_transaction_error_id,
4589: p_transaction_id => fnd_api.g_miss_num,
4590: p_message_id => l_trx_error_rec.message_id,
4591: p_error_text => SQLERRM,
4592: p_source_type => l_trx_error_rec.source_type,
4593: p_source_id => l_trx_error_rec.source_id,

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

4642: l_msg_index NUMBER;
4643: l_msg_data VARCHAR2(2000);
4644: l_error_message VARCHAR2(4000);
4645: l_return_status VARCHAR2(1);
4646: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4647: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4648:
4649: BEGIN
4650: px_txn_rec.transaction_date := sysdate;

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

4643: l_msg_data VARCHAR2(2000);
4644: l_error_message VARCHAR2(4000);
4645: l_return_status VARCHAR2(1);
4646: l_fnd_error VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
4647: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4648:
4649: BEGIN
4650: px_txn_rec.transaction_date := sysdate;
4651: px_txn_rec.object_version_number := 1;

Line 4654: fnd_api.g_false,

4650: px_txn_rec.transaction_date := sysdate;
4651: px_txn_rec.object_version_number := 1;
4652:
4653: csi_transactions_pvt.create_transaction(l_api_version,
4654: fnd_api.g_false,
4655: fnd_api.g_false,
4656: fnd_api.g_valid_level_full,
4657: 'N',
4658: px_txn_rec,

Line 4655: fnd_api.g_false,

4651: px_txn_rec.object_version_number := 1;
4652:
4653: csi_transactions_pvt.create_transaction(l_api_version,
4654: fnd_api.g_false,
4655: fnd_api.g_false,
4656: fnd_api.g_valid_level_full,
4657: 'N',
4658: px_txn_rec,
4659: l_return_status,

Line 4656: fnd_api.g_valid_level_full,

4652:
4653: csi_transactions_pvt.create_transaction(l_api_version,
4654: fnd_api.g_false,
4655: fnd_api.g_false,
4656: fnd_api.g_valid_level_full,
4657: 'N',
4658: px_txn_rec,
4659: l_return_status,
4660: l_msg_count,

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

4664: IF NOT l_return_status = l_fnd_success then
4665: debug('You encountered an error in the csi_transactions_pvt.create_transaction API '||l_msg_data);
4666: l_msg_index := 1;
4667: WHILE l_msg_count > 0 loop
4668: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
4669: l_msg_index := l_msg_index + 1;
4670: l_msg_count := l_msg_count - 1;
4671: END LOOP;
4672: RAISE fnd_api.g_exc_error;

Line 4672: RAISE fnd_api.g_exc_error;

4668: l_error_message := l_error_message || fnd_msg_pub.get(l_msg_index,FND_API.G_FALSE);
4669: l_msg_index := l_msg_index + 1;
4670: l_msg_count := l_msg_count - 1;
4671: END LOOP;
4672: RAISE fnd_api.g_exc_error;
4673: END IF;
4674:
4675: EXCEPTION
4676: WHEN fnd_api.g_exc_error THEN

Line 4676: WHEN fnd_api.g_exc_error THEN

4672: RAISE fnd_api.g_exc_error;
4673: END IF;
4674:
4675: EXCEPTION
4676: WHEN fnd_api.g_exc_error THEN
4677: debug('You have encountered a "fnd_api.g_exc_error" exception');
4678: x_return_status := l_fnd_error;
4679: x_error_message := l_error_message;
4680:

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

4673: END IF;
4674:
4675: EXCEPTION
4676: WHEN fnd_api.g_exc_error THEN
4677: debug('You have encountered a "fnd_api.g_exc_error" exception');
4678: x_return_status := l_fnd_error;
4679: x_error_message := l_error_message;
4680:
4681: END create_csi_txn;

Line 4729: x_return_status := fnd_api.G_RET_STS_SUCCESS ;

4725: l_issue_hz, l_misc_issue_hz) ;
4726:
4727:
4728: BEGIN
4729: x_return_status := fnd_api.G_RET_STS_SUCCESS ;
4730: x_redeploy_flag := 'N' ;
4731:
4732: l_out_of_sev := get_txn_type_id('OUT_OF_SERVICE','CSE');
4733: l_proj_insev := get_txn_type_id('PROJECT_ITEM_IN_SERVICE','CSE');

Line 4743: x_return_status := fnd_api.G_RET_STS_ERROR ;

4739: CLOSE get_redeploy_flag_cur ;
4740:
4741: EXCEPTION
4742: WHEN OTHERS THEN
4743: x_return_status := fnd_api.G_RET_STS_ERROR ;
4744: x_error_message := SQLERRM ;
4745: END get_redeploy_flag ;
4746:
4747: FUNCTION valid_ib_txn (p_transaction_id IN NUMBER) RETURN BOOLEAN IS

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

4746:
4747: FUNCTION valid_ib_txn (p_transaction_id IN NUMBER) RETURN BOOLEAN IS
4748:
4749: l_api_version NUMBER := 1.0;
4750: l_init_msg_list VARCHAR2(1) := FND_API.G_FALSE;
4751: l_msg_count NUMBER;
4752: l_msg_data VARCHAR2(2000);
4753: l_logical_trx_attr_values INV_DROPSHIP_GLOBALS.logical_trx_attr_tbl;
4754: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

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

4750: l_init_msg_list VARCHAR2(1) := FND_API.G_FALSE;
4751: l_msg_count NUMBER;
4752: l_msg_data VARCHAR2(2000);
4753: l_logical_trx_attr_values INV_DROPSHIP_GLOBALS.logical_trx_attr_tbl;
4754: l_fnd_success VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4755: l_ds_return_status VARCHAR2(30);
4756: l_source_type VARCHAR2(50) := NULL;
4757: l_type_id NUMBER := NULL;
4758: l_csi_txn_name VARCHAR2(50) := NULL;

Line 5234: x_return_status := fnd_api.g_ret_sts_success;

5230: l_returned_item varchar2(1) := 'N';
5231:
5232: BEGIN
5233:
5234: x_return_status := fnd_api.g_ret_sts_success;
5235:
5236: debug('Setting Item Control Attributes on Query Record');
5237:
5238: l_instance_query_rec := csi_inv_trxs_pkg.init_instance_query_rec;

Line 5272: NVL(l_mtl_item_tbl(table_index).serial_number,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR AND

5268: -- Bug 11695798
5269: --IF l_mtl_item_tbl(table_index).serial_number_control_code in (1,6) AND l_serial_tagged = 2 AND l_returned_item = 'N' THEN
5270: IF (l_mtl_item_tbl(table_index).serial_number_control_code in (1,6) AND l_serial_tagged = 2 AND l_returned_item = 'N')
5271: OR (l_mtl_item_tbl(table_index).serial_number_control_code in (1,6) AND
5272: NVL(l_mtl_item_tbl(table_index).serial_number,FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR AND
5273: l_returned_item = 'N') THEN
5274: l_instance_query_rec.serial_number := NULL;
5275:
5276: -- Lot Control

Line 5313: x_return_status := fnd_api.g_ret_sts_error;

5309: debug('Done setting attributes in query passing out to set the rest of the values ');
5310:
5311: EXCEPTION
5312: WHEN others THEN
5313: x_return_status := fnd_api.g_ret_sts_error;
5314:
5315: END set_item_attr_query_values;
5316:
5317: END csi_inv_trxs_pkg;