[Home] [Help]
PACKAGE BODY: APPS.ENG_SUB_COMPONENT_UTIL
Source
1 PACKAGE BODY ENG_Sub_Component_Util AS
2 /* $Header: ENGUSBCB.pls 115.11 2002/12/02 12:30:22 akumar ship $ */
3
4 -- Global constant holding the package name
5
6 G_PKG_NAME CONSTANT VARCHAR2(30) := 'ENG_Sub_Component_Util';
7
8
9 -- Function Convert_Miss_To_Null
10
11 FUNCTION Convert_Miss_To_Null
12 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
13 ) RETURN Bom_Bo_Pub.Sub_Component_Rec_Type
14 IS
15 l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type := p_sub_component_rec;
16 BEGIN
17
18 /*
19 IF l_sub_component_rec.substitute_component_id = FND_API.G_MISS_NUM THEN
20 l_sub_component_rec.substitute_component_id := NULL;
21 END IF;
22
23 IF l_sub_component_rec.last_update_date = FND_API.G_MISS_DATE THEN
24 l_sub_component_rec.last_update_date := NULL;
25 END IF;
26
27 IF l_sub_component_rec.last_updated_by = FND_API.G_MISS_NUM THEN
28 l_sub_component_rec.last_updated_by := NULL;
29 END IF;
30
31 IF l_sub_component_rec.creation_date = FND_API.G_MISS_DATE THEN
32 l_sub_component_rec.creation_date := NULL;
33 END IF;
34
35 IF l_sub_component_rec.created_by = FND_API.G_MISS_NUM THEN
36 l_sub_component_rec.created_by := NULL;
37 END IF;
38
39 IF l_sub_component_rec.last_update_login = FND_API.G_MISS_NUM THEN
40 l_sub_component_rec.last_update_login := NULL;
41 END IF;
42
43 IF l_sub_component_rec.substitute_item_quantity = FND_API.G_MISS_NUM THEN
44 l_sub_component_rec.substitute_item_quantity := NULL;
45 END IF;
46
47 IF l_sub_component_rec.component_sequence_id = FND_API.G_MISS_NUM THEN
48 l_sub_component_rec.component_sequence_id := NULL;
49 END IF;
50
51 IF l_sub_component_rec.acd_type = FND_API.G_MISS_NUM THEN
52 l_sub_component_rec.acd_type := NULL;
53 END IF;
54
55 IF l_sub_component_rec.change_notice = FND_API.G_MISS_CHAR THEN
56 l_sub_component_rec.change_notice := NULL;
57 END IF;
58
59 IF l_sub_component_rec.request_id = FND_API.G_MISS_NUM THEN
60 l_sub_component_rec.request_id := NULL;
61 END IF;
62
63 IF l_sub_component_rec.program_application_id = FND_API.G_MISS_NUM THEN
64 l_sub_component_rec.program_application_id := NULL;
65 END IF;
66
67 IF l_sub_component_rec.program_update_date = FND_API.G_MISS_DATE THEN
68 l_sub_component_rec.program_update_date := NULL;
69 END IF;
70
71 IF l_sub_component_rec.attribute_category = FND_API.G_MISS_CHAR THEN
72 l_sub_component_rec.attribute_category := NULL;
73 END IF;
74
75 IF l_sub_component_rec.attribute1 = FND_API.G_MISS_CHAR THEN
76 l_sub_component_rec.attribute1 := NULL;
77 END IF;
78
79 IF l_sub_component_rec.attribute2 = FND_API.G_MISS_CHAR THEN
80 l_sub_component_rec.attribute2 := NULL;
81 END IF;
82
83 IF l_sub_component_rec.attribute4 = FND_API.G_MISS_CHAR THEN
84 l_sub_component_rec.attribute4 := NULL;
85 END IF;
86
87 IF l_sub_component_rec.attribute5 = FND_API.G_MISS_CHAR THEN
88 l_sub_component_rec.attribute5 := NULL;
89 END IF;
90
91 IF l_sub_component_rec.attribute6 = FND_API.G_MISS_CHAR THEN
92 l_sub_component_rec.attribute6 := NULL;
93 END IF;
94
95 IF l_sub_component_rec.attribute8 = FND_API.G_MISS_CHAR THEN
96 l_sub_component_rec.attribute8 := NULL;
97 END IF;
98
99 IF l_sub_component_rec.attribute9 = FND_API.G_MISS_CHAR THEN
100 l_sub_component_rec.attribute9 := NULL;
101 END IF;
102
103 IF l_sub_component_rec.attribute10 = FND_API.G_MISS_CHAR THEN
104 l_sub_component_rec.attribute10 := NULL;
105 END IF;
106
107 IF l_sub_component_rec.attribute12 = FND_API.G_MISS_CHAR THEN
108 l_sub_component_rec.attribute12 := NULL;
109 END IF;
110
111 IF l_sub_component_rec.attribute13 = FND_API.G_MISS_CHAR THEN
112 l_sub_component_rec.attribute13 := NULL;
113 END IF;
114
115 IF l_sub_component_rec.attribute14 = FND_API.G_MISS_CHAR THEN
116 l_sub_component_rec.attribute14 := NULL;
117 END IF;
118
119 IF l_sub_component_rec.attribute15 = FND_API.G_MISS_CHAR THEN
120 l_sub_component_rec.attribute15 := NULL;
121 END IF;
122
123 IF l_sub_component_rec.program_id = FND_API.G_MISS_NUM THEN
124 l_sub_component_rec.program_id := NULL;
125 END IF;
126
127 IF l_sub_component_rec.attribute3 = FND_API.G_MISS_CHAR THEN
128 l_sub_component_rec.attribute3 := NULL;
129 END IF;
130
131 IF l_sub_component_rec.attribute7 = FND_API.G_MISS_CHAR THEN
132 l_sub_component_rec.attribute7 := NULL;
133 END IF;
134
135 IF l_sub_component_rec.attribute11 = FND_API.G_MISS_CHAR THEN
136 l_sub_component_rec.attribute11 := NULL;
137 END IF;
138
139 */
140
141 RETURN l_sub_component_rec;
142
143 END Convert_Miss_To_Null;
144
145 /********************************************************************
146 *
147 * Procedure : Update_Row
148 * Parameter IN : Substitute Component Record
149 * Sub. Comps Unexposed Cols. Record
150 * Parameter OUT : Return_Status - indicating success or failure
151 * Mesg_Token_Tbl - Filled with Errors or warnings
152 * Purpose : Update Row procedure will update the production rec
153 * to the new values as entered in the user record.
154 * Any errors are filled in the Mesg_Token_Tbl.
155 *
156 ********************************************************************/
157
158 PROCEDURE Update_Row
159 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
160 , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
161 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
162 , x_return_status OUT NOCOPY VARCHAR2
163 )
164 IS
165 l_processed BOOLEAN;
166 l_sub_component_rec Bom_Bo_Pub.SUB_COMPONENT_REC_TYPE :=
167 p_sub_component_rec;
168 l_return_status VARCHAR2(200);
169 l_err_text VARCHAR2(255);
170 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
171 BEGIN
172
173 -- Lock the row before updating the row
174 dbms_output.put_line('Within Update Row . . .');
175 dbms_output.put_line('Comp.SeqId : ' ||
176 to_Char(p_sub_comp_Unexp_rec.component_sequence_id)
177 );
178 dbms_output.put_line('Sub. Comp : ' ||
179 to_Char(p_sub_comp_Unexp_rec.substitute_component_id)
180 );
181 dbms_output.put_line('Acd_Type : ' || to_Char(p_sub_component_rec.acd_type));
182
183
184 UPDATE BOM_SUBSTITUTE_COMPONENTS
185 SET SUBSTITUTE_ITEM_QUANTITY =
186 p_sub_component_rec.substitute_item_quantity
187 , ATTRIBUTE_CATEGORY = p_sub_component_rec.attribute_category
188 , ATTRIBUTE1 = p_sub_component_rec.attribute1
189 , ATTRIBUTE2 = p_sub_component_rec.attribute2
190 , ATTRIBUTE3 = p_sub_component_rec.attribute3
191 , ATTRIBUTE4 = p_sub_component_rec.attribute4
192 , ATTRIBUTE5 = p_sub_component_rec.attribute5
193 , ATTRIBUTE6 = p_sub_component_rec.attribute6
194 , ATTRIBUTE7 = p_sub_component_rec.attribute7
195 , ATTRIBUTE8 = p_sub_component_rec.attribute8
196 , ATTRIBUTE9 = p_sub_component_rec.attribute9
197 , ATTRIBUTE10 = p_sub_component_rec.attribute10
198 , ATTRIBUTE11 = p_sub_component_rec.attribute11
199 , ATTRIBUTE12 = p_sub_component_rec.attribute12
200 , ATTRIBUTE13 = p_sub_component_rec.attribute13
201 , ATTRIBUTE14 = p_sub_component_rec.attribute14
202 , ATTRIBUTE15 = p_sub_component_rec.attribute15
203 , Original_system_Reference =
204 p_sub_component_rec.original_system_reference
205 WHERE SUBSTITUTE_COMPONENT_ID =
206 p_sub_comp_Unexp_rec.substitute_component_id
207 AND COMPONENT_SEQUENCE_ID = p_sub_comp_Unexp_rec.component_sequence_id
208 AND ACD_TYPE = p_sub_component_rec.acd_type
209 ;
210 -- end if;
211 dbms_output.put_line('Update Row successful . . . ');
212
213 x_return_status := FND_API.G_RET_STS_SUCCESS;
214 EXCEPTION
215
216 WHEN NO_DATA_FOUND THEN
217 IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
218 THEN
219 Error_Handler.Add_Error_Token
220 ( p_Message_name => 'ENG_NOT_UPDATE_ROW'
221 , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
222 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
223 );
224 END IF;
225
226 x_return_status := FND_API.G_RET_STS_ERROR;
227 x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
228
229 WHEN OTHERS THEN
230
231 IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
232 THEN
233 l_err_text := G_PKG_NAME ||
234 'Utility (SubStitute Component Update)' ||
235 SUBSTR(SQLERRM, 1, 100);
236 dbms_output.put_line('Update Row Unexpected Error: ' || l_err_text);
237
238 Error_Handler.Add_Error_Token
239 ( p_Message_Name => NULL
240 , p_Message_Text => l_err_text
241 , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
242 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
243 );
244 END IF;
245 x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
246 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
247
248 END Update_Row;
249
250 /********************************************************************
251 *
252 * Procedure : Insert_Row
253 * Parameters IN : Substitute Component Record as given by the User
254 * Sub. Comps Unexposed Cols. Record
255 * Parameters OUT: Substitute Component Record
256 * Return_Status - Indicating success or faliure
257 * Mesg_Token_Tbl - Filled with any errors or warnings
258 * Purpose : Will Insert a new substitute component record in
259 * Bom_Substitute_Components table.
260 *
261 ********************************************************************/
262 PROCEDURE Insert_Row
263 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
264 , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
265 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
266 , x_return_status OUT NOCOPY VARCHAR2
267 )
268 IS
269 l_processed BOOLEAN;
270 l_err_text VARCHAR2(255);
271 l_return_status VARCHAR2(200);
272 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
273 BEGIN
274
275
276 INSERT INTO BOM_SUBSTITUTE_COMPONENTS
277 ( SUBSTITUTE_COMPONENT_ID
278 , LAST_UPDATE_DATE
279 , LAST_UPDATED_BY
280 , CREATION_DATE
281 , CREATED_BY
282 , LAST_UPDATE_LOGIN
283 , SUBSTITUTE_ITEM_QUANTITY
284 , COMPONENT_SEQUENCE_ID
285 , ACD_TYPE
286 , CHANGE_NOTICE
287 , REQUEST_ID
288 , PROGRAM_APPLICATION_ID
289 , PROGRAM_UPDATE_DATE
290 , ATTRIBUTE_CATEGORY
291 , ATTRIBUTE1
292 , ATTRIBUTE2
293 , ATTRIBUTE3
294 , ATTRIBUTE4
295 , ATTRIBUTE5
296 , ATTRIBUTE6
297 , ATTRIBUTE7
298 , ATTRIBUTE8
299 , ATTRIBUTE9
300 , ATTRIBUTE10
301 , ATTRIBUTE11
302 , ATTRIBUTE12
303 , ATTRIBUTE13
304 , ATTRIBUTE14
305 , ATTRIBUTE15
306 , PROGRAM_ID
307 , Original_System_Reference
308 )
309 VALUES
310 ( p_sub_comp_unexp_rec.substitute_component_id
311 , SYSDATE
312 , Bom_globals.Get_User_Id
313 , SYSDATE
314 , Bom_Globals.Get_User_Id
315 , Bom_Globals.Get_User_Id
316 , p_sub_component_rec.substitute_item_quantity
317 , p_sub_comp_Unexp_rec.component_sequence_id
318 , p_sub_component_rec.acd_type
319 , p_sub_component_rec.Eco_Name
320 , NULL /* Request Id */
321 , Bom_Globals.Get_Prog_AppId
322 , SYSDATE
323 , p_sub_component_rec.attribute_category
324 , p_sub_component_rec.attribute1
325 , p_sub_component_rec.attribute2
326 , p_sub_component_rec.attribute3
327 , p_sub_component_rec.attribute4
328 , p_sub_component_rec.attribute5
329 , p_sub_component_rec.attribute6
330 , p_sub_component_rec.attribute7
331 , p_sub_component_rec.attribute8
332 , p_sub_component_rec.attribute9
333 , p_sub_component_rec.attribute10
334 , p_sub_component_rec.attribute11
335 , p_sub_component_rec.attribute12
336 , p_sub_component_rec.attribute13
337 , p_sub_component_rec.attribute14
338 , p_sub_component_rec.attribute15
339 , Bom_Globals.Get_Prog_Id
340 , p_sub_component_rec.Original_System_Reference
341 );
342
343 x_return_status := FND_API.G_RET_STS_SUCCESS;
344
345 EXCEPTION
346
347 WHEN OTHERS THEN
348 IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
349 THEN
350 l_err_text := G_PKG_NAME ||
351 'Utility (Substitute Component Insert)' ||
352 SUBSTR(SQLERRM, 1, 100);
353 Error_Handler.Add_Error_Token
354 ( p_Message_Name => NULL
355 , p_Message_text => l_err_text
356 , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
357 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
358 );
359 END IF;
360 x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
361 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
362
363 END Insert_Row;
364
365
366 /********************************************************************
367 *
368 * Procedure : Delete_Row
369 * Parameters IN : Primary Key of Substitute Component Table
370 * Parameters OUT: Return_Status - Indicating success or faliure
371 * Mesg_Token_Tbl - Filled with any errors or warnings
372 * Purpose : Will delete a substitute component record using the
373 * primary unique key.
374 ********************************************************************/
375 PROCEDURE Delete_Row
376 ( p_substitute_component_id IN NUMBER
377 , p_change_notice IN VARCHAR2
378 , p_component_sequence_id IN NUMBER
379 , p_acd_type IN NUMBER
380 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
381 , x_return_status OUT NOCOPY VARCHAR2
382 )
383 IS
384 l_processed BOOLEAN;
385 l_return_status VARCHAR2(200);
386 l_err_text VARCHAR2(255);
387 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
388 BEGIN
389
390 Bom_GLOBALS.Check_Approved_For_Process(p_change_notice,
391 Bom_GLOBALS.Get_org_id,
392 l_processed,
393 l_err_text);
394
395 if (l_processed = TRUE) then
396 Bom_GLOBALS.Set_Request_For_approval(p_change_notice,
397 Bom_GLOBALS.Get_org_id,
398 l_err_text);
399 end if;
400
401 DELETE FROM BOM_SUBSTITUTE_COMPONENTS
402 WHERE SUBSTITUTE_COMPONENT_ID = p_substitute_component_id
403 AND COMPONENT_SEQUENCE_ID = p_component_sequence_id
404 AND ACD_TYPE = p_acd_type
405 ;
406
407 x_return_status := FND_API.G_RET_STS_SUCCESS;
408
409 EXCEPTION
410
411 WHEN OTHERS THEN
412
413 IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
414 THEN
415 l_err_text := G_PKG_NAME ||
416 'Utility (Substitute Component Delete_Row)' ||
417 SUBSTR(SQLERRM, 1, 100);
418
419 Error_Handler.Add_Error_Token
420 ( p_Message_Name => NULL
421 , p_Message_Text => l_err_text
422 , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
423 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
424 );
425 END IF;
426 x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
427 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
428
429 END Delete_Row;
430
431 /********************************************************************
432 *
433 * Procedure : Query_Row
434 * Parameters IN : Substitute Component primary key
435 * Parameters OUT: Substitute Component Record of exposed colmuns
436 * Substitute Component record of unexposed columns
437 * Return_Status - Indicating success or faliure
438 * Mesg_Token_Tbl - Filled with any errors or warnings
439 * Purpose : Complete Record will take the Database record and
440 * compare it with the user record and will complete
441 * the user record by filling in those values from the
442 * record that the user has left blank.
443 * Any user filled in columns will not be overwritten
444 * even if the values do not match.
445 ********************************************************************/
446 PROCEDURE Query_Row
447 ( p_substitute_component_id IN NUMBER
448 , p_component_sequence_id IN NUMBER
449 , p_acd_type IN NUMBER
450 , x_Sub_Component_Rec OUT NOCOPY Bom_Bo_Pub.Sub_Component_Rec_Type
451 , x_Sub_Comp_Unexp_Rec OUT NOCOPY Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
452 , x_return_status OUT NOCOPY VARCHAR2
453 )
454 IS
455 l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;
456 l_Token_Tbl Error_Handler.Token_Tbl_Type;
457 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
458 BEGIN
459
460 SELECT SUBSTITUTE_ITEM_QUANTITY
461 , ATTRIBUTE_CATEGORY
462 , ATTRIBUTE1
463 , ATTRIBUTE2
464 , ATTRIBUTE3
465 , ATTRIBUTE4
466 , ATTRIBUTE5
467 , ATTRIBUTE6
468 , ATTRIBUTE7
469 , ATTRIBUTE8
470 , ATTRIBUTE9
471 , ATTRIBUTE10
472 , ATTRIBUTE11
473 , ATTRIBUTE12
474 , ATTRIBUTE13
475 , ATTRIBUTE14
476 , ATTRIBUTE15
477 , CHANGE_NOTICE
478 , ACD_TYPE
479 , SUBSTITUTE_COMPONENT_ID
480 , COMPONENT_SEQUENCE_ID
481 INTO l_sub_component_rec.substitute_item_quantity
482 , l_sub_component_rec.attribute_category
483 , l_sub_component_rec.attribute1
484 , l_sub_component_rec.attribute2
485 , l_sub_component_rec.attribute3
486 , l_sub_component_rec.attribute4
487 , l_sub_component_rec.attribute5
488 , l_sub_component_rec.attribute6
489 , l_sub_component_rec.attribute7
490 , l_sub_component_rec.attribute8
491 , l_sub_component_rec.attribute9
492 , l_sub_component_rec.attribute10
493 , l_sub_component_rec.attribute11
494 , l_sub_component_rec.attribute12
495 , l_sub_component_rec.attribute13
496 , l_sub_component_rec.attribute14
497 , l_sub_component_rec.attribute15
498 , l_Sub_Component_Rec.Eco_Name
499 , l_Sub_Component_Rec.Acd_Type
500 , x_Sub_comp_Unexp_Rec.Substitute_Component_Id
501 , x_Sub_Comp_Unexp_Rec.Component_Sequence_Id
502 FROM BOM_SUBSTITUTE_COMPONENTS
503 WHERE SUBSTITUTE_COMPONENT_ID = p_substitute_component_id
504 AND COMPONENT_SEQUENCE_ID = p_component_sequence_id
505 AND ACD_TYPE = p_acd_type
506 ;
507
508 x_Sub_Component_Rec := l_sub_component_rec;
509 x_return_status := Bom_Globals.G_RECORD_FOUND;
510
511 EXCEPTION
512 WHEN NO_DATA_FOUND THEN
513 x_Sub_Component_Rec := l_sub_component_rec;
514 x_return_status := Bom_Globals.G_RECORD_NOT_FOUND;
515
516 WHEN OTHERS THEN
517 x_return_status := Bom_Globals.G_RECORD_NOT_FOUND;
518
519 END Query_Row;
520
521 -- Procedure lock_Row
522 --
523
524 PROCEDURE Lock_Row
525 ( x_return_status OUT NOCOPY VARCHAR2
526 , p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
527 , x_sub_component_rec OUT NOCOPY Bom_Bo_Pub.Sub_Component_Rec_Type
528 , x_err_text OUT NOCOPY VARCHAR2
529 )
530 IS
531 l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;
532 l_err_text VARCHAR2(255);
533 BEGIN
534 NULL;
535 END Lock_Row;
536
537 PROCEDURE Perform_Writes
538 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
539 , p_sub_comp_unexp_rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
540 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
541 , x_Return_Status OUT NOCOPY VARCHAR2
542 )
543 IS
544 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
545 l_return_status VARCHAR2(1);
546 l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;
547 l_sub_comp_unexp_rec Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type;
548 BEGIN
549 l_sub_component_rec := p_sub_component_rec;
550 l_sub_comp_unexp_rec := p_sub_comp_unexp_rec;
551
552 IF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_CREATE
553 THEN
554 Insert_Row( p_sub_component_rec => l_sub_component_rec
555 , p_Sub_Comp_Unexp_Rec => l_sub_comp_unexp_rec
556 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
557 , x_return_status => l_return_status
558 );
559 ELSIF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_UPDATE
560 THEN
561 Update_Row( p_sub_component_rec => l_sub_component_rec
562 , p_Sub_Comp_Unexp_Rec => l_sub_comp_unexp_rec
563 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
564 , x_return_status => l_return_status
565 );
566
567 ELSIF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_DELETE
568 THEN
569 Delete_Row
570 ( p_substitute_component_id =>
571 l_sub_comp_unexp_rec.substitute_component_id
572 , p_change_notice =>
573 l_sub_component_rec.eco_name
574 , p_component_sequence_id =>
575 l_sub_comp_unexp_rec.component_sequence_id
576 , p_acd_type =>
577 l_sub_component_rec.acd_type
578 , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
579 , x_return_status => l_return_status
580 );
581
582 END IF;
583
584 x_return_status := l_return_status;
585 x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
586
587 END Perform_Writes;
588
589 END ENG_Sub_Component_Util;