63: FROM BSC_TAB_IND_GROUPS_B
64: WHERE IND_GROUP_ID = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
65:
66: IF l_count = 0 THEN
67: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_KGROUP_ID');
68: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
69: FND_MSG_PUB.ADD;
70: RAISE FND_API.G_EXC_ERROR;
71: END IF;
64: WHERE IND_GROUP_ID = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
65:
66: IF l_count = 0 THEN
67: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_KGROUP_ID');
68: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
69: FND_MSG_PUB.ADD;
70: RAISE FND_API.G_EXC_ERROR;
71: END IF;
72: ELSE
69: FND_MSG_PUB.ADD;
70: RAISE FND_API.G_EXC_ERROR;
71: END IF;
72: ELSE
73: FND_MESSAGE.SET_NAME('BSC','BSC_NO_KGROUP_ID_ENTERED');
74: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
75: FND_MSG_PUB.ADD;
76: RAISE FND_API.G_EXC_ERROR;
77: END IF;
70: RAISE FND_API.G_EXC_ERROR;
71: END IF;
72: ELSE
73: FND_MESSAGE.SET_NAME('BSC','BSC_NO_KGROUP_ID_ENTERED');
74: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
75: FND_MSG_PUB.ADD;
76: RAISE FND_API.G_EXC_ERROR;
77: END IF;
78:
83: FROM BSC_TABS_B
84: WHERE TAB_ID = p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id;
85:
86: IF l_count = 0 THEN
87: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_TAB_ID');
88: FND_MESSAGE.SET_TOKEN('BSC_TAB', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
89: FND_MSG_PUB.ADD;
90: RAISE FND_API.G_EXC_ERROR;
91: END IF;
84: WHERE TAB_ID = p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id;
85:
86: IF l_count = 0 THEN
87: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_TAB_ID');
88: FND_MESSAGE.SET_TOKEN('BSC_TAB', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
89: FND_MSG_PUB.ADD;
90: RAISE FND_API.G_EXC_ERROR;
91: END IF;
92: ELSE
89: FND_MSG_PUB.ADD;
90: RAISE FND_API.G_EXC_ERROR;
91: END IF;
92: ELSE
93: FND_MESSAGE.SET_NAME('BSC','BSC_NO_TAB_ID_ENTERED');
94: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
95: FND_MSG_PUB.ADD;
96: RAISE FND_API.G_EXC_ERROR;
97: END IF;
90: RAISE FND_API.G_EXC_ERROR;
91: END IF;
92: ELSE
93: FND_MESSAGE.SET_NAME('BSC','BSC_NO_TAB_ID_ENTERED');
94: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
95: FND_MSG_PUB.ADD;
96: RAISE FND_API.G_EXC_ERROR;
97: END IF;
98: ELSE -- New KPI Group to be added
104:
105: -- Need to review if this validation is required, since we are not deleting KPI Group
106: -- and it can have multiple rows
107: -- IF l_Count <> 0 THEN
108: -- FND_MESSAGE.SET_NAME('BSC','BSC_UNIQUE_NAME_REQUIRED');
109: -- FND_MESSAGE.SET_TOKEN('SHORT_NAME', BSC_APPS.GET_LOOKUP_VALUE('BSC_UI_BUILDER', 'MEASURE_SHORT_NAME'));
110: -- FND_MESSAGE.SET_TOKEN('NAME_VALUE', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Short_Name );
111: -- FND_MSG_PUB.ADD;
112: -- RAISE FND_API.G_EXC_ERROR;
105: -- Need to review if this validation is required, since we are not deleting KPI Group
106: -- and it can have multiple rows
107: -- IF l_Count <> 0 THEN
108: -- FND_MESSAGE.SET_NAME('BSC','BSC_UNIQUE_NAME_REQUIRED');
109: -- FND_MESSAGE.SET_TOKEN('SHORT_NAME', BSC_APPS.GET_LOOKUP_VALUE('BSC_UI_BUILDER', 'MEASURE_SHORT_NAME'));
110: -- FND_MESSAGE.SET_TOKEN('NAME_VALUE', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Short_Name );
111: -- FND_MSG_PUB.ADD;
112: -- RAISE FND_API.G_EXC_ERROR;
113: -- END IF;
106: -- and it can have multiple rows
107: -- IF l_Count <> 0 THEN
108: -- FND_MESSAGE.SET_NAME('BSC','BSC_UNIQUE_NAME_REQUIRED');
109: -- FND_MESSAGE.SET_TOKEN('SHORT_NAME', BSC_APPS.GET_LOOKUP_VALUE('BSC_UI_BUILDER', 'MEASURE_SHORT_NAME'));
110: -- FND_MESSAGE.SET_TOKEN('NAME_VALUE', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Short_Name );
111: -- FND_MSG_PUB.ADD;
112: -- RAISE FND_API.G_EXC_ERROR;
113: -- END IF;
114: END IF;
195: WHEN NO_DATA_FOUND THEN
196: ROLLBACK TO BSCKPIGrpPVT;
197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
198: if (SQLCODE = -01400) then
199: FND_MESSAGE.SET_NAME('BSC','BSC_TABLE_NULL_VALUE');
200: FND_MESSAGE.SET_TOKEN('BSC_OBJECT', 'BSC_KPI_GROUP_PVT.Create_Kpi_Group');
201: FND_MSG_PUB.ADD;
202: RAISE FND_API.G_EXC_ERROR;
203: end if;
196: ROLLBACK TO BSCKPIGrpPVT;
197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
198: if (SQLCODE = -01400) then
199: FND_MESSAGE.SET_NAME('BSC','BSC_TABLE_NULL_VALUE');
200: FND_MESSAGE.SET_TOKEN('BSC_OBJECT', 'BSC_KPI_GROUP_PVT.Create_Kpi_Group');
201: FND_MSG_PUB.ADD;
202: RAISE FND_API.G_EXC_ERROR;
203: end if;
204: IF (x_msg_data IS NOT NULL) THEN
348: FROM BSC_TAB_IND_GROUPS_B
349: WHERE ind_group_id = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
350:
351: if l_count = 0 then
352: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_KGROUP_ID');
353: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
354: FND_MSG_PUB.ADD;
355: RAISE FND_API.G_EXC_ERROR;
356: end if;
349: WHERE ind_group_id = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
350:
351: if l_count = 0 then
352: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_KGROUP_ID');
353: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
354: FND_MSG_PUB.ADD;
355: RAISE FND_API.G_EXC_ERROR;
356: end if;
357: else
354: FND_MSG_PUB.ADD;
355: RAISE FND_API.G_EXC_ERROR;
356: end if;
357: else
358: FND_MESSAGE.SET_NAME('BSC','BSC_NO_KGROUP_ID_ENTERED');
359: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
360: FND_MSG_PUB.ADD;
361: RAISE FND_API.G_EXC_ERROR;
362: end if;
355: RAISE FND_API.G_EXC_ERROR;
356: end if;
357: else
358: FND_MESSAGE.SET_NAME('BSC','BSC_NO_KGROUP_ID_ENTERED');
359: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
360: FND_MSG_PUB.ADD;
361: RAISE FND_API.G_EXC_ERROR;
362: end if;
363:
372:
373: --BSC_DEBUG.PUT_LINE(' BSC_KPI_GROUP_PVT.Update_Kpi_Group - Flag 2 ' );
374:
375: if l_name_count <> 0 then
376: FND_MESSAGE.SET_NAME('BSC','BSC_KGROUP_NAME_EXISTS');
377: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Name);
378: FND_MSG_PUB.ADD;
379: RAISE FND_API.G_EXC_ERROR;
380: end if;
373: --BSC_DEBUG.PUT_LINE(' BSC_KPI_GROUP_PVT.Update_Kpi_Group - Flag 2 ' );
374:
375: if l_name_count <> 0 then
376: FND_MESSAGE.SET_NAME('BSC','BSC_KGROUP_NAME_EXISTS');
377: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Name);
378: FND_MSG_PUB.ADD;
379: RAISE FND_API.G_EXC_ERROR;
380: end if;
381:
389: FROM BSC_TABS_B
390: WHERE TAB_ID = p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id;
391:
392: if l_count = 0 then
393: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_TAB_ID');
394: FND_MESSAGE.SET_TOKEN('BSC_TAB', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
395: FND_MSG_PUB.ADD;
396: RAISE FND_API.G_EXC_ERROR;
397: end if;
390: WHERE TAB_ID = p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id;
391:
392: if l_count = 0 then
393: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_TAB_ID');
394: FND_MESSAGE.SET_TOKEN('BSC_TAB', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
395: FND_MSG_PUB.ADD;
396: RAISE FND_API.G_EXC_ERROR;
397: end if;
398: else
395: FND_MSG_PUB.ADD;
396: RAISE FND_API.G_EXC_ERROR;
397: end if;
398: else
399: FND_MESSAGE.SET_NAME('BSC','BSC_NO_TAB_ID_ENTERED');
400: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
401: FND_MSG_PUB.ADD;
402: RAISE FND_API.G_EXC_ERROR;
403: end if;
396: RAISE FND_API.G_EXC_ERROR;
397: end if;
398: else
399: FND_MESSAGE.SET_NAME('BSC','BSC_NO_TAB_ID_ENTERED');
400: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id);
401: FND_MSG_PUB.ADD;
402: RAISE FND_API.G_EXC_ERROR;
403: end if;
404: end if;
584: FROM BSC_TAB_IND_GROUPS_B
585: WHERE IND_GROUP_ID = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
586:
587: if l_count = 0 then
588: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_KGROUP_ID');
589: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
590: FND_MSG_PUB.ADD;
591: RAISE FND_API.G_EXC_ERROR;
592: end if;
585: WHERE IND_GROUP_ID = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
586:
587: if l_count = 0 then
588: FND_MESSAGE.SET_NAME('BSC','BSC_INVALID_KGROUP_ID');
589: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
590: FND_MSG_PUB.ADD;
591: RAISE FND_API.G_EXC_ERROR;
592: end if;
593: else
590: FND_MSG_PUB.ADD;
591: RAISE FND_API.G_EXC_ERROR;
592: end if;
593: else
594: FND_MESSAGE.SET_NAME('BSC','BSC_NO_KGROUP_ID_ENTERED');
595: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
596: FND_MSG_PUB.ADD;
597: RAISE FND_API.G_EXC_ERROR;
598: end if;
591: RAISE FND_API.G_EXC_ERROR;
592: end if;
593: else
594: FND_MESSAGE.SET_NAME('BSC','BSC_NO_KGROUP_ID_ENTERED');
595: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id);
596: FND_MSG_PUB.ADD;
597: RAISE FND_API.G_EXC_ERROR;
598: end if;
599:
617: where ind_group_id = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id
618: and tab_id = p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id;
619: else
620: FND_MSG_PUB.Initialize;
621: FND_MESSAGE.SET_NAME('BSC','BSC_CANNOT_DELETE_KGROUP');
622: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Name);
623: FND_MSG_PUB.ADD;
624: RAISE FND_API.G_EXC_ERROR;
625: end if;
618: and tab_id = p_Bsc_Kpi_Group_Rec.Bsc_Tab_Id;
619: else
620: FND_MSG_PUB.Initialize;
621: FND_MESSAGE.SET_NAME('BSC','BSC_CANNOT_DELETE_KGROUP');
622: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Name);
623: FND_MSG_PUB.ADD;
624: RAISE FND_API.G_EXC_ERROR;
625: end if;
626:
641: delete from BSC_TAB_IND_GROUPS_TL
642: where ind_group_id = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
643: else
644: FND_MSG_PUB.Initialize;
645: FND_MESSAGE.SET_NAME('BSC','BSC_CANNOT_DELETE_KGROUP');
646: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Name);
647: FND_MSG_PUB.ADD;
648: RAISE FND_API.G_EXC_ERROR;
649: end if;
642: where ind_group_id = p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Id;
643: else
644: FND_MSG_PUB.Initialize;
645: FND_MESSAGE.SET_NAME('BSC','BSC_CANNOT_DELETE_KGROUP');
646: FND_MESSAGE.SET_TOKEN('BSC_KGROUP', p_Bsc_Kpi_Group_Rec.Bsc_Kpi_Group_Name);
647: FND_MSG_PUB.ADD;
648: RAISE FND_API.G_EXC_ERROR;
649: end if;
650: