1 PACKAGE BODY ENG_Default_Change_Line AS
2 /* $Header: ENGDCHLB.pls 115.8 2003/09/07 19:17:56 mxgovind ship $ */
3
4
5 G_Pkg_Name VARCHAR2(30) := 'ENG_Default_Change_Line';
6
7
8 /*******************************************************************
9 * Following are all get functions which will be used by the attribute
10 * defaulting procedure. Each column needing to be defaulted has one GET
11 * function.
12 ********************************************************************/
13
14 -- Chagne Line Id
15 FUNCTION Get_Change_Line_Id RETURN NUMBER
16 IS
17 CURSOR l_cl_seq_cur IS
18 SELECT ENG_Change_Lines_S.NEXTVAL CL_Id
19 FROM SYS.DUAL ;
20 BEGIN
21 FOR l_cl_seq_rec IN l_cl_seq_cur LOOP
22 RETURN l_cl_seq_rec.CL_Id ;
23 END LOOP ;
24 RETURN NULL ;
25
26 END Get_Change_Line_Id ;
27
28 /* Comment Out
29 PROCEDURE Get_Flex_Change_Line
30 ( p_change_line_rec IN Eng_Eco_Pub.Change_Line_Rec_Type
31 , x_change_line_rec OUT NOCOPY Eng_Eco_Pub.Change_Line_Rec_Type
32 )
33 IS
34 l_change_line_rec Eng_Eco_Pub.Change_Line_Rec_Type ;
35
36 BEGIN
37 -- Initialize change line exp and unexp record
38 l_change_line_rec := p_change_line_rec ;
39
40 -- In the future call Flex APIs for defaults
41
42 IF l_change_line_rec.attribute_category = FND_API.G_MISS_CHAR THEN
43 l_change_line_rec.attribute_category := NULL;
44 END IF;
45
46 IF l_change_line_rec.attribute1 = FND_API.G_MISS_CHAR THEN
47 l_change_line_rec.attribute1 := NULL;
48 END IF;
49
50 IF l_change_line_rec.attribute2 = FND_API.G_MISS_CHAR THEN
51 l_change_line_rec.attribute2 := NULL;
52 END IF;
53
54 IF l_change_line_rec.attribute3 = FND_API.G_MISS_CHAR THEN
55 l_change_line_rec.attribute3 := NULL;
56 END IF;
57
58 IF l_change_line_rec.attribute4 = FND_API.G_MISS_CHAR THEN
59 l_change_line_rec.attribute4 := NULL;
60 END IF;
61
62 IF l_change_line_rec.attribute5 = FND_API.G_MISS_CHAR THEN
63 l_change_line_rec.attribute5 := NULL;
64 END IF;
65
66 IF l_change_line_rec.attribute6 = FND_API.G_MISS_CHAR THEN
67 l_change_line_rec.attribute6 := NULL;
68 END IF;
69
70 IF l_change_line_rec.attribute7 = FND_API.G_MISS_CHAR THEN
71 l_change_line_rec.attribute7 := NULL;
72 END IF;
73
74 IF l_change_line_rec.attribute8 = FND_API.G_MISS_CHAR THEN
75 l_change_line_rec.attribute8 := NULL;
76 END IF;
77
78 IF l_change_line_rec.attribute9 = FND_API.G_MISS_CHAR THEN
79 l_change_line_rec.attribute9 := NULL;
80 END IF;
81
82 IF l_change_line_rec.attribute10 = FND_API.G_MISS_CHAR THEN
83 l_change_line_rec.attribute10 := NULL;
84 END IF;
85
86 IF l_change_line_rec.attribute11 = FND_API.G_MISS_CHAR THEN
87 l_change_line_rec.attribute11 := NULL;
88 END IF;
89
90 IF l_change_line_rec.attribute12 = FND_API.G_MISS_CHAR THEN
91 l_change_line_rec.attribute12 := NULL;
92 END IF;
93
94 IF l_change_line_rec.attribute13 = FND_API.G_MISS_CHAR THEN
95 l_change_line_rec.attribute13 := NULL;
96 END IF;
97
98 IF l_change_line_rec.attribute14 = FND_API.G_MISS_CHAR THEN
99 l_change_line_rec.attribute14 := NULL;
100 END IF;
101
102 IF l_change_line_rec.attribute15 = FND_API.G_MISS_CHAR THEN
103 l_change_line_rec.attribute15 := NULL;
104 END IF;
105
106 x_change_line_rec := l_change_line_rec ;
107
108 END Get_Flex_Change Line ;
109 */
110
111
112 /********************************************************************
113 * Procedure : Attribute_Defaulting for Common
114 * Parameters IN : Chagne Line exposed column record
115 * Chagne Line unexposed column record
116 * Parameters OUT: Chagne Line exposed column record after defaulting
117 * Chagne Line unexposed column record after defaulting
118 * Return Status
119 * Message Token Table
120 * Purpose : Attribute defaulting proc. defualts columns to
121 * appropriate values. Defualting will happen for
122 * exposed as well as unexposed columns.
123 *********************************************************************/
124 PROCEDURE Attribute_Defaulting
125 ( p_change_line_rec IN Eng_Eco_Pub.Change_Line_Rec_Type
126 , p_change_line_unexp_rec IN Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
127 , x_change_line_rec IN OUT NOCOPY Eng_Eco_Pub.Change_Line_Rec_Type
128 , x_change_line_unexp_rec IN OUT NOCOPY Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
129 , x_mesg_token_tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
130 , x_return_status OUT NOCOPY VARCHAR2
131 )
132
133 IS
134
135 l_change_line_rec Eng_Eco_Pub.Change_Line_Rec_Type ;
136 l_change_line_unexp_rec Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type ;
137
138 l_return_status VARCHAR2(1);
139 l_temp_return_status VARCHAR2(1);
140 l_err_text VARCHAR2(2000) ;
141 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
142 l_Temp_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
143
144
145 BEGIN
146
147 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
148 ('Within the Change Line Attr. Defaulting...') ;
149 END IF ;
150
151 l_return_status := FND_API.G_RET_STS_SUCCESS ;
152 x_return_status := FND_API.G_RET_STS_SUCCESS ;
153
154 -- Initialize change line exp and unexp record
155 l_change_line_rec := p_change_line_rec ;
156 l_change_line_unexp_rec := p_change_line_unexp_rec ;
157
158
159 --
160 -- Default Change Line Id
161 --
162 IF l_change_line_unexp_rec.change_line_id IS NULL OR
163 l_change_line_unexp_rec.change_line_id = FND_API.G_MISS_NUM
164 THEN
165 l_change_line_unexp_rec.change_line_id :=
166 Get_Change_Line_Id ;
167 END IF ;
168
169 IF l_change_line_unexp_rec.status_code IS NULL OR
170 l_change_line_unexp_rec.status_code = FND_API.G_MISS_CHAR
171 THEN
172 l_change_line_unexp_rec.status_code := '1';
173 END IF ;
174 --Added as Approval_Status_Type is a mandatory column
175 IF l_change_line_unexp_rec.Approval_Status_Type IS NULL OR
176 l_change_line_unexp_rec.Approval_Status_Type = FND_API.G_MISS_CHAR
177 THEN
178 l_change_line_unexp_rec.Approval_Status_Type := 1;
179 END IF ;
180
181
182
183
184 -- IF l_change_line_rec.attribute_category = FND_API.G_MISS_CHAR
185 -- OR l_change_line_rec.attribute1 = FND_API.G_MISS_CHAR
186 -- OR l_change_line_rec.attribute2 = FND_API.G_MISS_CHAR
187 -- OR l_change_line_rec.attribute3 = FND_API.G_MISS_CHAR
188 -- OR l_change_line_rec.attribute4 = FND_API.G_MISS_CHAR
189 -- OR l_change_line_rec.attribute5 = FND_API.G_MISS_CHAR
190 -- OR l_change_line_rec.attribute6 = FND_API.G_MISS_CHAR
191 -- OR l_change_line_rec.attribute7 = FND_API.G_MISS_CHAR
192 -- OR l_change_line_rec.attribute8 = FND_API.G_MISS_CHAR
193 -- OR l_change_line_rec.attribute9 = FND_API.G_MISS_CHAR
194 -- OR l_change_line_rec.attribute10 = FND_API.G_MISS_CHAR
195 -- OR l_change_line_rec.attribute11 = FND_API.G_MISS_CHAR
196 -- OR l_change_line_rec.attribute12 = FND_API.G_MISS_CHAR
197 -- OR l_change_line_rec.attribute13 = FND_API.G_MISS_CHAR
198 -- OR l_change_line_rec.attribute14 = FND_API.G_MISS_CHAR
199 -- OR l_change_line_rec.attribute15 = FND_API.G_MISS_CHAR
200 -- THEN
201 --
202 -- Get_Flex_Change_Line ( p_change_line_rec => l_change_line_rec
203 -- , x_change_line_rec => l_change_line_rec ) ;
204 -- END IF;
205
206 x_change_line_rec := l_change_line_rec ;
207 x_change_line_unexp_rec := l_change_line_unexp_rec ;
208 x_return_status := l_return_status ;
209 x_mesg_token_tbl := l_mesg_token_tbl ;
210
211 IF BOM_Globals.Get_Debug = 'Y' THEN
212 Error_Handler.Write_Debug('Getting out of Change Line Attribute Defualting...');
213 END IF ;
214
215
216 EXCEPTION
217 WHEN OTHERS THEN
218
219 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
220 ('Some unknown error in Attribute Defaulting . . .' || SQLERRM );
221 END IF ;
222
223
224 l_err_text := G_PKG_NAME || ' Default (Attr. Defaulting) '
225 || substrb(SQLERRM,1,200);
226 -- dbms_output.put_line('Unexpected Error: '||l_err_text);
227
228 Error_Handler.Add_Error_Token
229 ( p_message_name => NULL
230 , p_message_text => l_err_text
231 , p_mesg_token_tbl => l_mesg_token_tbl
232 , x_mesg_token_tbl => l_mesg_token_tbl
233 ) ;
234
235 -- Return the status and message table.
236 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
237 x_mesg_token_tbl := l_mesg_token_tbl ;
238
239
240 END Attribute_Defaulting ;
241
242
243
244 /*******************************************************************
245 * Procedure : Populate_Null_Columns
246 * Parameters IN : Chagne Line exposed column record
247 * Chagne Line unexposed column record
248 * Old Chagne Line exposed column record
249 * Old Chagne Line unexposed column record
250 * Parameters OUT: Chagne Line exposed column record after populating null columns
251 * Chagne Line unexposed column record after populating null columns
252 * Purpose : Complete record will compare the database record with
253 * the user given record and will complete the user
254 * record with values from the database record, for all
255 * columns that the user has left NULL.
256 ********************************************************************/
257 PROCEDURE Populate_Null_Columns
258 ( p_change_line_rec IN Eng_Eco_Pub.Change_Line_Rec_Type
259 , p_change_line_unexp_rec IN Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
260 , p_old_change_line_rec IN Eng_Eco_Pub.Change_Line_Rec_Type
261 , p_old_change_line_unexp_rec IN Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
262 , x_change_line_rec IN OUT NOCOPY Eng_Eco_Pub.Change_Line_Rec_Type
263 , x_change_line_unexp_rec IN OUT NOCOPY Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
264 )
265 IS
266
267 l_change_line_rec Eng_Eco_Pub.Change_Line_Rec_Type ;
268 l_change_line_unexp_rec Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type ;
269
270 BEGIN
271
272 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
273 ('Within the Change Line Populate null columns...') ;
274 END IF ;
275
276 -- Initialize change line exp and unexp record
277 l_change_line_rec := p_change_line_rec ;
278 l_change_line_unexp_rec := p_change_line_unexp_rec ;
279
280
281 -- Exposed Column
282 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
283 ('Populate null exposed columns......') ;
284 END IF ;
285
286
287 IF l_change_line_rec.Description IS NULL
288 THEN
289 l_change_line_rec.Description
290 := p_old_change_line_rec.Description ;
291 END IF ;
292
293 IF l_change_line_rec.Sequence_Number IS NULL
294 THEN
295 l_change_line_rec.Sequence_Number
296 := p_old_change_line_rec.Sequence_Number ;
297 END IF ;
298
299 IF l_change_line_rec.Need_By_Date IS NULL
300 THEN
301 l_change_line_rec.Need_By_Date
302 := p_old_change_line_rec.Need_By_Date;
303 END IF ;
304
305 IF l_change_line_rec.Scheduled_Date IS NULL
306 THEN
307 l_change_line_rec.Scheduled_Date
308 := p_old_change_line_rec.Scheduled_Date;
309 END IF ;
310
311 IF l_change_line_rec.Implementation_Date IS NULL
312 THEN
313 l_change_line_rec.Implementation_Date
314 := p_old_change_line_rec.Implementation_Date;
315 END IF ;
316
317 IF l_change_line_rec.Cancelation_Date IS NULL
318 THEN
319 l_change_line_rec.Cancelation_Date
320 := p_old_change_line_rec.Cancelation_Date;
321 END IF ;
322
323 IF l_change_line_rec.Original_System_Reference IS NULL
324 THEN
325 l_change_line_rec.Original_System_Reference
326 := p_old_change_line_rec.Original_System_Reference ;
327 END IF ;
328
329
330 /* Comment Out
331 -- Populate Null Columns for FlexFields
332 IF l_change_line_rec.attribute_category IS NULL THEN
333 l_change_line_rec.attribute_category :=
334 p_old_change_line_rec.attribute_category;
335 END IF;
336
337 IF l_change_line_rec.attribute1 IS NULL THEN
338 l_change_line_rec.attribute1 :=
339 p_old_change_line_rec.attribute1;
340 END IF;
341
342 IF l_change_line_rec.attribute2 IS NULL THEN
343 l_change_line_rec.attribute2 :=
344 p_old_change_line_rec.attribute2;
345 END IF;
346
347 IF l_change_line_rec.attribute3 IS NULL THEN
348 l_change_line_rec.attribute3 :=
349 p_old_change_line_rec.attribute3;
350 END IF;
351
352 IF l_change_line_rec.attribute4 IS NULL THEN
353 l_change_line_rec.attribute4 :=
354 p_old_change_line_rec.attribute4;
355 END IF;
356
357 IF l_change_line_rec.attribute5 IS NULL THEN
358 l_change_line_rec.attribute5 :=
359 p_old_change_line_rec.attribute5;
360 END IF;
361
362 IF l_change_line_rec.attribute6 IS NULL THEN
363 l_change_line_rec.attribute6 :=
364 p_old_change_line_rec.attribute6;
365 END IF;
366
367 IF l_change_line_rec.attribute7 IS NULL THEN
368 l_change_line_rec.attribute7 :=
369 p_old_change_line_rec.attribute7;
370 END IF;
371
372 IF l_change_line_rec.attribute8 IS NULL THEN
373 l_change_line_rec.attribute8 :=
374 p_old_change_line_rec.attribute8;
375 END IF;
376
377 IF l_change_line_rec.attribute9 IS NULL THEN
378 l_change_line_rec.attribute9 :=
379 p_old_change_line_rec.attribute9;
380 END IF;
381
382 IF l_change_line_rec.attribute10 IS NULL THEN
383 l_change_line_rec.attribute10 :=
384 p_old_change_line_rec.attribute10;
385 END IF;
386
387 IF l_change_line_rec.attribute11 IS NULL THEN
388 l_change_line_rec.attribute11 :=
389 p_old_change_line_rec.attribute11;
390 END IF;
391
392 IF l_change_line_rec.attribute12 IS NULL THEN
393 l_change_line_rec.attribute12 :=
394 p_old_change_line_rec.attribute12;
395 END IF;
396
397 IF l_change_line_rec.attribute13 IS NULL THEN
398 l_change_line_rec.attribute13 :=
399 p_old_change_line_rec.attribute13;
400 END IF;
401
402 IF l_change_line_rec.attribute14 IS NULL THEN
403 l_change_line_rec.attribute14 :=
404 p_old_change_line_rec.attribute14;
405 END IF;
406
407 IF l_change_line_rec.attribute15 IS NULL THEN
408 l_change_line_rec.attribute15 :=
409 p_old_change_line_rec.attribute15;
410 END IF;
411
412 */
413
414 --
415 -- Also copy the Unexposed Columns from Database to New record
416 --
417 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
418 ('Populate Null Unexposed columns......') ;
419 END IF ;
420
421
422 IF l_change_line_unexp_rec.Change_Line_Id IS NULL OR
423 l_change_line_unexp_rec.Change_Line_Id = FND_API.G_MISS_NUM
424 THEN
425 l_change_line_unexp_rec.Change_Line_Id
426 := p_old_change_line_unexp_rec.Change_Line_Id ;
427 END IF ;
428
429 IF l_change_line_unexp_rec.Change_Type_Id IS NULL OR
430 l_change_line_unexp_rec.Change_Type_Id = FND_API.G_MISS_NUM
431 THEN
432 l_change_line_unexp_rec.Change_Type_Id
433 := p_old_change_line_unexp_rec.Change_Type_Id ;
434 END IF ;
435
436 IF l_change_line_unexp_rec.Status_Code IS NULL OR
437 l_change_line_unexp_rec.Status_Code = FND_API.G_MISS_CHAR
438 THEN
439 l_change_line_unexp_rec.Status_Code
440 := p_old_change_line_unexp_rec.Status_Code;
441 END IF ;
442
443 IF l_change_line_unexp_rec.Assignee_Id IS NULL OR
444 l_change_line_unexp_rec.Assignee_Id = FND_API.G_MISS_NUM
445 THEN
446 l_change_line_unexp_rec.Assignee_Id
447 := p_old_change_line_unexp_rec.Assignee_Id ;
448 END IF ;
449
450 IF l_change_line_unexp_rec.Object_Name IS NULL OR
451 l_change_line_unexp_rec.Object_Name = FND_API.G_MISS_CHAR
452 THEN
453 l_change_line_unexp_rec.Object_Name
454 := p_old_change_line_unexp_rec.Object_Name ;
455 END IF ;
456
457 IF l_change_line_unexp_rec.Pk1_Value IS NULL OR
458 l_change_line_unexp_rec.Pk1_Value = FND_API.G_MISS_NUM
459 THEN
460 l_change_line_unexp_rec.Pk1_Value
461 := p_old_change_line_unexp_rec.Pk1_Value ;
462 END IF ;
463
464 IF l_change_line_unexp_rec.Pk2_Value IS NULL OR
465 l_change_line_unexp_rec.Pk2_Value = FND_API.G_MISS_NUM
466 THEN
467 l_change_line_unexp_rec.Pk2_Value
468 := p_old_change_line_unexp_rec.Pk2_Value ;
469 END IF ;
470
471 IF l_change_line_unexp_rec.Pk3_Value IS NULL OR
472 l_change_line_unexp_rec.Pk3_Value = FND_API.G_MISS_NUM
473 THEN
474 l_change_line_unexp_rec.Pk3_Value
475 := p_old_change_line_unexp_rec.Pk3_Value ;
476 END IF ;
477
478 IF l_change_line_unexp_rec.Pk4_Value IS NULL OR
479 l_change_line_unexp_rec.Pk4_Value = FND_API.G_MISS_NUM
480 THEN
481 l_change_line_unexp_rec.Pk4_Value
482 := p_old_change_line_unexp_rec.Pk4_Value ;
483 END IF ;
484
485 IF l_change_line_unexp_rec.Pk5_Value IS NULL OR
486 l_change_line_unexp_rec.Pk5_Value = FND_API.G_MISS_NUM
487 THEN
488 l_change_line_unexp_rec.Pk5_Value
489 := p_old_change_line_unexp_rec.Pk5_Value ;
490 END IF ;
491
492 -- Return change line exp and unexp record
493 x_change_line_rec := l_change_line_rec ;
494 x_change_line_unexp_rec := l_change_line_unexp_rec ;
495
496 END Populate_Null_Columns;
497
498
499 /********************************************************************
500 * Procedure : Entity_Defaulting
501 * Parameters IN : Chagne Line exposed column record
502 * Chagne Line unexposed column record
503 * Parameters OUT: Chagne Line exposed column record after defaulting
504 * Change Line unexposed column record after defaulting
505 * Return Status
506 * Message Token Table
507 * Purpose : Entity defaulting proc. defualts columns to
508 * appropriate values. Defualting will happen for
509 * exposed as well as unexposed columns.
510 *********************************************************************/
511 PROCEDURE Entity_Defaulting
512 ( p_change_line_rec IN Eng_Eco_Pub.Change_Line_Rec_Type
513 , p_change_line_unexp_rec IN Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
514 , p_old_change_line_rec IN Eng_Eco_Pub.Change_Line_Rec_Type
515 , p_old_change_line_unexp_rec IN Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
516 , x_change_line_rec IN OUT NOCOPY Eng_Eco_Pub.Change_Line_Rec_Type
517 , x_change_line_unexp_rec IN OUT NOCOPY Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type
518 , x_mesg_token_tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
519 , x_return_status OUT NOCOPY VARCHAR2
520 )
521
522 IS
523
524 l_change_line_rec Eng_Eco_Pub.Change_Line_Rec_Type ;
525 l_change_line_unexp_rec Eng_Eco_Pub.Change_Line_Unexposed_Rec_Type ;
526
527 l_return_status VARCHAR2(1);
528 l_err_text VARCHAR2(2000) ;
529 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
530
531
532 BEGIN
533
534 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
535 ('Within the Change Line Entity Defaulting...') ;
536 END IF ;
537
538 x_return_status := FND_API.G_RET_STS_SUCCESS;
539 l_return_status := FND_API.G_RET_STS_SUCCESS;
540
541 -- Initialize change line exp and unexp record
542 l_change_line_rec := p_change_line_rec ;
543 l_change_line_unexp_rec := p_change_line_unexp_rec ;
544
545
546 IF l_change_line_rec.Description = FND_API.G_MISS_CHAR
547 THEN
548 l_change_line_rec.Description := NULL ;
549 END IF ;
550
551 IF l_change_line_unexp_rec.Assignee_Id = FND_API.G_MISS_NUM
552 THEN
553 l_change_line_unexp_rec.Assignee_Id := NULL ;
554 END IF;
555
556 IF l_change_line_unexp_rec.Object_Name = FND_API.G_MISS_CHAR
557 THEN
558 l_change_line_unexp_rec.Object_Name := NULL ;
559 END IF;
560
561 IF l_change_line_unexp_rec.Pk1_Value = FND_API.G_MISS_CHAR
562 THEN
563 l_change_line_unexp_rec.Pk1_Value := NULL ;
564 END IF ;
565
566 IF l_change_line_unexp_rec.Pk2_Value = FND_API.G_MISS_CHAR
567 THEN
568 l_change_line_unexp_rec.Pk2_Value := NULL ;
569 END IF ;
570
571 IF l_change_line_unexp_rec.Pk3_Value = FND_API.G_MISS_CHAR
572 THEN
573 l_change_line_unexp_rec.Pk3_Value := NULL ;
574 END IF ;
575
576 IF l_change_line_unexp_rec.Pk4_Value = FND_API.G_MISS_CHAR
577 THEN
578 l_change_line_unexp_rec.Pk4_Value := NULL ;
579 END IF ;
580
581 IF l_change_line_unexp_rec.Pk5_Value = FND_API.G_MISS_CHAR
582 THEN
583 l_change_line_unexp_rec.Pk5_Value := NULL ;
584 END IF ;
585
586
587 /*
588 -- FlexFields
589 IF l_change_line_rec.attribute_category = FND_API.G_MISS_CHAR THEN
590 l_change_line_rec.attribute_category := NULL ;
591 END IF;
592
593 IF l_change_line_rec.attribute1 = FND_API.G_MISS_CHAR THEN
594 l_change_line_rec.attribute1 := NULL ;
595 END IF;
596
597 IF l_change_line_rec.attribute2 = FND_API.G_MISS_CHAR THEN
598 l_change_line_rec.attribute2 := NULL ;
599 END IF;
600
601 IF l_change_line_rec.attribute3 = FND_API.G_MISS_CHAR THEN
602 l_change_line_rec.attribute3 := NULL ;
603 END IF;
604
605 IF l_change_line_rec.attribute4 = FND_API.G_MISS_CHAR THEN
606 l_change_line_rec.attribute4 := NULL ;
607 END IF;
608
609 IF l_change_line_rec.attribute5 = FND_API.G_MISS_CHAR THEN
610 l_change_line_rec.attribute5 := NULL ;
611 END IF;
612
613 IF l_change_line_rec.attribute6 = FND_API.G_MISS_CHAR THEN
614 l_change_line_rec.attribute6 := NULL ;
615 END IF;
616
617 IF l_change_line_rec.attribute7 = FND_API.G_MISS_CHAR THEN
618 l_change_line_rec.attribute7 := NULL ;
619 END IF;
620
621 IF l_change_line_rec.attribute8 = FND_API.G_MISS_CHAR THEN
622 l_change_line_rec.attribute8 := NULL ;
623 END IF;
624
625 IF l_change_line_rec.attribute9 = FND_API.G_MISS_CHAR THEN
626 l_change_line_rec.attribute9 := NULL ;
627 END IF;
628
629 IF l_change_line_rec.attribute10 = FND_API.G_MISS_CHAR THEN
630 l_change_line_rec.attribute10 := NULL ;
631 END IF;
632
633 IF l_change_line_rec.attribute11 = FND_API.G_MISS_CHAR THEN
634 l_change_line_rec.attribute11 := NULL ;
635 END IF;
636
637 IF l_change_line_rec.attribute12 = FND_API.G_MISS_CHAR THEN
638 l_change_line_rec.attribute12 := NULL ;
639 END IF;
640
641 IF l_change_line_rec.attribute13 = FND_API.G_MISS_CHAR THEN
642 l_change_line_rec.attribute13 := NULL ;
643 END IF;
644
645 IF l_change_line_rec.attribute14 = FND_API.G_MISS_CHAR THEN
646 l_change_line_rec.attribute14 := NULL ;
647 END IF;
648
649 IF l_change_line_rec.attribute15 = FND_API.G_MISS_CHAR THEN
650 l_change_line_rec.attribute15 := NULL ;
651 END IF;
652 */
653
654 -- Return the status and message table.
655 x_return_status := l_return_status ;
656 x_mesg_token_tbl := l_mesg_token_tbl ;
657
658 -- Return the change line records after entity defaulting.
659 x_change_line_rec := l_change_line_rec ;
660 x_change_line_unexp_rec := l_change_line_unexp_rec ;
661
662
663 EXCEPTION
664 WHEN OTHERS THEN
665
666 IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
667 ('Some unknown error in Entity Defaulting . . .' || SQLERRM );
668 END IF ;
669
670 l_err_text := G_PKG_NAME || ' Defaulting (Entity Defaulting) '
671 || substrb(SQLERRM,1,200);
672
673 Error_Handler.Add_Error_Token
674 ( p_message_name => NULL
675 , p_message_text => l_err_text
676 , p_mesg_token_tbl => l_mesg_token_tbl
677 , x_mesg_token_tbl => l_mesg_token_tbl
678 ) ;
679
680 -- Return the status and message table.
681 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
682 x_mesg_token_tbl := l_mesg_token_tbl ;
683
684 END Entity_Defaulting ;
685
686
687 END ENG_Default_Change_Line ;