DBA Data[Home] [Help]

APPS.OKL_SUBSIDY_POOL_APPROVAL_PVT dependencies on OKC_API

Line 101: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'p_subsidy_pool_id');

97:
98: x_total_budgets := 0;
99: -- validate if subsidy pool id passed is valid
100: IF(p_subsidy_pool_id IS NULL OR p_subsidy_pool_id = OKL_API.G_MISS_NUM)THEN
101: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'p_subsidy_pool_id');
102: x_return_status := OKC_API.G_RET_STS_ERROR;
103: RAISE OKL_API.G_EXCEPTION_ERROR;
104: END IF;
105: -- get the subsidy pool details to process

Line 102: x_return_status := OKC_API.G_RET_STS_ERROR;

98: x_total_budgets := 0;
99: -- validate if subsidy pool id passed is valid
100: IF(p_subsidy_pool_id IS NULL OR p_subsidy_pool_id = OKL_API.G_MISS_NUM)THEN
101: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'p_subsidy_pool_id');
102: x_return_status := OKC_API.G_RET_STS_ERROR;
103: RAISE OKL_API.G_EXCEPTION_ERROR;
104: END IF;
105: -- get the subsidy pool details to process
106: OPEN c_get_pool_details_csr; FETCH c_get_pool_details_csr INTO cv_pool_details_csr;

Line 111: OKC_API.set_message(G_APP_NAME, G_INVALID_POOL_STATUS, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);

107: CLOSE c_get_pool_details_csr;
108:
109: -- if the pool status is not new, then error out. initial pool approval should have the pool status and the line status as NEW
110: IF(cv_pool_details_csr.decision_status_code <> 'NEW')THEN
111: OKC_API.set_message(G_APP_NAME, G_INVALID_POOL_STATUS, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
112: x_return_status := OKC_API.G_RET_STS_ERROR;
113: RAISE OKL_API.G_EXCEPTION_ERROR;
114: END IF;
115:

Line 112: x_return_status := OKC_API.G_RET_STS_ERROR;

108:
109: -- if the pool status is not new, then error out. initial pool approval should have the pool status and the line status as NEW
110: IF(cv_pool_details_csr.decision_status_code <> 'NEW')THEN
111: OKC_API.set_message(G_APP_NAME, G_INVALID_POOL_STATUS, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
112: x_return_status := OKC_API.G_RET_STS_ERROR;
113: RAISE OKL_API.G_EXCEPTION_ERROR;
114: END IF;
115:
116: -- check for pool expiration here. pool could be logically expired by the time user submits for approval.

Line 149: OKC_API.set_message(G_APP_NAME, G_POOL_NO_SUB_ASSOC, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);

145: -- at least one subsidy
146: OPEN c_chk_subsidy_assoc_csr; FETCH c_chk_subsidy_assoc_csr INTO lv_dummy_var;
147: CLOSE c_chk_subsidy_assoc_csr;
148: IF(NVL(lv_dummy_var,'N')<> 'X')THEN
149: OKC_API.set_message(G_APP_NAME, G_POOL_NO_SUB_ASSOC, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
150: x_return_status := OKC_API.G_RET_STS_ERROR;
151: RAISE OKL_API.G_EXCEPTION_ERROR;
152: END IF;
153: -- get the number of subsidy pool budget lines

Line 150: x_return_status := OKC_API.G_RET_STS_ERROR;

146: OPEN c_chk_subsidy_assoc_csr; FETCH c_chk_subsidy_assoc_csr INTO lv_dummy_var;
147: CLOSE c_chk_subsidy_assoc_csr;
148: IF(NVL(lv_dummy_var,'N')<> 'X')THEN
149: OKC_API.set_message(G_APP_NAME, G_POOL_NO_SUB_ASSOC, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
150: x_return_status := OKC_API.G_RET_STS_ERROR;
151: RAISE OKL_API.G_EXCEPTION_ERROR;
152: END IF;
153: -- get the number of subsidy pool budget lines
154: lv_number_of_lines:=0;

Line 158: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_NO_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);

154: lv_number_of_lines:=0;
155: OPEN c_get_pool_line_number; FETCH c_get_pool_line_number INTO lv_number_of_lines;
156: CLOSE c_get_pool_line_number;
157: IF(lv_number_of_lines = 0)THEN
158: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_NO_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
159: x_return_status := OKC_API.G_RET_STS_ERROR;
160: RAISE OKL_API.G_EXCEPTION_ERROR;
161: ELSIF(lv_number_of_lines > 1)THEN -- for initial pool approval, only one budget line is allowed.
162: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_MORE_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);

Line 159: x_return_status := OKC_API.G_RET_STS_ERROR;

155: OPEN c_get_pool_line_number; FETCH c_get_pool_line_number INTO lv_number_of_lines;
156: CLOSE c_get_pool_line_number;
157: IF(lv_number_of_lines = 0)THEN
158: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_NO_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
159: x_return_status := OKC_API.G_RET_STS_ERROR;
160: RAISE OKL_API.G_EXCEPTION_ERROR;
161: ELSIF(lv_number_of_lines > 1)THEN -- for initial pool approval, only one budget line is allowed.
162: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_MORE_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
163: x_return_status := OKC_API.G_RET_STS_ERROR;

Line 162: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_MORE_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);

158: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_NO_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
159: x_return_status := OKC_API.G_RET_STS_ERROR;
160: RAISE OKL_API.G_EXCEPTION_ERROR;
161: ELSIF(lv_number_of_lines > 1)THEN -- for initial pool approval, only one budget line is allowed.
162: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_MORE_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
163: x_return_status := OKC_API.G_RET_STS_ERROR;
164: RAISE OKL_API.G_EXCEPTION_ERROR;
165: END IF;
166:

Line 163: x_return_status := OKC_API.G_RET_STS_ERROR;

159: x_return_status := OKC_API.G_RET_STS_ERROR;
160: RAISE OKL_API.G_EXCEPTION_ERROR;
161: ELSIF(lv_number_of_lines > 1)THEN -- for initial pool approval, only one budget line is allowed.
162: OKC_API.set_message(G_APP_NAME, G_POOL_HAS_MORE_LINES, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name);
163: x_return_status := OKC_API.G_RET_STS_ERROR;
164: RAISE OKL_API.G_EXCEPTION_ERROR;
165: END IF;
166:
167: -- get the budget line details

Line 172: OKC_API.set_message(G_APP_NAME, G_POOL_LINE_INVALID, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name

168: OPEN c_get_pool_line_details_csr; FETCH c_get_pool_line_details_csr INTO cv_get_pool_line_details_csr;
169: CLOSE c_get_pool_line_details_csr;
170: IF(cv_get_pool_line_details_csr.budget_type_code <> 'ADDITION' OR cv_get_pool_line_details_csr.budget_amount <= 0
171: OR cv_get_pool_line_details_csr.decision_status_code <> 'NEW')THEN
172: OKC_API.set_message(G_APP_NAME, G_POOL_LINE_INVALID, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name
173: ,'AMOUNT',cv_get_pool_line_details_csr.budget_amount);
174: x_return_status := OKC_API.G_RET_STS_ERROR;
175: RAISE OKL_API.G_EXCEPTION_ERROR;
176: END IF;

Line 174: x_return_status := OKC_API.G_RET_STS_ERROR;

170: IF(cv_get_pool_line_details_csr.budget_type_code <> 'ADDITION' OR cv_get_pool_line_details_csr.budget_amount <= 0
171: OR cv_get_pool_line_details_csr.decision_status_code <> 'NEW')THEN
172: OKC_API.set_message(G_APP_NAME, G_POOL_LINE_INVALID, 'POOL_NAME', cv_pool_details_csr.subsidy_pool_name
173: ,'AMOUNT',cv_get_pool_line_details_csr.budget_amount);
174: x_return_status := OKC_API.G_RET_STS_ERROR;
175: RAISE OKL_API.G_EXCEPTION_ERROR;
176: END IF;
177:
178: -- now that all the required validations are passed, update the pool and line status to pending approval

Line 427: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'p_subsidy_pool_budget_id');

423: is_debug_statement_on := okl_debug_pub.check_log_on(l_module,FND_LOG.LEVEL_STATEMENT);
424:
425: -- validate if subsidy pool budget id passed is valid
426: IF(p_subsidy_pool_budget_id IS NULL OR p_subsidy_pool_budget_id = OKL_API.G_MISS_NUM)THEN
427: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'p_subsidy_pool_budget_id');
428: x_return_status := OKC_API.G_RET_STS_ERROR;
429: RAISE OKL_API.G_EXCEPTION_ERROR;
430: END IF;
431:

Line 428: x_return_status := OKC_API.G_RET_STS_ERROR;

424:
425: -- validate if subsidy pool budget id passed is valid
426: IF(p_subsidy_pool_budget_id IS NULL OR p_subsidy_pool_budget_id = OKL_API.G_MISS_NUM)THEN
427: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'p_subsidy_pool_budget_id');
428: x_return_status := OKC_API.G_RET_STS_ERROR;
429: RAISE OKL_API.G_EXCEPTION_ERROR;
430: END IF;
431:
432: -- get the pool and the budget line information

Line 438: OKC_API.set_message(G_APP_NAME, G_POOL_IS_NOT_ACTIVE, 'POOL_NAME', cv_get_pool_info.subsidy_pool_name);

434: CLOSE c_get_pool_info_csr;
435:
436: -- check if the pool status is ACTIVE, if not ACTIVE, throw error
437: IF(cv_get_pool_info.pool_status <> 'ACTIVE')THEN
438: OKC_API.set_message(G_APP_NAME, G_POOL_IS_NOT_ACTIVE, 'POOL_NAME', cv_get_pool_info.subsidy_pool_name);
439: x_return_status := OKC_API.G_RET_STS_ERROR;
440: RAISE OKL_API.G_EXCEPTION_ERROR;
441: END IF;
442:

Line 439: x_return_status := OKC_API.G_RET_STS_ERROR;

435:
436: -- check if the pool status is ACTIVE, if not ACTIVE, throw error
437: IF(cv_get_pool_info.pool_status <> 'ACTIVE')THEN
438: OKC_API.set_message(G_APP_NAME, G_POOL_IS_NOT_ACTIVE, 'POOL_NAME', cv_get_pool_info.subsidy_pool_name);
439: x_return_status := OKC_API.G_RET_STS_ERROR;
440: RAISE OKL_API.G_EXCEPTION_ERROR;
441: END IF;
442:
443: -- check for pool expiration here. pool could be logically expired by the time user submits line for approval.

Line 473: OKC_API.set_message(G_APP_NAME, G_POOL_LINE_INVALID, 'POOL_NAME', cv_get_pool_info.subsidy_pool_name

469: END IF;
470: -- check if the line status is NEW, if not throw an error. this check is required as the user might resubmit the same
471: -- line for approval, by clicking on the refresh icon (even when the submit for approval is disabled)
472: IF(cv_get_pool_info.line_status <> 'NEW')THEN
473: OKC_API.set_message(G_APP_NAME, G_POOL_LINE_INVALID, 'POOL_NAME', cv_get_pool_info.subsidy_pool_name
474: ,'AMOUNT',cv_get_pool_info.budget_amount);
475: x_return_status := OKC_API.G_RET_STS_ERROR;
476: RAISE OKL_API.G_EXCEPTION_ERROR;
477: END IF;

Line 475: x_return_status := OKC_API.G_RET_STS_ERROR;

471: -- line for approval, by clicking on the refresh icon (even when the submit for approval is disabled)
472: IF(cv_get_pool_info.line_status <> 'NEW')THEN
473: OKC_API.set_message(G_APP_NAME, G_POOL_LINE_INVALID, 'POOL_NAME', cv_get_pool_info.subsidy_pool_name
474: ,'AMOUNT',cv_get_pool_info.budget_amount);
475: x_return_status := OKC_API.G_RET_STS_ERROR;
476: RAISE OKL_API.G_EXCEPTION_ERROR;
477: END IF;
478:
479: -- now that the validations have been passed, set the budget line to pending for approval