78: BEGIN
79: -- Standard Start of API savepoint
80: SAVEPOINT po_request_action_bulk_sp;
81: -- Standard Call to check for call compatibility
82: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
83: p_api_version ,
84: l_api_name ,
85: G_PKG_NAME )
86: THEN
84: l_api_name ,
85: G_PKG_NAME )
86: THEN
87: x_error_message := 'API version check raised exception';
88: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
89: END IF;
90:
91: -- API body
92: -- First lets get the bulk collects for org_id, l_doc_sub_type,
208: -- some reason l_return_code is not getting set.
209: -- Doc Manager Rewrite: also check for STATE_FAILED return code
210: IF(l_ret_sts <> 'S') THEN
211: x_error_message := l_error_message;
212: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
213: ELSIF (l_return_code = 'STATE_FAILED') THEN
214: x_error_message := 'Document state check failed.';
215: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
216: ELSE
211: x_error_message := l_error_message;
212: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
213: ELSIF (l_return_code = 'STATE_FAILED') THEN
214: x_error_message := 'Document state check failed.';
215: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
216: ELSE
217: x_result := 1;
218: END IF;
219:
251: END LOOP;
252:
253: -- End of API body
254: EXCEPTION
255: WHEN FND_API.G_EXC_ERROR THEN
256: ROLLBACK TO po_request_action_bulk_sp;
257: IF(x_error_message is null) THEN
258: x_error_message := 'In Expected error of po_request_action_bulk';
259: END IF;
257: IF(x_error_message is null) THEN
258: x_error_message := 'In Expected error of po_request_action_bulk';
259: END IF;
260: x_result := -1;
261: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
262: ROLLBACK TO po_request_action_bulk_sp;
263: IF(x_error_message is null) THEN
264: x_error_message := 'In Unexpected error';
265: END IF;
494: Info_Request := NULL;
495: Document_Status := NULL;
496:
497:
498: IF l_return_status IN (FND_API.g_ret_sts_SUCCESS,
499: FND_API.g_ret_sts_ERROR) THEN
500: IF action IN ('IGC YEAR END RESERVE', 'IGC YEAR END UNRESERVE') THEN
501:
502: -- CBC expects the encumbrance code to commit, unless
495: Document_Status := NULL;
496:
497:
498: IF l_return_status IN (FND_API.g_ret_sts_SUCCESS,
499: FND_API.g_ret_sts_ERROR) THEN
500: IF action IN ('IGC YEAR END RESERVE', 'IGC YEAR END UNRESERVE') THEN
501:
502: -- CBC expects the encumbrance code to commit, unless
503: -- there was a SQL/fatal error