45: ORDER BY line_id;
46:
47: BEGIN
48: xProgress := 'POO-10-1000';
49: ec_debug.enable_debug(v_debug_mode);
50: if ec_debug.G_debug_level >= 2 then
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
46:
47: BEGIN
48: xProgress := 'POO-10-1000';
49: ec_debug.enable_debug(v_debug_mode);
50: if ec_debug.G_debug_level >= 2 then
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
47: BEGIN
48: xProgress := 'POO-10-1000';
49: ec_debug.enable_debug(v_debug_mode);
50: if ec_debug.G_debug_level >= 2 then
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
48: xProgress := 'POO-10-1000';
49: ec_debug.enable_debug(v_debug_mode);
50: if ec_debug.G_debug_level >= 2 then
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
49: ec_debug.enable_debug(v_debug_mode);
50: if ec_debug.G_debug_level >= 2 then
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
50: if ec_debug.G_debug_level >= 2 then
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
51: ec_debug.push('ECE_POO.Extract_POO_Outbound');
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
52: ec_debug.pl(3,'cOutput_Path: ' ,cOutput_Path);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
60: ec_debug.pl(3,'cVendor_Site_Code: ',cVendor_Site_Code);
53: ec_debug.pl(3,'cOutput_Filename: ' ,cOutput_Filename);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
60: ec_debug.pl(3,'cVendor_Site_Code: ',cVendor_Site_Code);
61: ec_debug.pl(3,'v_debug_mode: ' ,v_debug_mode);
54: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
60: ec_debug.pl(3,'cVendor_Site_Code: ',cVendor_Site_Code);
61: ec_debug.pl(3,'v_debug_mode: ' ,v_debug_mode);
62: end if;
55: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
60: ec_debug.pl(3,'cVendor_Site_Code: ',cVendor_Site_Code);
61: ec_debug.pl(3,'v_debug_mode: ' ,v_debug_mode);
62: end if;
63: /* Check to see if the transaction is enabled. If not, abort */
56: ec_debug.pl(3,'cCDate_From: ' ,cCDate_From);
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
60: ec_debug.pl(3,'cVendor_Site_Code: ',cVendor_Site_Code);
61: ec_debug.pl(3,'v_debug_mode: ' ,v_debug_mode);
62: end if;
63: /* Check to see if the transaction is enabled. If not, abort */
64: xProgress := 'POO-10-1005';
57: ec_debug.pl(3,'cCDate_To: ' ,cCDate_To);
58: ec_debug.pl(3,'cPC_Type: ' ,cPC_Type);
59: ec_debug.pl(3,'cVendor_Name: ' ,cVendor_Name);
60: ec_debug.pl(3,'cVendor_Site_Code: ',cVendor_Site_Code);
61: ec_debug.pl(3,'v_debug_mode: ' ,v_debug_mode);
62: end if;
63: /* Check to see if the transaction is enabled. If not, abort */
64: xProgress := 'POO-10-1005';
65: fnd_profile.get('ECE_' || cTransaction_Type || '_ENABLED',cEnabled);
77: FROM DUAL;
78:
79: EXCEPTION
80: WHEN NO_DATA_FOUND THEN
81: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_OUTPUT_RUNS_S');
82:
83: END;
84:
85: xProgress := 'POO-10-1025';
82:
83: END;
84:
85: xProgress := 'POO-10-1025';
86: if ec_debug.G_debug_level >= 1 then
87: ec_debug.pl(3,'iRun_id: ',iRun_id);
88: ec_debug.pl(1,'EC','ECE_POO_START',NULL);
89: ec_debug.pl(1,'EC','ECE_RUN_ID','RUN_ID',iRun_id);
90: end if;
83: END;
84:
85: xProgress := 'POO-10-1025';
86: if ec_debug.G_debug_level >= 1 then
87: ec_debug.pl(3,'iRun_id: ',iRun_id);
88: ec_debug.pl(1,'EC','ECE_POO_START',NULL);
89: ec_debug.pl(1,'EC','ECE_RUN_ID','RUN_ID',iRun_id);
90: end if;
91:
84:
85: xProgress := 'POO-10-1025';
86: if ec_debug.G_debug_level >= 1 then
87: ec_debug.pl(3,'iRun_id: ',iRun_id);
88: ec_debug.pl(1,'EC','ECE_POO_START',NULL);
89: ec_debug.pl(1,'EC','ECE_RUN_ID','RUN_ID',iRun_id);
90: end if;
91:
92:
85: xProgress := 'POO-10-1025';
86: if ec_debug.G_debug_level >= 1 then
87: ec_debug.pl(3,'iRun_id: ',iRun_id);
88: ec_debug.pl(1,'EC','ECE_POO_START',NULL);
89: ec_debug.pl(1,'EC','ECE_RUN_ID','RUN_ID',iRun_id);
90: end if;
91:
92:
93: xProgress := 'POO-10-1026';
101: END IF;
102:
103: -- Open the file for write.
104: xProgress := 'POO-10-1030';
105: if ec_debug.G_debug_level = 1 then
106: ec_debug.pl(1,'Output File:',cFilename);
107: ec_debug.pl(1,'Open Output file'); --Bug 2034376
108: end if;
109: i_path := cOutput_Path;
102:
103: -- Open the file for write.
104: xProgress := 'POO-10-1030';
105: if ec_debug.G_debug_level = 1 then
106: ec_debug.pl(1,'Output File:',cFilename);
107: ec_debug.pl(1,'Open Output file'); --Bug 2034376
108: end if;
109: i_path := cOutput_Path;
110: i_filename := cFilename;
103: -- Open the file for write.
104: xProgress := 'POO-10-1030';
105: if ec_debug.G_debug_level = 1 then
106: ec_debug.pl(1,'Output File:',cFilename);
107: ec_debug.pl(1,'Open Output file'); --Bug 2034376
108: end if;
109: i_path := cOutput_Path;
110: i_filename := cFilename;
111: -- ece_poo_transaction.uFile_type := utl_file.fopen(cOutput_Path,cFilename,'W',32767); --Bug 2887790
110: i_filename := cFilename;
111: -- ece_poo_transaction.uFile_type := utl_file.fopen(cOutput_Path,cFilename,'W',32767); --Bug 2887790
112:
113: xProgress := 'POO-10-1040';
114: if ec_debug.G_debug_level = 1 then
115: ec_debug.pl(1,'Call Populate Poo Trx procedure'); --Bug 2034376
116: end if;
117:
118: ece_poo_transaction.populate_poo_trx(
111: -- ece_poo_transaction.uFile_type := utl_file.fopen(cOutput_Path,cFilename,'W',32767); --Bug 2887790
112:
113: xProgress := 'POO-10-1040';
114: if ec_debug.G_debug_level = 1 then
115: ec_debug.pl(1,'Call Populate Poo Trx procedure'); --Bug 2034376
116: end if;
117:
118: ece_poo_transaction.populate_poo_trx(
119: cCommunication_Method,
133: cPO_Number_From,
134: cPO_Number_To);
135:
136: /* xProgress := 'POO-10-1035';
137: if ec_debug.G_debug_level = 1 then
138: ec_debug.pl(1,'Call Put To Output Table procedure'); --Bug 2034376
139: end if;
140:
141: select count(*)
134: cPO_Number_To);
135:
136: /* xProgress := 'POO-10-1035';
137: if ec_debug.G_debug_level = 1 then
138: ec_debug.pl(1,'Call Put To Output Table procedure'); --Bug 2034376
139: end if;
140:
141: select count(*)
142: into xHeaderCount
142: into xHeaderCount
143: from ECE_PO_INTERFACE_HEADERS
144: where run_id = iRun_id;
145: */
146: if ec_debug.G_debug_level = 1 then
147: ec_debug.pl(1,'NUMBER OF RECORDS PROCESSED IS ',xHeaderCount);
148: end if;
149:
150:
143: from ECE_PO_INTERFACE_HEADERS
144: where run_id = iRun_id;
145: */
146: if ec_debug.G_debug_level = 1 then
147: ec_debug.pl(1,'NUMBER OF RECORDS PROCESSED IS ',xHeaderCount);
148: end if;
149:
150:
151:
170: utl_file.fclose(ece_poo_transaction.uFile_type);
171: end if;
172:
173: IF ec_mapping_utils.ec_get_trans_upgrade_status(cTransaction_Type) = 'U' THEN
174: ec_debug.pl(0,'EC','ECE_REC_TRANS_PENDING',NULL);
175: retcode := 1;
176: END IF;
177:
178: if ec_debug.G_debug_level >= 2 then
174: ec_debug.pl(0,'EC','ECE_REC_TRANS_PENDING',NULL);
175: retcode := 1;
176: END IF;
177:
178: if ec_debug.G_debug_level >= 2 then
179: ec_debug.pop('ECE_POO.Extract_POO_Outbound');
180: end if;
181:
182: ec_debug.disable_debug;
175: retcode := 1;
176: END IF;
177:
178: if ec_debug.G_debug_level >= 2 then
179: ec_debug.pop('ECE_POO.Extract_POO_Outbound');
180: end if;
181:
182: ec_debug.disable_debug;
183:
178: if ec_debug.G_debug_level >= 2 then
179: ec_debug.pop('ECE_POO.Extract_POO_Outbound');
180: end if;
181:
182: ec_debug.disable_debug;
183:
184: COMMIT;
185:
186:
185:
186:
187: EXCEPTION
188: WHEN ece_transaction_disabled THEN
189: ec_debug.pl(0,'EC','ECE_TRANSACTION_DISABLED','TRANSACTION',cTransaction_type);
190: retcode := 1;
191: ec_debug.disable_debug;
192: ROLLBACK;
193:
187: EXCEPTION
188: WHEN ece_transaction_disabled THEN
189: ec_debug.pl(0,'EC','ECE_TRANSACTION_DISABLED','TRANSACTION',cTransaction_type);
190: retcode := 1;
191: ec_debug.disable_debug;
192: ROLLBACK;
193:
194: WHEN utl_file.write_error THEN
195: ec_debug.pl(0,'EC','ECE_UTL_WRITE_ERROR',NULL);
191: ec_debug.disable_debug;
192: ROLLBACK;
193:
194: WHEN utl_file.write_error THEN
195: ec_debug.pl(0,'EC','ECE_UTL_WRITE_ERROR',NULL);
196: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
197:
198: retcode := 2;
199: ec_debug.disable_debug;
192: ROLLBACK;
193:
194: WHEN utl_file.write_error THEN
195: ec_debug.pl(0,'EC','ECE_UTL_WRITE_ERROR',NULL);
196: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
197:
198: retcode := 2;
199: ec_debug.disable_debug;
200: if (utl_file.is_open(ece_poo_transaction.uFile_type))
195: ec_debug.pl(0,'EC','ECE_UTL_WRITE_ERROR',NULL);
196: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
197:
198: retcode := 2;
199: ec_debug.disable_debug;
200: if (utl_file.is_open(ece_poo_transaction.uFile_type))
201: then
202: utl_file.fclose(ece_poo_transaction.uFile_type);
203: end if;
205: utl_file.fclose(ece_poo_transaction.uFile_type);
206: ROLLBACK;
207:
208: WHEN utl_file.invalid_path THEN
209: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_PATH',NULL);
210: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
211:
212: retcode := 2;
213: ec_debug.disable_debug;
206: ROLLBACK;
207:
208: WHEN utl_file.invalid_path THEN
209: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_PATH',NULL);
210: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
211:
212: retcode := 2;
213: ec_debug.disable_debug;
214: ROLLBACK;
209: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_PATH',NULL);
210: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
211:
212: retcode := 2;
213: ec_debug.disable_debug;
214: ROLLBACK;
215:
216: WHEN utl_file.invalid_operation THEN
217: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
213: ec_debug.disable_debug;
214: ROLLBACK;
215:
216: WHEN utl_file.invalid_operation THEN
217: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
218: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
219:
220: retcode := 2;
221: ec_debug.disable_debug;
214: ROLLBACK;
215:
216: WHEN utl_file.invalid_operation THEN
217: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
218: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
219:
220: retcode := 2;
221: ec_debug.disable_debug;
222: if (utl_file.is_open(ece_poo_transaction.uFile_type))
217: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
218: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
219:
220: retcode := 2;
221: ec_debug.disable_debug;
222: if (utl_file.is_open(ece_poo_transaction.uFile_type))
223: then
224: utl_file.fclose(ece_poo_transaction.uFile_type);
225: end if;
227: utl_file.fclose(ece_poo_transaction.uFile_type);
228: ROLLBACK;
229:
230: WHEN OTHERS THEN
231: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
232: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
233:
234: retcode := 2;
235: ec_debug.disable_debug;
228: ROLLBACK;
229:
230: WHEN OTHERS THEN
231: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
232: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
233:
234: retcode := 2;
235: ec_debug.disable_debug;
236: if (utl_file.is_open(ece_poo_transaction.uFile_type))
231: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
232: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
233:
234: retcode := 2;
235: ec_debug.disable_debug;
236: if (utl_file.is_open(ece_poo_transaction.uFile_type))
237: then
238: utl_file.fclose(ece_poo_transaction.uFile_type);
239: end if;
498: FROM po_line_locations
499: WHERE po_line_id = p_line_id;
500:
501: BEGIN
502: if ec_debug.G_debug_level >= 2 then
503: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
499: WHERE po_line_id = p_line_id;
500:
501: BEGIN
502: if ec_debug.G_debug_level >= 2 then
503: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
500:
501: BEGIN
502: if ec_debug.G_debug_level >= 2 then
503: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
501: BEGIN
502: if ec_debug.G_debug_level >= 2 then
503: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
502: if ec_debug.G_debug_level >= 2 then
503: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
503: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
504: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
505: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
506: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
507: ec_debug.pl(3,'dTransaction_date: ' ,dTransaction_date);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
508: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
509: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
510: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
518: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
511: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
518: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
519: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
512: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
518: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
519: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
520: end if;
513: ec_debug.pl(3,'cCreate_Date_From: ' ,cCreate_Date_From);
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
518: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
519: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
520: end if;
521:
514: ec_debug.pl(3,'cCreate_Date_To: ' ,cCreate_Date_To);
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
518: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
519: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
520: end if;
521:
522: xProgress := 'POOB-10-1000';
515: ec_debug.pl(3,'cSupplier_Name: ' ,cSupplier_Name);
516: ec_debug.pl(3,'cSupplier_Site: ' ,cSupplier_Site);
517: ec_debug.pl(3,'cDocument_Type: ' ,cDocument_Type);
518: ec_debug.pl(3,'cPO_Number_From: ' ,cPO_Number_From);
519: ec_debug.pl(3,'cPO_Number_To: ' ,cPO_Number_To);
520: end if;
521:
522: xProgress := 'POOB-10-1000';
523: BEGIN
526: FROM financials_system_parameters;
527:
528: EXCEPTION
529: WHEN NO_DATA_FOUND THEN
530: ec_debug.pl(0,
531: 'EC',
532: 'ECE_NO_ROW_SELECTED',
533: 'PROGRESS_LEVEL',
534: xProgress,
536: 'INVENTORY ORGANIZATION ID',
537: 'TABLE_NAME',
538: 'FINANCIALS_SYSTEM_PARAMETERS');
539: END;
540: if ec_debug.G_debug_level = 3 then
541: ec_debug.pl(3,'norganization_id: ',norganization_id);
542: end if;
543: --Bug 1891291 begin
544: -- Let's See if Project Accounting is Installed
537: 'TABLE_NAME',
538: 'FINANCIALS_SYSTEM_PARAMETERS');
539: END;
540: if ec_debug.G_debug_level = 3 then
541: ec_debug.pl(3,'norganization_id: ',norganization_id);
542: end if;
543: --Bug 1891291 begin
544: -- Let's See if Project Accounting is Installed
545: xProgress := 'POOB-10-1001';
549: v_project_acct_industry,
550: v_project_acct_schema);
551:
552: v_project_acct_status := NVL(v_project_acct_status,'X');
553: ec_debug.pl(3,'v_project_acct_status: ' ,v_project_acct_status);
554: ec_debug.pl(3,'v_project_acct_industry: ',v_project_acct_industry);
555: ec_debug.pl(3,'v_project_acct_schema: ' ,v_project_acct_schema);
556: */
557: --Bug 1891291 end
550: v_project_acct_schema);
551:
552: v_project_acct_status := NVL(v_project_acct_status,'X');
553: ec_debug.pl(3,'v_project_acct_status: ' ,v_project_acct_status);
554: ec_debug.pl(3,'v_project_acct_industry: ',v_project_acct_industry);
555: ec_debug.pl(3,'v_project_acct_schema: ' ,v_project_acct_schema);
556: */
557: --Bug 1891291 end
558: -- Get Profile Option Values for Attachments
551:
552: v_project_acct_status := NVL(v_project_acct_status,'X');
553: ec_debug.pl(3,'v_project_acct_status: ' ,v_project_acct_status);
554: ec_debug.pl(3,'v_project_acct_industry: ',v_project_acct_industry);
555: ec_debug.pl(3,'v_project_acct_schema: ' ,v_project_acct_schema);
556: */
557: --Bug 1891291 end
558: -- Get Profile Option Values for Attachments
559: xProgress := 'POOB-10-1002';
580: END IF;
581:
582: EXCEPTION
583: WHEN value_error OR invalid_number THEN
584: ec_debug.pl(0,'EC','ECE_INVALID_SEGMENT_NUM','SEGMENT_VALUE',n_att_seg_size,'SEGMENT_DEFAULT',G_DEFAULT_ATT_SEG_SIZE);
585: n_att_seg_size := G_DEFAULT_ATT_SEG_SIZE;
586: END;
587: END IF;
588: if ec_debug.G_debug_level = 3 then
584: ec_debug.pl(0,'EC','ECE_INVALID_SEGMENT_NUM','SEGMENT_VALUE',n_att_seg_size,'SEGMENT_DEFAULT',G_DEFAULT_ATT_SEG_SIZE);
585: n_att_seg_size := G_DEFAULT_ATT_SEG_SIZE;
586: END;
587: END IF;
588: if ec_debug.G_debug_level = 3 then
589: ec_debug.pl(3,'v_header_att_enabled: ',v_header_att_enabled);
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
585: n_att_seg_size := G_DEFAULT_ATT_SEG_SIZE;
586: END;
587: END IF;
588: if ec_debug.G_debug_level = 3 then
589: ec_debug.pl(3,'v_header_att_enabled: ',v_header_att_enabled);
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
586: END;
587: END IF;
588: if ec_debug.G_debug_level = 3 then
589: ec_debug.pl(3,'v_header_att_enabled: ',v_header_att_enabled);
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
594: ec_debug.pl(3,'v_att_enabled: ' ,v_att_enabled);
587: END IF;
588: if ec_debug.G_debug_level = 3 then
589: ec_debug.pl(3,'v_header_att_enabled: ',v_header_att_enabled);
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
594: ec_debug.pl(3,'v_att_enabled: ' ,v_att_enabled);
595: ec_debug.pl(3,'n_att_seg_size: ' ,n_att_seg_size);
588: if ec_debug.G_debug_level = 3 then
589: ec_debug.pl(3,'v_header_att_enabled: ',v_header_att_enabled);
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
594: ec_debug.pl(3,'v_att_enabled: ' ,v_att_enabled);
595: ec_debug.pl(3,'n_att_seg_size: ' ,n_att_seg_size);
596: end if;
589: ec_debug.pl(3,'v_header_att_enabled: ',v_header_att_enabled);
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
594: ec_debug.pl(3,'v_att_enabled: ' ,v_att_enabled);
595: ec_debug.pl(3,'n_att_seg_size: ' ,n_att_seg_size);
596: end if;
597:
590: ec_debug.pl(3,'v_line_att_enabled: ' ,v_line_att_enabled);
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
594: ec_debug.pl(3,'v_att_enabled: ' ,v_att_enabled);
595: ec_debug.pl(3,'n_att_seg_size: ' ,n_att_seg_size);
596: end if;
597:
598: xProgress := 'POOB-10-1010';
591: ec_debug.pl(3,'v_mitem_att_enabled: ' ,v_mitem_att_enabled);
592: ec_debug.pl(3,'v_iitem_att_enabled: ' ,v_iitem_att_enabled);
593: ec_debug.pl(3,'v_ship_att_enabled: ' ,v_ship_att_enabled);
594: ec_debug.pl(3,'v_att_enabled: ' ,v_att_enabled);
595: ec_debug.pl(3,'n_att_seg_size: ' ,n_att_seg_size);
596: end if;
597:
598: xProgress := 'POOB-10-1010';
599: ece_flatfile_pvt.init_table(cTransaction_Type,cHeader_Interface,NULL,FALSE,l_header_tbl,l_key_tbl);
602: l_key_tbl := l_header_tbl;
603:
604: xProgress := 'POOB-10-1025';
605: --iKey_count := l_header_tbl.COUNT;
606: --ec_debug.pl(3,'iKey_count: ',iKey_count );
607:
608: xProgress := 'POOB-10-1030';
609: ece_flatfile_pvt.init_table(cTransaction_Type,cLine_Interface,NULL,TRUE,l_line_tbl,l_key_tbl);
610:
824:
825: cShipment_select := cShipment_select ||
826: cShipment_from ||
827: cShipment_where;
828: if ec_debug.G_debug_level = 3 then
829: ec_debug.pl(3,'cHeader_select: ',cHeader_select);
830: ec_debug.pl(3,'cLine_select: ',cLine_select);
831: ec_debug.pl(3,'cShipment_select: ',cShipment_select);
832: end if;
825: cShipment_select := cShipment_select ||
826: cShipment_from ||
827: cShipment_where;
828: if ec_debug.G_debug_level = 3 then
829: ec_debug.pl(3,'cHeader_select: ',cHeader_select);
830: ec_debug.pl(3,'cLine_select: ',cLine_select);
831: ec_debug.pl(3,'cShipment_select: ',cShipment_select);
832: end if;
833: -- ***************************************************
826: cShipment_from ||
827: cShipment_where;
828: if ec_debug.G_debug_level = 3 then
829: ec_debug.pl(3,'cHeader_select: ',cHeader_select);
830: ec_debug.pl(3,'cLine_select: ',cLine_select);
831: ec_debug.pl(3,'cShipment_select: ',cShipment_select);
832: end if;
833: -- ***************************************************
834: -- *** Get data setup for the dynamic SQL call.
827: cShipment_where;
828: if ec_debug.G_debug_level = 3 then
829: ec_debug.pl(3,'cHeader_select: ',cHeader_select);
830: ec_debug.pl(3,'cLine_select: ',cLine_select);
831: ec_debug.pl(3,'cShipment_select: ',cShipment_select);
832: end if;
833: -- ***************************************************
834: -- *** Get data setup for the dynamic SQL call.
835: -- *** Open a cursor for each of the SELECT call
900:
901:
902: xProgress := 'POOB-10-1280';
903: iShipment_count := l_shipment_tbl.COUNT;
904: if ec_debug.G_debug_level = 3 then
905: ec_debug.pl(3,'iHeader_count: ',iHeader_count);
906: ec_debug.pl(3,'iLine_count: ',iLine_count);
907: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
908: end if;
901:
902: xProgress := 'POOB-10-1280';
903: iShipment_count := l_shipment_tbl.COUNT;
904: if ec_debug.G_debug_level = 3 then
905: ec_debug.pl(3,'iHeader_count: ',iHeader_count);
906: ec_debug.pl(3,'iLine_count: ',iLine_count);
907: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
908: end if;
909:
902: xProgress := 'POOB-10-1280';
903: iShipment_count := l_shipment_tbl.COUNT;
904: if ec_debug.G_debug_level = 3 then
905: ec_debug.pl(3,'iHeader_count: ',iHeader_count);
906: ec_debug.pl(3,'iLine_count: ',iLine_count);
907: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
908: end if;
909:
910: -- ******************************************************
903: iShipment_count := l_shipment_tbl.COUNT;
904: if ec_debug.G_debug_level = 3 then
905: ec_debug.pl(3,'iHeader_count: ',iHeader_count);
906: ec_debug.pl(3,'iLine_count: ',iLine_count);
907: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
908: end if;
909:
910: -- ******************************************************
911: -- Define TYPE for every columns in the SELECT statement
1111:
1112: xProgress := 'POOB-10-1449';
1113: ece_flatfile_pvt.find_pos(l_line_tbl,'UOM_CODE',nLine_uom_pos);
1114:
1115: if ec_debug.G_debug_level = 3 then
1116: ec_debug.pl(3,'n_trx_date_pos: ',n_trx_date_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1112: xProgress := 'POOB-10-1449';
1113: ece_flatfile_pvt.find_pos(l_line_tbl,'UOM_CODE',nLine_uom_pos);
1114:
1115: if ec_debug.G_debug_level = 3 then
1116: ec_debug.pl(3,'n_trx_date_pos: ',n_trx_date_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1113: ece_flatfile_pvt.find_pos(l_line_tbl,'UOM_CODE',nLine_uom_pos);
1114:
1115: if ec_debug.G_debug_level = 3 then
1116: ec_debug.pl(3,'n_trx_date_pos: ',n_trx_date_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1114:
1115: if ec_debug.G_debug_level = 3 then
1116: ec_debug.pl(3,'n_trx_date_pos: ',n_trx_date_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1115: if ec_debug.G_debug_level = 3 then
1116: ec_debug.pl(3,'n_trx_date_pos: ',n_trx_date_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1116: ec_debug.pl(3,'n_trx_date_pos: ',n_trx_date_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1117: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1118: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1126: ec_debug.pl(3,'nItem_id_pos: ',nItem_id_pos);
1119: ec_debug.pl(3,'nPO_Number_pos: ',nPO_Number_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1126: ec_debug.pl(3,'nItem_id_pos: ',nItem_id_pos);
1127: ec_debug.pl(3,'nShip_Line_Location_ID_pos: ',nShip_Line_Location_ID_pos);
1120: ec_debug.pl(3,'nPO_Type_pos: ',nPO_Type_pos);
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1126: ec_debug.pl(3,'nItem_id_pos: ',nItem_id_pos);
1127: ec_debug.pl(3,'nShip_Line_Location_ID_pos: ',nShip_Line_Location_ID_pos);
1128: end if;
1121: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1126: ec_debug.pl(3,'nItem_id_pos: ',nItem_id_pos);
1127: ec_debug.pl(3,'nShip_Line_Location_ID_pos: ',nShip_Line_Location_ID_pos);
1128: end if;
1129:
1122: ec_debug.pl(3,'nRelease_id_pos: ',nRelease_id_pos);
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1126: ec_debug.pl(3,'nItem_id_pos: ',nItem_id_pos);
1127: ec_debug.pl(3,'nShip_Line_Location_ID_pos: ',nShip_Line_Location_ID_pos);
1128: end if;
1129:
1130: -- Timezone enhancement
1123: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
1124: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
1125: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
1126: ec_debug.pl(3,'nItem_id_pos: ',nItem_id_pos);
1127: ec_debug.pl(3,'nShip_Line_Location_ID_pos: ',nShip_Line_Location_ID_pos);
1128: end if;
1129:
1130: -- Timezone enhancement
1131: xProgress := 'POOB-TZ-1000';
1306:
1307: -- dbms_sql.bind_variable(line_sel_c,'l_nOrganization_ID',nOrganization_ID);
1308:
1309: iKey_count := 0;
1310: if ec_debug.G_debug_level = 3 then
1311: ec_debug.pl(3,'iKey_count: ',iKey_count);
1312: end if;
1313:
1314: -- EXECUTE the SELECT statement
1307: -- dbms_sql.bind_variable(line_sel_c,'l_nOrganization_ID',nOrganization_ID);
1308:
1309: iKey_count := 0;
1310: if ec_debug.G_debug_level = 3 then
1311: ec_debug.pl(3,'iKey_count: ',iKey_count);
1312: end if;
1313:
1314: -- EXECUTE the SELECT statement
1315: xProgress := 'POOB-10-1408';
1357: FROM DUAL;
1358:
1359: EXCEPTION
1360: WHEN NO_DATA_FOUND THEN
1361: ec_debug.pl(0,
1362: 'EC',
1363: 'ECE_DECODE_FAILED',
1364: 'PROGRESS_LEVEL',
1365: xProgress,
1365: xProgress,
1366: 'CODE',
1367: l_header_tbl(nDocument_type_pos).value);
1368: END;
1369: if ec_debug.G_debug_level = 3 then
1370: ec_debug.pl(3, 'l_document_type: ',l_document_type);
1371: end if;
1372: xProgress := 'POOB-10-1450';
1373:
1366: 'CODE',
1367: l_header_tbl(nDocument_type_pos).value);
1368: END;
1369: if ec_debug.G_debug_level = 3 then
1370: ec_debug.pl(3, 'l_document_type: ',l_document_type);
1371: end if;
1372: xProgress := 'POOB-10-1450';
1373:
1374:
1457: FROM DUAL;
1458:
1459: EXCEPTION
1460: WHEN NO_DATA_FOUND THEN
1461: ec_debug.pl(0,
1462: 'EC',
1463: 'ECE_GET_NEXT_SEQ_FAILED',
1464: 'PROGRESS_LEVEL',
1465: xProgress,
1466: 'SEQ',
1467: 'ECE_POO_HEADER_S');
1468:
1469: END;
1470: ec_debug.pl(3,'l_header_fkey: ',l_header_fkey);
1471: --2823215
1472: xProgress := 'POOB-10-1490';
1473:
1474: c_file_common_key := RPAD(SUBSTRB(NVL(l_header_tbl(nTrans_code_pos).value,' '),1,25),25);
1476: xProgress := 'POOB-10-1491';
1477: c_file_common_key := c_file_common_key ||
1478: RPAD(SUBSTRB(NVL(l_header_tbl(n_header_common_key_pos).value,' '),1,22),22) || RPAD(' ',22) || RPAD(' ',22);
1479:
1480: ec_debug.pl(3, 'c_file_common_key: ',c_file_common_key);
1481:
1482:
1483: /* ece_extract_utils_pub.insert_into_interface_tbl(iRun_id,
1484: cTransaction_Type,
1513: IF l_document_type = 'NR' THEN -- If this is a Release PO.
1514: xProgress := 'POOB-10-1503';
1515: v_entity_name := 'PO_RELEASES';
1516: v_pk1_value := l_header_tbl(nRelease_id_pos).value;
1517: if ec_debug.G_debug_level = 3 then
1518: ec_debug.pl(3,'release_id: ',l_header_tbl(nRelease_id_pos).value);
1519: end if;
1520: ELSE -- If this is a non-Release PO.
1521: xProgress := 'POOB-10-1504';
1514: xProgress := 'POOB-10-1503';
1515: v_entity_name := 'PO_RELEASES';
1516: v_pk1_value := l_header_tbl(nRelease_id_pos).value;
1517: if ec_debug.G_debug_level = 3 then
1518: ec_debug.pl(3,'release_id: ',l_header_tbl(nRelease_id_pos).value);
1519: end if;
1520: ELSE -- If this is a non-Release PO.
1521: xProgress := 'POOB-10-1504';
1522: v_entity_name := 'PO_HEADERS';
1520: ELSE -- If this is a non-Release PO.
1521: xProgress := 'POOB-10-1504';
1522: v_entity_name := 'PO_HEADERS';
1523: v_pk1_value := l_header_tbl(nHeader_key_pos).value;
1524: if ec_debug.G_debug_level = 3 then
1525: ec_debug.pl(3,'po_header_id: ',l_header_tbl(nHeader_key_pos).value);
1526: end if;
1527: END IF;
1528:
1521: xProgress := 'POOB-10-1504';
1522: v_entity_name := 'PO_HEADERS';
1523: v_pk1_value := l_header_tbl(nHeader_key_pos).value;
1524: if ec_debug.G_debug_level = 3 then
1525: ec_debug.pl(3,'po_header_id: ',l_header_tbl(nHeader_key_pos).value);
1526: end if;
1527: END IF;
1528:
1529: xProgress := 'POOB-10-1505';
1548: l_hdr_att_dtl_tbl,
1549: iAtt_hdr_pos); -- 2823215
1550: --Start of code changes for the bug 15880908
1551: --Added this logic to retrieve the Vendor Site Level Attachments
1552: if ec_debug.G_debug_level = 3 then
1553: ec_debug.pl(3, 'Vendor Site ID Value : ',l_header_tbl(nVendor_Site_Id_pos).value);
1554: end if;
1555:
1556: v_entity_name := 'PO_VENDOR_SITES';
1549: iAtt_hdr_pos); -- 2823215
1550: --Start of code changes for the bug 15880908
1551: --Added this logic to retrieve the Vendor Site Level Attachments
1552: if ec_debug.G_debug_level = 3 then
1553: ec_debug.pl(3, 'Vendor Site ID Value : ',l_header_tbl(nVendor_Site_Id_pos).value);
1554: end if;
1555:
1556: v_entity_name := 'PO_VENDOR_SITES';
1557: v_pk1_value := l_header_tbl(nVendor_Site_Id_pos).Value;
1684: FROM DUAL;
1685:
1686: EXCEPTION
1687: WHEN NO_DATA_FOUND THEN
1688: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_POO_LINE_S');
1689:
1690: END;
1691: ec_debug.pl(3,'l_line_fkey: ',l_line_fkey);
1692:
1687: WHEN NO_DATA_FOUND THEN
1688: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_POO_LINE_S');
1689:
1690: END;
1691: ec_debug.pl(3,'l_line_fkey: ',l_line_fkey);
1692:
1693: if ec_debug.G_debug_level = 3 then
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1689:
1690: END;
1691: ec_debug.pl(3,'l_line_fkey: ',l_line_fkey);
1692:
1693: if ec_debug.G_debug_level = 3 then
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1690: END;
1691: ec_debug.pl(3,'l_line_fkey: ',l_line_fkey);
1692:
1693: if ec_debug.G_debug_level = 3 then
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1691: ec_debug.pl(3,'l_line_fkey: ',l_line_fkey);
1692:
1693: if ec_debug.G_debug_level = 3 then
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1692:
1693: if ec_debug.G_debug_level = 3 then
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1693: if ec_debug.G_debug_level = 3 then
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1694: ec_debug.pl(3,'line_part_number: ' ,line_part_number);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1695: ec_debug.pl(3,'line_part_attrib_category: ',line_part_attrib_category);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1696: ec_debug.pl(3,'line_part_attribute1: ' ,line_part_attribute1);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1697: ec_debug.pl(3,'line_part_attribute2: ' ,line_part_attribute2);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1698: ec_debug.pl(3,'line_part_attribute3: ' ,line_part_attribute3);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1699: ec_debug.pl(3,'line_part_attribute4: ' ,line_part_attribute4);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1700: ec_debug.pl(3,'line_part_attribute5: ' ,line_part_attribute5);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1701: ec_debug.pl(3,'line_part_attribute6: ' ,line_part_attribute6);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1709: ec_debug.pl(3,'line_part_attribute14: ' ,line_part_attribute14);
1702: ec_debug.pl(3,'line_part_attribute7: ' ,line_part_attribute7);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1709: ec_debug.pl(3,'line_part_attribute14: ' ,line_part_attribute14);
1710: ec_debug.pl(3,'line_part_attribute15: ' ,line_part_attribute15);
1703: ec_debug.pl(3,'line_part_attribute8: ' ,line_part_attribute8);
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1709: ec_debug.pl(3,'line_part_attribute14: ' ,line_part_attribute14);
1710: ec_debug.pl(3,'line_part_attribute15: ' ,line_part_attribute15);
1711: end if;
1704: ec_debug.pl(3,'line_part_attribute9: ' ,line_part_attribute9);
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1709: ec_debug.pl(3,'line_part_attribute14: ' ,line_part_attribute14);
1710: ec_debug.pl(3,'line_part_attribute15: ' ,line_part_attribute15);
1711: end if;
1712:
1705: ec_debug.pl(3,'line_part_attribute10: ' ,line_part_attribute10);
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1709: ec_debug.pl(3,'line_part_attribute14: ' ,line_part_attribute14);
1710: ec_debug.pl(3,'line_part_attribute15: ' ,line_part_attribute15);
1711: end if;
1712:
1713: xProgress := 'POOB-10-1591';
1706: ec_debug.pl(3,'line_part_attribute11: ' ,line_part_attribute11);
1707: ec_debug.pl(3,'line_part_attribute12: ' ,line_part_attribute12);
1708: ec_debug.pl(3,'line_part_attribute13: ' ,line_part_attribute13);
1709: ec_debug.pl(3,'line_part_attribute14: ' ,line_part_attribute14);
1710: ec_debug.pl(3,'line_part_attribute15: ' ,line_part_attribute15);
1711: end if;
1712:
1713: xProgress := 'POOB-10-1591';
1714: l_line_tbl(nLp_att_cat_pos).value := line_part_attrib_category;
1742: 1,
1743: 22),22) ||
1744: RPAD(' ',22);
1745:
1746: if ec_debug.G_debug_level = 3 then
1747: ec_debug.pl(3,'c_file_common_key: ',c_file_common_key);
1748: end if;
1749:
1750: xProgress := 'POOB-10-1620';
1743: 22),22) ||
1744: RPAD(' ',22);
1745:
1746: if ec_debug.G_debug_level = 3 then
1747: ec_debug.pl(3,'c_file_common_key: ',c_file_common_key);
1748: end if;
1749:
1750: xProgress := 'POOB-10-1620';
1751: ece_poo_x.populate_ext_line(l_line_fkey,l_line_tbl);
1775: /* IF l_document_type = 'NR' THEN -- If this is a Release PO.
1776: xProgress := 'POOB-10-1622';
1777: v_entity_name := 'PO_SHIPMENTS';
1778: v_pk1_value := l_line_tbl(nLine_Location_ID_pos).value; -- LINE_LOCATION_ID
1779: if ec_debug.G_debug_level = 3 then
1780: ec_debug.pl(3,'PO_LINE_LOCATION_ID: ',l_line_tbl(nLine_Location_ID_pos).value);
1781: end if;
1782: ELSE -- If this is a non-Release PO. */ --Bug 2187958
1783: xProgress := 'POOB-10-1623';
1776: xProgress := 'POOB-10-1622';
1777: v_entity_name := 'PO_SHIPMENTS';
1778: v_pk1_value := l_line_tbl(nLine_Location_ID_pos).value; -- LINE_LOCATION_ID
1779: if ec_debug.G_debug_level = 3 then
1780: ec_debug.pl(3,'PO_LINE_LOCATION_ID: ',l_line_tbl(nLine_Location_ID_pos).value);
1781: end if;
1782: ELSE -- If this is a non-Release PO. */ --Bug 2187958
1783: xProgress := 'POOB-10-1623';
1784: v_entity_name := 'PO_LINES';
1782: ELSE -- If this is a non-Release PO. */ --Bug 2187958
1783: xProgress := 'POOB-10-1623';
1784: v_entity_name := 'PO_LINES';
1785: v_pk1_value := l_line_tbl(nLine_key_pos).value; -- LINE_ID
1786: if ec_debug.G_debug_level = 3 then
1787: ec_debug.pl(3,'PO_LINE_ID: ',l_line_tbl(nLine_key_pos).value);
1788: -- end if;
1789: END IF;
1790:
1783: xProgress := 'POOB-10-1623';
1784: v_entity_name := 'PO_LINES';
1785: v_pk1_value := l_line_tbl(nLine_key_pos).value; -- LINE_ID
1786: if ec_debug.G_debug_level = 3 then
1787: ec_debug.pl(3,'PO_LINE_ID: ',l_line_tbl(nLine_key_pos).value);
1788: -- end if;
1789: END IF;
1790:
1791: xProgress := 'POOB-10-1624';
1820: v_entity_name := 'MTL_SYSTEM_ITEMS';
1821: v_pk1_value := nOrganization_ID; -- Master Inventory Org ID
1822:
1823: v_pk2_value := l_line_tbl(nitem_id_pos).value; -- Item ID
1824: if ec_debug.G_debug_level = 3 then
1825: ec_debug.pl(3,'Master Org ID: ',v_pk1_value);
1826: ec_debug.pl(3,'Item ID: ',v_pk2_value);
1827: end if;
1828:
1821: v_pk1_value := nOrganization_ID; -- Master Inventory Org ID
1822:
1823: v_pk2_value := l_line_tbl(nitem_id_pos).value; -- Item ID
1824: if ec_debug.G_debug_level = 3 then
1825: ec_debug.pl(3,'Master Org ID: ',v_pk1_value);
1826: ec_debug.pl(3,'Item ID: ',v_pk2_value);
1827: end if;
1828:
1829: xProgress := 'POOB-10-1626';
1822:
1823: v_pk2_value := l_line_tbl(nitem_id_pos).value; -- Item ID
1824: if ec_debug.G_debug_level = 3 then
1825: ec_debug.pl(3,'Master Org ID: ',v_pk1_value);
1826: ec_debug.pl(3,'Item ID: ',v_pk2_value);
1827: end if;
1828:
1829: xProgress := 'POOB-10-1626';
1830: ece_poo_transaction.populate_text_attachment(cCommunication_Method,
1856: IF v_iitem_att_enabled = 'Y' THEN
1857: xProgress := 'POOB-10-1627';
1858: v_entity_name := 'MTL_SYSTEM_ITEMS';
1859: v_pk2_value := l_line_tbl(nitem_id_pos).value; -- Item ID
1860: if ec_debug.G_debug_level = 3 then
1861: ec_debug.pl(3,'Item ID: ',v_pk2_value);
1862: end if;
1863:
1864: xProgress := 'POOB-10-1628';
1857: xProgress := 'POOB-10-1627';
1858: v_entity_name := 'MTL_SYSTEM_ITEMS';
1859: v_pk2_value := l_line_tbl(nitem_id_pos).value; -- Item ID
1860: if ec_debug.G_debug_level = 3 then
1861: ec_debug.pl(3,'Item ID: ',v_pk2_value);
1862: end if;
1863:
1864: xProgress := 'POOB-10-1628';
1865: FOR v_org_id IN c_org_id(l_line_tbl(nLine_key_pos).value) LOOP -- Value passed is the Line ID
1864: xProgress := 'POOB-10-1628';
1865: FOR v_org_id IN c_org_id(l_line_tbl(nLine_key_pos).value) LOOP -- Value passed is the Line ID
1866: IF v_org_id.ship_to_organization_id <> nOrganization_ID THEN -- Only do this if it is not the same as the Master Org ID
1867: v_pk1_value := v_org_id.ship_to_organization_id;
1868: if ec_debug.G_debug_level = 3 then
1869: ec_debug.pl(3,'Inventory Org ID: ',v_pk1_value);
1870: end if;
1871:
1872: xProgress := 'POOB-10-1626';
1865: FOR v_org_id IN c_org_id(l_line_tbl(nLine_key_pos).value) LOOP -- Value passed is the Line ID
1866: IF v_org_id.ship_to_organization_id <> nOrganization_ID THEN -- Only do this if it is not the same as the Master Org ID
1867: v_pk1_value := v_org_id.ship_to_organization_id;
1868: if ec_debug.G_debug_level = 3 then
1869: ec_debug.pl(3,'Inventory Org ID: ',v_pk1_value);
1870: end if;
1871:
1872: xProgress := 'POOB-10-1626';
1873: ece_poo_transaction.populate_text_attachment(cCommunication_Method,
1926: FROM DUAL;
1927:
1928: EXCEPTION
1929: WHEN NO_DATA_FOUND THEN
1930: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_POO_SHIPMENT_S');
1931: END;
1932: if ec_debug.G_debug_level = 3 then
1933: ec_debug.pl(3, 'l_shipment_fkey: ',l_shipment_fkey);
1934: end if;
1928: EXCEPTION
1929: WHEN NO_DATA_FOUND THEN
1930: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_POO_SHIPMENT_S');
1931: END;
1932: if ec_debug.G_debug_level = 3 then
1933: ec_debug.pl(3, 'l_shipment_fkey: ',l_shipment_fkey);
1934: end if;
1935:
1936: l_shipment_tbl(nLine_Location_uom_pos).value := l_line_tbl(nLine_uom_code_pos).value; -- bug 2823215
1929: WHEN NO_DATA_FOUND THEN
1930: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_POO_SHIPMENT_S');
1931: END;
1932: if ec_debug.G_debug_level = 3 then
1933: ec_debug.pl(3, 'l_shipment_fkey: ',l_shipment_fkey);
1934: end if;
1935:
1936: l_shipment_tbl(nLine_Location_uom_pos).value := l_line_tbl(nLine_uom_code_pos).value; -- bug 2823215
1937:
2007: c_file_common_key := RPAD(SUBSTRB(NVL(l_header_tbl(nTrans_code_pos).value ,' '),1,25),25) ||
2008: RPAD(SUBSTRB(NVL(l_header_tbl(n_header_common_key_pos).value ,' '),1,22),22) ||
2009: RPAD(SUBSTRB(NVL(l_line_tbl(n_line_common_key_pos).value ,' '),1,22),22) ||
2010: RPAD(SUBSTRB(NVL(l_shipment_tbl(n_ship_common_key_pos).value,' '),1,22),22);
2011: if ec_debug.G_debug_level = 3 then
2012: ec_debug.pl(3, 'c_file_common_key: ',c_file_common_key);
2013: end if;
2014:
2015:
2008: RPAD(SUBSTRB(NVL(l_header_tbl(n_header_common_key_pos).value ,' '),1,22),22) ||
2009: RPAD(SUBSTRB(NVL(l_line_tbl(n_line_common_key_pos).value ,' '),1,22),22) ||
2010: RPAD(SUBSTRB(NVL(l_shipment_tbl(n_ship_common_key_pos).value,' '),1,22),22);
2011: if ec_debug.G_debug_level = 3 then
2012: ec_debug.pl(3, 'c_file_common_key: ',c_file_common_key);
2013: end if;
2014:
2015:
2016: xProgress := 'POOB-10-1700';
2021: xProgress := 'POOB-10-1691';
2022: v_drop_ship_flag := OE_DROP_SHIP_GRP.PO_Line_Location_Is_Drop_Ship(l_shipment_tbl(nShip_Line_Location_ID_pos).value);
2023: xProgress := 'POOB-10-1692';
2024:
2025: if ec_debug.G_debug_level = 3 then
2026: ec_debug.pl(3, 'Drop Ship Flag:',v_drop_ship_flag);
2027: end if;
2028:
2029: IF (v_drop_ship_flag is NOT NULL) THEN
2022: v_drop_ship_flag := OE_DROP_SHIP_GRP.PO_Line_Location_Is_Drop_Ship(l_shipment_tbl(nShip_Line_Location_ID_pos).value);
2023: xProgress := 'POOB-10-1692';
2024:
2025: if ec_debug.G_debug_level = 3 then
2026: ec_debug.pl(3, 'Drop Ship Flag:',v_drop_ship_flag);
2027: end if;
2028:
2029: IF (v_drop_ship_flag is NOT NULL) THEN
2030:
2031: v_header_cancel_flag := l_header_tbl(nHeader_Cancel_Flag_pos).value;
2032: v_line_cancel_flag := l_line_tbl(nLine_Cancel_Flag_pos).value;
2033: v_shipment_cancel_flag := l_shipment_tbl(nShipment_Cancel_Flag_pos).value;
2034:
2035: if ec_debug.G_debug_level = 3 then
2036: ec_debug.pl(3,'v_header_cancel_flag:',v_header_cancel_flag);
2037: ec_debug.pl(3,'v_line_cancel_flag:',v_line_cancel_flag);
2038: ec_debug.pl(3,'v_shipment_cancel_flag:',v_shipment_cancel_flag);
2039: END IF;
2032: v_line_cancel_flag := l_line_tbl(nLine_Cancel_Flag_pos).value;
2033: v_shipment_cancel_flag := l_shipment_tbl(nShipment_Cancel_Flag_pos).value;
2034:
2035: if ec_debug.G_debug_level = 3 then
2036: ec_debug.pl(3,'v_header_cancel_flag:',v_header_cancel_flag);
2037: ec_debug.pl(3,'v_line_cancel_flag:',v_line_cancel_flag);
2038: ec_debug.pl(3,'v_shipment_cancel_flag:',v_shipment_cancel_flag);
2039: END IF;
2040:
2033: v_shipment_cancel_flag := l_shipment_tbl(nShipment_Cancel_Flag_pos).value;
2034:
2035: if ec_debug.G_debug_level = 3 then
2036: ec_debug.pl(3,'v_header_cancel_flag:',v_header_cancel_flag);
2037: ec_debug.pl(3,'v_line_cancel_flag:',v_line_cancel_flag);
2038: ec_debug.pl(3,'v_shipment_cancel_flag:',v_shipment_cancel_flag);
2039: END IF;
2040:
2041: if ((nvl(v_header_cancel_flag,'N') <> 'Y')
2034:
2035: if ec_debug.G_debug_level = 3 then
2036: ec_debug.pl(3,'v_header_cancel_flag:',v_header_cancel_flag);
2037: ec_debug.pl(3,'v_line_cancel_flag:',v_line_cancel_flag);
2038: ec_debug.pl(3,'v_shipment_cancel_flag:',v_shipment_cancel_flag);
2039: END IF;
2040:
2041: if ((nvl(v_header_cancel_flag,'N') <> 'Y')
2042: and (nvl(v_line_cancel_flag,'N') <> 'Y')
2055: return_status
2056: );
2057: xProgress := 'POOB-10-1670';
2058:
2059: if ec_debug.G_debug_level = 3 then
2060: ec_debug.pl(3,'Ship to Customer Name:',rec_order_line_info.ship_to_customer_name);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2056: );
2057: xProgress := 'POOB-10-1670';
2058:
2059: if ec_debug.G_debug_level = 3 then
2060: ec_debug.pl(3,'Ship to Customer Name:',rec_order_line_info.ship_to_customer_name);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2057: xProgress := 'POOB-10-1670';
2058:
2059: if ec_debug.G_debug_level = 3 then
2060: ec_debug.pl(3,'Ship to Customer Name:',rec_order_line_info.ship_to_customer_name);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2058:
2059: if ec_debug.G_debug_level = 3 then
2060: ec_debug.pl(3,'Ship to Customer Name:',rec_order_line_info.ship_to_customer_name);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2059: if ec_debug.G_debug_level = 3 then
2060: ec_debug.pl(3,'Ship to Customer Name:',rec_order_line_info.ship_to_customer_name);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2060: ec_debug.pl(3,'Ship to Customer Name:',rec_order_line_info.ship_to_customer_name);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2061: ec_debug.pl(3,'Ship to Contact Name:',rec_order_line_info.ship_to_contact_name);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2062: ec_debug.pl(3,'Ship to Contact Phone:',rec_order_line_info.ship_to_contact_phone);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2063: ec_debug.pl(3,'Ship to Contact Fax:',rec_order_line_info.ship_to_contact_fax);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2064: ec_debug.pl(3,'Ship to Contact Email:',rec_order_line_info.ship_to_contact_email);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2065: ec_debug.pl(3,'Shipping Instructions:',rec_order_line_info.shipping_instructions);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2066: ec_debug.pl(3,'Packing Instructions:',rec_order_line_info.packing_instructions);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2067: ec_debug.pl(3,'Shipping Method:',rec_order_line_info.shipping_method);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2068: ec_debug.pl(3,'Customer PO Number:',rec_order_line_info.customer_po_number);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2069: ec_debug.pl(3,'Customer PO Line Number:',rec_order_line_info.customer_po_line_number);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2077: ec_debug.pl(3,'Deliver to Customer Address:',rec_order_line_info.deliver_to_customer_address);
2070: ec_debug.pl(3,'Customer PO Shipment Num:',rec_order_line_info.customer_po_shipment_number);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2077: ec_debug.pl(3,'Deliver to Customer Address:',rec_order_line_info.deliver_to_customer_address);
2078: ec_debug.pl(3,'Deliver to Contact Email:', rec_order_line_info.deliver_to_contact_email);
2071: ec_debug.pl(3,'Customer Item Description:',rec_order_line_info.customer_product_description);
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2077: ec_debug.pl(3,'Deliver to Customer Address:',rec_order_line_info.deliver_to_customer_address);
2078: ec_debug.pl(3,'Deliver to Contact Email:', rec_order_line_info.deliver_to_contact_email);
2079: end if;
2072: ec_debug.pl(3,'Deliver to Location:',rec_order_line_info.deliver_to_customer_location);
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2077: ec_debug.pl(3,'Deliver to Customer Address:',rec_order_line_info.deliver_to_customer_address);
2078: ec_debug.pl(3,'Deliver to Contact Email:', rec_order_line_info.deliver_to_contact_email);
2079: end if;
2080:
2073: ec_debug.pl(3,'Deliver to Customer Name:',rec_order_line_info.deliver_to_customer_name);
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2077: ec_debug.pl(3,'Deliver to Customer Address:',rec_order_line_info.deliver_to_customer_address);
2078: ec_debug.pl(3,'Deliver to Contact Email:', rec_order_line_info.deliver_to_contact_email);
2079: end if;
2080:
2081: -- 2823215
2074: ec_debug.pl(3,'Deliver to Contact Name:',rec_order_line_info.deliver_to_customer_name);
2075: ec_debug.pl(3,'Deliver to Contact Phone:',rec_order_line_info.deliver_to_contact_phone);
2076: ec_debug.pl(3,'Deliver to Contact Fax:',rec_order_line_info.deliver_to_contact_fax);
2077: ec_debug.pl(3,'Deliver to Customer Address:',rec_order_line_info.deliver_to_customer_address);
2078: ec_debug.pl(3,'Deliver to Contact Email:', rec_order_line_info.deliver_to_contact_email);
2079: end if;
2080:
2081: -- 2823215
2082: l_shipment_tbl(nSt_cust_name_pos).value := rec_order_line_info.ship_to_customer_name;
2123: xProgress := 'POOB-10-1710';
2124: IF v_ship_att_enabled = 'Y' THEN
2125: v_entity_name := 'PO_SHIPMENTS';
2126: v_pk1_value := l_shipment_tbl(nShip_Line_Location_ID_pos).value;
2127: if ec_debug.G_debug_level = 3 then
2128: ec_debug.pl(3,'Ship Level Line Location ID: ',l_shipment_tbl(nShip_Line_Location_ID_pos).value);
2129: end if;
2130:
2131: xProgress := 'POOB-10-1720';
2124: IF v_ship_att_enabled = 'Y' THEN
2125: v_entity_name := 'PO_SHIPMENTS';
2126: v_pk1_value := l_shipment_tbl(nShip_Line_Location_ID_pos).value;
2127: if ec_debug.G_debug_level = 3 then
2128: ec_debug.pl(3,'Ship Level Line Location ID: ',l_shipment_tbl(nShip_Line_Location_ID_pos).value);
2129: end if;
2130:
2131: xProgress := 'POOB-10-1720';
2132: ece_poo_transaction.populate_text_attachment(cCommunication_Method,
2174:
2175: xProgress := 'POOB-10-1740';
2176: IF dbms_sql.last_row_count = 0 THEN
2177: v_LevelProcessed := 'SHIPMENT';
2178: ec_debug.pl(0,
2179: 'EC',
2180: 'ECE_NO_DB_ROW_PROCESSED',
2181: 'PROGRESS_LEVEL',
2182: xProgress,
2190:
2191: xProgress := 'POOB-10-1750';
2192: IF(dbms_sql.last_row_count = 0) THEN
2193: v_LevelProcessed := 'LINE';
2194: ec_debug.pl(0,
2195: 'EC',
2196: 'ECE_NO_DB_ROW_PROCESSED',
2197: 'PROGRESS_LEVEL',
2198: xProgress,
2208:
2209: xProgress := 'POOB-10-1760';
2210: IF(dbms_sql.last_row_count = 0) THEN
2211: v_LevelProcessed := 'HEADER';
2212: ec_debug.pl(0,
2213: 'EC',
2214: 'ECE_NO_DB_ROW_PROCESSED',
2215: 'LEVEL_PROCESSED',
2216: v_LevelProcessed,
2231: dbms_sql.close_cursor(line_sel_c);
2232:
2233: xProgress := 'POOB-10-1800';
2234: dbms_sql.close_cursor(header_sel_c);
2235: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
2236:
2237: EXCEPTION
2238: WHEN OTHERS THEN
2239: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
2235: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_POO_TRX');
2236:
2237: EXCEPTION
2238: WHEN OTHERS THEN
2239: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
2240: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
2241:
2242: app_exception.raise_exception;
2243:
2236:
2237: EXCEPTION
2238: WHEN OTHERS THEN
2239: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
2240: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
2241:
2242: app_exception.raise_exception;
2243:
2244: END populate_poo_trx;
2361: FROM po_line_locations
2362: WHERE po_line_id = p_line_id;
2363:
2364: BEGIN
2365: if ec_debug.G_debug_level = 3 then
2366: ec_debug.push('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2362: WHERE po_line_id = p_line_id;
2363:
2364: BEGIN
2365: if ec_debug.G_debug_level = 3 then
2366: ec_debug.push('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2363:
2364: BEGIN
2365: if ec_debug.G_debug_level = 3 then
2366: ec_debug.push('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2364: BEGIN
2365: if ec_debug.G_debug_level = 3 then
2366: ec_debug.push('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2372: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
2365: if ec_debug.G_debug_level = 3 then
2366: ec_debug.push('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2372: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
2373: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
2366: ec_debug.push('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2372: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
2373: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
2374: end if;
2367: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2372: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
2373: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
2374: end if;
2375:
2368: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2372: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
2373: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
2374: end if;
2375:
2376: BEGIN
2369: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
2370: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
2371: ec_debug.pl(3,'cHeader_Interface: ' ,cHeader_Interface);
2372: ec_debug.pl(3,'cLine_Interface: ' ,cLine_Interface);
2373: ec_debug.pl(3,'cShipment_Interface: ' ,cShipment_Interface);
2374: end if;
2375:
2376: BEGIN
2377: SELECT inventory_organization_id
2379: FROM financials_system_parameters;
2380:
2381: EXCEPTION
2382: WHEN NO_DATA_FOUND THEN
2383: ec_debug.pl(0,
2384: 'EC',
2385: 'ECE_NO_ROW_SELECTED',
2386: 'PROGRESS_LEVEL',
2387: xProgress,
2389: 'INVENTORY ORGANIZATION ID',
2390: 'TABLE_NAME',
2391: 'FINANCIALS_SYSTEM_PARAMETERS');
2392: END;
2393: if ec_debug.G_debug_level = 3 then
2394: ec_debug.pl(3,'norganization_id: ',norganization_id);
2395: end if;
2396:
2397: -- Let's See if Project Accounting is Installed
2390: 'TABLE_NAME',
2391: 'FINANCIALS_SYSTEM_PARAMETERS');
2392: END;
2393: if ec_debug.G_debug_level = 3 then
2394: ec_debug.pl(3,'norganization_id: ',norganization_id);
2395: end if;
2396:
2397: -- Let's See if Project Accounting is Installed
2398: /* xProgress := 'POOB-20-1000';
2402: v_project_acct_industry,
2403: v_project_acct_schema);
2404:
2405: v_project_acct_status := NVL(v_project_acct_status,'X');
2406: ec_debug.pl(3,'v_project_acct_status: ' ,v_project_acct_status);
2407: ec_debug.pl(3,'v_project_acct_industry: ',v_project_acct_industry);
2408: ec_debug.pl(3,'v_project_acct_schema: ' ,v_project_acct_schema);
2409: */
2410: xProgress := 'POOB-20-1005';
2403: v_project_acct_schema);
2404:
2405: v_project_acct_status := NVL(v_project_acct_status,'X');
2406: ec_debug.pl(3,'v_project_acct_status: ' ,v_project_acct_status);
2407: ec_debug.pl(3,'v_project_acct_industry: ',v_project_acct_industry);
2408: ec_debug.pl(3,'v_project_acct_schema: ' ,v_project_acct_schema);
2409: */
2410: xProgress := 'POOB-20-1005';
2411: ece_flatfile_pvt.select_clause(cTransaction_Type,
2404:
2405: v_project_acct_status := NVL(v_project_acct_status,'X');
2406: ec_debug.pl(3,'v_project_acct_status: ' ,v_project_acct_status);
2407: ec_debug.pl(3,'v_project_acct_industry: ',v_project_acct_industry);
2408: ec_debug.pl(3,'v_project_acct_schema: ' ,v_project_acct_schema);
2409: */
2410: xProgress := 'POOB-20-1005';
2411: ece_flatfile_pvt.select_clause(cTransaction_Type,
2412: cCommunication_Method,
2475: ece_flatfile_pvt.find_pos(l_shipment_tbl,'LINE_LOCATION_ID',nLine_Location_ID_pos);
2476:
2477: xProgress := 'POOB-20-1032';
2478: ece_flatfile_pvt.find_pos(l_shipment_tbl,c_shipment_key_name,nShipment_key_pos);
2479: if ec_debug.G_debug_level = 3 then
2480: ec_debug.pl(3,'nTrans_code_pos: ',nTrans_code_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2476:
2477: xProgress := 'POOB-20-1032';
2478: ece_flatfile_pvt.find_pos(l_shipment_tbl,c_shipment_key_name,nShipment_key_pos);
2479: if ec_debug.G_debug_level = 3 then
2480: ec_debug.pl(3,'nTrans_code_pos: ',nTrans_code_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2477: xProgress := 'POOB-20-1032';
2478: ece_flatfile_pvt.find_pos(l_shipment_tbl,c_shipment_key_name,nShipment_key_pos);
2479: if ec_debug.G_debug_level = 3 then
2480: ec_debug.pl(3,'nTrans_code_pos: ',nTrans_code_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2478: ece_flatfile_pvt.find_pos(l_shipment_tbl,c_shipment_key_name,nShipment_key_pos);
2479: if ec_debug.G_debug_level = 3 then
2480: ec_debug.pl(3,'nTrans_code_pos: ',nTrans_code_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2479: if ec_debug.G_debug_level = 3 then
2480: ec_debug.pl(3,'nTrans_code_pos: ',nTrans_code_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2480: ec_debug.pl(3,'nTrans_code_pos: ',nTrans_code_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2481: ec_debug.pl(3,'nHeader_key_pos: ',nHeader_key_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2489: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
2482: ec_debug.pl(3,'nRelease_num_pos: ',nRelease_num_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2489: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
2490: ec_debug.pl(3,'nShipment_key_pos: ',nShipment_key_pos);
2483: ec_debug.pl(3,'nRelease_ID_pos: ',nRelease_ID_pos);
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2489: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
2490: ec_debug.pl(3,'nShipment_key_pos: ',nShipment_key_pos);
2491: end if;
2484: ec_debug.pl(3,'nDocument_type_pos: ',nDocument_type_pos);
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2489: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
2490: ec_debug.pl(3,'nShipment_key_pos: ',nShipment_key_pos);
2491: end if;
2492: -- Build SELECT Statement
2485: ec_debug.pl(3,'nLine_key_pos: ',nLine_key_pos);
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2489: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
2490: ec_debug.pl(3,'nShipment_key_pos: ',nShipment_key_pos);
2491: end if;
2492: -- Build SELECT Statement
2493: xProgress := 'POOB-20-1035';
2486: ec_debug.pl(3,'nLine_num_pos: ',nLine_num_pos);
2487: ec_debug.pl(3,'nPO_Line_Location_ID_pos: ',nPO_Line_Location_ID_pos);
2488: ec_debug.pl(3,'nItem_ID_pos: ',nItem_ID_pos);
2489: ec_debug.pl(3,'nLine_Location_ID_pos: ',nLine_Location_ID_pos);
2490: ec_debug.pl(3,'nShipment_key_pos: ',nShipment_key_pos);
2491: end if;
2492: -- Build SELECT Statement
2493: xProgress := 'POOB-20-1035';
2494: cHeader_where := cHeader_where ||
2568: '.po_header_id,' ||
2569: cHeader_Interface ||
2570: '.release_number ' ||
2571: ' FOR UPDATE';
2572: ec_debug.pl(3,'cHeader_select: ',cHeader_select);
2573:
2574: cLine_select := cLine_select ||
2575: cLine_from ||
2576: cLine_where ||
2577: ' ORDER BY ' ||
2578: cLine_Interface ||
2579: '.line_number ' ||
2580: ' FOR UPDATE';
2581: ec_debug.pl(3, 'cLine_select: ',cLine_select);
2582:
2583: cShipment_select := cShipment_select ||
2584: cShipment_from ||
2585: cShipment_where ||
2586: ' ORDER BY ' ||
2587: cShipment_Interface ||
2588: '.shipment_number ' ||
2589: ' FOR UPDATE';
2590: ec_debug.pl(3, 'cShipment_select: ',cShipment_select);
2591:
2592: xProgress := 'POOB-20-1060';
2593: cHeader_delete1 := 'DELETE FROM ' || cHeader_Interface || ' WHERE rowid = :col_rowid';
2594:
2601:
2602: cLine_delete2 := 'DELETE FROM ' || cLine_X_Interface || ' WHERE rowid = :col_rowid';
2603:
2604: cShipment_delete2 := 'DELETE FROM ' || cShipment_X_Interface || ' WHERE rowid = :col_rowid';
2605: if ec_debug.G_debug_level = 3 then
2606: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2602: cLine_delete2 := 'DELETE FROM ' || cLine_X_Interface || ' WHERE rowid = :col_rowid';
2603:
2604: cShipment_delete2 := 'DELETE FROM ' || cShipment_X_Interface || ' WHERE rowid = :col_rowid';
2605: if ec_debug.G_debug_level = 3 then
2606: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2610: ec_debug.pl(3,'cLine_delete2: ',cLine_delete2);
2603:
2604: cShipment_delete2 := 'DELETE FROM ' || cShipment_X_Interface || ' WHERE rowid = :col_rowid';
2605: if ec_debug.G_debug_level = 3 then
2606: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2610: ec_debug.pl(3,'cLine_delete2: ',cLine_delete2);
2611: ec_debug.pl(3,'cShipment_delete2: ',cShipment_delete2);
2604: cShipment_delete2 := 'DELETE FROM ' || cShipment_X_Interface || ' WHERE rowid = :col_rowid';
2605: if ec_debug.G_debug_level = 3 then
2606: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2610: ec_debug.pl(3,'cLine_delete2: ',cLine_delete2);
2611: ec_debug.pl(3,'cShipment_delete2: ',cShipment_delete2);
2612: end if;
2605: if ec_debug.G_debug_level = 3 then
2606: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2610: ec_debug.pl(3,'cLine_delete2: ',cLine_delete2);
2611: ec_debug.pl(3,'cShipment_delete2: ',cShipment_delete2);
2612: end if;
2613:
2606: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2610: ec_debug.pl(3,'cLine_delete2: ',cLine_delete2);
2611: ec_debug.pl(3,'cShipment_delete2: ',cShipment_delete2);
2612: end if;
2613:
2614: -- ***************************************************
2607: ec_debug.pl(3,'cLine_delete1: ',cLine_delete1);
2608: ec_debug.pl(3,'cShipment_delete1: ',cShipment_delete1);
2609: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
2610: ec_debug.pl(3,'cLine_delete2: ',cLine_delete2);
2611: ec_debug.pl(3,'cShipment_delete2: ',cShipment_delete2);
2612: end if;
2613:
2614: -- ***************************************************
2615: -- *** Get data setup for the dynamic SQL call.
2754: iHeader_count := l_header_tbl.COUNT;
2755: iLine_count := l_line_tbl.COUNT;
2756: iShipment_count := l_shipment_tbl.COUNT;
2757:
2758: if ec_debug.G_debug_level = 3 then
2759: ec_debug.pl(3,'iHeader_count: ' ,iHeader_count);
2760: ec_debug.pl(3,'iLine_count: ' ,iLine_count);
2761: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
2762: end if;
2755: iLine_count := l_line_tbl.COUNT;
2756: iShipment_count := l_shipment_tbl.COUNT;
2757:
2758: if ec_debug.G_debug_level = 3 then
2759: ec_debug.pl(3,'iHeader_count: ' ,iHeader_count);
2760: ec_debug.pl(3,'iLine_count: ' ,iLine_count);
2761: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
2762: end if;
2763:
2756: iShipment_count := l_shipment_tbl.COUNT;
2757:
2758: if ec_debug.G_debug_level = 3 then
2759: ec_debug.pl(3,'iHeader_count: ' ,iHeader_count);
2760: ec_debug.pl(3,'iLine_count: ' ,iLine_count);
2761: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
2762: end if;
2763:
2764: -- ******************************************************
2757:
2758: if ec_debug.G_debug_level = 3 then
2759: ec_debug.pl(3,'iHeader_count: ' ,iHeader_count);
2760: ec_debug.pl(3,'iLine_count: ' ,iLine_count);
2761: ec_debug.pl(3,'iShipment_count: ',iShipment_count);
2762: end if;
2763:
2764: -- ******************************************************
2765: -- Define TYPE for every columns in the SELECT statement
2861: nRelease_num := l_header_tbl(nRelease_num_pos).value;
2862:
2863: xProgress := 'POOB-20-1450';
2864: nRelease_ID := l_header_tbl(nRelease_id_pos).value;
2865: if ec_debug.G_debug_level = 3 then
2866: ec_debug.pl(3,'nRelease_num: ',nRelease_num);
2867: ec_debug.pl(3,'nRelease_ID: ',nRelease_ID);
2868: end if;
2869:
2862:
2863: xProgress := 'POOB-20-1450';
2864: nRelease_ID := l_header_tbl(nRelease_id_pos).value;
2865: if ec_debug.G_debug_level = 3 then
2866: ec_debug.pl(3,'nRelease_num: ',nRelease_num);
2867: ec_debug.pl(3,'nRelease_ID: ',nRelease_ID);
2868: end if;
2869:
2870: BEGIN
2863: xProgress := 'POOB-20-1450';
2864: nRelease_ID := l_header_tbl(nRelease_id_pos).value;
2865: if ec_debug.G_debug_level = 3 then
2866: ec_debug.pl(3,'nRelease_num: ',nRelease_num);
2867: ec_debug.pl(3,'nRelease_ID: ',nRelease_ID);
2868: end if;
2869:
2870: BEGIN
2871: xProgress := 'POOB-20-1455';
2883: FROM DUAL;
2884:
2885: EXCEPTION
2886: WHEN NO_DATA_FOUND THEN
2887: ec_debug.pl(0,
2888: 'EC',
2889: 'ECE_DECODE_FAILED',
2890: 'PROGRESS_LEVEL',
2891: xProgress,
2891: xProgress,
2892: 'CODE',
2893: l_header_tbl(nDocument_type_pos).value);
2894: END;
2895: ec_debug.pl(3,'l_document_type: ',l_document_type);
2896:
2897: xProgress := 'POOB-20-1460';
2898: c_file_common_key := RPAD(SUBSTRB(NVL(l_header_tbl(nTrans_code_pos).value,' '),1,25),25);
2899:
2900: xProgress := 'POOB-20-1470';
2901: c_file_common_key := c_file_common_key ||
2902: RPAD(SUBSTRB(NVL(l_header_tbl(nHeader_key_pos).value,' '),1,22),22) || RPAD(' ',22) || RPAD(' ',22);
2903:
2904: ec_debug.pl(3, 'c_file_common_key: ',c_file_common_key);
2905:
2906: xProgress := 'POOB-20-1480';
2907: ece_poo_transaction.write_to_file(cTransaction_Type,
2908: cCommunication_Method,
2916: IF l_document_type = 'NR' THEN -- If this is a Release PO.
2917: xProgress := 'POOB-20-1481';
2918: v_entity_name := 'PO_RELEASES';
2919: v_pk1_value := nRelease_ID;
2920: if ec_debug.G_debug_level = 3 then
2921: ec_debug.pl(3,'release_id: ',nRelease_ID);
2922: end if;
2923: ELSE -- If this is a non-Release PO.
2924: xProgress := 'POOB-20-1482';
2917: xProgress := 'POOB-20-1481';
2918: v_entity_name := 'PO_RELEASES';
2919: v_pk1_value := nRelease_ID;
2920: if ec_debug.G_debug_level = 3 then
2921: ec_debug.pl(3,'release_id: ',nRelease_ID);
2922: end if;
2923: ELSE -- If this is a non-Release PO.
2924: xProgress := 'POOB-20-1482';
2925: v_entity_name := 'PO_HEADERS';
2923: ELSE -- If this is a non-Release PO.
2924: xProgress := 'POOB-20-1482';
2925: v_entity_name := 'PO_HEADERS';
2926: v_pk1_value := n_po_header_id;
2927: if ec_debug.G_debug_level = 3 then
2928: ec_debug.pl(3,'po_header_id: ',n_po_header_id);
2929: end if;
2930: END IF;
2931:
2924: xProgress := 'POOB-20-1482';
2925: v_entity_name := 'PO_HEADERS';
2926: v_pk1_value := n_po_header_id;
2927: if ec_debug.G_debug_level = 3 then
2928: ec_debug.pl(3,'po_header_id: ',n_po_header_id);
2929: end if;
2930: END IF;
2931:
2932: xProgress := 'POOB-20-1483';
2998: nPO_Line_Location_ID := l_line_tbl(nPO_Line_Location_ID_pos).value;
2999:
3000: xProgress := 'POOB-20-1545';
3001: nItem_ID := l_line_tbl(nItem_id_pos).value;
3002: if ec_debug.G_debug_level = 3 then
3003: ec_debug.pl(3,'n_po_line_id: ',n_po_line_id);
3004: ec_debug.pl(3,'nLine_num: ',nLine_num);
3005: ec_debug.pl(3,'nPO_Line_Location_ID: ',nPO_Line_Location_ID);
3006: ec_debug.pl(3,'nItem_ID: ',nItem_ID);
2999:
3000: xProgress := 'POOB-20-1545';
3001: nItem_ID := l_line_tbl(nItem_id_pos).value;
3002: if ec_debug.G_debug_level = 3 then
3003: ec_debug.pl(3,'n_po_line_id: ',n_po_line_id);
3004: ec_debug.pl(3,'nLine_num: ',nLine_num);
3005: ec_debug.pl(3,'nPO_Line_Location_ID: ',nPO_Line_Location_ID);
3006: ec_debug.pl(3,'nItem_ID: ',nItem_ID);
3007: end if;
3000: xProgress := 'POOB-20-1545';
3001: nItem_ID := l_line_tbl(nItem_id_pos).value;
3002: if ec_debug.G_debug_level = 3 then
3003: ec_debug.pl(3,'n_po_line_id: ',n_po_line_id);
3004: ec_debug.pl(3,'nLine_num: ',nLine_num);
3005: ec_debug.pl(3,'nPO_Line_Location_ID: ',nPO_Line_Location_ID);
3006: ec_debug.pl(3,'nItem_ID: ',nItem_ID);
3007: end if;
3008:
3001: nItem_ID := l_line_tbl(nItem_id_pos).value;
3002: if ec_debug.G_debug_level = 3 then
3003: ec_debug.pl(3,'n_po_line_id: ',n_po_line_id);
3004: ec_debug.pl(3,'nLine_num: ',nLine_num);
3005: ec_debug.pl(3,'nPO_Line_Location_ID: ',nPO_Line_Location_ID);
3006: ec_debug.pl(3,'nItem_ID: ',nItem_ID);
3007: end if;
3008:
3009: xProgress := 'POOB-20-1550';
3002: if ec_debug.G_debug_level = 3 then
3003: ec_debug.pl(3,'n_po_line_id: ',n_po_line_id);
3004: ec_debug.pl(3,'nLine_num: ',nLine_num);
3005: ec_debug.pl(3,'nPO_Line_Location_ID: ',nPO_Line_Location_ID);
3006: ec_debug.pl(3,'nItem_ID: ',nItem_ID);
3007: end if;
3008:
3009: xProgress := 'POOB-20-1550';
3010: c_file_common_key := RPAD(SUBSTRB(NVL
3019: (l_line_tbl(nLine_key_pos).value,' '),
3020: 1,
3021: 22),22) ||
3022: RPAD(' ',22);
3023: if ec_debug.G_debug_level = 3 then
3024: ec_debug.pl(3,'c_file_common_key: ',c_file_common_key);
3025: end if;
3026:
3027: xProgress := 'POOB-20-1551';
3020: 1,
3021: 22),22) ||
3022: RPAD(' ',22);
3023: if ec_debug.G_debug_level = 3 then
3024: ec_debug.pl(3,'c_file_common_key: ',c_file_common_key);
3025: end if;
3026:
3027: xProgress := 'POOB-20-1551';
3028: ece_poo_transaction.write_to_file(cTransaction_Type,
3070: v_entity_name := 'MTL_SYSTEM_ITEMS';
3071: v_pk1_value := nOrganization_ID; -- Master Inventory Org ID
3072:
3073: v_pk2_value := nItem_ID; -- Item ID
3074: if ec_debug.G_debug_level = 3 then
3075: ec_debug.pl(3,'Master Org ID: ',v_pk1_value);
3076: ec_debug.pl(3,'Item ID: ',v_pk2_value);
3077: end if;
3078:
3071: v_pk1_value := nOrganization_ID; -- Master Inventory Org ID
3072:
3073: v_pk2_value := nItem_ID; -- Item ID
3074: if ec_debug.G_debug_level = 3 then
3075: ec_debug.pl(3,'Master Org ID: ',v_pk1_value);
3076: ec_debug.pl(3,'Item ID: ',v_pk2_value);
3077: end if;
3078:
3079: xProgress := 'POOB-20-1556';
3072:
3073: v_pk2_value := nItem_ID; -- Item ID
3074: if ec_debug.G_debug_level = 3 then
3075: ec_debug.pl(3,'Master Org ID: ',v_pk1_value);
3076: ec_debug.pl(3,'Item ID: ',v_pk2_value);
3077: end if;
3078:
3079: xProgress := 'POOB-20-1556';
3080: put_att_to_output_table(cCommunication_Method,
3100: FOR v_org_id IN c_org_id(n_po_line_id) LOOP -- Value passed is the Line ID
3101: IF v_org_id.ship_to_organization_id <> nOrganization_ID THEN -- Only do this if it is not the same as the Master Org ID
3102: v_pk1_value := v_org_id.ship_to_organization_id;
3103:
3104: if ec_debug.G_debug_level = 3 then
3105: ec_debug.pl(3,'Inventory Org ID: ',v_pk1_value);
3106: end if;
3107:
3108: xProgress := 'POOB-20-1558';
3101: IF v_org_id.ship_to_organization_id <> nOrganization_ID THEN -- Only do this if it is not the same as the Master Org ID
3102: v_pk1_value := v_org_id.ship_to_organization_id;
3103:
3104: if ec_debug.G_debug_level = 3 then
3105: ec_debug.pl(3,'Inventory Org ID: ',v_pk1_value);
3106: end if;
3107:
3108: xProgress := 'POOB-20-1558';
3109: put_att_to_output_table(cCommunication_Method,
3157: dbms_sql.column_value(shipment_sel_c,iShipment_count + 2,rShipment_X_rowid);
3158:
3159: xProgress := 'POCOB-10-1610';
3160: nLine_Location_ID := l_shipment_tbl(nLine_Location_ID_pos).value;
3161: if ec_debug.G_debug_level = 3 then
3162: ec_debug.pl(3,'Ship Level Line Location ID: ',nLine_Location_ID);
3163: end if;
3164:
3165: xProgress := 'POCOB-10-1620';
3158:
3159: xProgress := 'POCOB-10-1610';
3160: nLine_Location_ID := l_shipment_tbl(nLine_Location_ID_pos).value;
3161: if ec_debug.G_debug_level = 3 then
3162: ec_debug.pl(3,'Ship Level Line Location ID: ',nLine_Location_ID);
3163: end if;
3164:
3165: xProgress := 'POCOB-10-1620';
3166: c_file_common_key := RPAD(SUBSTRB(NVL(l_header_tbl(nTrans_code_pos).value ,' '),1,25),25) ||
3166: c_file_common_key := RPAD(SUBSTRB(NVL(l_header_tbl(nTrans_code_pos).value ,' '),1,25),25) ||
3167: RPAD(SUBSTRB(NVL(l_header_tbl(nHeader_key_pos).value ,' '),1,22),22) ||
3168: RPAD(SUBSTRB(NVL(l_line_tbl(nLine_key_pos).value ,' '),1,22),22) ||
3169: RPAD(SUBSTRB(NVL(l_shipment_tbl(nShipment_key_pos).value,' '),1,22),22);
3170: if ec_debug.G_debug_level = 3 then
3171: ec_debug.pl(3, 'c_file_common_key: ',c_file_common_key);
3172: end if;
3173:
3174: xProgress := 'POOB-20-1630';
3167: RPAD(SUBSTRB(NVL(l_header_tbl(nHeader_key_pos).value ,' '),1,22),22) ||
3168: RPAD(SUBSTRB(NVL(l_line_tbl(nLine_key_pos).value ,' '),1,22),22) ||
3169: RPAD(SUBSTRB(NVL(l_shipment_tbl(nShipment_key_pos).value,' '),1,22),22);
3170: if ec_debug.G_debug_level = 3 then
3171: ec_debug.pl(3, 'c_file_common_key: ',c_file_common_key);
3172: end if;
3173:
3174: xProgress := 'POOB-20-1630';
3175: ece_poo_transaction.write_to_file(cTransaction_Type,
3235:
3236: xProgress := 'POOB-20-1674';
3237: IF dbms_sql.last_row_count = 0 THEN
3238: v_LevelProcessed := 'SHIPMENT';
3239: ec_debug.pl(0,
3240: 'EC',
3241: 'ECE_NO_DB_ROW_PROCESSED',
3242: 'PROGRESS_LEVEL',
3243: xProgress,
3266:
3267: xProgress := 'POOB-20-1714';
3268: IF dbms_sql.last_row_count = 0 THEN
3269: v_LevelProcessed := 'LINE';
3270: ec_debug.pl(0,
3271: 'EC',
3272: 'ECE_NO_DB_ROW_PROCESSED',
3273: 'PROGRESS_LEVEL',
3274: xProgress,
3294:
3295: xProgress := 'POOB-20-1754';
3296: IF dbms_sql.last_row_count = 0 THEN
3297: v_LevelProcessed := 'HEADER';
3298: ec_debug.pl(0,
3299: 'EC',
3300: 'ECE_NO_DB_ROW_PROCESSED',
3301: 'PROGRESS_LEVEL',
3302: xProgress,
3345: dbms_sql.close_cursor(ece_poo_transaction.project_del_c2);
3346: end if;
3347:
3348: xProgress := 'POOB-20-1820';
3349: if ec_debug.G_debug_level >= 2 then
3350: ec_debug.pop('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
3351: end if;
3352:
3353: EXCEPTION
3346: end if;
3347:
3348: xProgress := 'POOB-20-1820';
3349: if ec_debug.G_debug_level >= 2 then
3350: ec_debug.pop('ECE_POO_TRANSACTION.PUT_DATA_TO_OUTPUT_TABLE');
3351: end if;
3352:
3353: EXCEPTION
3354: WHEN OTHERS THEN
3351: end if;
3352:
3353: EXCEPTION
3354: WHEN OTHERS THEN
3355: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
3356: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
3357:
3358: app_exception.raise_exception;
3359:
3352:
3353: EXCEPTION
3354: WHEN OTHERS THEN
3355: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
3356: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
3357:
3358: app_exception.raise_exception;
3359:
3360: END put_data_to_output_table;
3376: l_error_buf VARCHAR2(1000);
3377: l_error_stack VARCHAR2(2000);
3378:
3379: BEGIN
3380: if ec_debug.G_debug_level >= 2 then
3381: ec_debug.push('ECE_POO_TRANSACTION.UPDATE_PO');
3382: ec_debug.pl(3,'document_type: ', document_type);
3383: ec_debug.pl(3,'po_number: ', po_number);
3384: ec_debug.pl(3,'po_type: ', po_type);
3377: l_error_stack VARCHAR2(2000);
3378:
3379: BEGIN
3380: if ec_debug.G_debug_level >= 2 then
3381: ec_debug.push('ECE_POO_TRANSACTION.UPDATE_PO');
3382: ec_debug.pl(3,'document_type: ', document_type);
3383: ec_debug.pl(3,'po_number: ', po_number);
3384: ec_debug.pl(3,'po_type: ', po_type);
3385: ec_debug.pl(3,'release_number: ',release_number);
3378:
3379: BEGIN
3380: if ec_debug.G_debug_level >= 2 then
3381: ec_debug.push('ECE_POO_TRANSACTION.UPDATE_PO');
3382: ec_debug.pl(3,'document_type: ', document_type);
3383: ec_debug.pl(3,'po_number: ', po_number);
3384: ec_debug.pl(3,'po_type: ', po_type);
3385: ec_debug.pl(3,'release_number: ',release_number);
3386: end if;
3379: BEGIN
3380: if ec_debug.G_debug_level >= 2 then
3381: ec_debug.push('ECE_POO_TRANSACTION.UPDATE_PO');
3382: ec_debug.pl(3,'document_type: ', document_type);
3383: ec_debug.pl(3,'po_number: ', po_number);
3384: ec_debug.pl(3,'po_type: ', po_type);
3385: ec_debug.pl(3,'release_number: ',release_number);
3386: end if;
3387:
3380: if ec_debug.G_debug_level >= 2 then
3381: ec_debug.push('ECE_POO_TRANSACTION.UPDATE_PO');
3382: ec_debug.pl(3,'document_type: ', document_type);
3383: ec_debug.pl(3,'po_number: ', po_number);
3384: ec_debug.pl(3,'po_type: ', po_type);
3385: ec_debug.pl(3,'release_number: ',release_number);
3386: end if;
3387:
3388: xProgress := 'POOB-30-1000';
3381: ec_debug.push('ECE_POO_TRANSACTION.UPDATE_PO');
3382: ec_debug.pl(3,'document_type: ', document_type);
3383: ec_debug.pl(3,'po_number: ', po_number);
3384: ec_debug.pl(3,'po_type: ', po_type);
3385: ec_debug.pl(3,'release_number: ',release_number);
3386: end if;
3387:
3388: xProgress := 'POOB-30-1000';
3389: BEGIN
3394: type_lookup_code = po_type;
3395:
3396: EXCEPTION
3397: WHEN NO_DATA_FOUND THEN
3398: ec_debug.pl(0,'EC','ECE_NO_ROW_SELECTED','PROGRESS_LEVEL',xProgress,'INFO','PO HEADER ID','TABLE_NAME','PO_HEADERS');
3399:
3400: END;
3401: if ec_debug.G_debug_level = 3 then
3402: ec_debug.pl(3,'l_header_id: ',l_header_id);
3397: WHEN NO_DATA_FOUND THEN
3398: ec_debug.pl(0,'EC','ECE_NO_ROW_SELECTED','PROGRESS_LEVEL',xProgress,'INFO','PO HEADER ID','TABLE_NAME','PO_HEADERS');
3399:
3400: END;
3401: if ec_debug.G_debug_level = 3 then
3402: ec_debug.pl(3,'l_header_id: ',l_header_id);
3403: end if;
3404:
3405: -- Perform the first update if this is a Standard or Blanket PO
3398: ec_debug.pl(0,'EC','ECE_NO_ROW_SELECTED','PROGRESS_LEVEL',xProgress,'INFO','PO HEADER ID','TABLE_NAME','PO_HEADERS');
3399:
3400: END;
3401: if ec_debug.G_debug_level = 3 then
3402: ec_debug.pl(3,'l_header_id: ',l_header_id);
3403: end if;
3404:
3405: -- Perform the first update if this is a Standard or Blanket PO
3406: xProgress := 'POOB-30-1010';
3413: edi_processed_flag = 'Y'
3414: WHERE po_header_id = l_header_id;
3415:
3416: IF SQL%NOTFOUND THEN
3417: ec_debug.pl(0,'EC','ECE_NO_ROW_UPDATED','PROGRESS_LEVEL',xProgress,'INFO','EDI PROCESSED','TABLE_NAME','PO_HEADERS');
3418: END IF;
3419:
3420: -- Perform the same update for the Archive Table.
3421: xProgress := 'POOB-30-1022';
3427: WHERE po_header_id = l_header_id AND
3428: latest_external_flag = 'Y';
3429:
3430: IF SQL%NOTFOUND THEN
3431: ec_debug.pl(0,'EC','ECE_NO_ROW_UPDATED','PROGRESS_LEVEL',xProgress,'INFO','EDI PROCESSED','TABLE_NAME','PO_HEADERS_ARCHIVE');
3432: END IF;
3433:
3434: ELSE
3435: -- Get the po_release_id, as it is needed here for the update and
3442: po_header_id = l_header_id;
3443:
3444: EXCEPTION
3445: WHEN NO_DATA_FOUND THEN
3446: ec_debug.pl(0,'EC','ECE_NO_ROW_SELECTED','PROGRESS_LEVEL',xProgress,'INFO','PO RELEASE ID','TABLE_NAME','PO_RELEASES');
3447:
3448: END;
3449: if ec_debug.G_debug_level = 3 then
3450: ec_debug.pl(3, 'l_release_id: ',l_release_id);
3445: WHEN NO_DATA_FOUND THEN
3446: ec_debug.pl(0,'EC','ECE_NO_ROW_SELECTED','PROGRESS_LEVEL',xProgress,'INFO','PO RELEASE ID','TABLE_NAME','PO_RELEASES');
3447:
3448: END;
3449: if ec_debug.G_debug_level = 3 then
3450: ec_debug.pl(3, 'l_release_id: ',l_release_id);
3451: end if;
3452:
3453: -- Perform this update if this is a Release PO
3446: ec_debug.pl(0,'EC','ECE_NO_ROW_SELECTED','PROGRESS_LEVEL',xProgress,'INFO','PO RELEASE ID','TABLE_NAME','PO_RELEASES');
3447:
3448: END;
3449: if ec_debug.G_debug_level = 3 then
3450: ec_debug.pl(3, 'l_release_id: ',l_release_id);
3451: end if;
3452:
3453: -- Perform this update if this is a Release PO
3454: xProgress := 'POOB-30-1030';
3459: edi_processed_flag = 'Y'
3460: WHERE po_release_id = l_release_id;
3461:
3462: IF SQL%NOTFOUND THEN
3463: ec_debug.pl(0,'EC','ECE_NO_ROW_UPDATED','PROGRESS_LEVEL',xProgress,'INFO','EDI PROCESSED','TABLE_NAME','PO_RELEASES');
3464: END IF;
3465:
3466: -- Perform the same update for the Archive Table.
3467: xProgress := 'POOB-30-1040';
3473: WHERE po_release_id = l_release_id AND
3474: latest_external_flag = 'Y';
3475:
3476: IF SQL%NOTFOUND THEN
3477: ec_debug.pl(0,'EC','ECE_NO_ROW_UPDATED','PROGRESS_LEVEL',xProgress,'INFO','EDI PROCESSED','TABLE_NAME','PO_RELEASES_ARCHIVE');
3478: END IF;
3479: END IF;
3480:
3481: -- Perform archiving by calling the archive proceedure.
3507: FROM DUAL;
3508:
3509: EXCEPTION
3510: WHEN NO_DATA_FOUND THEN
3511: ec_debug.pl(0,'EC','ECE_DECODE_FAILED','PROGRESS_LEVEL',xProgress,'CODE',document_type);
3512:
3513: END;
3514:
3515: if ec_debug.G_debug_level = 3 then
3511: ec_debug.pl(0,'EC','ECE_DECODE_FAILED','PROGRESS_LEVEL',xProgress,'CODE',document_type);
3512:
3513: END;
3514:
3515: if ec_debug.G_debug_level = 3 then
3516: ec_debug.pl(3,'l_document_type: ', l_document_type);
3517: ec_debug.pl(3,'l_document_subtype: ',l_document_subtype);
3518: end if;
3519:
3512:
3513: END;
3514:
3515: if ec_debug.G_debug_level = 3 then
3516: ec_debug.pl(3,'l_document_type: ', l_document_type);
3517: ec_debug.pl(3,'l_document_subtype: ',l_document_subtype);
3518: end if;
3519:
3520: xProgress := 'POOB-30-1060';
3513: END;
3514:
3515: if ec_debug.G_debug_level = 3 then
3516: ec_debug.pl(3,'l_document_type: ', l_document_type);
3517: ec_debug.pl(3,'l_document_subtype: ',l_document_subtype);
3518: end if;
3519:
3520: xProgress := 'POOB-30-1060';
3521: IF document_type NOT IN ('NR','CR') THEN
3538: -- IF l_error_code <> 0 THEN
3539: -- raise_application_error(-20000,l_error_buf || l_error_stack);
3540: -- END IF;
3541:
3542: if ec_debug.G_debug_level = 3 then
3543: ec_debug.pop('ECE_POO_TRANSACTION.UPDATE_PO');
3544: end if;
3545:
3546: EXCEPTION
3539: -- raise_application_error(-20000,l_error_buf || l_error_stack);
3540: -- END IF;
3541:
3542: if ec_debug.G_debug_level = 3 then
3543: ec_debug.pop('ECE_POO_TRANSACTION.UPDATE_PO');
3544: end if;
3545:
3546: EXCEPTION
3547: WHEN OTHERS THEN
3544: end if;
3545:
3546: EXCEPTION
3547: WHEN OTHERS THEN
3548: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
3549: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
3550:
3551: app_exception.raise_exception;
3552: END update_po;
3545:
3546: EXCEPTION
3547: WHEN OTHERS THEN
3548: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
3549: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
3550:
3551: app_exception.raise_exception;
3552: END update_po;
3553:
3609: nConv_dt_pos pls_integer;
3610: nConv_tz_pos pls_integer;
3611: nConv_off_pos pls_integer;
3612: BEGIN
3613: if ec_debug.G_debug_level = 3 then
3614: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3610: nConv_tz_pos pls_integer;
3611: nConv_off_pos pls_integer;
3612: BEGIN
3613: if ec_debug.G_debug_level = 3 then
3614: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3611: nConv_off_pos pls_integer;
3612: BEGIN
3613: if ec_debug.G_debug_level = 3 then
3614: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3612: BEGIN
3613: if ec_debug.G_debug_level = 3 then
3614: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3613: if ec_debug.G_debug_level = 3 then
3614: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3621: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3614: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3621: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3622: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3615: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3621: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3622: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3623: end if;
3616: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3621: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3622: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3623: end if;
3624:
3617: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3621: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3622: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3623: end if;
3624:
3625: -- Initialize the PL/SQL Table
3618: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3619: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3620: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3621: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3622: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3623: end if;
3624:
3625: -- Initialize the PL/SQL Table
3626:
3641: if ece_poo_transaction.project_sel_c <0 then --Bug 2490109
3642:
3643: xProgress := 'POOB-40-1000';
3644: iKey_count := l_key_tbl.COUNT;
3645: if ec_debug.G_debug_level = 3 then
3646: ec_debug.pl(3,'iKey_count: ',iKey_count);
3647: END if;
3648: ece_flatfile_pvt.init_table(cTransaction_Type,cDistribution_Interface,iProject_output_level,TRUE,l_project_tbl,l_key_tbl);
3649:
3642:
3643: xProgress := 'POOB-40-1000';
3644: iKey_count := l_key_tbl.COUNT;
3645: if ec_debug.G_debug_level = 3 then
3646: ec_debug.pl(3,'iKey_count: ',iKey_count);
3647: END if;
3648: ece_flatfile_pvt.init_table(cTransaction_Type,cDistribution_Interface,iProject_output_level,TRUE,l_project_tbl,l_key_tbl);
3649:
3650: xProgress := 'POOB-40-1010';
3678: cProject_select := cProject_select ||
3679: cProject_from ||
3680: cProject_where;
3681:
3682: if ec_debug.G_debug_level = 3 then
3683: ec_debug.pl(3,'cProject_select: ',cProject_select);
3684: end if;
3685:
3686: -- Open the Cursor
3679: cProject_from ||
3680: cProject_where;
3681:
3682: if ec_debug.G_debug_level = 3 then
3683: ec_debug.pl(3,'cProject_select: ',cProject_select);
3684: end if;
3685:
3686: -- Open the Cursor
3687: xProgress := 'POOB-40-1050';
3702:
3703: -- Set Counter
3704: xProgress := 'POOB-40-1070';
3705: iProject_count := l_project_tbl.COUNT;
3706: ec_debug.pl(3,'iProject_count: ',iProject_count);
3707:
3708: xProgress := 'POOB-40-1080';
3709: --iKey_count := l_key_tbl.COUNT;
3710: --ec_debug.pl(3,'iKey_count: ',iKey_count);
3706: ec_debug.pl(3,'iProject_count: ',iProject_count);
3707:
3708: xProgress := 'POOB-40-1080';
3709: --iKey_count := l_key_tbl.COUNT;
3710: --ec_debug.pl(3,'iKey_count: ',iKey_count);
3711:
3712: -- Define Column Types
3713: xProgress := 'POOB-40-1090';
3714: ece_flatfile_pvt.define_interface_column_type(project_sel_c,cProject_select,ece_extract_utils_PUB.G_MaxColWidth,l_project_tbl);
3784: FROM DUAL;
3785:
3786: EXCEPTION
3787: WHEN NO_DATA_FOUND THEN
3788: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_PO_PROJECT_INFO_S');
3789:
3790: END;
3791: if ec_debug.G_debug_level = 3 then
3792: ec_debug.pl(3,'l_project_fkey: ',l_project_fkey);
3787: WHEN NO_DATA_FOUND THEN
3788: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_PO_PROJECT_INFO_S');
3789:
3790: END;
3791: if ec_debug.G_debug_level = 3 then
3792: ec_debug.pl(3,'l_project_fkey: ',l_project_fkey);
3793: end if;
3794:
3795: -- Insert into Interface Table
3788: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_PO_PROJECT_INFO_S');
3789:
3790: END;
3791: if ec_debug.G_debug_level = 3 then
3792: ec_debug.pl(3,'l_project_fkey: ',l_project_fkey);
3793: end if;
3794:
3795: -- Insert into Interface Table
3796: /* xProgress := 'POOB-40-1230';
3892: -- Check to see if anything was processed
3893: xProgress := 'POOB-40-1250';
3894: IF(dbms_sql.last_row_count = 0) THEN
3895: v_LevelProcessed := 'PROJECT';
3896: ec_debug.pl(0,'EC','ECE_NO_DB_ROW_PROCESSED','LEVEL_PROCESSED',v_LevelProcessed,'PROGRESS_LEVEL',xProgress,'TRANSACTION_TYPE',cTransaction_Type);
3897: END IF;
3898:
3899: end if; --Bug 2490109
3900:
3902: -- xProgress := 'POOB-40-1260';
3903: -- dbms_sql.close_cursor(project_sel_c);
3904:
3905: -- Tell Debug that this Procedure is Done
3906: if ec_debug.G_debug_level = 3 then
3907: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3908: end if;
3909:
3910: EXCEPTION
3903: -- dbms_sql.close_cursor(project_sel_c);
3904:
3905: -- Tell Debug that this Procedure is Done
3906: if ec_debug.G_debug_level = 3 then
3907: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_PROJECT_INFO');
3908: end if;
3909:
3910: EXCEPTION
3911: WHEN OTHERS THEN
3908: end if;
3909:
3910: EXCEPTION
3911: WHEN OTHERS THEN
3912: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
3913: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
3914:
3915: app_exception.raise_exception;
3916:
3909:
3910: EXCEPTION
3911: WHEN OTHERS THEN
3912: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
3913: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
3914:
3915: app_exception.raise_exception;
3916:
3917: END POPULATE_DISTRIBUTION_INFO;
3959: iProject_start_num INTEGER;
3960: dummy INTEGER;
3961:
3962: BEGIN
3963: if ec_debug.G_debug_level >= 2 then
3964: ec_debug.push('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3960: dummy INTEGER;
3961:
3962: BEGIN
3963: if ec_debug.G_debug_level >= 2 then
3964: ec_debug.push('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3961:
3962: BEGIN
3963: if ec_debug.G_debug_level >= 2 then
3964: ec_debug.push('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3962: BEGIN
3963: if ec_debug.G_debug_level >= 2 then
3964: ec_debug.push('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3963: if ec_debug.G_debug_level >= 2 then
3964: ec_debug.push('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3964: ec_debug.push('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3965: ec_debug.pl(3,'cCommunication_Method: ',cCommunication_Method);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3973: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3966: ec_debug.pl(3,'cTransaction_Type: ' ,cTransaction_Type);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3973: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3974: ec_debug.pl(3,'cFile_Common_Key: ' ,cFile_Common_Key);
3967: ec_debug.pl(3,'iOutput_width: ' ,iOutput_width);
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3973: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3974: ec_debug.pl(3,'cFile_Common_Key: ' ,cFile_Common_Key);
3975: end if;
3968: ec_debug.pl(3,'iRun_id: ' ,iRun_id);
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3973: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3974: ec_debug.pl(3,'cFile_Common_Key: ' ,cFile_Common_Key);
3975: end if;
3976:
3969: ec_debug.pl(3,'cDistribution_Interface: ' ,cDistribution_Interface);
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3973: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3974: ec_debug.pl(3,'cFile_Common_Key: ' ,cFile_Common_Key);
3975: end if;
3976:
3977:
3970: ec_debug.pl(3,'cPO_Header_ID: ' ,cPO_Header_ID);
3971: ec_debug.pl(3,'cPO_Release_ID: ' ,cPO_Release_ID);
3972: ec_debug.pl(3,'cPO_Line_ID: ' ,cPO_Line_ID);
3973: ec_debug.pl(3,'cPO_Line_Location_ID: ' ,cPO_Line_Location_ID);
3974: ec_debug.pl(3,'cFile_Common_Key: ' ,cFile_Common_Key);
3975: end if;
3976:
3977:
3978: if ece_poo_transaction.project_sel_c = 0 then -- Bug 2490109
4024: cProject_select := cProject_select ||
4025: cProject_from ||
4026: cProject_where ||
4027: ' FOR UPDATE';
4028: ec_debug.pl(3,'cProject_select: ',cProject_select);
4029:
4030: -- Build First DELETE SQL Statement
4031: cProject_delete1 := 'DELETE FROM ' || cDistribution_Interface || ' WHERE rowid = :col_rowid';
4032:
4032:
4033: -- Build Second DELETE SQL Statement
4034: cProject_delete2 := 'DELETE FROM ' || cProject_X_Interface || ' WHERE rowid = :col_rowid';
4035:
4036: if ec_debug.G_debug_level = 3 then
4037: ec_debug.pl(3,'cProject_delete1: ',cProject_delete1);
4038: ec_debug.pl(3,'cProject_delete2: ',cProject_delete2);
4039: end if;
4040:
4033: -- Build Second DELETE SQL Statement
4034: cProject_delete2 := 'DELETE FROM ' || cProject_X_Interface || ' WHERE rowid = :col_rowid';
4035:
4036: if ec_debug.G_debug_level = 3 then
4037: ec_debug.pl(3,'cProject_delete1: ',cProject_delete1);
4038: ec_debug.pl(3,'cProject_delete2: ',cProject_delete2);
4039: end if;
4040:
4041: -- Open the Cursors
4034: cProject_delete2 := 'DELETE FROM ' || cProject_X_Interface || ' WHERE rowid = :col_rowid';
4035:
4036: if ec_debug.G_debug_level = 3 then
4037: ec_debug.pl(3,'cProject_delete1: ',cProject_delete1);
4038: ec_debug.pl(3,'cProject_delete2: ',cProject_delete2);
4039: end if;
4040:
4041: -- Open the Cursors
4042: xProgress := 'POOB-50-1020';
4091:
4092: -- Set the Counter Variables
4093: xProgress := 'POOB-50-1110';
4094: iProject_count := l_project_tbl.COUNT;
4095: if ec_debug.G_debug_level = 3 then
4096: ec_debug.pl(3,'iProject_count: ',iProject_count);
4097: end if;
4098:
4099: -- Define Column Types
4092: -- Set the Counter Variables
4093: xProgress := 'POOB-50-1110';
4094: iProject_count := l_project_tbl.COUNT;
4095: if ec_debug.G_debug_level = 3 then
4096: ec_debug.pl(3,'iProject_count: ',iProject_count);
4097: end if;
4098:
4099: -- Define Column Types
4100: xProgress := 'POOB-50-1120';
4174: xProgress := 'POOB-50-1300';
4175: IF dbms_sql.last_row_count = 0 THEN
4176: xProgress := 'POOB-50-1310';
4177: v_LevelProcessed := 'PROJECT';
4178: ec_debug.pl(0,
4179: 'EC',
4180: 'ECE_NO_DB_ROW_PROCESSED',
4181: 'PROGRESS_LEVEL',
4182: xProgress,
4200: dbms_sql.close_cursor(project_del_c2);
4201: */
4202:
4203: xProgress := 'POOB-50-1350';
4204: if ec_debug.G_debug_level >= 2 then
4205: ec_debug.pop('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
4206: end if;
4207:
4208: EXCEPTION
4201: */
4202:
4203: xProgress := 'POOB-50-1350';
4204: if ec_debug.G_debug_level >= 2 then
4205: ec_debug.pop('ECE_POO_TRANSACTION.PUT_PROJECT_DATA_TO_OUTPUT_TBL');
4206: end if;
4207:
4208: EXCEPTION
4209: WHEN OTHERS THEN
4206: end if;
4207:
4208: EXCEPTION
4209: WHEN OTHERS THEN
4210: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
4211: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
4212:
4213: app_exception.raise_exception;
4214:
4207:
4208: EXCEPTION
4209: WHEN OTHERS THEN
4210: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
4211: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
4212:
4213: app_exception.raise_exception;
4214:
4215: END PUT_DISTDATA_TO_OUT_TBL;
4254: n_att_seq_num_pos NUMBER;
4255: n_att_doc_id_pos NUMBER; --Bug 2187958
4256: n_att_hdr_count NUMBER;
4257: BEGIN
4258: if ec_debug.G_debug_level >= 2 then
4259: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4255: n_att_doc_id_pos NUMBER; --Bug 2187958
4256: n_att_hdr_count NUMBER;
4257: BEGIN
4258: if ec_debug.G_debug_level >= 2 then
4259: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4256: n_att_hdr_count NUMBER;
4257: BEGIN
4258: if ec_debug.G_debug_level >= 2 then
4259: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4257: BEGIN
4258: if ec_debug.G_debug_level >= 2 then
4259: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4258: if ec_debug.G_debug_level >= 2 then
4259: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4266: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
4259: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4266: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
4267: ec_debug.pl(3,'cSegment_Size: ',cSegment_Size);
4260: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4266: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
4267: ec_debug.pl(3,'cSegment_Size: ',cSegment_Size);
4268: end if;
4261: ec_debug.pl(3,'cName: ', cName);
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4266: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
4267: ec_debug.pl(3,'cSegment_Size: ',cSegment_Size);
4268: end if;
4269:
4262: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4266: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
4267: ec_debug.pl(3,'cSegment_Size: ',cSegment_Size);
4268: end if;
4269:
4270: xProgress := 'POOB-60-1000';
4263: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
4264: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
4265: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
4266: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
4267: ec_debug.pl(3,'cSegment_Size: ',cSegment_Size);
4268: end if;
4269:
4270: xProgress := 'POOB-60-1000';
4271: if ( l_att_header_tbl.count = 0) then
4277: l_att_header_tbl,
4278: l_key_tbl);
4279: end if;
4280:
4281: if ec_debug.G_debug_level >= 3 then
4282: ec_debug.pl(3,'l_key_count: ', l_key_count);
4283: end if;
4284:
4285: xProgress := 'POOB-60-1005';
4278: l_key_tbl);
4279: end if;
4280:
4281: if ec_debug.G_debug_level >= 3 then
4282: ec_debug.pl(3,'l_key_count: ', l_key_count);
4283: end if;
4284:
4285: xProgress := 'POOB-60-1005';
4286: -- Build the SELECT Clause.
4403: xProgress := 'POOB-60-1090';
4404: -- Now we put all the clauses together.
4405: v_att_header_select := v_att_header_select || v_att_header_from || v_att_header_where;
4406:
4407: if ec_debug.G_debug_level = 3 then
4408: ec_debug.pl(3,'v_att_header_select: ',v_att_header_select);
4409: end if;
4410:
4411: xProgress := 'POOB-60-1092';
4404: -- Now we put all the clauses together.
4405: v_att_header_select := v_att_header_select || v_att_header_from || v_att_header_where;
4406:
4407: if ec_debug.G_debug_level = 3 then
4408: ec_debug.pl(3,'v_att_header_select: ',v_att_header_select);
4409: end if;
4410:
4411: xProgress := 'POOB-60-1092';
4412: ece_extract_utils_pub.find_pos(l_att_header_tbl,'DATATYPE_ID',n_datatype_id_pos);
4412: ece_extract_utils_pub.find_pos(l_att_header_tbl,'DATATYPE_ID',n_datatype_id_pos);
4413:
4414: xProgress := 'POOB-60-1094';
4415: ece_extract_utils_pub.find_pos(l_att_header_tbl,'ATT_SEQ_NUM',n_att_seq_num_pos);
4416: if ec_debug.G_debug_level = 3 then
4417: ec_debug.pl(3,'n_datatype_id_pos: ',n_datatype_id_pos);
4418: ec_debug.pl(3,'n_att_seq_num_pos: ',n_att_seq_num_pos);
4419: end if;
4420:
4413:
4414: xProgress := 'POOB-60-1094';
4415: ece_extract_utils_pub.find_pos(l_att_header_tbl,'ATT_SEQ_NUM',n_att_seq_num_pos);
4416: if ec_debug.G_debug_level = 3 then
4417: ec_debug.pl(3,'n_datatype_id_pos: ',n_datatype_id_pos);
4418: ec_debug.pl(3,'n_att_seq_num_pos: ',n_att_seq_num_pos);
4419: end if;
4420:
4421: xProgress := 'POOB-60-1096';
4414: xProgress := 'POOB-60-1094';
4415: ece_extract_utils_pub.find_pos(l_att_header_tbl,'ATT_SEQ_NUM',n_att_seq_num_pos);
4416: if ec_debug.G_debug_level = 3 then
4417: ec_debug.pl(3,'n_datatype_id_pos: ',n_datatype_id_pos);
4418: ec_debug.pl(3,'n_att_seq_num_pos: ',n_att_seq_num_pos);
4419: end if;
4420:
4421: xProgress := 'POOB-60-1096';
4422: ece_extract_utils_pub.find_pos(l_att_header_tbl,'ATTACHED_DOCUMENT_ID',n_att_doc_id_pos); --Bug 2187958
4419: end if;
4420:
4421: xProgress := 'POOB-60-1096';
4422: ece_extract_utils_pub.find_pos(l_att_header_tbl,'ATTACHED_DOCUMENT_ID',n_att_doc_id_pos); --Bug 2187958
4423: if ec_debug.G_debug_level = 3 then
4424: ec_debug.pl(3,'n_att_doc_id_pos: ',n_att_doc_id_pos);
4425: end if;
4426:
4427: -- Open Cursor.
4420:
4421: xProgress := 'POOB-60-1096';
4422: ece_extract_utils_pub.find_pos(l_att_header_tbl,'ATTACHED_DOCUMENT_ID',n_att_doc_id_pos); --Bug 2187958
4423: if ec_debug.G_debug_level = 3 then
4424: ec_debug.pl(3,'n_att_doc_id_pos: ',n_att_doc_id_pos);
4425: end if;
4426:
4427: -- Open Cursor.
4428: xProgress := 'POOB-60-1100';
4442:
4443: -- Set Counter
4444: xProgress := 'POOB-60-1120';
4445: n_header_count := l_att_header_tbl.COUNT;
4446: if ec_debug.G_debug_level = 3 then
4447: ec_debug.pl(3,'n_header_count: ',n_header_count);
4448: end if;
4449:
4450: xProgress := 'POOB-60-1130';
4443: -- Set Counter
4444: xProgress := 'POOB-60-1120';
4445: n_header_count := l_att_header_tbl.COUNT;
4446: if ec_debug.G_debug_level = 3 then
4447: ec_debug.pl(3,'n_header_count: ',n_header_count);
4448: end if;
4449:
4450: xProgress := 'POOB-60-1130';
4451: ece_flatfile_pvt.define_interface_column_type(n_att_header_sel_c,
4503: FROM DUAL;
4504:
4505: EXCEPTION
4506: WHEN NO_DATA_FOUND THEN
4507: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_ATTACHMENT_HEADERS_S');
4508: END; */
4509:
4510: xProgress := 'POOB-60-1180';
4511: /* ece_extract_utils_pub.insert_into_interface_tbl(iRun_id,
4553: END LOOP;
4554:
4555: xProgress := 'POOB-60-1210';
4556: dbms_sql.close_cursor(n_att_header_sel_c);
4557: if ec_debug.G_debug_level >= 2 then
4558: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4559: end if;
4560:
4561: EXCEPTION
4554:
4555: xProgress := 'POOB-60-1210';
4556: dbms_sql.close_cursor(n_att_header_sel_c);
4557: if ec_debug.G_debug_level >= 2 then
4558: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_TEXT_ATTACHMENT');
4559: end if;
4560:
4561: EXCEPTION
4562: WHEN OTHERS THEN
4559: end if;
4560:
4561: EXCEPTION
4562: WHEN OTHERS THEN
4563: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
4564: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
4565:
4566: app_exception.raise_exception;
4567: END populate_text_attachment;
4560:
4561: EXCEPTION
4562: WHEN OTHERS THEN
4563: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
4564: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
4565:
4566: app_exception.raise_exception;
4567: END populate_text_attachment;
4568:
4636: n_transaction_record_id_pos NUMBER;
4637: n_pr_pos NUMBER; -- 3618073
4638:
4639: BEGIN
4640: if ec_debug.G_debug_level = 3 then
4641: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4637: n_pr_pos NUMBER; -- 3618073
4638:
4639: BEGIN
4640: if ec_debug.G_debug_level = 3 then
4641: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4638:
4639: BEGIN
4640: if ec_debug.G_debug_level = 3 then
4641: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4639: BEGIN
4640: if ec_debug.G_debug_level = 3 then
4641: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4640: if ec_debug.G_debug_level = 3 then
4641: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4641: ec_debug.push('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4642: ec_debug.pl(3,'cDetail_Output_Level: ' ,cDetail_Output_Level);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4643: ec_debug.pl(3,'cAtt_Detail_Interface: ',cAtt_Detail_Interface);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4644: ec_debug.pl(3,'cAtt_Seq_Num: ' ,cAtt_Seq_Num);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4645: ec_debug.pl(3,'cEntity_Name: ' ,cEntity_Name);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4653: ec_debug.pl(3,'cSegment_Size: ' ,cSegment_Size);
4646: ec_debug.pl(3,'cName: ' ,cName);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4653: ec_debug.pl(3,'cSegment_Size: ' ,cSegment_Size);
4654: ec_debug.pl(3,'cAtt_doc_id: ' ,cAtt_doc_id);
4647: ec_debug.pl(3,'cPK1_Value: ' ,cPK1_Value);
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4653: ec_debug.pl(3,'cSegment_Size: ' ,cSegment_Size);
4654: ec_debug.pl(3,'cAtt_doc_id: ' ,cAtt_doc_id);
4655: end if;
4648: ec_debug.pl(3,'cPK2_Value: ' ,cPK2_Value);
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4653: ec_debug.pl(3,'cSegment_Size: ' ,cSegment_Size);
4654: ec_debug.pl(3,'cAtt_doc_id: ' ,cAtt_doc_id);
4655: end if;
4656:
4649: ec_debug.pl(3,'cPK3_Value: ' ,cPK3_Value);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4653: ec_debug.pl(3,'cSegment_Size: ' ,cSegment_Size);
4654: ec_debug.pl(3,'cAtt_doc_id: ' ,cAtt_doc_id);
4655: end if;
4656:
4657: fnd_profile.get('ECE_ATT_SPLIT_WORD_ALLOWED',v_split_word);
4650: ec_debug.pl(3,'cPK4_Value: ' ,cPK4_Value);
4651: ec_debug.pl(3,'cPK5_Value: ' ,cPK5_Value);
4652: ec_debug.pl(3,'cData_Type_ID: ' ,cData_Type_ID);
4653: ec_debug.pl(3,'cSegment_Size: ' ,cSegment_Size);
4654: ec_debug.pl(3,'cAtt_doc_id: ' ,cAtt_doc_id);
4655: end if;
4656:
4657: fnd_profile.get('ECE_ATT_SPLIT_WORD_ALLOWED',v_split_word);
4658: v_split_word := NVL(v_split_word,'Y');
4655: end if;
4656:
4657: fnd_profile.get('ECE_ATT_SPLIT_WORD_ALLOWED',v_split_word);
4658: v_split_word := NVL(v_split_word,'Y');
4659: ec_debug.pl(3,'v_split_word: ',v_split_word);
4660:
4661: xProgress := 'POOB-70-1000';
4662: if (l_att_detail_tbl.count = 0) then
4663: ece_flatfile_pvt.init_table(cTransaction_Type,cAtt_Detail_Interface,cDetail_Output_Level,TRUE,l_att_detail_tbl,l_key_tbl);
4829:
4830: -- Now we put all the clauses together.
4831: xProgress := 'POOB-70-1200';
4832: v_att_detail_select := v_att_detail_select || v_att_detail_from || v_att_detail_where;
4833: if ec_debug.G_debug_level = 3 then
4834: ec_debug.pl(3,'v_att_detail_select: ',v_att_detail_select);
4835: end if;
4836:
4837: -- Open Cursor.
4830: -- Now we put all the clauses together.
4831: xProgress := 'POOB-70-1200';
4832: v_att_detail_select := v_att_detail_select || v_att_detail_from || v_att_detail_where;
4833: if ec_debug.G_debug_level = 3 then
4834: ec_debug.pl(3,'v_att_detail_select: ',v_att_detail_select);
4835: end if;
4836:
4837: -- Open Cursor.
4838: xProgress := 'POOB-70-1210';
4894:
4895: -- Set Counter
4896: xProgress := 'POOB-70-1310';
4897: n_detail_count := l_att_detail_tbl.COUNT;
4898: if ec_debug.G_debug_level = 3 then
4899: ec_debug.pl(3,'n_detail_count: ',n_detail_count);
4900: end if;
4901:
4902: -- Define Columns
4895: -- Set Counter
4896: xProgress := 'POOB-70-1310';
4897: n_detail_count := l_att_detail_tbl.COUNT;
4898: if ec_debug.G_debug_level = 3 then
4899: ec_debug.pl(3,'n_detail_count: ',n_detail_count);
4900: end if;
4901:
4902: -- Define Columns
4903: xProgress := 'POOB-70-1320';
4924:
4925: xProgress := 'POOB-70-1360';
4926: WHILE dbms_sql.fetch_rows(n_att_detail_sel_c) > 0 LOOP
4927: xProgress := 'POOB-70-1370';
4928: ec_debug.pl(3,'xProgress: ',xProgress);
4929:
4930: ece_flatfile_pvt.assign_column_value_to_tbl(n_att_detail_sel_c,l_att_detail_tbl);
4931:
4932: n_segment_number := 1;
4933: n_cur_pos := 1;
4934: n_new_chunk_size := 0;
4935:
4936: xProgress := 'POOB-70-1380';
4937: if ec_debug.G_debug_level = 3 then
4938: ec_debug.pl(3,'xProgress: ',xProgress);
4939: end if;
4940:
4941: IF cData_Type_ID = 1 THEN -- Short Text
4934: n_new_chunk_size := 0;
4935:
4936: xProgress := 'POOB-70-1380';
4937: if ec_debug.G_debug_level = 3 then
4938: ec_debug.pl(3,'xProgress: ',xProgress);
4939: end if;
4940:
4941: IF cData_Type_ID = 1 THEN -- Short Text
4942: xProgress := 'POOB-70-1390';
4939: end if;
4940:
4941: IF cData_Type_ID = 1 THEN -- Short Text
4942: xProgress := 'POOB-70-1390';
4943: if ec_debug.G_debug_level = 3 then
4944: ec_debug.pl(3,'xProgress: ',xProgress);
4945: end if;
4946:
4947: dbms_sql.column_value(n_att_detail_sel_c,n_detail_count + 1,l_short_text);
4940:
4941: IF cData_Type_ID = 1 THEN -- Short Text
4942: xProgress := 'POOB-70-1390';
4943: if ec_debug.G_debug_level = 3 then
4944: ec_debug.pl(3,'xProgress: ',xProgress);
4945: end if;
4946:
4947: dbms_sql.column_value(n_att_detail_sel_c,n_detail_count + 1,l_short_text);
4948: -- l_short_text := LTRIM(RTRIM(l_short_text)); -- Not using this one because white spaces at front may be intentional
4949: l_short_text := RTRIM(l_short_text);
4950: END IF;
4951:
4952: xProgress := 'POOB-70-1400';
4953: ec_debug.pl(3,'xProgress: ',xProgress);
4954: LOOP
4955: xProgress := 'POOB-70-1410';
4956: if ec_debug.G_debug_level = 3 then
4957: ec_debug.pl(3,'xProgress: ',xProgress);
4952: xProgress := 'POOB-70-1400';
4953: ec_debug.pl(3,'xProgress: ',xProgress);
4954: LOOP
4955: xProgress := 'POOB-70-1410';
4956: if ec_debug.G_debug_level = 3 then
4957: ec_debug.pl(3,'xProgress: ',xProgress);
4958: end if;
4959: n_pr_pos := 0; -- 3618073
4960: IF cData_Type_ID = 1 THEN -- Short Text
4953: ec_debug.pl(3,'xProgress: ',xProgress);
4954: LOOP
4955: xProgress := 'POOB-70-1410';
4956: if ec_debug.G_debug_level = 3 then
4957: ec_debug.pl(3,'xProgress: ',xProgress);
4958: end if;
4959: n_pr_pos := 0; -- 3618073
4960: IF cData_Type_ID = 1 THEN -- Short Text
4961: xProgress := 'POOB-70-1420';
4958: end if;
4959: n_pr_pos := 0; -- 3618073
4960: IF cData_Type_ID = 1 THEN -- Short Text
4961: xProgress := 'POOB-70-1420';
4962: if ec_debug.G_debug_level = 3 then
4963: ec_debug.pl(3,'xProgress: ',xProgress);
4964: end if;
4965:
4966: l_short_text := SUBSTRB(l_short_text,n_cur_pos);
4959: n_pr_pos := 0; -- 3618073
4960: IF cData_Type_ID = 1 THEN -- Short Text
4961: xProgress := 'POOB-70-1420';
4962: if ec_debug.G_debug_level = 3 then
4963: ec_debug.pl(3,'xProgress: ',xProgress);
4964: end if;
4965:
4966: l_short_text := SUBSTRB(l_short_text,n_cur_pos);
4967: n_short_text_length := LENGTH(l_short_text); -- bug 3310412
4969: l_data_chunk := SUBSTRB(l_short_text,1,cSegment_Size);
4970:
4971: n_return_size := LENGTH(l_data_chunk);
4972:
4973: if ec_debug.G_debug_level = 3 then
4974: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4975: ec_debug.pl(3,'n_return_size: ',n_return_size);
4976: ec_debug.pl(3,'l_short_text: ',l_short_text);
4977: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4970:
4971: n_return_size := LENGTH(l_data_chunk);
4972:
4973: if ec_debug.G_debug_level = 3 then
4974: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4975: ec_debug.pl(3,'n_return_size: ',n_return_size);
4976: ec_debug.pl(3,'l_short_text: ',l_short_text);
4977: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4978: end if;
4971: n_return_size := LENGTH(l_data_chunk);
4972:
4973: if ec_debug.G_debug_level = 3 then
4974: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4975: ec_debug.pl(3,'n_return_size: ',n_return_size);
4976: ec_debug.pl(3,'l_short_text: ',l_short_text);
4977: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4978: end if;
4979: ELSIF cData_Type_ID = 2 THEN -- Long Text
4972:
4973: if ec_debug.G_debug_level = 3 then
4974: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4975: ec_debug.pl(3,'n_return_size: ',n_return_size);
4976: ec_debug.pl(3,'l_short_text: ',l_short_text);
4977: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4978: end if;
4979: ELSIF cData_Type_ID = 2 THEN -- Long Text
4980: xProgress := 'POOB-70-1430';
4973: if ec_debug.G_debug_level = 3 then
4974: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4975: ec_debug.pl(3,'n_return_size: ',n_return_size);
4976: ec_debug.pl(3,'l_short_text: ',l_short_text);
4977: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4978: end if;
4979: ELSIF cData_Type_ID = 2 THEN -- Long Text
4980: xProgress := 'POOB-70-1430';
4981: if ec_debug.G_debug_level = 3 then
4977: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4978: end if;
4979: ELSIF cData_Type_ID = 2 THEN -- Long Text
4980: xProgress := 'POOB-70-1430';
4981: if ec_debug.G_debug_level = 3 then
4982: ec_debug.pl(3,'xProgress: ',xProgress);
4983: end if;
4984:
4985: -- Cursor(I) ,Pos(I) ,Len(I) ,Offset(I) ,Value(O) ,Value Len(O)
4978: end if;
4979: ELSIF cData_Type_ID = 2 THEN -- Long Text
4980: xProgress := 'POOB-70-1430';
4981: if ec_debug.G_debug_level = 3 then
4982: ec_debug.pl(3,'xProgress: ',xProgress);
4983: end if;
4984:
4985: -- Cursor(I) ,Pos(I) ,Len(I) ,Offset(I) ,Value(O) ,Value Len(O)
4986: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_data_chunk,n_return_size);
4983: end if;
4984:
4985: -- Cursor(I) ,Pos(I) ,Len(I) ,Offset(I) ,Value(O) ,Value Len(O)
4986: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_data_chunk,n_return_size);
4987: if ec_debug.G_debug_level = 3 then
4988: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4989: ec_debug.pl(3,'n_return_size: ',n_return_size);
4990: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4991: end if;
4984:
4985: -- Cursor(I) ,Pos(I) ,Len(I) ,Offset(I) ,Value(O) ,Value Len(O)
4986: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_data_chunk,n_return_size);
4987: if ec_debug.G_debug_level = 3 then
4988: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4989: ec_debug.pl(3,'n_return_size: ',n_return_size);
4990: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4991: end if;
4992: END IF;
4985: -- Cursor(I) ,Pos(I) ,Len(I) ,Offset(I) ,Value(O) ,Value Len(O)
4986: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_data_chunk,n_return_size);
4987: if ec_debug.G_debug_level = 3 then
4988: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4989: ec_debug.pl(3,'n_return_size: ',n_return_size);
4990: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4991: end if;
4992: END IF;
4993:
4986: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_data_chunk,n_return_size);
4987: if ec_debug.G_debug_level = 3 then
4988: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
4989: ec_debug.pl(3,'n_return_size: ',n_return_size);
4990: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
4991: end if;
4992: END IF;
4993:
4994: xProgress := 'POOB-70-1440';
4991: end if;
4992: END IF;
4993:
4994: xProgress := 'POOB-70-1440';
4995: if ec_debug.G_debug_level = 3 then
4996: ec_debug.pl(3,'xProgress: ',xProgress);
4997: end if;
4998: EXIT WHEN (n_return_size = 0 AND cData_Type_ID = 2) OR (l_short_text IS NULL AND cData_Type_ID = 1);
4999:
4992: END IF;
4993:
4994: xProgress := 'POOB-70-1440';
4995: if ec_debug.G_debug_level = 3 then
4996: ec_debug.pl(3,'xProgress: ',xProgress);
4997: end if;
4998: EXIT WHEN (n_return_size = 0 AND cData_Type_ID = 2) OR (l_short_text IS NULL AND cData_Type_ID = 1);
4999:
5000: xProgress := 'POOB-70-1450';
4997: end if;
4998: EXIT WHEN (n_return_size = 0 AND cData_Type_ID = 2) OR (l_short_text IS NULL AND cData_Type_ID = 1);
4999:
5000: xProgress := 'POOB-70-1450';
5001: if ec_debug.G_debug_level = 3 then
5002: ec_debug.pl(3,'xProgress: ',xProgress);
5003: end if;
5004:
5005: v_continue_flag := 'Y';
4998: EXIT WHEN (n_return_size = 0 AND cData_Type_ID = 2) OR (l_short_text IS NULL AND cData_Type_ID = 1);
4999:
5000: xProgress := 'POOB-70-1450';
5001: if ec_debug.G_debug_level = 3 then
5002: ec_debug.pl(3,'xProgress: ',xProgress);
5003: end if;
5004:
5005: v_continue_flag := 'Y';
5006: n_cr_pos := INSTR(l_data_chunk,c_local_chr_13);
5005: v_continue_flag := 'Y';
5006: n_cr_pos := INSTR(l_data_chunk,c_local_chr_13);
5007: n_lf_pos := INSTR(l_data_chunk,c_local_chr_10);
5008:
5009: if ec_debug.G_debug_level = 3 then
5010: ec_debug.pl(3,'n_cr_pos: ',n_cr_pos);
5011: ec_debug.pl(3,'n_lf_pos: ',n_lf_pos);
5012: end if;
5013:
5006: n_cr_pos := INSTR(l_data_chunk,c_local_chr_13);
5007: n_lf_pos := INSTR(l_data_chunk,c_local_chr_10);
5008:
5009: if ec_debug.G_debug_level = 3 then
5010: ec_debug.pl(3,'n_cr_pos: ',n_cr_pos);
5011: ec_debug.pl(3,'n_lf_pos: ',n_lf_pos);
5012: end if;
5013:
5014: IF n_cr_pos = 0 AND n_lf_pos = 0 THEN -- There are no CR or CRLF in the chunk...
5007: n_lf_pos := INSTR(l_data_chunk,c_local_chr_10);
5008:
5009: if ec_debug.G_debug_level = 3 then
5010: ec_debug.pl(3,'n_cr_pos: ',n_cr_pos);
5011: ec_debug.pl(3,'n_lf_pos: ',n_lf_pos);
5012: end if;
5013:
5014: IF n_cr_pos = 0 AND n_lf_pos = 0 THEN -- There are no CR or CRLF in the chunk...
5015: xProgress := 'POOB-70-1460';
5012: end if;
5013:
5014: IF n_cr_pos = 0 AND n_lf_pos = 0 THEN -- There are no CR or CRLF in the chunk...
5015: xProgress := 'POOB-70-1460';
5016: if ec_debug.G_debug_level = 3 then
5017: ec_debug.pl(3,'xProgress: ',xProgress);
5018: end if;
5019:
5020: IF v_split_word = 'N' THEN -- No I am not allowed to split a word.
5013:
5014: IF n_cr_pos = 0 AND n_lf_pos = 0 THEN -- There are no CR or CRLF in the chunk...
5015: xProgress := 'POOB-70-1460';
5016: if ec_debug.G_debug_level = 3 then
5017: ec_debug.pl(3,'xProgress: ',xProgress);
5018: end if;
5019:
5020: IF v_split_word = 'N' THEN -- No I am not allowed to split a word.
5021: xProgress := 'POOB-70-1470';
5018: end if;
5019:
5020: IF v_split_word = 'N' THEN -- No I am not allowed to split a word.
5021: xProgress := 'POOB-70-1470';
5022: if ec_debug.G_debug_level = 3 then
5023: ec_debug.pl(3,'xProgress: ',xProgress);
5024: end if;
5025:
5026: v_last_char := SUBSTRB(l_data_chunk,n_return_size,1);
5019:
5020: IF v_split_word = 'N' THEN -- No I am not allowed to split a word.
5021: xProgress := 'POOB-70-1470';
5022: if ec_debug.G_debug_level = 3 then
5023: ec_debug.pl(3,'xProgress: ',xProgress);
5024: end if;
5025:
5026: v_last_char := SUBSTRB(l_data_chunk,n_return_size,1);
5027:
5026: v_last_char := SUBSTRB(l_data_chunk,n_return_size,1);
5027:
5028: IF v_last_char NOT IN ('.',',',';','-',' ') THEN
5029: xProgress := 'POOB-70-1480';
5030: if ec_debug.G_debug_level = 3 then
5031: ec_debug.pl(3,'xProgress: ',xProgress);
5032: end if;
5033:
5034: n_space_pos := INSTR(l_data_chunk,' ',-1,1);
5027:
5028: IF v_last_char NOT IN ('.',',',';','-',' ') THEN
5029: xProgress := 'POOB-70-1480';
5030: if ec_debug.G_debug_level = 3 then
5031: ec_debug.pl(3,'xProgress: ',xProgress);
5032: end if;
5033:
5034: n_space_pos := INSTR(l_data_chunk,' ',-1,1);
5035:
5054: end if;
5055: -- bug 3310412
5056: l_data_chunk := SUBSTRB(l_data_chunk,1,n_new_chunk_size);
5057:
5058: if ec_debug.G_debug_level = 3 then
5059: ec_debug.pl(3,'xProgress: ',xProgress);
5060: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5061: end if;
5062: ELSE --Space Chacter Not Found
5055: -- bug 3310412
5056: l_data_chunk := SUBSTRB(l_data_chunk,1,n_new_chunk_size);
5057:
5058: if ec_debug.G_debug_level = 3 then
5059: ec_debug.pl(3,'xProgress: ',xProgress);
5060: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5061: end if;
5062: ELSE --Space Chacter Not Found
5063: xProgress := 'POOB-70-1492';
5056: l_data_chunk := SUBSTRB(l_data_chunk,1,n_new_chunk_size);
5057:
5058: if ec_debug.G_debug_level = 3 then
5059: ec_debug.pl(3,'xProgress: ',xProgress);
5060: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5061: end if;
5062: ELSE --Space Chacter Not Found
5063: xProgress := 'POOB-70-1492';
5064: n_new_chunk_size := n_return_size;
5061: end if;
5062: ELSE --Space Chacter Not Found
5063: xProgress := 'POOB-70-1492';
5064: n_new_chunk_size := n_return_size;
5065: if ec_debug.G_debug_level = 3 then
5066: ec_debug.pl(3,'xProgress: ',xProgress);
5067: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5068: end if;
5069: END IF;
5062: ELSE --Space Chacter Not Found
5063: xProgress := 'POOB-70-1492';
5064: n_new_chunk_size := n_return_size;
5065: if ec_debug.G_debug_level = 3 then
5066: ec_debug.pl(3,'xProgress: ',xProgress);
5067: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5068: end if;
5069: END IF;
5070: ELSE -- Whew, last character is a breakable character...
5063: xProgress := 'POOB-70-1492';
5064: n_new_chunk_size := n_return_size;
5065: if ec_debug.G_debug_level = 3 then
5066: ec_debug.pl(3,'xProgress: ',xProgress);
5067: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5068: end if;
5069: END IF;
5070: ELSE -- Whew, last character is a breakable character...
5071: xProgress := 'POOB-70-1494';
5070: ELSE -- Whew, last character is a breakable character...
5071: xProgress := 'POOB-70-1494';
5072:
5073: n_new_chunk_size := n_return_size;
5074: if ec_debug.G_debug_level = 3 then
5075: ec_debug.pl(3,'xProgress: ',xProgress);
5076: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5077: end if;
5078: END IF;
5071: xProgress := 'POOB-70-1494';
5072:
5073: n_new_chunk_size := n_return_size;
5074: if ec_debug.G_debug_level = 3 then
5075: ec_debug.pl(3,'xProgress: ',xProgress);
5076: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5077: end if;
5078: END IF;
5079: ELSE -- Yes I am allowed to split a word.
5072:
5073: n_new_chunk_size := n_return_size;
5074: if ec_debug.G_debug_level = 3 then
5075: ec_debug.pl(3,'xProgress: ',xProgress);
5076: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5077: end if;
5078: END IF;
5079: ELSE -- Yes I am allowed to split a word.
5080: xProgress := 'POOB-70-1496';
5079: ELSE -- Yes I am allowed to split a word.
5080: xProgress := 'POOB-70-1496';
5081:
5082: n_new_chunk_size := n_return_size;
5083: if ec_debug.G_debug_level = 3 then
5084: ec_debug.pl(3,'xProgress: ',xProgress);
5085: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5086: end if;
5087: END IF;
5080: xProgress := 'POOB-70-1496';
5081:
5082: n_new_chunk_size := n_return_size;
5083: if ec_debug.G_debug_level = 3 then
5084: ec_debug.pl(3,'xProgress: ',xProgress);
5085: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5086: end if;
5087: END IF;
5088:
5081:
5082: n_new_chunk_size := n_return_size;
5083: if ec_debug.G_debug_level = 3 then
5084: ec_debug.pl(3,'xProgress: ',xProgress);
5085: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5086: end if;
5087: END IF;
5088:
5089: ELSIF n_cr_pos = 1 OR n_lf_pos = 1 THEN -- This is a blank line...
5087: END IF;
5088:
5089: ELSIF n_cr_pos = 1 OR n_lf_pos = 1 THEN -- This is a blank line...
5090: xProgress := 'POOB-70-1500';
5091: if ec_debug.G_debug_level = 3 then
5092: ec_debug.pl(3,'xProgress: ',xProgress);
5093: end if;
5094:
5095: IF n_cr_pos = 1 AND n_lf_pos = 2 THEN
5088:
5089: ELSIF n_cr_pos = 1 OR n_lf_pos = 1 THEN -- This is a blank line...
5090: xProgress := 'POOB-70-1500';
5091: if ec_debug.G_debug_level = 3 then
5092: ec_debug.pl(3,'xProgress: ',xProgress);
5093: end if;
5094:
5095: IF n_cr_pos = 1 AND n_lf_pos = 2 THEN
5096: xProgress := 'POOB-70-1510';
5093: end if;
5094:
5095: IF n_cr_pos = 1 AND n_lf_pos = 2 THEN
5096: xProgress := 'POOB-70-1510';
5097: if ec_debug.G_debug_level = 3 then
5098: ec_debug.pl(3,'xProgress: ',xProgress);
5099: end if;
5100:
5101: n_new_chunk_size := 2;
5094:
5095: IF n_cr_pos = 1 AND n_lf_pos = 2 THEN
5096: xProgress := 'POOB-70-1510';
5097: if ec_debug.G_debug_level = 3 then
5098: ec_debug.pl(3,'xProgress: ',xProgress);
5099: end if;
5100:
5101: n_new_chunk_size := 2;
5102: n_pr_pos := 0; -- 3618073
5101: n_new_chunk_size := 2;
5102: n_pr_pos := 0; -- 3618073
5103: ELSE
5104: xProgress := 'POOB-70-1520';
5105: if ec_debug.G_debug_level = 3 then
5106: ec_debug.pl(3,'xProgress: ',xProgress);
5107: end if;
5108: n_new_chunk_size := 1;
5109: n_pr_pos := 0; -- 3618073
5102: n_pr_pos := 0; -- 3618073
5103: ELSE
5104: xProgress := 'POOB-70-1520';
5105: if ec_debug.G_debug_level = 3 then
5106: ec_debug.pl(3,'xProgress: ',xProgress);
5107: end if;
5108: n_new_chunk_size := 1;
5109: n_pr_pos := 0; -- 3618073
5110: END IF;
5109: n_pr_pos := 0; -- 3618073
5110: END IF;
5111:
5112: xProgress := 'POOB-70-1530';
5113: if ec_debug.G_debug_level = 3 then
5114: ec_debug.pl(3,'xProgress: ',xProgress);
5115: end if;
5116: l_data_chunk := '';
5117:
5110: END IF;
5111:
5112: xProgress := 'POOB-70-1530';
5113: if ec_debug.G_debug_level = 3 then
5114: ec_debug.pl(3,'xProgress: ',xProgress);
5115: end if;
5116: l_data_chunk := '';
5117:
5118: ELSIF n_cr_pos > 1 OR n_lf_pos > 1 THEN -- There is a CR or LF in the chunk...
5116: l_data_chunk := '';
5117:
5118: ELSIF n_cr_pos > 1 OR n_lf_pos > 1 THEN -- There is a CR or LF in the chunk...
5119: xProgress := 'POOB-70-1540';
5120: if ec_debug.G_debug_level = 3 then
5121: ec_debug.pl(3,'xProgress: ',xProgress);
5122: end if;
5123:
5124: IF n_cr_pos > 1 THEN
5117:
5118: ELSIF n_cr_pos > 1 OR n_lf_pos > 1 THEN -- There is a CR or LF in the chunk...
5119: xProgress := 'POOB-70-1540';
5120: if ec_debug.G_debug_level = 3 then
5121: ec_debug.pl(3,'xProgress: ',xProgress);
5122: end if;
5123:
5124: IF n_cr_pos > 1 THEN
5125: xProgress := 'POOB-70-1550';
5122: end if;
5123:
5124: IF n_cr_pos > 1 THEN
5125: xProgress := 'POOB-70-1550';
5126: if ec_debug.G_debug_level = 3 then
5127: ec_debug.pl(3,'xProgress: ',xProgress);
5128: end if;
5129:
5130: IF n_lf_pos = n_cr_pos + 1 THEN -- This is a CRLF combo...
5123:
5124: IF n_cr_pos > 1 THEN
5125: xProgress := 'POOB-70-1550';
5126: if ec_debug.G_debug_level = 3 then
5127: ec_debug.pl(3,'xProgress: ',xProgress);
5128: end if;
5129:
5130: IF n_lf_pos = n_cr_pos + 1 THEN -- This is a CRLF combo...
5131: xProgress := 'POOB-70-1560';
5128: end if;
5129:
5130: IF n_lf_pos = n_cr_pos + 1 THEN -- This is a CRLF combo...
5131: xProgress := 'POOB-70-1560';
5132: if ec_debug.G_debug_level = 3 then
5133: ec_debug.pl(3,'xProgress: ',xProgress);
5134: end if;
5135: n_new_chunk_size := n_lf_pos;
5136: n_pr_pos := 2; -- 3618073
5129:
5130: IF n_lf_pos = n_cr_pos + 1 THEN -- This is a CRLF combo...
5131: xProgress := 'POOB-70-1560';
5132: if ec_debug.G_debug_level = 3 then
5133: ec_debug.pl(3,'xProgress: ',xProgress);
5134: end if;
5135: n_new_chunk_size := n_lf_pos;
5136: n_pr_pos := 2; -- 3618073
5137: ELSE -- This is CR only...
5135: n_new_chunk_size := n_lf_pos;
5136: n_pr_pos := 2; -- 3618073
5137: ELSE -- This is CR only...
5138: xProgress := 'POOB-70-1570';
5139: if ec_debug.G_debug_level = 3 then
5140: ec_debug.pl(3,'xProgress: ',xProgress);
5141: end if;
5142:
5143: n_new_chunk_size := n_cr_pos;
5136: n_pr_pos := 2; -- 3618073
5137: ELSE -- This is CR only...
5138: xProgress := 'POOB-70-1570';
5139: if ec_debug.G_debug_level = 3 then
5140: ec_debug.pl(3,'xProgress: ',xProgress);
5141: end if;
5142:
5143: n_new_chunk_size := n_cr_pos;
5144: n_pr_pos := 1; --3618073
5144: n_pr_pos := 1; --3618073
5145: END IF;
5146: ELSE -- This is LF only
5147: xProgress := 'POOB-70-1580';
5148: if ec_debug.G_debug_level = 3 then
5149: ec_debug.pl(3,'xProgress: ',xProgress);
5150: end if;
5151: n_new_chunk_size := n_lf_pos;
5152: n_pr_pos := 1;
5145: END IF;
5146: ELSE -- This is LF only
5147: xProgress := 'POOB-70-1580';
5148: if ec_debug.G_debug_level = 3 then
5149: ec_debug.pl(3,'xProgress: ',xProgress);
5150: end if;
5151: n_new_chunk_size := n_lf_pos;
5152: n_pr_pos := 1;
5153: END IF;
5155: xProgress := 'POOB-70-1590';
5156:
5157: l_data_chunk := SUBSTRB(l_data_chunk,1,n_new_chunk_size-n_pr_pos); -- 3618073
5158:
5159: if ec_debug.G_debug_level = 3 then
5160: ec_debug.pl(3,'xProgress: ',xProgress);
5161: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5162: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5163: end if;
5156:
5157: l_data_chunk := SUBSTRB(l_data_chunk,1,n_new_chunk_size-n_pr_pos); -- 3618073
5158:
5159: if ec_debug.G_debug_level = 3 then
5160: ec_debug.pl(3,'xProgress: ',xProgress);
5161: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5162: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5163: end if;
5164: END IF;
5157: l_data_chunk := SUBSTRB(l_data_chunk,1,n_new_chunk_size-n_pr_pos); -- 3618073
5158:
5159: if ec_debug.G_debug_level = 3 then
5160: ec_debug.pl(3,'xProgress: ',xProgress);
5161: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5162: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5163: end if;
5164: END IF;
5165:
5158:
5159: if ec_debug.G_debug_level = 3 then
5160: ec_debug.pl(3,'xProgress: ',xProgress);
5161: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5162: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5163: end if;
5164: END IF;
5165:
5166: xProgress := 'POOB-70-1600';
5168: l_att_detail_tbl(n_att_seg_pos).value := l_data_chunk;
5169:
5170: l_att_detail_tbl(n_seg_num_pos).value := n_segment_number;
5171:
5172: if ec_debug.G_debug_level = 3 then
5173: ec_debug.pl(3,'xProgress: ',xProgress);
5174: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5175: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5176: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5169:
5170: l_att_detail_tbl(n_seg_num_pos).value := n_segment_number;
5171:
5172: if ec_debug.G_debug_level = 3 then
5173: ec_debug.pl(3,'xProgress: ',xProgress);
5174: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5175: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5176: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5177: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
5170: l_att_detail_tbl(n_seg_num_pos).value := n_segment_number;
5171:
5172: if ec_debug.G_debug_level = 3 then
5173: ec_debug.pl(3,'xProgress: ',xProgress);
5174: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5175: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5176: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5177: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
5178: end if;
5171:
5172: if ec_debug.G_debug_level = 3 then
5173: ec_debug.pl(3,'xProgress: ',xProgress);
5174: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5175: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5176: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5177: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
5178: end if;
5179:
5172: if ec_debug.G_debug_level = 3 then
5173: ec_debug.pl(3,'xProgress: ',xProgress);
5174: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5175: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5176: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5177: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
5178: end if;
5179:
5180: xProgress := 'POOB-70-1610';
5173: ec_debug.pl(3,'xProgress: ',xProgress);
5174: ec_debug.pl(3,'l_data_chunk: ',l_data_chunk);
5175: ec_debug.pl(3,'n_new_chunk_size: ',n_new_chunk_size);
5176: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5177: ec_debug.pl(3,'n_cur_pos: ',n_cur_pos);
5178: end if;
5179:
5180: xProgress := 'POOB-70-1610';
5181:
5185: n_cur_pos := n_cur_pos + n_new_chunk_size;
5186: END IF;
5187:
5188: n_segment_number := n_segment_number + 1;
5189: if ec_debug.G_debug_level = 3 then
5190: ec_debug.pl(3,'New n_cur_pos: ',n_cur_pos);
5191: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5192: end if;
5193:
5186: END IF;
5187:
5188: n_segment_number := n_segment_number + 1;
5189: if ec_debug.G_debug_level = 3 then
5190: ec_debug.pl(3,'New n_cur_pos: ',n_cur_pos);
5191: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5192: end if;
5193:
5194: BEGIN
5187:
5188: n_segment_number := n_segment_number + 1;
5189: if ec_debug.G_debug_level = 3 then
5190: ec_debug.pl(3,'New n_cur_pos: ',n_cur_pos);
5191: ec_debug.pl(3,'n_segment_number: ',n_segment_number);
5192: end if;
5193:
5194: BEGIN
5195: xProgress := 'POOB-70-1620';
5192: end if;
5193:
5194: BEGIN
5195: xProgress := 'POOB-70-1620';
5196: ec_debug.pl(3,'xProgress: ',xProgress);
5197:
5198: SELECT ece_attachment_details_s.NEXTVAL INTO n_detail_fkey
5199: FROM DUAL;
5200: if ec_debug.G_debug_level = 3 then
5196: ec_debug.pl(3,'xProgress: ',xProgress);
5197:
5198: SELECT ece_attachment_details_s.NEXTVAL INTO n_detail_fkey
5199: FROM DUAL;
5200: if ec_debug.G_debug_level = 3 then
5201: ec_debug.pl(3,'n_detail_fkey: ',n_detail_fkey);
5202: end if;
5203: EXCEPTION
5204: WHEN NO_DATA_FOUND THEN
5197:
5198: SELECT ece_attachment_details_s.NEXTVAL INTO n_detail_fkey
5199: FROM DUAL;
5200: if ec_debug.G_debug_level = 3 then
5201: ec_debug.pl(3,'n_detail_fkey: ',n_detail_fkey);
5202: end if;
5203: EXCEPTION
5204: WHEN NO_DATA_FOUND THEN
5205: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_ATTACHMENT_DETAILS_S');
5201: ec_debug.pl(3,'n_detail_fkey: ',n_detail_fkey);
5202: end if;
5203: EXCEPTION
5204: WHEN NO_DATA_FOUND THEN
5205: ec_debug.pl(0,'EC','ECE_GET_NEXT_SEQ_FAILED','PROGRESS_LEVEL',xProgress,'SEQ','ECE_ATTACHMENT_DETAILS_S');
5206: END;
5207:
5208: -- I have to execute the following few lines of code because, I have no way of knowing at this point
5209: -- whether to set the Continue Flag 'Y' or 'N' until I loop around to the top again. This is how I find
5209: -- whether to set the Continue Flag 'Y' or 'N' until I loop around to the top again. This is how I find
5210: -- out ahead of time what the answer will be.
5211: IF cData_Type_ID = 1 THEN -- Short Text
5212: xProgress := 'POOB-70-1622';
5213: if ec_debug.G_debug_level = 3 then
5214: ec_debug.pl(3,'xProgress: ',xProgress);
5215: end if;
5216: l_temp_text := SUBSTRB(l_short_text,n_cur_pos);
5217: ELSIF cData_Type_ID = 2 THEN -- Long Text
5210: -- out ahead of time what the answer will be.
5211: IF cData_Type_ID = 1 THEN -- Short Text
5212: xProgress := 'POOB-70-1622';
5213: if ec_debug.G_debug_level = 3 then
5214: ec_debug.pl(3,'xProgress: ',xProgress);
5215: end if;
5216: l_temp_text := SUBSTRB(l_short_text,n_cur_pos);
5217: ELSIF cData_Type_ID = 2 THEN -- Long Text
5218: xProgress := 'POOB-70-1623';
5215: end if;
5216: l_temp_text := SUBSTRB(l_short_text,n_cur_pos);
5217: ELSIF cData_Type_ID = 2 THEN -- Long Text
5218: xProgress := 'POOB-70-1623';
5219: if ec_debug.G_debug_level = 3 then
5220: ec_debug.pl(3,'xProgress: ',xProgress);
5221: end if;
5222:
5223: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_temp_text,n_temp_return_size);
5216: l_temp_text := SUBSTRB(l_short_text,n_cur_pos);
5217: ELSIF cData_Type_ID = 2 THEN -- Long Text
5218: xProgress := 'POOB-70-1623';
5219: if ec_debug.G_debug_level = 3 then
5220: ec_debug.pl(3,'xProgress: ',xProgress);
5221: end if;
5222:
5223: dbms_sql.column_value_long(n_att_detail_sel_c,n_detail_count + 1,cSegment_Size,n_cur_pos - 1,l_temp_text,n_temp_return_size);
5224: END IF;
5224: END IF;
5225:
5226: IF (n_temp_return_size = 0 AND cData_Type_ID = 2) OR (l_temp_text IS NULL AND cData_Type_ID = 1) THEN
5227: xProgress := 'POOB-70-1624';
5228: if ec_debug.G_debug_level = 3 then
5229: ec_debug.pl(3,'xProgress: ',xProgress);
5230: end if;
5231: v_continue_flag := 'N';
5232: END IF;
5225:
5226: IF (n_temp_return_size = 0 AND cData_Type_ID = 2) OR (l_temp_text IS NULL AND cData_Type_ID = 1) THEN
5227: xProgress := 'POOB-70-1624';
5228: if ec_debug.G_debug_level = 3 then
5229: ec_debug.pl(3,'xProgress: ',xProgress);
5230: end if;
5231: v_continue_flag := 'N';
5232: END IF;
5233:
5231: v_continue_flag := 'N';
5232: END IF;
5233:
5234: l_att_detail_tbl(n_cont_flag_pos).value := v_continue_flag;
5235: if ec_debug.G_debug_level = 3 then
5236: ec_debug.pl(3,'v_continue_flag: ',v_continue_flag);
5237: end if;
5238:
5239: xProgress := 'POOB-70-1625';
5232: END IF;
5233:
5234: l_att_detail_tbl(n_cont_flag_pos).value := v_continue_flag;
5235: if ec_debug.G_debug_level = 3 then
5236: ec_debug.pl(3,'v_continue_flag: ',v_continue_flag);
5237: end if;
5238:
5239: xProgress := 'POOB-70-1625';
5240: ec_debug.pl(3,'xProgress: ',xProgress);
5236: ec_debug.pl(3,'v_continue_flag: ',v_continue_flag);
5237: end if;
5238:
5239: xProgress := 'POOB-70-1625';
5240: ec_debug.pl(3,'xProgress: ',xProgress);
5241: l_att_detail_tbl(n_att_seq_num_pos).value := cAtt_Seq_Num;
5242: l_att_detail_tbl(n_entity_name_pos).value := cEntity_name;
5243: l_att_detail_tbl(n_name_pos).value := cName;
5244: l_att_detail_tbl(n_pk1_value_pos).value := cPK1_Value;
5248: l_att_detail_tbl(n_pk5_value_pos).value := cPK5_Value;
5249: l_att_detail_tbl(n_run_id_pos).value := iRun_id;
5250: l_att_detail_tbl(n_att_doc_id_pos).value := cAtt_doc_id; --Bug 2187958
5251: xProgress := 'POOB-70-1630';
5252: ec_debug.pl(3,'xProgress: ',xProgress);
5253: /* ece_extract_utils_pub.insert_into_interface_tbl(
5254: iRun_id,
5255: cTransaction_Type,
5256: cCommunication_Method,
5275:
5276: xProgress := 'POOB-70-1640';
5277: dbms_sql.close_cursor(n_att_detail_sel_c);
5278:
5279: if ec_debug.G_debug_level >= 2 then
5280: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
5281: end if;
5282: EXCEPTION
5283: WHEN OTHERS THEN
5276: xProgress := 'POOB-70-1640';
5277: dbms_sql.close_cursor(n_att_detail_sel_c);
5278:
5279: if ec_debug.G_debug_level >= 2 then
5280: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
5281: end if;
5282: EXCEPTION
5283: WHEN OTHERS THEN
5284: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
5280: ec_debug.pop('ECE_POO_TRANSACTION.POPULATE_TEXT_ATT_DETAIL');
5281: end if;
5282: EXCEPTION
5283: WHEN OTHERS THEN
5284: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
5285: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
5286:
5287: app_exception.raise_exception;
5288:
5281: end if;
5282: EXCEPTION
5283: WHEN OTHERS THEN
5284: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
5285: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
5286:
5287: app_exception.raise_exception;
5288:
5289: END populate_text_att_detail;
5335: rHeader_X_rowid ROWID;
5336: get_no_rows INTEGER;
5337: get_no_lrows INTEGER;
5338: BEGIN
5339: if ec_debug.G_debug_level >= 2 then
5340: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5336: get_no_rows INTEGER;
5337: get_no_lrows INTEGER;
5338: BEGIN
5339: if ec_debug.G_debug_level >= 2 then
5340: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5337: get_no_lrows INTEGER;
5338: BEGIN
5339: if ec_debug.G_debug_level >= 2 then
5340: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5338: BEGIN
5339: if ec_debug.G_debug_level >= 2 then
5340: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5346: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5339: if ec_debug.G_debug_level >= 2 then
5340: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5346: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5347: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5340: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5346: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5347: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5348: end if;
5341: ec_debug.pl(3,'cEntity_Name: ',cEntity_Name);
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5346: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5347: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5348: end if;
5349:
5342: ec_debug.pl(3,'cName: ', cName);
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5346: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5347: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5348: end if;
5349:
5350: xProgress := 'POOB-80-1000';
5343: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5344: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5345: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5346: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5347: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5348: end if;
5349:
5350: xProgress := 'POOB-80-1000';
5351: ece_flatfile_pvt.select_clause(cTransaction_Type,
5483: cHeader_X_Interface || '.rowid ';
5484:
5485: -- Now form the complete SELECT SQL...
5486: cHeader_select := cHeader_select || cHeader_from || cHeader_where || ' FOR UPDATE';
5487: ec_debug.pl(3,'cHeader_select: ',cHeader_select);
5488:
5489: -- Form DELETE SQL...
5490: cHeader_delete1 := 'DELETE FROM ' || cHeader_Interface || ' WHERE rowid = :col_rowid';
5491:
5490: cHeader_delete1 := 'DELETE FROM ' || cHeader_Interface || ' WHERE rowid = :col_rowid';
5491:
5492: -- Form DELETE SQL for the Extension Table...
5493: cHeader_delete2 := 'DELETE FROM ' || cHeader_X_Interface || ' WHERE rowid = :col_rowid';
5494: if ec_debug.G_debug_level = 3 then
5495: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
5496: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
5497: end if;
5498:
5491:
5492: -- Form DELETE SQL for the Extension Table...
5493: cHeader_delete2 := 'DELETE FROM ' || cHeader_X_Interface || ' WHERE rowid = :col_rowid';
5494: if ec_debug.G_debug_level = 3 then
5495: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
5496: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
5497: end if;
5498:
5499: -- Open Cursors
5492: -- Form DELETE SQL for the Extension Table...
5493: cHeader_delete2 := 'DELETE FROM ' || cHeader_X_Interface || ' WHERE rowid = :col_rowid';
5494: if ec_debug.G_debug_level = 3 then
5495: ec_debug.pl(3,'cHeader_delete1: ',cHeader_delete1);
5496: ec_debug.pl(3,'cHeader_delete2: ',cHeader_delete2);
5497: end if;
5498:
5499: -- Open Cursors
5500: xProgress := 'POOB-80-1090';
5542:
5543: --Set Counter
5544: xProgress := 'POOB-80-1150';
5545: iHeader_count := l_header_tbl.COUNT;
5546: if ec_debug.G_debug_level = 3 then
5547: ec_debug.pl(3,'iHeader_count: ',iHeader_count);
5548: end if;
5549:
5550: xProgress := 'POOB-80-1160';
5543: --Set Counter
5544: xProgress := 'POOB-80-1150';
5545: iHeader_count := l_header_tbl.COUNT;
5546: if ec_debug.G_debug_level = 3 then
5547: ec_debug.pl(3,'iHeader_count: ',iHeader_count);
5548: end if;
5549:
5550: xProgress := 'POOB-80-1160';
5551: ece_flatfile_pvt.define_interface_column_type(Header_sel_c,
5605: ece_flatfile_pvt.find_pos(l_header_tbl,'ATTACHED_DOCUMENT_ID',nAtt_Doc_ID);
5606: -- Get the Attachment Document ID
5607: nAtt_Doc_ID := l_header_tbl(nAtt_Doc_ID).value;
5608:
5609: if ec_debug.G_debug_level = 3 then
5610: ec_debug.pl(3,'nDoc_ID_pos: ',nDoc_ID_pos);
5611: ec_debug.pl(3,'nDoc_ID: ' ,nDoc_ID);
5612: ec_debug.pl(3,'nSeq_Num: ',nSeq_Num);
5613: ec_debug.pl(3,'nAtt_Doc_ID: ',nAtt_Doc_ID);
5606: -- Get the Attachment Document ID
5607: nAtt_Doc_ID := l_header_tbl(nAtt_Doc_ID).value;
5608:
5609: if ec_debug.G_debug_level = 3 then
5610: ec_debug.pl(3,'nDoc_ID_pos: ',nDoc_ID_pos);
5611: ec_debug.pl(3,'nDoc_ID: ' ,nDoc_ID);
5612: ec_debug.pl(3,'nSeq_Num: ',nSeq_Num);
5613: ec_debug.pl(3,'nAtt_Doc_ID: ',nAtt_Doc_ID);
5614: end if;
5607: nAtt_Doc_ID := l_header_tbl(nAtt_Doc_ID).value;
5608:
5609: if ec_debug.G_debug_level = 3 then
5610: ec_debug.pl(3,'nDoc_ID_pos: ',nDoc_ID_pos);
5611: ec_debug.pl(3,'nDoc_ID: ' ,nDoc_ID);
5612: ec_debug.pl(3,'nSeq_Num: ',nSeq_Num);
5613: ec_debug.pl(3,'nAtt_Doc_ID: ',nAtt_Doc_ID);
5614: end if;
5615:
5608:
5609: if ec_debug.G_debug_level = 3 then
5610: ec_debug.pl(3,'nDoc_ID_pos: ',nDoc_ID_pos);
5611: ec_debug.pl(3,'nDoc_ID: ' ,nDoc_ID);
5612: ec_debug.pl(3,'nSeq_Num: ',nSeq_Num);
5613: ec_debug.pl(3,'nAtt_Doc_ID: ',nAtt_Doc_ID);
5614: end if;
5615:
5616: xProgress := 'POOB-80-1250';
5609: if ec_debug.G_debug_level = 3 then
5610: ec_debug.pl(3,'nDoc_ID_pos: ',nDoc_ID_pos);
5611: ec_debug.pl(3,'nDoc_ID: ' ,nDoc_ID);
5612: ec_debug.pl(3,'nSeq_Num: ',nSeq_Num);
5613: ec_debug.pl(3,'nAtt_Doc_ID: ',nAtt_Doc_ID);
5614: end if;
5615:
5616: xProgress := 'POOB-80-1250';
5617: ece_poo_transaction.write_to_file(cTransaction_Type,
5661: xProgress := 'POOB-80-1310';
5662: dbms_sql.close_cursor(Header_sel_c);
5663: dbms_sql.close_cursor(Header_del_c1);
5664: dbms_sql.close_cursor(Header_del_c2);
5665: if ec_debug.G_debug_level >= 2 then
5666: ec_debug.pop ('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5667: end if;
5668: EXCEPTION
5669: WHEN OTHERS THEN
5662: dbms_sql.close_cursor(Header_sel_c);
5663: dbms_sql.close_cursor(Header_del_c1);
5664: dbms_sql.close_cursor(Header_del_c2);
5665: if ec_debug.G_debug_level >= 2 then
5666: ec_debug.pop ('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5667: end if;
5668: EXCEPTION
5669: WHEN OTHERS THEN
5670: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
5666: ec_debug.pop ('ECE_POO_TRANSACTION.PUT_ATT_TO_OUTPUT_TABLE');
5667: end if;
5668: EXCEPTION
5669: WHEN OTHERS THEN
5670: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
5671: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
5672:
5673: app_exception.raise_exception;
5674:
5667: end if;
5668: EXCEPTION
5669: WHEN OTHERS THEN
5670: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
5671: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
5672:
5673: app_exception.raise_exception;
5674:
5675: END put_att_to_output_table;
5716: rDetail_X_rowid ROWID;
5717: get_no_rows INTEGER; -- Bug 1892253
5718: get_no_lrows INTEGER;
5719: BEGIN
5720: if ec_debug.G_debug_level >= 2 then
5721: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5717: get_no_rows INTEGER; -- Bug 1892253
5718: get_no_lrows INTEGER;
5719: BEGIN
5720: if ec_debug.G_debug_level >= 2 then
5721: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5718: get_no_lrows INTEGER;
5719: BEGIN
5720: if ec_debug.G_debug_level >= 2 then
5721: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5719: BEGIN
5720: if ec_debug.G_debug_level >= 2 then
5721: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5720: if ec_debug.G_debug_level >= 2 then
5721: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5721: ec_debug.push('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5722: ec_debug.pl(3,'cDetail_Output_Level: ',cDetail_Output_Level);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5723: ec_debug.pl(3,'cAtt_Seq_Num: ', cAtt_Seq_Num);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5731: ec_debug.pl(3,'cFile_Common_Key: ', cFile_Common_Key);
5724: ec_debug.pl(3,'cEntity_Name: ', cEntity_Name);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5731: ec_debug.pl(3,'cFile_Common_Key: ', cFile_Common_Key);
5732: ec_debug.pl(3,'cAtt_Doc_ID: ' ,cAtt_Doc_ID);
5725: ec_debug.pl(3,'cName: ', cName);
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5731: ec_debug.pl(3,'cFile_Common_Key: ', cFile_Common_Key);
5732: ec_debug.pl(3,'cAtt_Doc_ID: ' ,cAtt_Doc_ID);
5733: end if;
5726: ec_debug.pl(3,'cPK1_Value: ', cPK1_Value);
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5731: ec_debug.pl(3,'cFile_Common_Key: ', cFile_Common_Key);
5732: ec_debug.pl(3,'cAtt_Doc_ID: ' ,cAtt_Doc_ID);
5733: end if;
5734:
5727: ec_debug.pl(3,'cPK2_Value: ', cPK2_Value);
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5731: ec_debug.pl(3,'cFile_Common_Key: ', cFile_Common_Key);
5732: ec_debug.pl(3,'cAtt_Doc_ID: ' ,cAtt_Doc_ID);
5733: end if;
5734:
5735: xProgress := 'POOB-90-1000';
5728: ec_debug.pl(3,'cPK3_Value: ', cPK3_Value);
5729: ec_debug.pl(3,'cPK4_Value: ', cPK4_Value);
5730: ec_debug.pl(3,'cPK5_Value: ', cPK5_Value);
5731: ec_debug.pl(3,'cFile_Common_Key: ', cFile_Common_Key);
5732: ec_debug.pl(3,'cAtt_Doc_ID: ' ,cAtt_Doc_ID);
5733: end if;
5734:
5735: xProgress := 'POOB-90-1000';
5736: ece_flatfile_pvt.select_clause(cTransaction_Type,
5884: cDetail_delete1 := 'DELETE FROM ' || cDetail_Interface || ' WHERE rowid = :col_rowid';
5885:
5886: -- Form DELETE SQL for the Extension Table...
5887: cDetail_delete2 := 'DELETE FROM ' || cDetail_X_Interface || ' WHERE rowid = :col_rowid';
5888: if ec_debug.G_debug_level = 3 then
5889: ec_debug.pl(3,'cDetail_select: ',cDetail_select);
5890: ec_debug.pl(3,'cDetail_delete1: ',cDetail_delete1);
5891: ec_debug.pl(3,'cDetail_delete2: ',cDetail_delete2);
5892: end if;
5885:
5886: -- Form DELETE SQL for the Extension Table...
5887: cDetail_delete2 := 'DELETE FROM ' || cDetail_X_Interface || ' WHERE rowid = :col_rowid';
5888: if ec_debug.G_debug_level = 3 then
5889: ec_debug.pl(3,'cDetail_select: ',cDetail_select);
5890: ec_debug.pl(3,'cDetail_delete1: ',cDetail_delete1);
5891: ec_debug.pl(3,'cDetail_delete2: ',cDetail_delete2);
5892: end if;
5893:
5886: -- Form DELETE SQL for the Extension Table...
5887: cDetail_delete2 := 'DELETE FROM ' || cDetail_X_Interface || ' WHERE rowid = :col_rowid';
5888: if ec_debug.G_debug_level = 3 then
5889: ec_debug.pl(3,'cDetail_select: ',cDetail_select);
5890: ec_debug.pl(3,'cDetail_delete1: ',cDetail_delete1);
5891: ec_debug.pl(3,'cDetail_delete2: ',cDetail_delete2);
5892: end if;
5893:
5894: -- Open Cursors
5887: cDetail_delete2 := 'DELETE FROM ' || cDetail_X_Interface || ' WHERE rowid = :col_rowid';
5888: if ec_debug.G_debug_level = 3 then
5889: ec_debug.pl(3,'cDetail_select: ',cDetail_select);
5890: ec_debug.pl(3,'cDetail_delete1: ',cDetail_delete1);
5891: ec_debug.pl(3,'cDetail_delete2: ',cDetail_delete2);
5892: end if;
5893:
5894: -- Open Cursors
5895: xProgress := 'POOB-90-1110';
5936:
5937: --Set Counter
5938: xProgress := 'POOB-90-1170';
5939: iDetail_count := l_detail_tbl.COUNT;
5940: if ec_debug.G_debug_level = 3 then
5941: ec_debug.pl(3,'iDetail_count: ',iDetail_count);
5942: end if;
5943:
5944: xProgress := 'POOB-90-1180';
5937: --Set Counter
5938: xProgress := 'POOB-90-1170';
5939: iDetail_count := l_detail_tbl.COUNT;
5940: if ec_debug.G_debug_level = 3 then
5941: ec_debug.pl(3,'iDetail_count: ',iDetail_count);
5942: end if;
5943:
5944: xProgress := 'POOB-90-1180';
5945: ece_flatfile_pvt.define_interface_column_type(Detail_sel_c,
6036: xProgress := 'POOB-90-1310';
6037: dbms_sql.close_cursor(Detail_sel_c);
6038: dbms_sql.close_cursor(Detail_del_c1);
6039: dbms_sql.close_cursor(Detail_del_c2);
6040: if ec_debug.G_debug_level >= 2 then
6041: ec_debug.pop ('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
6042: end if;
6043: EXCEPTION
6044: WHEN OTHERS THEN
6037: dbms_sql.close_cursor(Detail_sel_c);
6038: dbms_sql.close_cursor(Detail_del_c1);
6039: dbms_sql.close_cursor(Detail_del_c2);
6040: if ec_debug.G_debug_level >= 2 then
6041: ec_debug.pop ('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
6042: end if;
6043: EXCEPTION
6044: WHEN OTHERS THEN
6045: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6041: ec_debug.pop ('ECE_POO_TRANSACTION.PUT_ATT_DETAIL_TO_OUTPUT_TABLE');
6042: end if;
6043: EXCEPTION
6044: WHEN OTHERS THEN
6045: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6046: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6047:
6048: app_exception.raise_exception;
6049:
6042: end if;
6043: EXCEPTION
6044: WHEN OTHERS THEN
6045: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6046: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6047:
6048: app_exception.raise_exception;
6049:
6050: END put_att_detail_to_output_table;
6078: c_local_chr_9 VARCHAR2(1) := fnd_global.local_chr(9);
6079:
6080:
6081: BEGIN
6082: if EC_DEBUG.G_debug_level >= 2 then
6083: ec_debug.push('ECE_POO_TRANSACTION.WRITE_TO_FILE');
6084: end if;
6085: xProgress := 'POOB-WR-1020';
6086: FOR i IN 1..iData_count LOOP
6079:
6080:
6081: BEGIN
6082: if EC_DEBUG.G_debug_level >= 2 then
6083: ec_debug.push('ECE_POO_TRANSACTION.WRITE_TO_FILE');
6084: end if;
6085: xProgress := 'POOB-WR-1020';
6086: FOR i IN 1..iData_count LOOP
6087: xProgress := 'POOB-WR-1030';
6091: p_Interface_tbl(i).position IS NOT NULL AND
6092: p_Interface_tbl(i).data_length IS NOT NULL THEN
6093: xProgress := 'POOB-WR-1050';
6094: iRow_num := i;
6095: if EC_DEBUG.G_debug_level >= 3 then
6096: ec_debug.pl(3,'iRow_num : ',iRow_num);
6097: end if;
6098: xProgress := 'POOB-WR-1060';
6099: IF p_Interface_tbl(i).interface_column_name = 'RUN_ID' THEN
6092: p_Interface_tbl(i).data_length IS NOT NULL THEN
6093: xProgress := 'POOB-WR-1050';
6094: iRow_num := i;
6095: if EC_DEBUG.G_debug_level >= 3 then
6096: ec_debug.pl(3,'iRow_num : ',iRow_num);
6097: end if;
6098: xProgress := 'POOB-WR-1060';
6099: IF p_Interface_tbl(i).interface_column_name = 'RUN_ID' THEN
6100: cValue := iRun_id;
6153: END IF;
6154: END IF;
6155: END LOOP;
6156:
6157: if EC_DEBUG.G_debug_level >= 2 then
6158: ec_debug.pop('ECE_POO_TRANSACTION.WRITE_TO_FILE');
6159: end if;
6160:
6161: EXCEPTION
6154: END IF;
6155: END LOOP;
6156:
6157: if EC_DEBUG.G_debug_level >= 2 then
6158: ec_debug.pop('ECE_POO_TRANSACTION.WRITE_TO_FILE');
6159: end if;
6160:
6161: EXCEPTION
6162: WHEN utl_file.write_error THEN
6159: end if;
6160:
6161: EXCEPTION
6162: WHEN utl_file.write_error THEN
6163: ec_debug.pl(0,'EC','ECE_UTL_WRITE_ERROR',NULL);
6164: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6165: app_exception.raise_exception;
6166:
6167: WHEN utl_file.invalid_path THEN
6160:
6161: EXCEPTION
6162: WHEN utl_file.write_error THEN
6163: ec_debug.pl(0,'EC','ECE_UTL_WRITE_ERROR',NULL);
6164: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6165: app_exception.raise_exception;
6166:
6167: WHEN utl_file.invalid_path THEN
6168: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_PATH',NULL);
6164: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6165: app_exception.raise_exception;
6166:
6167: WHEN utl_file.invalid_path THEN
6168: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_PATH',NULL);
6169: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6170: app_exception.raise_exception;
6171:
6172: WHEN utl_file.invalid_operation THEN
6165: app_exception.raise_exception;
6166:
6167: WHEN utl_file.invalid_path THEN
6168: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_PATH',NULL);
6169: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6170: app_exception.raise_exception;
6171:
6172: WHEN utl_file.invalid_operation THEN
6173: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
6169: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6170: app_exception.raise_exception;
6171:
6172: WHEN utl_file.invalid_operation THEN
6173: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
6174: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6175: app_exception.raise_exception;
6176:
6177: WHEN OTHERS THEN
6170: app_exception.raise_exception;
6171:
6172: WHEN utl_file.invalid_operation THEN
6173: ec_debug.pl(0,'EC','ECE_UTIL_INVALID_OPERATION',NULL);
6174: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6175: app_exception.raise_exception;
6176:
6177: WHEN OTHERS THEN
6178: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','ECE_POO_TRANSACTION.WRITE_TO_FILE');
6174: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6175: app_exception.raise_exception;
6176:
6177: WHEN OTHERS THEN
6178: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','ECE_POO_TRANSACTION.WRITE_TO_FILE');
6179: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6180: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6175: app_exception.raise_exception;
6176:
6177: WHEN OTHERS THEN
6178: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','ECE_POO_TRANSACTION.WRITE_TO_FILE');
6179: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6180: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6176:
6177: WHEN OTHERS THEN
6178: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','ECE_POO_TRANSACTION.WRITE_TO_FILE');
6179: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6180: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6184: ec_debug.pl(0,'EC','ECE_PLSQL_VALUE','COLUMN_NAME', 'p_interface_tbl(l_count).value');
6177: WHEN OTHERS THEN
6178: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','ECE_POO_TRANSACTION.WRITE_TO_FILE');
6179: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6180: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6184: ec_debug.pl(0,'EC','ECE_PLSQL_VALUE','COLUMN_NAME', 'p_interface_tbl(l_count).value');
6185: ec_debug.pl(0,'EC','ECE_PLSQL_DATA_TYPE','COLUMN_NAME', 'p_interface_tbl(l_count).data_type');
6179: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
6180: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6184: ec_debug.pl(0,'EC','ECE_PLSQL_VALUE','COLUMN_NAME', 'p_interface_tbl(l_count).value');
6185: ec_debug.pl(0,'EC','ECE_PLSQL_DATA_TYPE','COLUMN_NAME', 'p_interface_tbl(l_count).data_type');
6186: ec_debug.pl(0,'EC','ECE_PLSQL_COLUMN_NAME','COLUMN_NAME', 'p_interface_tbl(l_count).base_column');
6187: app_exception.raise_exception;
6180: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6184: ec_debug.pl(0,'EC','ECE_PLSQL_VALUE','COLUMN_NAME', 'p_interface_tbl(l_count).value');
6185: ec_debug.pl(0,'EC','ECE_PLSQL_DATA_TYPE','COLUMN_NAME', 'p_interface_tbl(l_count).data_type');
6186: ec_debug.pl(0,'EC','ECE_PLSQL_COLUMN_NAME','COLUMN_NAME', 'p_interface_tbl(l_count).base_column');
6187: app_exception.raise_exception;
6188:
6181: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6184: ec_debug.pl(0,'EC','ECE_PLSQL_VALUE','COLUMN_NAME', 'p_interface_tbl(l_count).value');
6185: ec_debug.pl(0,'EC','ECE_PLSQL_DATA_TYPE','COLUMN_NAME', 'p_interface_tbl(l_count).data_type');
6186: ec_debug.pl(0,'EC','ECE_PLSQL_COLUMN_NAME','COLUMN_NAME', 'p_interface_tbl(l_count).base_column');
6187: app_exception.raise_exception;
6188:
6189: END write_to_file;
6182:
6183: ec_debug.pl(0,'EC','ECE_PLSQL_POS_NOT_FOUND','COLUMN_NAME', 'to_char(l_count)');
6184: ec_debug.pl(0,'EC','ECE_PLSQL_VALUE','COLUMN_NAME', 'p_interface_tbl(l_count).value');
6185: ec_debug.pl(0,'EC','ECE_PLSQL_DATA_TYPE','COLUMN_NAME', 'p_interface_tbl(l_count).data_type');
6186: ec_debug.pl(0,'EC','ECE_PLSQL_COLUMN_NAME','COLUMN_NAME', 'p_interface_tbl(l_count).base_column');
6187: app_exception.raise_exception;
6188:
6189: END write_to_file;
6190: