37: IS
38: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
39: BEGIN
40: IF p_sub_component_rec.Revised_Item_Name IS NULL OR
41: p_sub_component_rec.Revised_Item_Name = FND_API.G_MISS_CHAR OR
42: p_sub_component_rec.Start_Effective_Date IS NULL OR
43: p_sub_component_rec.Start_Effective_Date = FND_API.G_MISS_DATE OR
44: p_sub_component_rec.Operation_Sequence_Number IS NULL OR
45: p_sub_component_rec.Operation_Sequence_Number = FND_API.G_MISS_NUM OR
39: BEGIN
40: IF p_sub_component_rec.Revised_Item_Name IS NULL OR
41: p_sub_component_rec.Revised_Item_Name = FND_API.G_MISS_CHAR OR
42: p_sub_component_rec.Start_Effective_Date IS NULL OR
43: p_sub_component_rec.Start_Effective_Date = FND_API.G_MISS_DATE OR
44: p_sub_component_rec.Operation_Sequence_Number IS NULL OR
45: p_sub_component_rec.Operation_Sequence_Number = FND_API.G_MISS_NUM OR
46: p_sub_component_rec.Component_Item_Name IS NULL OR
47: p_sub_component_rec.Component_Item_Name = FND_API.G_MISS_CHAR OR
41: p_sub_component_rec.Revised_Item_Name = FND_API.G_MISS_CHAR OR
42: p_sub_component_rec.Start_Effective_Date IS NULL OR
43: p_sub_component_rec.Start_Effective_Date = FND_API.G_MISS_DATE OR
44: p_sub_component_rec.Operation_Sequence_Number IS NULL OR
45: p_sub_component_rec.Operation_Sequence_Number = FND_API.G_MISS_NUM OR
46: p_sub_component_rec.Component_Item_Name IS NULL OR
47: p_sub_component_rec.Component_Item_Name = FND_API.G_MISS_CHAR OR
48: p_sub_component_rec.Alternate_BOM_Code IS NULL OR
49: p_sub_component_rec.Alternate_BOM_Code = FND_API.G_MISS_CHAR OR
43: p_sub_component_rec.Start_Effective_Date = FND_API.G_MISS_DATE OR
44: p_sub_component_rec.Operation_Sequence_Number IS NULL OR
45: p_sub_component_rec.Operation_Sequence_Number = FND_API.G_MISS_NUM OR
46: p_sub_component_rec.Component_Item_Name IS NULL OR
47: p_sub_component_rec.Component_Item_Name = FND_API.G_MISS_CHAR OR
48: p_sub_component_rec.Alternate_BOM_Code IS NULL OR
49: p_sub_component_rec.Alternate_BOM_Code = FND_API.G_MISS_CHAR OR
50: p_sub_component_rec.Substitute_Component_Name IS NULL OR
51: p_sub_component_rec.Substitute_Component_Name = FND_API.G_MISS_CHAR OR
45: p_sub_component_rec.Operation_Sequence_Number = FND_API.G_MISS_NUM OR
46: p_sub_component_rec.Component_Item_Name IS NULL OR
47: p_sub_component_rec.Component_Item_Name = FND_API.G_MISS_CHAR OR
48: p_sub_component_rec.Alternate_BOM_Code IS NULL OR
49: p_sub_component_rec.Alternate_BOM_Code = FND_API.G_MISS_CHAR OR
50: p_sub_component_rec.Substitute_Component_Name IS NULL OR
51: p_sub_component_rec.Substitute_Component_Name = FND_API.G_MISS_CHAR OR
52: ( ( p_sub_component_rec.acd_type IS NULL OR
53: p_sub_component_rec.acd_type = FND_API.G_MISS_NUM OR
47: p_sub_component_rec.Component_Item_Name = FND_API.G_MISS_CHAR OR
48: p_sub_component_rec.Alternate_BOM_Code IS NULL OR
49: p_sub_component_rec.Alternate_BOM_Code = FND_API.G_MISS_CHAR OR
50: p_sub_component_rec.Substitute_Component_Name IS NULL OR
51: p_sub_component_rec.Substitute_Component_Name = FND_API.G_MISS_CHAR OR
52: ( ( p_sub_component_rec.acd_type IS NULL OR
53: p_sub_component_rec.acd_type = FND_API.G_MISS_NUM OR
54: p_sub_component_rec.New_Revised_Item_Revision IS NULL OR
55: p_sub_component_rec.New_Revised_Item_Revision =
49: p_sub_component_rec.Alternate_BOM_Code = FND_API.G_MISS_CHAR OR
50: p_sub_component_rec.Substitute_Component_Name IS NULL OR
51: p_sub_component_rec.Substitute_Component_Name = FND_API.G_MISS_CHAR OR
52: ( ( p_sub_component_rec.acd_type IS NULL OR
53: p_sub_component_rec.acd_type = FND_API.G_MISS_NUM OR
54: p_sub_component_rec.New_Revised_Item_Revision IS NULL OR
55: p_sub_component_rec.New_Revised_Item_Revision =
56: FND_API.G_MISS_CHAR
57: ) AND
52: ( ( p_sub_component_rec.acd_type IS NULL OR
53: p_sub_component_rec.acd_type = FND_API.G_MISS_NUM OR
54: p_sub_component_rec.New_Revised_Item_Revision IS NULL OR
55: p_sub_component_rec.New_Revised_Item_Revision =
56: FND_API.G_MISS_CHAR
57: ) AND
58: Bom_Globals.Get_Bo_Identifier = Bom_Globals.G_ECO_BO
59: )
60: THEN
57: ) AND
58: Bom_Globals.Get_Bo_Identifier = Bom_Globals.G_ECO_BO
59: )
60: THEN
61: x_return_status := FND_API.G_RET_STS_ERROR;
62: Error_Handler.Add_Error_Token
63: ( x_Mesg_Token_Tbl => x_Mesg_Token_Tbl
64: , p_Message_Name => 'BOM_SUB_COMP_REQ'
65: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
68: -- missing with scope of 'R'
69: RETURN;
70: END IF;
71:
72: x_return_status := FND_API.G_RET_STS_SUCCESS;
73:
74: END CHECK_REQUIRED;
75:
76: /*******************************************************************
93: := BOM_BO_PUB.G_DEFAULT_CONTROL_REC
94: )
95: IS
96: l_temp_var NUMBER :=0;
97: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
98: l_sub_comp_unique VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
99: l_dummy NUMBER :=0;
100: l_dummy2 NUMBER :=0;
101: l_parent_acd_type NUMBER :=0;
94: )
95: IS
96: l_temp_var NUMBER :=0;
97: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
98: l_sub_comp_unique VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
99: l_dummy NUMBER :=0;
100: l_dummy2 NUMBER :=0;
101: l_parent_acd_type NUMBER :=0;
102: l_parent_BIT NUMBER;
191: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
192: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
193: , p_Token_Tbl => l_Token_Tbl
194: );
195: l_return_status := FND_API.G_RET_STS_ERROR;
196: END IF;
197:
198:
199: --if a mandatory ATO item was added in a pto model when the related profile was set, you cannot
213: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
214: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
215: , p_Token_Tbl => l_Token_Tbl
216: );
217: l_return_status := FND_API.G_RET_STS_ERROR;
218: END IF;
219: --BOM ER #9946990 changes (end)
220:
221: BEGIN
233: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
234: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
235: , p_Token_Tbl => l_Token_Tbl
236: );
237: l_Return_Status := FND_API.G_RET_STS_ERROR;
238: END;
239:
240: SELECT msi.bom_enabled_flag
241: INTO l_assy_bom_enabled
259: , p_message_name => 'BOM_REV_ITEM_BOM_NOT_ENABLED'
260: , p_token_tbl => l_token_tbl
261: );
262: END IF;
263: l_return_status := FND_API.G_RET_STS_ERROR;
264: END IF;
265:
266: IF p_control_rec.caller_type <> 'FORM'
267: THEN
280:
281: IF l_rec_bit IN (1, 2, 3, 5)
282: THEN
283: l_err_text := 'BOM_SBC_NON_STD_PARENT';
284: l_return_status := FND_API.G_RET_STS_ERROR;
285: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
286: -- dbms_output.put_line
287: -- ('Expected Error. non-standard component . . . ');
288:
296: END IF;
297:
298: IF l_parent_bit = 3 THEN
299: l_Err_text := 'BOM_SBC_PLANNING_BILL';
300: l_return_status := FND_API.G_RET_STS_ERROR;
301:
302: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
303: -- dbms_output.put_line
304: -- ('Expected Error. planning parent. . . ');
329: , p_message_text => 'ERROR in Entity validation ' ||
330: substr(SQLERRM, 1, 240) || ' ' ||
331: to_char(SQLCODE)
332: );
333: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
334: END;
335:
336: END IF;
337:
375: WHERE organization_id = p_Sub_Comp_Unexp_Rec.Organization_Id
376: AND inventory_item_id = decode(p_Sub_Comp_Unexp_Rec.new_substitute_component_id,
377: NULL,
378: p_Sub_Comp_Unexp_Rec.substitute_component_id,
379: FND_API.G_MISS_NUM,
380: p_Sub_Comp_Unexp_Rec.substitute_component_id,
381: p_Sub_Comp_Unexp_Rec.new_substitute_component_id
382: );
383:
389: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
390: , p_message_name => 'BOM_SUB_COMP_NOT_STD'
391: );
392: END IF;
393: l_return_status := FND_API.G_RET_STS_ERROR;
394: END IF;
395: /* Validations for OPM Convergence Project
396: Dual UOM controlled items should not be allowed*/
397:
400: ( p_Message_name => 'BOM_DUAL_UOM_ITEMS'
401: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
402: , x_mesg_token_tbl => l_mesg_token_tbl
403: );
404: l_return_status := FND_API.G_RET_STS_ERROR;
405: END IF;
406:
407: /* IF l_sbc_bom_enabled_flag <> 'Y'
408: THEN
416: , p_message_name => 'BOM_SUB_COMP_NOT_BOM_ENABLED'
417: , p_token_tbl => l_token_tbl
418: );
419: END IF;
420: l_return_status := FND_API.G_RET_STS_ERROR;
421: END IF; */ -- Commented as part of bug 3420657.
422:
423: -- IF ((l_rec_AST = 2) OR (l_rec_AST = 1 AND l_sbc_eng_item_flag = 'Y')) -- Bug No: 3561608
424: IF (l_rec_AST = 1 AND l_sbc_eng_item_flag = 'Y')
429: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
430: , p_message_name => 'BOM_SUB_COMP_ASSEMBLY_MFG'
431: );
432: END IF;
433: l_return_status := FND_API.G_RET_STS_ERROR;
434: END IF;
435:
436: EXCEPTION
437: WHEN no_data_found THEN
461: AND msi.inventory_item_id =
462: decode(p_Sub_Comp_Unexp_Rec.new_substitute_component_id,
463: NULL,
464: p_Sub_Comp_Unexp_Rec.substitute_component_id,
465: FND_API.G_MISS_NUM,
466: p_Sub_Comp_Unexp_Rec.substitute_component_id,
467: p_Sub_Comp_Unexp_Rec.new_substitute_component_id
468: )
469: AND msi.bom_enabled_flag = 'Y'
482: , p_message_name => 'BOM_SBC_COMBILL_DOES_NOT_EXIST'
483: , p_token_tbl => l_token_tbl
484: );
485: END IF;
486: l_return_status := FND_API.G_RET_STS_ERROR;
487: EXCEPTION
488: WHEN no_data_found THEN
489: null;
490: END;
513: , p_message_name => 'BOM_SUBCOMP_SAMEAS_ITEM_COMP'
514: , p_token_tbl => l_token_tbl
515: );
516: END IF;
517: l_return_status := FND_API.G_RET_STS_ERROR;
518: END IF;
519:
520: ------------------------------------------
521: -- Validate attribute dependencies here.|
536: --
537: IF Bom_Globals.Get_Bo_Identifier = Bom_Globals.G_ECO_BO
538: THEN
539: IF l_parent_acd_type = 3 THEN
540: l_return_status := FND_API.G_RET_STS_ERROR;
541: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
542: Error_Handler.Add_Error_Token
543: ( x_Mesg_Token_tbl => l_Mesg_Token_tbl
544: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
552: -------------------------------------------------------------------
553: stmt_num := 12;
554: IF ((l_parent_acd_type = 1 ) and ( p_Sub_Component_Rec.ACD_Type <> 1))
555: THEN
556: l_return_status := FND_API.G_RET_STS_ERROR;
557: l_token_tbl(1).token_name := 'REVISED_COMPONENT_NAME';
558: l_token_tbl(1).token_value := p_sub_component_rec.component_item_name;
559: Error_Handler.Add_Error_Token
560: ( x_Mesg_Token_tbl => l_Mesg_Token_tbl
623: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
624: , p_message_name => 'BOM_DISABLE_SCOMP_NOT_FOUND'
625: , p_token_tbl => l_token_tbl
626: );
627: l_return_status := FND_API.G_RET_STS_ERROR;
628: END IF;
629: END;
630: END IF;
631: END IF; -- ECO BO only validations ends
633: END IF; -- end of code that executes when ECO form has not called package.
634:
635: -- dbms_output.put_line('l_return_status : '|| l_return_status);
636:
637: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) then
638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
639: END IF;
640:
641: ----------------------------
634:
635: -- dbms_output.put_line('l_return_status : '|| l_return_status);
636:
637: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) then
638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
639: END IF;
640:
641: ----------------------------
642: -- Done validating entity |
648: /* When the Substitute component is updated with new Substitute Component, It should be checked that the
649: New Substitute Component does not exists already */
650:
651: IF ( p_Sub_Comp_Unexp_Rec.new_substitute_component_id is not null
652: and p_Sub_Comp_Unexp_Rec.new_substitute_component_id <> FND_API.G_MISS_NUM
653: and p_sub_component_rec.transaction_type = Bom_Globals.G_OPR_UPDATE) THEN
654:
655: select count(*) into l_temp_var
656: FROM BOM_SUBSTITUTE_COMPONENTS
655: select count(*) into l_temp_var
656: FROM BOM_SUBSTITUTE_COMPONENTS
657: WHERE substitute_component_id = p_Sub_Comp_Unexp_Rec.new_substitute_component_id
658: AND COMPONENT_SEQUENCE_ID = p_Sub_Comp_Unexp_Rec.component_sequence_id
659: AND NVL(DECODE(ACD_TYPE, FND_API.G_MISS_NUM, null, acd_type), 0) =
660: NVL(DECODE(p_sub_component_rec.acd_type, FND_API.G_MISS_NUM, null, p_sub_component_rec.acd_type), 0) ;
661:
662: IF (l_temp_var <>0) then
663:
656: FROM BOM_SUBSTITUTE_COMPONENTS
657: WHERE substitute_component_id = p_Sub_Comp_Unexp_Rec.new_substitute_component_id
658: AND COMPONENT_SEQUENCE_ID = p_Sub_Comp_Unexp_Rec.component_sequence_id
659: AND NVL(DECODE(ACD_TYPE, FND_API.G_MISS_NUM, null, acd_type), 0) =
660: NVL(DECODE(p_sub_component_rec.acd_type, FND_API.G_MISS_NUM, null, p_sub_component_rec.acd_type), 0) ;
661:
662: IF (l_temp_var <>0) then
663:
664: l_Token_Tbl(1).Token_Name := 'SUBSTITUTE_ITEM_NAME';
672: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
673: , p_message_name => 'BOM_SUB_COMP_ALREADY_EXISTS'
674: , p_token_tbl => l_token_tbl
675: );
676: RAISE FND_API.G_EXC_ERROR;
677: END IF;
678: END IF;
679:
680: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug('Verified New Substitute Component ...'); END IF;
681:
682:
683:
684: EXCEPTION
685: WHEN FND_API.G_EXC_ERROR THEN
686: -- dbms_output.put_line('expected Error : stmt_num -'
687: -- || to_char(stmt_num));
688: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
689: x_return_status := FND_API.G_RET_STS_ERROR;
685: WHEN FND_API.G_EXC_ERROR THEN
686: -- dbms_output.put_line('expected Error : stmt_num -'
687: -- || to_char(stmt_num));
688: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
689: x_return_status := FND_API.G_RET_STS_ERROR;
690: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
691: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
692: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
693: -- dbms_output.put_line('unexpected Error : stmt_num -'
686: -- dbms_output.put_line('expected Error : stmt_num -'
687: -- || to_char(stmt_num));
688: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
689: x_return_status := FND_API.G_RET_STS_ERROR;
690: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
691: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
692: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
693: -- dbms_output.put_line('unexpected Error : stmt_num -'
694: -- || to_char(stmt_num));
688: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
689: x_return_status := FND_API.G_RET_STS_ERROR;
690: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
691: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
692: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
693: -- dbms_output.put_line('unexpected Error : stmt_num -'
694: -- || to_char(stmt_num));
695: WHEN OTHERS THEN
696: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
693: -- dbms_output.put_line('unexpected Error : stmt_num -'
694: -- || to_char(stmt_num));
695: WHEN OTHERS THEN
696: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
697: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
698: -- dbms_output.put_line('other unexpected Error :
699: -- stmt_num -' || to_char(stmt_num));
700: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
701: THEN
736: l_token_tbl Error_Handler.Token_Tbl_Type;
737: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
738: BEGIN
739:
740: l_return_status := FND_API.G_RET_STS_SUCCESS;
741:
742: /**************************************************************************
743: With patch to bug 728002, this is not valid now
744:
755: , p_message_name => 'BOM_SUB_COMP_QTY_ZERO'
756: , p_token_tbl => l_token_tbl
757: );
758: END IF;
759: x_return_status := FND_API.G_RET_STS_ERROR;
760:
761: END IF;
762: **************************************************************************/
763:
781: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
782: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
783: , p_Token_Tbl => l_Token_Tbl
784: );
785: l_return_status := FND_API.G_RET_STS_ERROR;
786:
787: WHEN OTHERS THEN
788:
789: Error_Handler.Add_Error_Token
794: to_char(SQLCODE)
795: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
796: , p_Mesg_Token_Tbl => l_Mesg_token_Tbl
797: );
798: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
799: END;
800:
801: x_return_status := l_return_status;
802: x_mesg_token_tbl := l_mesg_token_tbl;
822: , p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
823: , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
824: )
825: IS
826: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
827: l_err_text VARCHAR2(255);
828: l_rec_ID DATE := NULL;
829: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
830: BEGIN
882: );
883:
884: IF p_sub_component_rec.transaction_type IS NULL THEN
885: Error_Handler.Write_Debug ('In SCOMP Check Exist ...is NULL');
886: ELSIF p_sub_component_rec.transaction_type = FND_API.G_MISS_CHAR THEN
887: Error_Handler.Write_Debug ('In SCOMP Check Exist ...is MISSING');
888: ELSE
889: Error_Handler.Write_Debug('In SCOMP Check Exist...'||p_sub_component_rec.transaction_type);
890: END IF;
897: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
898: , p_message_name => 'BOM_SUB_COMP_ALREADY_EXISTS'
899: , p_token_tbl => l_token_tbl
900: );
901: l_return_status := FND_API.G_RET_STS_ERROR;
902: ELSIF l_return_status = Bom_Globals.G_RECORD_NOT_FOUND AND
903: p_sub_component_rec.transaction_type IN
904: (Bom_Globals.G_OPR_UPDATE, Bom_Globals.G_OPR_DELETE)
905: THEN
908: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
909: , p_message_name => 'BOM_SUB_COMP_DOESNOT_EXIST'
910: , p_token_tbl => l_token_tbl
911: );
912: l_return_status := FND_API.G_RET_STS_ERROR;
913: ELSIF l_Return_status = FND_API.G_RET_STS_UNEXP_ERROR
914: THEN
915: Error_Handler.Add_Error_Token
916: ( x_Mesg_token_tbl => l_Mesg_Token_Tbl
909: , p_message_name => 'BOM_SUB_COMP_DOESNOT_EXIST'
910: , p_token_tbl => l_token_tbl
911: );
912: l_return_status := FND_API.G_RET_STS_ERROR;
913: ELSIF l_Return_status = FND_API.G_RET_STS_UNEXP_ERROR
914: THEN
915: Error_Handler.Add_Error_Token
916: ( x_Mesg_token_tbl => l_Mesg_Token_Tbl
917: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
934: x_old_sub_component_rec.transaction_type :=
935: Bom_Globals.G_OPR_CREATE;
936: END IF;
937: END IF;
938: l_return_status := FND_API.G_RET_STS_SUCCESS;
939: END IF;
940:
941: x_return_status := l_return_status;
942: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
970: AND operation_seq_num = p_sub_component_rec.operation_sequence_number
971: AND effectivity_date = p_sub_component_rec.start_effective_date
972: AND bill_sequence_id = p_sub_comp_unexp_rec.bill_sequence_id;
973: BEGIN
974: x_return_status := FND_API.G_RET_STS_SUCCESS;
975:
976: FOR Component IN c_GetComponent LOOP
977: IF NVL(Component.revised_item_sequence_id, 0) <>
978: NVL(p_sub_comp_unexp_rec.revised_item_sequence_id, 0)
995: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
996: , x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
997: , p_Token_Tbl => l_Token_Tbl
998: );
999: x_return_status := FND_API.G_RET_STS_ERROR;
1000: END IF;
1001: END LOOP;
1002:
1003: x_Mesg_Token_Tbl := l_Mesg_Token_Tbl;
1034: WHERE inventory_item_id = p_sub_comp_unexp_rec.substitute_component_id
1035: AND organization_id = p_sub_comp_unexp_rec.organization_id;
1036:
1037: BEGIN
1038: l_return_status := FND_API.G_RET_STS_SUCCESS;
1039:
1040: SELECT process_enabled_flag
1041: INTO l_OPM_org
1042: FROM mtl_parameters
1054: ( p_Message_name => 'BOM_OPM_ORG_MODEL_OC'
1055: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
1056: , x_mesg_token_tbl => l_mesg_token_tbl
1057: );
1058: l_return_status := FND_API.G_RET_STS_ERROR;
1059: ELSIF SubCompType.bom_item_type = Bom_Globals.G_PRODUCT_FAMILY
1060: THEN
1061: Error_Handler.Add_Error_Token
1062: ( p_Message_Name => 'BOM_SUB_COMP_PF'
1063: , p_mesg_token_tbl => l_mesg_token_tbl
1064: , x_mesg_token_tbl => l_mesg_token_tbl
1065: , p_token_tbl => l_token_tbl
1066: );
1067: l_return_status := FND_API.G_RET_STS_ERROR;
1068: ELSIF SubCompType.bom_item_type NOT IN
1069: (NVL(Bom_Globals.Get_MDL_Item_Access,0),
1070: NVL(Bom_Globals.Get_OC_Item_Access,0),
1071: NVL(Bom_Globals.Get_PLN_Item_Access,0),
1098: , x_Mesg_Token_Tbl => l_mesg_token_tbl
1099: , p_Token_Tbl => l_token_tbl
1100: );
1101: l_token_tbl.DELETE(2);
1102: l_return_status := FND_API.G_RET_STS_ERROR;
1103: END IF;
1104: END LOOP;
1105: x_return_status := l_return_status;
1106: