21: cEnabled VARCHAR2(1) := 'Y';
22: ece_transaction_disabled EXCEPTION;
23:
24: begin
25: ec_debug.enable_debug(i_debug_mode);
26: ec_debug.pl(0,'EC','ECE_START_INBOUND','TRANSACTION_TYPE',i_transaction_type);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
22: ece_transaction_disabled EXCEPTION;
23:
24: begin
25: ec_debug.enable_debug(i_debug_mode);
26: ec_debug.pl(0,'EC','ECE_START_INBOUND','TRANSACTION_TYPE',i_transaction_type);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
23:
24: begin
25: ec_debug.enable_debug(i_debug_mode);
26: ec_debug.pl(0,'EC','ECE_START_INBOUND','TRANSACTION_TYPE',i_transaction_type);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
24: begin
25: ec_debug.enable_debug(i_debug_mode);
26: ec_debug.pl(0,'EC','ECE_START_INBOUND','TRANSACTION_TYPE',i_transaction_type);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
25: ec_debug.enable_debug(i_debug_mode);
26: ec_debug.pl(0,'EC','ECE_START_INBOUND','TRANSACTION_TYPE',i_transaction_type);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
33: ec_debug.pl(3,'i_num_instances',i_num_instances);
26: ec_debug.pl(0,'EC','ECE_START_INBOUND','TRANSACTION_TYPE',i_transaction_type);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
33: ec_debug.pl(3,'i_num_instances',i_num_instances);
34: ec_debug.pl(3,'i_data_file_characterset',i_data_file_characterset);
27: ec_debug.push('ECEPOI.PROCESS_POI_INBOUND');
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
33: ec_debug.pl(3,'i_num_instances',i_num_instances);
34: ec_debug.pl(3,'i_data_file_characterset',i_data_file_characterset);
35: /* Check to see if the transaction is enabled. If not, abort */
28: ec_debug.pl(3,'i_file_path',i_file_path);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
33: ec_debug.pl(3,'i_num_instances',i_num_instances);
34: ec_debug.pl(3,'i_data_file_characterset',i_data_file_characterset);
35: /* Check to see if the transaction is enabled. If not, abort */
36: fnd_profile.get('ECE_' || i_transaction_type || '_ENABLED',cEnabled);
29: ec_debug.pl(3,'i_file_name',i_file_name);
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
33: ec_debug.pl(3,'i_num_instances',i_num_instances);
34: ec_debug.pl(3,'i_data_file_characterset',i_data_file_characterset);
35: /* Check to see if the transaction is enabled. If not, abort */
36: fnd_profile.get('ECE_' || i_transaction_type || '_ENABLED',cEnabled);
37: IF cEnabled = 'N' THEN
30: ec_debug.pl(3,'i_run_import',i_run_import);
31: ec_debug.pl(3,'i_map_id',i_map_id);
32: ec_debug.pl(3,'i_debug_mode',i_debug_mode);
33: ec_debug.pl(3,'i_num_instances',i_num_instances);
34: ec_debug.pl(3,'i_data_file_characterset',i_data_file_characterset);
35: /* Check to see if the transaction is enabled. If not, abort */
36: fnd_profile.get('ECE_' || i_transaction_type || '_ENABLED',cEnabled);
37: IF cEnabled = 'N' THEN
38: RAISE ece_transaction_disabled;
37: IF cEnabled = 'N' THEN
38: RAISE ece_transaction_disabled;
39: END IF;
40:
41: ec_debug.pl(0,'EC','ECE_BEGIN_STAGING','TRANSACTION_TYPE',i_transaction_type);
42:
43: select map_type into i_map_type
44: from ece_mappings
45: where map_id = i_map_id
63: i_run_id
64: );
65: END IF;
66:
67: ec_debug.pl(0,'EC','ECE_END_STAGING','TRANSACTION_TYPE',i_transaction_type);
68:
69: /**
70: Initialize the Stack Table
71: **/
70: Initialize the Stack Table
71: **/
72: ec_utils.g_stack.DELETE;
73:
74: ec_debug.pl(0,'EC','ECE_START_GENERIC_INBOUND','TRANSACTION_TYPE',i_transaction_type);
75: ece_inbound.process_run_inbound (
76: i_transaction_type => i_transaction_type,
77: i_run_id => i_run_id
78: );
76: i_transaction_type => i_transaction_type,
77: i_run_id => i_run_id
78: );
79:
80: ec_debug.pl(0,'EC','ECE_FINISH_GENERIC_INBOUND','TRANSACTION_TYPE',i_transaction_type);
81:
82: IF i_Run_Import = 'Y' THEN
83: i_Submit_ID := fnd_request.submit_request (
84: application => 'ONT',
91: argument6 => '1', -- Debug Level = 1
92: argument7 => i_num_instances -- No. of Instance to run for OIMP
93: );
94:
95: ec_debug.pl(0,'EC','ECE_EXECUTE_OPEN_INTERFACE',
96: 'TRANSACTION_TYPE',i_transaction_type,
97: 'REQUEST_ID',i_Submit_Id);
98: END IF;
99:
100: COMMIT;
101: retcode := ec_utils.i_ret_code;
102:
103: IF ec_mapping_utils.ec_get_trans_upgrade_status(i_transaction_type) = 'U' THEN
104: ec_debug.pl(0,'EC','ECE_REC_TRANS_PENDING',NULL);
105: retcode := 1;
106: END IF;
107:
108: ec_debug.pl(3,'i_submit_id',i_submit_id);
104: ec_debug.pl(0,'EC','ECE_REC_TRANS_PENDING',NULL);
105: retcode := 1;
106: END IF;
107:
108: ec_debug.pl(3,'i_submit_id',i_submit_id);
109: ec_debug.pl(3,'retcode',retcode);
110: ec_debug.pl(3,'errbuf',errbuf);
111: ec_debug.pop('ECEPOI.PROCESS_POI_INBOUND');
112:
105: retcode := 1;
106: END IF;
107:
108: ec_debug.pl(3,'i_submit_id',i_submit_id);
109: ec_debug.pl(3,'retcode',retcode);
110: ec_debug.pl(3,'errbuf',errbuf);
111: ec_debug.pop('ECEPOI.PROCESS_POI_INBOUND');
112:
113: ec_debug.pl(0,'EC','ECE_END_INBOUND','TRANSACTION_TYPE',i_transaction_type);
106: END IF;
107:
108: ec_debug.pl(3,'i_submit_id',i_submit_id);
109: ec_debug.pl(3,'retcode',retcode);
110: ec_debug.pl(3,'errbuf',errbuf);
111: ec_debug.pop('ECEPOI.PROCESS_POI_INBOUND');
112:
113: ec_debug.pl(0,'EC','ECE_END_INBOUND','TRANSACTION_TYPE',i_transaction_type);
114: ec_debug.disable_debug;
107:
108: ec_debug.pl(3,'i_submit_id',i_submit_id);
109: ec_debug.pl(3,'retcode',retcode);
110: ec_debug.pl(3,'errbuf',errbuf);
111: ec_debug.pop('ECEPOI.PROCESS_POI_INBOUND');
112:
113: ec_debug.pl(0,'EC','ECE_END_INBOUND','TRANSACTION_TYPE',i_transaction_type);
114: ec_debug.disable_debug;
115:
109: ec_debug.pl(3,'retcode',retcode);
110: ec_debug.pl(3,'errbuf',errbuf);
111: ec_debug.pop('ECEPOI.PROCESS_POI_INBOUND');
112:
113: ec_debug.pl(0,'EC','ECE_END_INBOUND','TRANSACTION_TYPE',i_transaction_type);
114: ec_debug.disable_debug;
115:
116: EXCEPTION
117: WHEN ece_transaction_disabled THEN
110: ec_debug.pl(3,'errbuf',errbuf);
111: ec_debug.pop('ECEPOI.PROCESS_POI_INBOUND');
112:
113: ec_debug.pl(0,'EC','ECE_END_INBOUND','TRANSACTION_TYPE',i_transaction_type);
114: ec_debug.disable_debug;
115:
116: EXCEPTION
117: WHEN ece_transaction_disabled THEN
118: ec_debug.pl(0,'EC','ECE_TRANSACTION_DISABLED','TRANSACTION',i_transaction_type);
114: ec_debug.disable_debug;
115:
116: EXCEPTION
117: WHEN ece_transaction_disabled THEN
118: ec_debug.pl(0,'EC','ECE_TRANSACTION_DISABLED','TRANSACTION',i_transaction_type);
119: retcode := 1;
120: ec_debug.disable_debug;
121: ROLLBACK WORK;
122:
116: EXCEPTION
117: WHEN ece_transaction_disabled THEN
118: ec_debug.pl(0,'EC','ECE_TRANSACTION_DISABLED','TRANSACTION',i_transaction_type);
119: retcode := 1;
120: ec_debug.disable_debug;
121: ROLLBACK WORK;
122:
123: WHEN EC_UTILS.PROGRAM_EXIT then
124: errbuf := ec_utils.i_errbuf;
124: errbuf := ec_utils.i_errbuf;
125: retcode := ec_utils.i_ret_code;
126: ece_flatfile_pvt.print_attributes;
127: rollback work;
128: ec_debug.disable_debug;
129:
130: WHEN OTHERS THEN
131: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
132: 'ECEPOI.PROCESS_POI_INBOUND');
127: rollback work;
128: ec_debug.disable_debug;
129:
130: WHEN OTHERS THEN
131: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
132: 'ECEPOI.PROCESS_POI_INBOUND');
133: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
134: retcode := 2;
135: rollback work;
129:
130: WHEN OTHERS THEN
131: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
132: 'ECEPOI.PROCESS_POI_INBOUND');
133: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
134: retcode := 2;
135: rollback work;
136: ece_flatfile_pvt.print_attributes;
137: ec_debug.disable_debug;
133: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
134: retcode := 2;
135: rollback work;
136: ece_flatfile_pvt.print_attributes;
137: ec_debug.disable_debug;
138:
139: END PROCESS_POI_INBOUND;
140:
141: Procedure Concat_Strings(
482: --
483: l_item_description VARCHAR2(240) := null ;
484:
485: BEGIN
486: ec_debug.pl(3,'Entering Get_Item_Description()');
487: ec_debug.pl(3,'Item Identifier Type ',p_item_identifier_type);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
483: l_item_description VARCHAR2(240) := null ;
484:
485: BEGIN
486: ec_debug.pl(3,'Entering Get_Item_Description()');
487: ec_debug.pl(3,'Item Identifier Type ',p_item_identifier_type);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
491: ec_debug.pl(3,'Org ID ',p_org_id);
484:
485: BEGIN
486: ec_debug.pl(3,'Entering Get_Item_Description()');
487: ec_debug.pl(3,'Item Identifier Type ',p_item_identifier_type);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
491: ec_debug.pl(3,'Org ID ',p_org_id);
492: ec_debug.pl(3,'Ordered Item ',p_ordered_item);
485: BEGIN
486: ec_debug.pl(3,'Entering Get_Item_Description()');
487: ec_debug.pl(3,'Item Identifier Type ',p_item_identifier_type);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
491: ec_debug.pl(3,'Org ID ',p_org_id);
492: ec_debug.pl(3,'Ordered Item ',p_ordered_item);
493:
486: ec_debug.pl(3,'Entering Get_Item_Description()');
487: ec_debug.pl(3,'Item Identifier Type ',p_item_identifier_type);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
491: ec_debug.pl(3,'Org ID ',p_org_id);
492: ec_debug.pl(3,'Ordered Item ',p_ordered_item);
493:
494: l_organization_id := oe_sys_parameters.value('MASTER_ORGANIZATION_ID', p_org_id);
487: ec_debug.pl(3,'Item Identifier Type ',p_item_identifier_type);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
491: ec_debug.pl(3,'Org ID ',p_org_id);
492: ec_debug.pl(3,'Ordered Item ',p_ordered_item);
493:
494: l_organization_id := oe_sys_parameters.value('MASTER_ORGANIZATION_ID', p_org_id);
495: ec_debug.pl(3,'Organization ID ',l_organization_ID);
488: ec_debug.pl(3,'Inventory Item ID ',p_inventory_item_id);
489: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
490: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
491: ec_debug.pl(3,'Org ID ',p_org_id);
492: ec_debug.pl(3,'Ordered Item ',p_ordered_item);
493:
494: l_organization_id := oe_sys_parameters.value('MASTER_ORGANIZATION_ID', p_org_id);
495: ec_debug.pl(3,'Organization ID ',l_organization_ID);
496:
491: ec_debug.pl(3,'Org ID ',p_org_id);
492: ec_debug.pl(3,'Ordered Item ',p_ordered_item);
493:
494: l_organization_id := oe_sys_parameters.value('MASTER_ORGANIZATION_ID', p_org_id);
495: ec_debug.pl(3,'Organization ID ',l_organization_ID);
496:
497: IF (p_item_identifier_type) = 'INT' THEN
498: SELECT description
499: INTO x_item_description
501: WHERE inventory_item_id = p_inventory_item_id
502: AND organization_id = l_organization_id;
503:
504: ELSIF NVL(p_item_identifier_type,'INT') = 'CUST' THEN
505: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
506: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
507:
508: SELECT citems.customer_item_desc
509: INTO l_item_description
502: AND organization_id = l_organization_id;
503:
504: ELSIF NVL(p_item_identifier_type,'INT') = 'CUST' THEN
505: ec_debug.pl(3,'Ordered Item ID ',p_ordered_item_id);
506: ec_debug.pl(3,'Sold to Org ID ',p_sold_to_org_id);
507:
508: SELECT citems.customer_item_desc
509: INTO l_item_description
510: FROM mtl_customer_items citems
542: AND items.cross_reference = p_ordered_item -- check that how ordered_item_id can be used
543: AND ROWNUM = 1;
544:
545: END IF;
546: ec_debug.pl(3,'Item Description is : ',X_ITEM_DESCRIPTION ) ;
547: EXCEPTION
548: WHEN NO_DATA_FOUND THEN
549: ec_debug.pl(3,'When no data found then get desc from system items ',SQLERRM);
550: begin --bug7554911
545: END IF;
546: ec_debug.pl(3,'Item Description is : ',X_ITEM_DESCRIPTION ) ;
547: EXCEPTION
548: WHEN NO_DATA_FOUND THEN
549: ec_debug.pl(3,'When no data found then get desc from system items ',SQLERRM);
550: begin --bug7554911
551: SELECT sitems.description
552: INTO x_item_description
553: FROM mtl_system_items_vl sitems