[Home] [Help]
3024: FND_MSG_PUB.ADD;
3025: RAISE FND_API.G_EXC_ERROR;
3026: end if;
3027:
3028: l_db_object := 'BSC_KPI_CALCULATIONS';
3029:
3030: insert into BSC_KPI_CALCULATIONS( indicator
3031: ,calculation_id
3032: ,user_level0
3026: end if;
3027:
3028: l_db_object := 'BSC_KPI_CALCULATIONS';
3029:
3030: insert into BSC_KPI_CALCULATIONS( indicator
3031: ,calculation_id
3032: ,user_level0
3033: ,user_level1
3034: ,user_level1_default
3127: ,x_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level1_Default
3128: ,x_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level2
3129: ,x_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level2_Default
3130: ,x_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Default_Value
3131: from BSC_KPI_CALCULATIONS
3132: where indicator = p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Id
3133: and calculation_id = p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Calculation_Id;
3134:
3135: if (p_commit = FND_API.G_TRUE) then
3211: end if;
3212:
3213: -- Check that valid id was entered.
3214: if p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Calculation_Id is not null then
3215: l_count := BSC_DIMENSION_LEVELS_PVT.Validate_Value( 'BSC_KPI_CALCULATIONS'
3216: ,'calculation_id'
3217: ,p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Calculation_Id);
3218: if l_count = 0 then
3219: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_CALCULATION_ID');
3261: if p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Default_Value is not null then
3262: l_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Default_Value := p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Default_Value;
3263: end if;
3264:
3265: update BSC_KPI_CALCULATIONS
3266: set user_level0 = l_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level0
3267: ,user_level1 = l_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level1
3268: ,user_level1_default = l_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level1_Default
3269: ,user_level2 = l_Bsc_Kpi_Entity_Rec.Bsc_Kpi_User_Level2
3354: RAISE FND_API.G_EXC_ERROR;
3355: END IF;
3356:
3357: DELETE
3358: FROM bsc_kpi_calculations
3359: WHERE indicator = p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Id;
3360:
3361: DELETE
3362: FROM bsc_kpi_calculations_user
3358: FROM bsc_kpi_calculations
3359: WHERE indicator = p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Id;
3360:
3361: DELETE
3362: FROM bsc_kpi_calculations_user
3363: WHERE indicator = p_Bsc_Kpi_Entity_Rec.Bsc_Kpi_Id;
3364:
3365: IF (p_commit = FND_API.G_TRUE) THEN
3366: COMMIT;