177:
178: PROCEDURE Update_Row
179: ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
180: , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
181: , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
182: , x_return_status IN OUT NOCOPY VARCHAR2
183: )
184: IS
185: l_processed BOOLEAN;
186: l_sub_component_rec Bom_Bo_Pub.SUB_COMPONENT_REC_TYPE :=
187: p_sub_component_rec;
188: l_return_status VARCHAR2(200);
189: l_err_text VARCHAR2(255);
190: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
191: BEGIN
192:
193: -- Lock the row before updating the row
194: --dbms_output.put_line('Within Update Row . . .');
200: -- );
201: --dbms_output.put_line('Acd_Type : ' || to_Char(p_sub_component_rec.acd_type));
202:
203:
204: Error_Handler.Write_Debug ('Updating SCOMP Perform Writes ...');
205:
206: --bug:3254815 Update request id, prog id, prog appl id and prog update date.
207: UPDATE BOM_SUBSTITUTE_COMPONENTS
208: SET SUBSTITUTE_COMPONENT_ID = DECODE(p_sub_comp_Unexp_rec.new_substitute_component_id,
261:
262: WHEN NO_DATA_FOUND THEN
263: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
264: THEN
265: Error_Handler.Add_Error_Token
266: ( p_Message_name => 'BOM_NOT_UPDATE_ROW'
267: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
268: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
269: );
280: 'Utility (SubStitute Component Update)' ||
281: SUBSTR(SQLERRM, 1, 100);
282: --dbms_output.put_line('Update Row Unexpected Error: ' || l_err_text);
283:
284: Error_Handler.Add_Error_Token
285: ( p_Message_Name => NULL
286: , p_Message_Text => l_err_text
287: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
288: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
307: ********************************************************************/
308: PROCEDURE Insert_Row
309: ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
310: , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
311: , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
312: , x_return_status IN OUT NOCOPY VARCHAR2
313: )
314: IS
315: l_processed BOOLEAN;
314: IS
315: l_processed BOOLEAN;
316: l_err_text VARCHAR2(255);
317: l_return_status VARCHAR2(200);
318: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
319: BEGIN
320:
321: Error_Handler.Write_Debug ('Inserting SCOMP Perform Writes ...');
322:
317: l_return_status VARCHAR2(200);
318: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
319: BEGIN
320:
321: Error_Handler.Write_Debug ('Inserting SCOMP Perform Writes ...');
322:
323: INSERT INTO BOM_SUBSTITUTE_COMPONENTS
324: ( SUBSTITUTE_COMPONENT_ID
325: , LAST_UPDATE_DATE
401: THEN
402: l_err_text := G_PKG_NAME ||
403: 'Utility (Substitute Component Insert)' ||
404: SUBSTR(SQLERRM, 1, 100);
405: Error_Handler.Add_Error_Token
406: ( p_Message_Name => NULL
407: , p_Message_text => l_err_text
408: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
409: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
428: ( p_substitute_component_id IN NUMBER
429: , p_change_notice IN VARCHAR2
430: , p_component_sequence_id IN NUMBER
431: , p_acd_type IN NUMBER
432: , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
433: , x_return_status IN OUT NOCOPY VARCHAR2
434: )
435: IS
436: l_processed BOOLEAN;
435: IS
436: l_processed BOOLEAN;
437: l_return_status VARCHAR2(200);
438: l_err_text VARCHAR2(255);
439: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
440: l_BO_Id VARCHAR2(3) := Bom_Globals.Get_Bo_Identifier;
441: BEGIN
442:
443: IF Bom_Globals.Get_Bo_Identifier = Bom_Globals.G_ECO_BO
478: l_err_text := G_PKG_NAME ||
479: 'Utility (Substitute Component Delete_Row)' ||
480: SUBSTR(SQLERRM, 1, 100);
481:
482: Error_Handler.Add_Error_Token
483: ( p_Message_Name => NULL
484: , p_Message_Text => l_err_text
485: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
486: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
515: , x_return_status IN OUT NOCOPY VARCHAR2
516: )
517: IS
518: l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;
519: l_Token_Tbl Error_Handler.Token_Tbl_Type;
520: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
521: BEGIN
522:
523: SELECT SUBSTITUTE_ITEM_QUANTITY
516: )
517: IS
518: l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;
519: l_Token_Tbl Error_Handler.Token_Tbl_Type;
520: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
521: BEGIN
522:
523: SELECT SUBSTITUTE_ITEM_QUANTITY
524: , ATTRIBUTE_CATEGORY
611:
612: PROCEDURE Perform_Writes
613: ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
614: , p_sub_comp_unexp_rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
615: , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
616: , x_Return_Status IN OUT NOCOPY VARCHAR2
617: )
618: IS
619: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
615: , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
616: , x_Return_Status IN OUT NOCOPY VARCHAR2
617: )
618: IS
619: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
620: l_return_status VARCHAR2(1);
621: l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;
622: l_sub_comp_unexp_rec Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type;
623: BEGIN
624: l_sub_component_rec := p_sub_component_rec;
625: l_sub_comp_unexp_rec := p_sub_comp_unexp_rec;
626:
627: IF l_sub_component_rec.transaction_type IS NULL THEN
628: Error_Handler.Write_Debug ('In SCOMP Perform Writes ...is NULL');
629: ELSIF l_sub_component_rec.transaction_type = FND_API.G_MISS_CHAR THEN
630: Error_Handler.Write_Debug ('In SCOMP Perform Writes ...is MISSING');
631: ELSE
632: Error_Handler.Write_Debug('In SCOMP Perform Writes...'||l_sub_component_rec.transaction_type);
626:
627: IF l_sub_component_rec.transaction_type IS NULL THEN
628: Error_Handler.Write_Debug ('In SCOMP Perform Writes ...is NULL');
629: ELSIF l_sub_component_rec.transaction_type = FND_API.G_MISS_CHAR THEN
630: Error_Handler.Write_Debug ('In SCOMP Perform Writes ...is MISSING');
631: ELSE
632: Error_Handler.Write_Debug('In SCOMP Perform Writes...'||l_sub_component_rec.transaction_type);
633: END IF;
634: IF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_CREATE
628: Error_Handler.Write_Debug ('In SCOMP Perform Writes ...is NULL');
629: ELSIF l_sub_component_rec.transaction_type = FND_API.G_MISS_CHAR THEN
630: Error_Handler.Write_Debug ('In SCOMP Perform Writes ...is MISSING');
631: ELSE
632: Error_Handler.Write_Debug('In SCOMP Perform Writes...'||l_sub_component_rec.transaction_type);
633: END IF;
634: IF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_CREATE
635: THEN
636: Insert_Row( p_sub_component_rec => l_sub_component_rec
661: , x_return_status => l_return_status
662: );
663:
664: END IF;
665: Error_Handler.Write_Debug ('After SCOMP Perform Writes ...'||nvl(l_sub_component_rec.transaction_type,'NULL'));
666:
667: x_return_status := l_return_status;
668: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
669:
746:
747: PROCEDURE Perform_Writes
748: ( p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
749: , p_bom_sub_comp_unexp_rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
750: , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
751: , x_Return_Status IN OUT NOCOPY VARCHAR2
752: )
753: IS
754: l_sub_component_rec Bom_Bo_Pub.Sub_Component_Rec_Type;