DBA Data[Home] [Help]

PACKAGE BODY: APPS.CE_FORECAST_ROWS1_PKG

Source


1 PACKAGE BODY CE_FORECAST_ROWS1_PKG AS
2 /* $Header: cefrow1b.pls 120.1 2002/11/12 21:25:37 bhchung ship $ 	*/
3 --
4 -- Package
5 --   CE_FORECAST_ROWS1_PKG
6 -- Purpose
7 --   To group all the procedures/functions for table handling of the
8 --   ce_forecast_rows table.
9 -- History
10 --   07.10.96   C. Kawamoto   Created
11 --
12 
13   FUNCTION body_revision RETURN VARCHAR2 IS
14   BEGIN
15 
16     RETURN '$Revision: 120.1 $';
17 
18   END body_revision;
19 
20   FUNCTION spec_revision RETURN VARCHAR2 IS
21   BEGIN
22 
23     RETURN G_spec_revision;
24 
25   END spec_revision;
26 
27   --
28   -- Procedure
29   --   Check_Unique
30   -- Purpose
31   --   Checks the uniqueness of the forecast row inserted.
32   -- History
33   --   07.10.96   C. Kawamoto   Created
34   -- Example
35   --   CE_FORECAST_ROWS1_PKG.Check_Unique(...)
36   -- Notes
37   --
38   PROCEDURE Check_Unique(
39 		X_rowid			VARCHAR2,
40 		X_forecast_header_id	NUMBER,
41 		X_row_number		NUMBER) IS
42 	CURSOR chk_duplicates IS
43 		SELECT 'Duplidate'
44 		FROM ce_forecast_rows cfr
45 		WHERE cfr.forecast_header_id = X_forecast_header_id
46 	 	AND   cfr.row_number = X_row_number
47 		AND  (X_rowid IS NULL
48 		   OR cfr.rowid <> chartorowid(X_rowid));
49 	dummy VARCHAR2(100);
50   BEGIN
51 	OPEN chk_duplicates;
52 	FETCH chk_duplicates INTO dummy;
53 
54 	IF chk_duplicates%FOUND THEN
55 		FND_MESSAGE.Set_Name('CE', 'CE_DUPLICATE_ROW_NUMBER');
56 		APP_EXCEPTION.Raise_exception;
57 	END IF;
58 	CLOSE chk_duplicates;
59   EXCEPTION
60 	WHEN APP_EXCEPTIONS.application_exception THEN
61 		RAISE;
62 	WHEN OTHERS THEn
63 		FND_MESSAGE.Set_Name('CE', 'CE_UNHANDLED_EXCEPTION');
64 		FND_MESSAGE.Set_Token('PROCEDURE', 'ce_cf_rows1_pkg.check_unique');
65 	RAISE;
66   END Check_Unique;
67 
68   --
69   -- Procedure
70   --   insert_row
71   -- Purpose
72   --   To insert new row to ce_forecast_rows.
73   -- History
74   --   07.10.96   C. Kawamoto   Created
75   -- Example
76   --   CE_FORECAST_ROWS1_PKG.Insert_Row(...)
77   -- Notes
78   --
79 
80   PROCEDURE Insert_Row(
81 		X_rowid			IN OUT NOCOPY	VARCHAR2,
82 		X_forecast_row_id	IN OUT NOCOPY	NUMBER,
83 		X_forecast_header_id		NUMBER,
84 		X_row_number			NUMBER,
85 		X_trx_type			VARCHAR2,
86 		X_lead_time			NUMBER,
87 		X_forecast_method		VARCHAR2,
88 		X_discount_option		VARCHAR2,
89 		X_order_status			VARCHAR2,
90 		X_order_date_type		VARCHAR2,
91 		X_code_combination_id		NUMBER,
92 		X_set_of_books_id		NUMBER,
93 		X_org_id			NUMBER,
94 		X_chart_of_accounts_id		NUMBER,
95 		X_budget_name			VARCHAR2,
96 		X_budget_version_id		NUMBER,
97 		X_encumbrance_type_id		NUMBER,
98 		X_roll_forward_type		VARCHAR2,
99 		X_roll_forward_period		NUMBER,
100 		X_customer_profile_class_id	NUMBER,
101 		X_include_dispute_flag		VARCHAR2,
102 		X_sales_stage_id		NUMBER,
103 		X_channel_code			VARCHAR2,
104 		X_win_probability		NUMBER,
105                 X_sales_forecast_status		VARCHAR2,
106 		X_receipt_method_id		NUMBER,
107 		X_bank_account_id		NUMBER,
108 		X_payment_method		VARCHAR2,
109 		X_pay_group			VARCHAR2,
110 		X_payment_priority		NUMBER,
111 		X_vendor_type			VARCHAR2,
112 		X_authorization_status		VARCHAR2,
113 		X_type				VARCHAR2,
114 		X_budget_type			VARCHAR2,
115 		X_budget_version		VARCHAR2,
116 		X_include_hold_flag		VARCHAR2,
117                 X_include_net_cash_flag		VARCHAR2,
118 		X_created_by			NUMBER,
119 		X_creation_date			DATE,
120 		X_last_updated_by		NUMBER,
121 		X_last_update_date		DATE,
122 		X_last_update_login		NUMBER,
123 		X_org_payment_method_id		NUMBER,
124 		X_xtr_bank_account		VARCHAR2,
125 		X_exclude_indic_exp		VARCHAR2,
126 		X_company_code			VARCHAR2,
127 		X_attribute_category		VARCHAR2,
128 		X_attribute1			VARCHAR2,
129 		X_attribute2			VARCHAR2,
130 		X_attribute3			VARCHAR2,
131 		X_attribute4			VARCHAR2,
132 		X_attribute5			VARCHAR2,
133 		X_attribute6			VARCHAR2,
134 		X_attribute7			VARCHAR2,
135 		X_attribute8			VARCHAR2,
136 		X_attribute9			VARCHAR2,
137 		X_attribute10			VARCHAR2,
138 		X_attribute11			VARCHAR2,
139 		X_attribute12			VARCHAR2,
140 		X_attribute13			VARCHAR2,
141 		X_attribute14			VARCHAR2,
142 		X_attribute15			VARCHAR2,
143 		X_description			VARCHAR2,
144 		X_payroll_id			NUMBER,
145 		X_external_source_type		VARCHAR2,
146 		X_criteria_category		VARCHAR2,
147 		X_criteria1			VARCHAR2,
148 		X_criteria2			VARCHAR2,
149 		X_criteria3			VARCHAR2,
150 		X_criteria4			VARCHAR2,
151 		X_criteria5			VARCHAR2,
152 		X_criteria6			VARCHAR2,
153 		X_criteria7			VARCHAR2,
154 		X_criteria8			VARCHAR2,
155 		X_criteria9			VARCHAR2,
156 		X_criteria10			VARCHAR2,
157 		X_criteria11			VARCHAR2,
158 		X_criteria12			VARCHAR2,
159 		X_criteria13			VARCHAR2,
160 		X_criteria14			VARCHAR2,
161 		X_criteria15			VARCHAR2,
162                 X_use_average_payment_days      VARCHAR2,
163                 X_period                        NUMBER,
164                 X_order_type_id                 NUMBER,
165                 X_use_payment_terms             VARCHAR2
166 	) IS
167 		CURSOR C IS SELECT rowid FROM ce_forecast_rows
168 			WHERE forecast_row_id = X_forecast_row_id;
169 		CURSOR C2 IS SELECT ce_forecast_rows_s.nextval FROM sys.dual;
170 
171 	BEGIN
172 		OPEN C2;
173 		FETCH C2 INTO X_forecast_row_id;
174 		CLOSE C2;
175 
176 		INSERT INTO ce_forecast_rows(
177 			forecast_row_id,
178 			forecast_header_id,
179 			row_number,
180 			trx_type,
181 			lead_time,
182 			forecast_method,
183 			discount_option,
184 			order_status,
185 			order_date_type,
186 			code_combination_id,
187 			set_of_books_id,
188 			org_id,
189 			chart_of_accounts_id,
190 			budget_name,
191 			budget_version_id,
192 			encumbrance_type_id,
193 			roll_forward_type,
194 			roll_forward_period,
195 			customer_profile_class_id,
196 			include_dispute_flag,
197 			sales_stage_id,
198 			channel_code,
199 			win_probability,
200                         sales_forecast_status,
201 			receipt_method_id,
202 			bank_account_id,
203 			payment_method,
204 			pay_group,
205 			payment_priority,
206 			vendor_type,
207 			authorization_status,
208 			type,
209 			budget_type,
210 			budget_version,
211 			include_hold_flag,
212                 	include_net_cash_flag,
213 			xtr_bank_account,
214 			exclude_indic_exp,
215 			company_code,
216 			created_by,
217 			creation_date,
218 			last_updated_by,
219 			last_update_date,
220 			last_update_login,
221 			org_payment_method_id,
222 			attribute_category,
223 			attribute1,
224 			attribute2,
225 			attribute3,
226 			attribute4,
227 			attribute5,
228 			attribute6,
229 			attribute7,
230 			attribute8,
231 			attribute9,
232 			attribute10,
233 			attribute11,
234 			attribute12,
235 			attribute13,
236 			attribute14,
237 			attribute15,
238 			description,
239 			payroll_id,
240 			external_source_type,
241 			criteria_category,
242 			criteria1,
243 			criteria2,
244 			criteria3,
245 			criteria4,
246 			criteria5,
247 			criteria6,
248 			criteria7,
249 			criteria8,
250 			criteria9,
251 			criteria10,
252 			criteria11,
253 			criteria12,
254 			criteria13,
255 			criteria14,
256 			criteria15,
257                         use_average_payment_days,
258                         period,
259                         order_type_id,
260                         use_payment_terms
261 		) VALUES (
262 			X_forecast_row_id,
263 			X_forecast_header_id,
264 			X_row_number,
265 			X_trx_type,
266 			X_lead_time,
267 			X_forecast_method,
268 			X_discount_option,
269 			X_order_status,
270 			X_order_date_type,
271 			X_code_combination_id,
272 			X_set_of_books_id,
273 			X_org_id,
274 			X_chart_of_accounts_id,
275 			X_budget_name,
276 			X_budget_version_id,
277 			X_encumbrance_type_id,
278 			X_roll_forward_type,
279 			X_roll_forward_period,
280 			X_customer_profile_class_id,
281 			X_include_dispute_flag,
282 			X_sales_stage_id,
283 			X_channel_code,
284 			X_win_probability,
285                         X_sales_forecast_status,
286 			X_receipt_method_id,
287 			X_bank_account_id,
288 			X_payment_method,
289 			X_pay_group,
290 			X_payment_priority,
291 			X_vendor_type,
292 			X_authorization_status,
293 			X_type,
294 			X_budget_type,
295 			X_budget_version,
296 			X_include_hold_flag,
297                    	X_include_net_cash_flag,
298 			X_xtr_bank_account,
299 			X_exclude_indic_exp,
300 			X_company_code,
301 			X_created_by,
302 			X_creation_date,
303 			X_last_updated_by,
304 			X_last_update_date,
305 			X_last_update_login,
306 			X_org_payment_method_id,
307 			X_attribute_category,
308 			X_attribute1,
309 			X_attribute2,
310 			X_attribute3,
311 			X_attribute4,
312 			X_attribute5,
313 			X_attribute6,
314 			X_attribute7,
315 			X_attribute8,
316 			X_attribute9,
317 			X_attribute10,
318 			X_attribute11,
319 			X_attribute12,
320 			X_attribute13,
321 			X_attribute14,
322 			X_attribute15,
323 			X_description,
324 			X_payroll_id,
325 			X_external_source_type,
326 			X_criteria_category,
327 			X_criteria1,
328 			X_criteria2,
329 			X_criteria3,
330 			X_criteria4,
331 			X_criteria5,
332 			X_criteria6,
333 			X_criteria7,
334 			X_criteria8,
335 			X_criteria9,
336 			X_criteria10,
337 			X_criteria11,
338 			X_criteria12,
339 			X_criteria13,
340 			X_criteria14,
341 			X_criteria15,
342                         X_use_average_payment_days,
343                         X_period,
344                         X_order_type_id,
345                         X_use_payment_terms
346 		);
347 		OPEN C;
348 		FETCH C INTO X_rowid;
349 		if (C%NOTFOUND) then
350 			CLOSE C;
351 			Raise NO_DATA_FOUND;
352 		end if;
353 		CLOSE C;
354 	END Insert_Row;
355   --
356   -- Procedure
357   --   lock_row
358   -- Purpose
359   --   To lock a row from ce_forecast_rows.
360   -- History
361   --   07.10.96   C. Kawamoto   Created
362   -- Example
363   --   CE_FORECAST_ROWS1_PKG.Lock_Row(...)
364   -- Notes
365   --
366 
367   PROCEDURE Lock_Row(
368 		X_rowid				VARCHAR2,
369 		X_forecast_row_id		NUMBER,
370 		X_forecast_header_id		NUMBER,
371 		X_row_number			NUMBER,
372 		X_trx_type			VARCHAR2,
373 		X_lead_time			NUMBER,
374 		X_forecast_method		VARCHAR2,
375 		X_discount_option		VARCHAR2,
376 		X_order_status			VARCHAR2,
377 		X_order_date_type		VARCHAR2,
378 		X_code_combination_id		NUMBER,
379 		X_set_of_books_id		NUMBER,
380 		X_org_id			NUMBER,
381 		X_chart_of_accounts_id		NUMBER,
382 		X_budget_name			VARCHAR2,
383 		X_budget_version_id		NUMBER,
384 		X_encumbrance_type_id		NUMBER,
385 		X_roll_forward_type		VARCHAR2,
386 		X_roll_forward_period		NUMBER,
387 		X_customer_profile_class_id	NUMBER,
388 		X_include_dispute_flag		VARCHAR2,
389 		X_sales_stage_id		NUMBER,
390 		X_channel_code			VARCHAR2,
391 		X_win_probability		NUMBER,
392                 X_sales_forecast_status		VARCHAR2,
393 		X_receipt_method_id		NUMBER,
394 		X_bank_account_id		NUMBER,
395 		X_payment_method		VARCHAR2,
396 		X_pay_group			VARCHAR2,
397 		X_payment_priority		NUMBER,
398 		X_vendor_type			VARCHAR2,
399 		X_authorization_status		VARCHAR2,
400 		X_type				VARCHAR2,
401 		X_budget_type			VARCHAR2,
402 		X_budget_version		VARCHAR2,
403 		X_include_hold_flag		VARCHAR2,
404                 X_include_net_cash_flag		VARCHAR2,
405 		X_created_by			NUMBER,
406 		X_creation_date			DATE,
407 		X_last_updated_by		NUMBER,
408 		X_last_update_date		DATE,
409 		X_last_update_login		NUMBER,
410 		X_org_payment_method_id		NUMBER,
411 		X_xtr_bank_account		VARCHAR2,
412 		X_exclude_indic_exp		VARCHAR2,
413 		X_company_code			VARCHAR2,
414 		X_attribute_category		VARCHAR2,
415 		X_attribute1			VARCHAR2,
416 		X_attribute2			VARCHAR2,
417 		X_attribute3			VARCHAR2,
418 		X_attribute4			VARCHAR2,
419 		X_attribute5			VARCHAR2,
420 		X_attribute6			VARCHAR2,
421 		X_attribute7			VARCHAR2,
422 		X_attribute8			VARCHAR2,
423 		X_attribute9			VARCHAR2,
424 		X_attribute10			VARCHAR2,
425 		X_attribute11			VARCHAR2,
426 		X_attribute12			VARCHAR2,
427 		X_attribute13			VARCHAR2,
428 		X_attribute14			VARCHAR2,
429 		X_attribute15			VARCHAR2,
430 		X_description			VARCHAR2,
431 		X_payroll_id			NUMBER,
432 		X_external_source_type		VARCHAR2,
433 		X_criteria_category		VARCHAR2,
434 		X_criteria1			VARCHAR2,
435 		X_criteria2			VARCHAR2,
436 		X_criteria3			VARCHAR2,
437 		X_criteria4			VARCHAR2,
438 		X_criteria5			VARCHAR2,
439 		X_criteria6			VARCHAR2,
440 		X_criteria7			VARCHAR2,
441 		X_criteria8			VARCHAR2,
442 		X_criteria9			VARCHAR2,
443 		X_criteria10			VARCHAR2,
444 		X_criteria11			VARCHAR2,
445 		X_criteria12			VARCHAR2,
446 		X_criteria13			VARCHAR2,
447 		X_criteria14			VARCHAR2,
448 		X_criteria15			VARCHAR2,
449                 X_use_average_payment_days      VARCHAR2,
450                 X_period                        NUMBER,
451                 X_order_type_id                 NUMBER,
452                 X_use_payment_terms             VARCHAR2
453 	) IS
454 		CURSOR C IS
455 			SELECT *
456 			FROM ce_forecast_rows
457 			WHERE rowid = X_rowid
458 			FOR UPDATE of forecast_row_id NOWAIT;
459 		Recinfo C%ROWTYPE;
460   BEGIN
461 	OPEN C;
462 	FETCH C INTO Recinfo;
463 	if (C%NOTFOUND) then
464 		CLOSE C;
465 		FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
466 		APP_EXCEPTION.Raise_Exception;
467 	end if;
468 	CLOSE C;
469 	if (
470 			(Recinfo.forecast_row_id = X_forecast_row_id)
471 		   AND	(Recinfo.forecast_header_id = X_forecast_header_id)
472 		   AND  (Recinfo.row_number = X_row_number)
473 	   	   AND  (Recinfo.trx_type = X_trx_type)
474 		   AND	(    (Recinfo.lead_time = X_lead_time)
475 			 OR  (  (Recinfo.lead_time IS NULL)
476 			     AND (X_lead_time IS NULL)))
477 	 	   AND  (    (Recinfo.forecast_method = X_forecast_method)
478 			 OR  (  (Recinfo.forecast_method IS NULL)
479 			     AND (X_forecast_method IS NULL)))
480 		   AND  (    (Recinfo.discount_option = X_discount_option)
481 			 OR  (  (Recinfo.discount_option IS NULL)
482 	 	 	     AND (X_discount_option IS NULL)))
483 	 	   AND  (    (Recinfo.order_status = X_order_status)
484 			 OR  (  (Recinfo.order_status IS NULL)
485                              AND (X_order_status IS NULL)))
486 	 	   AND  (    (Recinfo.order_date_type = X_order_date_type)
487 			 OR  (  (Recinfo.order_date_type IS NULL)
488   			     AND (X_order_date_type IS NULL)))
489 	 	   AND  (    (Recinfo.code_combination_id = X_code_combination_id)
490 			 OR  (  (Recinfo.code_combination_id IS NULL)
491 			     AND (X_code_combination_id IS NULL)))
492 	 	   AND  (    (Recinfo.set_of_books_id = X_set_of_books_id)
493 			 OR  (  (Recinfo.set_of_books_id IS NULL)
494 			     AND (X_set_of_books_id IS NULL)))
495 	 	   AND  (    (Recinfo.org_id = X_org_id)
496 			 OR  (  (Recinfo.org_id IS NULL)
497 			     AND (X_org_id IS NULL)))
498 	 	   AND  (    (Recinfo.chart_of_accounts_id = X_chart_of_accounts_id)
499 			 OR  (  (Recinfo.chart_of_accounts_id IS NULL)
500 			     AND (X_chart_of_accounts_id IS NULL)))
501 	 	   AND  (    (Recinfo.budget_name = X_budget_name)
502 			 OR  (  (Recinfo.budget_name IS NULL)
503 			     AND (X_budget_name IS NULL)))
504 		   AND  (    (Recinfo.budget_version_id = X_budget_version_id)
505 			 OR  (  (Recinfo.budget_version_id IS NULL)
506 			     AND (X_budget_version_id IS NULL)))
507 	 	   AND  (    (Recinfo.encumbrance_type_id = X_encumbrance_type_id)
508 			 OR  (  (Recinfo.encumbrance_type_id IS NULL)
509 			     AND (X_encumbrance_type_id IS NULL)))
513 		   AND  (    (Recinfo.roll_forward_period = X_roll_forward_period)
510 		   AND  (    (Recinfo.roll_forward_type = X_roll_forward_type)
511 			 OR  (  (Recinfo.roll_forward_type IS NULL)
512 			     AND (X_roll_forward_type IS NULL)))
514 			 OR  (  (Recinfo.roll_forward_period IS NULL)
515 			     AND (X_roll_forward_period IS NULL)))
516                    AND  (    (Recinfo.customer_profile_class_id = X_customer_profile_class_id)
517                          OR  (  (Recinfo.customer_profile_class_id IS NULL)
518                              AND (X_customer_profile_class_id IS NULL)))
519                    AND  (    (Recinfo.include_dispute_flag = X_include_dispute_flag)
520                          OR  (  (Recinfo.include_dispute_flag IS NULL)
521                              AND (X_include_dispute_flag IS NULL)))
522                    AND  (    (Recinfo.include_hold_flag = X_include_hold_flag)
523                          OR  (  (Recinfo.include_hold_flag IS NULL)
524                              AND (X_include_hold_flag IS NULL)))
525                    AND  (    (Recinfo.include_net_cash_flag = X_include_net_cash_flag)
526                          OR  (  (Recinfo.include_net_cash_flag IS NULL)
527                              AND (X_include_net_cash_flag IS NULL)))
528                    AND  (    (Recinfo.sales_stage_id = X_sales_stage_id)
529                          OR  (  (Recinfo.sales_stage_id IS NULL)
530                              AND (X_sales_stage_id IS NULL)))
531                    AND  (    (Recinfo.channel_code = X_channel_code)
532                          OR  (  (Recinfo.channel_code IS NULL)
533                              AND (X_channel_code IS NULL)))
534                    AND  (    (Recinfo.win_probability = X_win_probability)
535                          OR  (  (Recinfo.win_probability IS NULL)
536                              AND (X_win_probability IS NULL)))
537                    AND  (    (Recinfo.sales_forecast_status = X_sales_forecast_status)
538                          OR  (  (Recinfo.sales_forecast_status IS NULL)
539                              AND (X_sales_forecast_status IS NULL)))
540                    AND  (    (Recinfo.receipt_method_id = X_receipt_method_id)
541                          OR  (  (Recinfo.receipt_method_id IS NULL)
542                              AND (X_receipt_method_id IS NULL)))
543                    AND  (    (Recinfo.bank_account_id = X_bank_account_id)
544                          OR  (  (Recinfo.bank_account_id IS NULL)
545                              AND (X_bank_account_id IS NULL)))
546                    AND  (    (Recinfo.payment_method = X_payment_method)
547                          OR  (  (Recinfo.payment_method IS NULL)
548                              AND (X_payment_method IS NULL)))
549 		   AND  (    (Recinfo.pay_group = X_pay_group)
550                          OR  (  (Recinfo.pay_group IS NULL)
551                              AND (X_pay_group IS NULL)))
552                    AND  (    (Recinfo.payment_priority = X_payment_priority)
553                          OR  (  (Recinfo.payment_priority IS NULL)
554                              AND (X_payment_priority IS NULL)))
555 		   AND  (    (Recinfo.vendor_type = X_vendor_type)
556 		         OR  (  (Recinfo.vendor_type IS NULL)
557 			     AND (X_vendor_type IS NULL)))
558                    AND  (    (Recinfo.org_payment_method_id = X_org_payment_method_id)
559                          OR  (  (Recinfo.org_payment_method_id IS NULL)
560                              AND (X_org_payment_method_id IS NULL)))
561                    AND  (    (Recinfo.type = X_type)
562                          OR  (  (Recinfo.type IS NULL)
563                              AND (X_type IS NULL)))
564                    AND  (    (Recinfo.xtr_bank_account = X_xtr_bank_account)
565                          OR  (  (Recinfo.xtr_bank_account IS NULL)
566                              AND (X_xtr_bank_account IS NULL)))
567                    AND  (    (Recinfo.exclude_indic_exp = X_exclude_indic_exp)
568                          OR  (  (Recinfo.exclude_indic_exp IS NULL)
569                              AND (X_exclude_indic_exp IS NULL)))
570                    AND  (    (Recinfo.company_code = X_company_code)
571                          OR  (  (Recinfo.company_code IS NULL)
572                              AND (X_company_code IS NULL)))
573                    AND  (    (Recinfo.budget_type = X_budget_type)
574                          OR  (  (Recinfo.budget_type IS NULL)
575                              AND (X_budget_type IS NULL)))
576                    AND  (    (Recinfo.budget_version = X_budget_version)
577                          OR  (  (Recinfo.budget_version IS NULL)
578                              AND (X_budget_version IS NULL)))
579 	   	   AND  (    (Recinfo.attribute_category = X_attribute_category)
580 			 OR  (  (Recinfo.attribute_category IS NULL)
581 			     AND (X_attribute_category IS NULL)))
582 		   AND  (    (Recinfo.attribute1 = X_attribute1)
583 			 OR  (  (Recinfo.attribute1 IS NULL)
584 			     AND (X_attribute1 IS NULL)))
585 		   AND  (    (Recinfo.attribute2 = X_attribute2)
586 			 OR  (  (Recinfo.attribute2 IS NULL)
587 			     AND (X_attribute2 IS NULL)))
588 		   AND  (    (Recinfo.attribute3 = X_attribute3)
589 			 OR  (  (Recinfo.attribute3 IS NULL)
590 			     AND (X_attribute3 IS NULL)))
591 		   AND  (    (Recinfo.attribute4 = X_attribute4)
592 			 OR  (  (Recinfo.attribute4 IS NULL)
593 			     AND (X_attribute4 IS NULL)))
594 		   AND  (    (Recinfo.attribute5 = X_attribute5)
595 			 OR  (  (Recinfo.attribute5 IS NULL)
596 			     AND (X_attribute5 IS NULL)))
597 		   AND  (    (Recinfo.attribute6 = X_attribute6)
598 			 OR  (  (Recinfo.attribute6 IS NULL)
599 			     AND (X_attribute6 IS NULL)))
600 		   AND  (    (Recinfo.attribute7 = X_attribute7)
601 			 OR  (  (Recinfo.attribute7 IS NULL)
602 			     AND (X_attribute7 IS NULL)))
603 		   AND  (    (Recinfo.attribute8 = X_attribute8)
604 			 OR  (  (Recinfo.attribute8 IS NULL)
605 			     AND (X_attribute8 IS NULL)))
606 		   AND  (    (Recinfo.attribute9 = X_attribute9)
610 			 OR  (  (Recinfo.attribute10 IS NULL)
607 			 OR  (  (Recinfo.attribute9 IS NULL)
608 			     AND (X_attribute9 IS NULL)))
609 		   AND  (    (Recinfo.attribute10 = X_attribute10)
611 			     AND (X_attribute10 IS NULL)))
612 		   AND  (    (Recinfo.attribute11 = X_attribute11)
613 			 OR  (  (Recinfo.attribute11 IS NULL)
614 			     AND (X_attribute11 IS NULL)))
615 		   AND  (    (Recinfo.attribute12 = X_attribute12)
616 			 OR  (  (Recinfo.attribute12 IS NULL)
617 			     AND (X_attribute12 IS NULL)))
618 		   AND  (    (Recinfo.attribute13 = X_attribute13)
619 			 OR  (  (Recinfo.attribute13 IS NULL)
620 			     AND (X_attribute13 IS NULL)))
621 		   AND  (    (Recinfo.attribute14 = X_attribute14)
622 			 OR  (  (Recinfo.attribute14 IS NULL)
623 			     AND (X_attribute14 IS NULL)))
624 		   AND  (    (Recinfo.attribute15 = X_attribute15)
625 			 OR  (  (Recinfo.attribute15 IS NULL)
626 			     AND (X_attribute15 IS NULL)))
627                    AND  (    (Recinfo.description = X_description)
628                          OR  (  (Recinfo.description IS NULL)
629                              AND (X_description IS NULL)))
630                    AND  (    (Recinfo.payroll_id = X_payroll_id)
631                          OR  (  (Recinfo.payroll_id IS NULL)
632                              AND (X_payroll_id IS NULL)))
633                    AND  (    (Recinfo.external_source_type = X_external_source_type)
634                          OR  (  (Recinfo.external_source_type IS NULL)
635                              AND (X_external_source_type IS NULL)))
636                    AND  (    (Recinfo.criteria_category = X_criteria_category)
637                          OR  (  (Recinfo.criteria_category IS NULL)
638                              AND (X_criteria_category IS NULL)))
639                    AND  (    (Recinfo.criteria1 = X_criteria1)
640                          OR  (  (Recinfo.criteria1 IS NULL)
641                              AND (X_criteria1 IS NULL)))
642                    AND  (    (Recinfo.criteria2 = X_criteria2)
643                          OR  (  (Recinfo.criteria2 IS NULL)
644                              AND (X_criteria2 IS NULL)))
645                    AND  (    (Recinfo.criteria3 = X_criteria3)
646                          OR  (  (Recinfo.criteria3 IS NULL)
647                              AND (X_criteria3 IS NULL)))
648                    AND  (    (Recinfo.criteria4 = X_criteria4)
649                          OR  (  (Recinfo.criteria4 IS NULL)
650                              AND (X_criteria4 IS NULL)))
651                    AND  (    (Recinfo.criteria5 = X_criteria5)
652                          OR  (  (Recinfo.criteria5 IS NULL)
653                              AND (X_criteria5 IS NULL)))
654                    AND  (    (Recinfo.criteria6 = X_criteria6)
655                          OR  (  (Recinfo.criteria6 IS NULL)
656                              AND (X_criteria6 IS NULL)))
657                    AND  (    (Recinfo.criteria7 = X_criteria7)
658                          OR  (  (Recinfo.criteria7 IS NULL)
659                              AND (X_criteria7 IS NULL)))
660                    AND  (    (Recinfo.criteria8 = X_criteria8)
661                          OR  (  (Recinfo.criteria8 IS NULL)
662                              AND (X_criteria8 IS NULL)))
663                    AND  (    (Recinfo.criteria9 = X_criteria9)
664                          OR  (  (Recinfo.criteria9 IS NULL)
665                              AND (X_criteria9 IS NULL)))
666                    AND  (    (Recinfo.criteria10 = X_criteria10)
667                          OR  (  (Recinfo.criteria10 IS NULL)
668                              AND (X_criteria10 IS NULL)))
669                    AND  (    (Recinfo.criteria11 = X_criteria11)
670                          OR  (  (Recinfo.criteria11 IS NULL)
671                              AND (X_criteria11 IS NULL)))
672                    AND  (    (Recinfo.criteria12 = X_criteria12)
673                          OR  (  (Recinfo.criteria12 IS NULL)
674                              AND (X_criteria12 IS NULL)))
675                    AND  (    (Recinfo.criteria13 = X_criteria13)
676                          OR  (  (Recinfo.criteria13 IS NULL)
677                              AND (X_criteria13 IS NULL)))
678                    AND  (    (Recinfo.criteria14 = X_criteria14)
679                          OR  (  (Recinfo.criteria14 IS NULL)
680                              AND (X_criteria14 IS NULL)))
681                    AND  (    (Recinfo.criteria15 = X_criteria15)
682                          OR  (  (Recinfo.criteria15 IS NULL)
683                              AND (X_criteria15 IS NULL)))
684                    AND  (    (Recinfo.use_average_payment_days = X_use_average_payment_days)
685                          OR  (  (Recinfo.use_average_payment_days IS NULL)
686                              AND (X_use_average_payment_days IS NULL)))
687                    AND  (    (Recinfo.period = X_period)
688                          OR  (  (Recinfo.period IS NULL)
689                              AND (X_period IS NULL)))
690                    AND  (    (Recinfo.order_type_id = X_order_type_id)
691                          OR  (  (Recinfo.order_type_id IS NULL)
692                              AND (X_order_type_id IS NULL)))
693                    AND  (    (Recinfo.use_payment_terms = X_use_payment_terms)
694                          OR  (  (Recinfo.use_payment_terms IS NULL)
695                              AND (X_use_payment_terms IS NULL)))
696 	) then
697 	return;
698 	else
699 		FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
700 		APP_EXCEPTION.Raise_Exception;
701 	end if;
702   END Lock_Row;
703 
704 
705 END CE_FORECAST_ROWS1_PKG;