70: l_req_control_error_rc VARCHAR2(1);
71:
72: -- Bug 3362534 START
73: l_document_org_id PO_REQUISITION_HEADERS_ALL.org_id%TYPE;
74: l_original_org_id NUMBER := PO_MOAC_UTILS_PVT.GET_CURRENT_ORG_ID ; --
76:
77: BEGIN
78:
99: WHERE requisition_header_id = p_req_header_id(i);
100:
101: -- Bug 3362534 START
102: -- Set the org context to the operating unit of the document.
103: PO_MOAC_UTILS_PVT.set_org_context(l_document_org_id) ; --
105: -- Check whether req encumbrance is enabled for this operating unit.
106: IF PO_CORE_S.is_encumbrance_on (
107: p_doc_type => PO_CORE_S.g_doc_type_REQUISITION,
178: l_progress := '050';
179: x_return_status := FND_API.G_RET_STS_SUCCESS;
180:
181: -- Bug 3362534 Set the org context back to the original operating unit.
182: PO_MOAC_UTILS_PVT.set_org_context(l_original_org_id) ; --
184: EXCEPTION
185: WHEN FND_API.G_EXC_ERROR THEN
186: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
185: WHEN FND_API.G_EXC_ERROR THEN
186: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
187: x_return_status := FND_API.G_RET_STS_ERROR;
188: -- Bug 3362534 Set the org context back to the original operating unit.
189: PO_MOAC_UTILS_PVT.set_org_context(l_original_org_id) ; --
191: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
193: -- Bug 3362534 Set the org context back to the original operating unit.
190: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
191: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
193: -- Bug 3362534 Set the org context back to the original operating unit.
194: PO_MOAC_UTILS_PVT.set_org_context(l_original_org_id) ; --
196: FND_MSG_PUB.add_exc_msg(G_PKG_NAME, l_api_name || '.' || l_progress);
197: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
198: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
196: FND_MSG_PUB.add_exc_msg(G_PKG_NAME, l_api_name || '.' || l_progress);
197: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
198: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
199: -- Bug 3362534 Set the org context back to the original operating unit.
200: PO_MOAC_UTILS_PVT.set_org_context(l_original_org_id) ; --
202: END cancel_requisition;
203:
204: END PO_REQ_DOCUMENT_CANCEL_PVT;