977: g_Bsc_Anal_Opt_Rec.Bsc_Option_Help := g_Bsc_Pmf_Ui_Rec.Option_Description;
978:
979: select count(option_id) + 1
980: into g_Bsc_Anal_Opt_Rec.Bsc_Option_Group0
981: from BSC_KPI_ANALYSIS_OPTIONS_B
982: where indicator = g_Bsc_Anal_Opt_Rec.Bsc_Kpi_Id
983: and analysis_group_id = g_Bsc_Anal_Opt_Rec.Bsc_Analysis_Group_Id;
984:
985: -- Need to create Analysis Options for this KPI. But first we need to determine
986: -- if the KPI only has 1 option, and if this option is the default option. If it
987: -- is then we need to replace it.
988: select count(option_id)
989: into l_count
990: from BSC_KPI_ANALYSIS_OPTIONS_B
991: where indicator = g_Bsc_Anal_Opt_Rec.Bsc_Kpi_Id
992: and analysis_group_id = g_Bsc_Anal_Opt_Rec.Bsc_Analysis_Group_Id;
993:
994: -- if there's only one option then check if this is the default option.