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
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
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
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
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;
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:
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
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:
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
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;
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:
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
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
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
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