561: p_return_sts := 0 ;
562:
563: l_stmt_num := 2 ;
564:
565: IF FND_FLEX_KEYVAL.validate_ccid
566: ( appl_short_name => 'INV' ,
567: key_flex_code => 'MSTK' ,
568: structure_number => BOM_PFI_PVT.G_MSTK_Structure_ID ,
569: combination_id => p_item_id ,
569: combination_id => p_item_id ,
570: data_set => p_org_id
571: )
572: THEN
573: l_concat_segments := FND_FLEX_KEYVAL.concatenated_values ;
574: p_concat_segments := l_concat_segments ;
575: ELSE
576: p_return_sts := 2 ;
577: p_return_err := 'Get_Category_ID: Table MTL_SYSTEM_ITEMS_B, flexfield MSTK: ' ||
574: p_concat_segments := l_concat_segments ;
575: ELSE
576: p_return_sts := 2 ;
577: p_return_err := 'Get_Category_ID: Table MTL_SYSTEM_ITEMS_B, flexfield MSTK: ' ||
578: FND_FLEX_KEYVAL.error_message ;
579: RETURN;
580: END IF;
581:
582: l_stmt_num := 3 ;
580: END IF;
581:
582: l_stmt_num := 3 ;
583:
584: IF FND_FLEX_KEYVAL.validate_segs
585: ( operation => 'FIND_COMBINATION' ,
586: appl_short_name => 'INV' ,
587: key_flex_code => 'MCAT' ,
588: structure_number => BOM_PFI_PVT.G_PF_Structure_ID ,
588: structure_number => BOM_PFI_PVT.G_PF_Structure_ID ,
589: concat_segments => l_concat_segments
590: )
591: THEN
592: p_category_id := FND_FLEX_KEYVAL.combination_id ;
593: ELSE
594: p_return_sts := 3 ;
595: p_return_err := 'Get_Category_ID: Table MTL_CATEGORIES_B, flexfield MCAT: ' ||
596: FND_FLEX_KEYVAL.error_message ;
592: p_category_id := FND_FLEX_KEYVAL.combination_id ;
593: ELSE
594: p_return_sts := 3 ;
595: p_return_err := 'Get_Category_ID: Table MTL_CATEGORIES_B, flexfield MCAT: ' ||
596: FND_FLEX_KEYVAL.error_message ;
597: RETURN;
598: END IF;
599:
600: