63: WHERE gl_budget_set_id = p_gl_budget_set_id ;
64:
65: CURSOR C2 IS
66: SELECT psb_gl_budget_sets_s.NEXTVAL
67: FROM dual ;
68: --
69: BEGIN
70: --
71: SAVEPOINT Insert_Row_Pvt ;
803: SELECT gl_budget_id ,
804: gl_budget_name ,
805: start_date ,
806: end_date ,
807: dual_posting_type
808: FROM psb_gl_budgets_v
809: WHERE gl_budget_set_id = p_gl_budget_set_id
810: )
811: LOOP
830: )
831: LOOP
832:
833: -- Check whether current CCID for the current gl_budget_id belongs to
834: -- any other gl_budget_id for the same period and same dual_posting_type
835: -- Note that if dual_posting_type is NULL, it is equivant to being
836: -- Permanent.
837: -- If yes, we have found an overlap. This is to be
838:
831: LOOP
832:
833: -- Check whether current CCID for the current gl_budget_id belongs to
834: -- any other gl_budget_id for the same period and same dual_posting_type
835: -- Note that if dual_posting_type is NULL, it is equivant to being
836: -- Permanent.
837: -- If yes, we have found an overlap. This is to be
838:
839: FOR l_dup_gl_budget_id IN
857: AND
858: l_end_date > gb.end_date
859: )
860: )
861: AND NVL( l_gl_budget_rec.dual_posting_type, 'P' ) =
862: NVL( gb.dual_posting_type, 'P' )
863: )
864: LOOP
865:
858: l_end_date > gb.end_date
859: )
860: )
861: AND NVL( l_gl_budget_rec.dual_posting_type, 'P' ) =
862: NVL( gb.dual_posting_type, 'P' )
863: )
864: LOOP
865:
866: p_validation_status := FND_API.G_RET_STS_ERROR;
1057: l_return_status VARCHAR2(1);
1058: --
1059: CURSOR l_check_references_br_csr IS
1060: SELECT 1
1061: FROM dual where exists(
1062: SELECT 1 FROM PSB_BUDGET_REVISIONS
1063: WHERE gl_budget_set_id = p_gl_budget_set_id);
1064:
1065: CURSOR l_check_references_ws_csr IS
1063: WHERE gl_budget_set_id = p_gl_budget_set_id);
1064:
1065: CURSOR l_check_references_ws_csr IS
1066: SELECT 1
1067: FROM dual where exists(
1068: SELECT 1 FROM PSB_WORKSHEETS
1069: WHERE gl_budget_set_id = p_gl_budget_set_id);
1070: BEGIN
1071: