78: );
79:
80:
81: IF l_return_status = Eng_Globals.G_RECORD_FOUND AND
82: p_change_line_rec.transaction_type = BOM_Globals.G_OPR_CREATE
83: THEN
84: Error_Handler.Add_Error_Token
85: ( x_Mesg_token_tbl => l_Mesg_Token_Tbl
86: , p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
261: IF p_change_line_rec.transaction_type = ENG_Globals.G_OPR_UPDATE
262: THEN
263:
264:
265: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
266: ('Change Line Attr Validation: Missing Value. . . ' || l_return_status) ;
267: END IF;
268:
269: -- Sequence Number
296: --
297: -- Check if the user is trying to create/update a record with
298: -- invalid value.
299: --
300: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
301: ('Change Line Attr Validation: Invalid Value. . . ' || l_return_status) ;
302: END IF;
303:
304: -- Sequence Number
370:
371: --End of changes for Bug 2908248
372:
373: -- Done validating attributes
374: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
375: ('Change Line Attr Validation completed with return_status: ' || l_return_status) ;
376: END IF;
377:
378: x_return_status := l_return_status;
380:
381: EXCEPTION
382: WHEN OTHERS THEN
383:
384: IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
385: ('Some unknown error in Attribute Validation . . .' || SQLERRM );
386: END IF ;
387:
388:
496: IF p_change_line_rec.transaction_type = ENG_Globals.G_OPR_DELETE
497: THEN
498:
499:
500: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
501: ('Change Line Entity Validation on Delete . . . ' || l_return_status) ;
502: END IF;
503:
504: END IF ;
504: END IF ;
505:
506:
507: -- Done validating attributes
508: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
509: ('Change Line Entity Validation on Delete completed with return_status: ' || l_return_status) ;
510: END IF;
511:
512: x_return_status := l_return_status;
514:
515: EXCEPTION
516: WHEN OTHERS THEN
517:
518: IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
519: ('Some unknown error in Entity Validation on Delete. . .' || SQLERRM );
520: END IF ;
521:
522:
615: --
616:
617: l_return_status := FND_API.G_RET_STS_SUCCESS ;
618:
619: IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
620: ('Performing Change Line Check Entitity Validation . . .') ;
621: END IF ;
622:
623:
712:
713: --
714: -- Check uniquness of the sequence number.
715: --
716: IF p_change_line_rec.transaction_type = BOM_Globals.G_OPR_CREATE
717: OR ( p_change_line_rec.transaction_type = BOM_Globals.G_OPR_UPDATE
718: AND p_change_line_rec.sequence_number
719: <> p_old_change_line_rec.sequence_number)
720: THEN
713: --
714: -- Check uniquness of the sequence number.
715: --
716: IF p_change_line_rec.transaction_type = BOM_Globals.G_OPR_CREATE
717: OR ( p_change_line_rec.transaction_type = BOM_Globals.G_OPR_UPDATE
718: AND p_change_line_rec.sequence_number
719: <> p_old_change_line_rec.sequence_number)
720: THEN
721:
756:
757: EXCEPTION
758: WHEN OTHERS THEN
759:
760: IF BOM_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug
761: ('Some unknown error in Entity Validation . . .' || SQLERRM );
762: END IF ;
763:
764:
836: --
837: -- Check that the user has access to the BOM Item Type
838: -- of the revised item
839: --
840: IF BOM_Globals.Get_STD_Item_Access IS NULL AND
841: BOM_Globals.Get_PLN_Item_Access IS NULL AND
842: BOM_Globals.Get_MDL_Item_Access IS NULL
843: THEN
844:
837: -- Check that the user has access to the BOM Item Type
838: -- of the revised item
839: --
840: IF BOM_Globals.Get_STD_Item_Access IS NULL AND
841: BOM_Globals.Get_PLN_Item_Access IS NULL AND
842: BOM_Globals.Get_MDL_Item_Access IS NULL
843: THEN
844:
845: --
838: -- of the revised item
839: --
840: IF BOM_Globals.Get_STD_Item_Access IS NULL AND
841: BOM_Globals.Get_PLN_Item_Access IS NULL AND
842: BOM_Globals.Get_MDL_Item_Access IS NULL
843: THEN
844:
845: --
846: -- Get respective profile values
846: -- Get respective profile values
847: --
848: IF NVL(fnd_profile.value('ENG:STANDARD_ITEM_ECN_ACCESS'), 1) = 1
849: THEN
850: BOM_Globals.Set_STD_Item_Access
851: ( p_std_item_access => 4);
852: ELSE
853: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug('no access to standard items'); END IF;
854: BOM_Globals.Set_STD_Item_Access
849: THEN
850: BOM_Globals.Set_STD_Item_Access
851: ( p_std_item_access => 4);
852: ELSE
853: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug('no access to standard items'); END IF;
854: BOM_Globals.Set_STD_Item_Access
855: (p_std_item_access => NULL);
856: END IF;
857:
850: BOM_Globals.Set_STD_Item_Access
851: ( p_std_item_access => 4);
852: ELSE
853: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug('no access to standard items'); END IF;
854: BOM_Globals.Set_STD_Item_Access
855: (p_std_item_access => NULL);
856: END IF;
857:
858: IF fnd_profile.value('ENG:MODEL_ITEM_ECN_ACCESS') = '1'
856: END IF;
857:
858: IF fnd_profile.value('ENG:MODEL_ITEM_ECN_ACCESS') = '1'
859: THEN
860: BOM_Globals.Set_MDL_Item_Access
861: ( p_mdl_item_access => 1);
862: BOM_Globals.Set_OC_Item_Access
863: ( p_oc_item_access => 2);
864: ELSE
858: IF fnd_profile.value('ENG:MODEL_ITEM_ECN_ACCESS') = '1'
859: THEN
860: BOM_Globals.Set_MDL_Item_Access
861: ( p_mdl_item_access => 1);
862: BOM_Globals.Set_OC_Item_Access
863: ( p_oc_item_access => 2);
864: ELSE
865: BOM_Globals.Set_MDL_Item_Access
866: ( p_mdl_item_access => NULL);
861: ( p_mdl_item_access => 1);
862: BOM_Globals.Set_OC_Item_Access
863: ( p_oc_item_access => 2);
864: ELSE
865: BOM_Globals.Set_MDL_Item_Access
866: ( p_mdl_item_access => NULL);
867: BOM_Globals.Set_OC_Item_Access
868: ( p_oc_item_access => NULL);
869: END IF;
863: ( p_oc_item_access => 2);
864: ELSE
865: BOM_Globals.Set_MDL_Item_Access
866: ( p_mdl_item_access => NULL);
867: BOM_Globals.Set_OC_Item_Access
868: ( p_oc_item_access => NULL);
869: END IF;
870:
871: IF fnd_profile.value('ENG:PLANNING_ITEM_ECN_ACCESS') = '1'
869: END IF;
870:
871: IF fnd_profile.value('ENG:PLANNING_ITEM_ECN_ACCESS') = '1'
872: THEN
873: BOM_Globals.Set_PLN_Item_Access
874: ( p_pln_item_access => 3);
875: ELSE
876: BOM_Globals.Set_PLN_Item_Access
877: ( p_pln_item_access => NULL);
872: THEN
873: BOM_Globals.Set_PLN_Item_Access
874: ( p_pln_item_access => 3);
875: ELSE
876: BOM_Globals.Set_PLN_Item_Access
877: ( p_pln_item_access => NULL);
878: END IF;
879: END IF;
880:
891: );
892: l_return_status := FND_API.G_RET_STS_ERROR;
893:
894: ELSIF item_rec.Bom_Item_Type NOT IN
895: ( NVL(BOM_Globals.Get_STD_Item_Access, 0),
896: NVL(BOM_Globals.Get_PLN_Item_Access, 0),
897: NVL(BOM_Globals.Get_OC_Item_Access, 0) ,
898: NVL(BOM_Globals.Get_MDL_Item_Access, 0)
899: )
892: l_return_status := FND_API.G_RET_STS_ERROR;
893:
894: ELSIF item_rec.Bom_Item_Type NOT IN
895: ( NVL(BOM_Globals.Get_STD_Item_Access, 0),
896: NVL(BOM_Globals.Get_PLN_Item_Access, 0),
897: NVL(BOM_Globals.Get_OC_Item_Access, 0) ,
898: NVL(BOM_Globals.Get_MDL_Item_Access, 0)
899: )
900: THEN
893:
894: ELSIF item_rec.Bom_Item_Type NOT IN
895: ( NVL(BOM_Globals.Get_STD_Item_Access, 0),
896: NVL(BOM_Globals.Get_PLN_Item_Access, 0),
897: NVL(BOM_Globals.Get_OC_Item_Access, 0) ,
898: NVL(BOM_Globals.Get_MDL_Item_Access, 0)
899: )
900: THEN
901: l_Token_Tbl(2).Token_Name := 'BOM_ITEM_TYPE';
894: ELSIF item_rec.Bom_Item_Type NOT IN
895: ( NVL(BOM_Globals.Get_STD_Item_Access, 0),
896: NVL(BOM_Globals.Get_PLN_Item_Access, 0),
897: NVL(BOM_Globals.Get_OC_Item_Access, 0) ,
898: NVL(BOM_Globals.Get_MDL_Item_Access, 0)
899: )
900: THEN
901: l_Token_Tbl(2).Token_Name := 'BOM_ITEM_TYPE';
902: l_Token_Tbl(2).Translate := TRUE;
928:
929: -- If all the access checks are satisfied then return a status of
930: -- success, else return error.
931: --
932: IF Bom_Globals.Get_Debug = 'Y' THEN Error_Handler.Write_Debug('Revised Item Check Access returning . . . ' || l_return_status);
933: END IF;
934:
935: x_Return_Status := l_return_status;
936: x_Mesg_Token_Tbl := l_mesg_token_tbl;