1537: FROM po_requisition_headers_all
1538: WHERE requisition_header_id = p_req_hdr_id;
1539:
1540: -- set org context back to req's org
1541: po_moac_utils_pvt.set_org_context(l_req_org_id) ; --
1543: IF(l_return_status = fnd_api.g_ret_sts_error) THEN
1544: x_retmsg := 'VC0d31:' || l_return_msg;
1545: l_err_count := l_doc_check_rec_type.online_report_id.count;
3121: -- save current org id
3122: l_req_org_id := mo_global.get_current_org_id();
3123:
3124: -- Set the org context before calling the cancel api
3125: po_moac_utils_pvt.set_org_context(l_po_org_id) ; --
3127: l_progress := '012';
3128:
3129: po_document_control_grp.check_control_action(
3144:
3145: l_progress := '013';
3146:
3147: -- set org context to the original value
3148: po_moac_utils_pvt.set_org_context(l_req_org_id) ; --
3150: IF (g_fnd_debug = 'Y') THEN
3151: IF (fnd_log.g_current_runtime_level <= fnd_log.level_statement) THEN
3152: fnd_log.string(fnd_log.level_statement,
4980:
4981: l_orgid := PO_ReqChangeRequestWF_PVT.get_sales_order_org(p_req_hdr_id => p_req_header_id);
4982:
4983: IF l_orgid is NOT NULL THEN
4984: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
4986:
4987: l_progress := '002';
4988: -- OM_API.is_req_line_cancellable(l_req_header_id,l_req_line_id,x_return_status);
5001:
5002: l_orgid := PO_ReqChangeRequestWF_PVT.get_requisition_org( p_req_hdr_id => p_req_header_id);
5003:
5004: IF l_orgid is NOT NULL THEN
5005: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
5007:
5008: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
5009: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5028: l_progress := '001';
5029: l_orgid := PO_ReqChangeRequestWF_PVT.get_sales_order_org(p_req_hdr_id => l_req_header_id);
5030:
5031: IF l_orgid is NOT NULL THEN
5032: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
5034:
5035: l_progress := '002';
5036: -- OM_API.is_req_line_cancellable(l_req_header_id,l_req_line_id,x_return_status);
5049:
5050: l_orgid := PO_ReqChangeRequestWF_PVT.get_requisition_org( p_req_hdr_id => p_req_header_id);
5051:
5052: IF l_orgid is NOT NULL THEN
5053: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
5055:
5056: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
5057: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5136:
5137: l_orgid := PO_ReqChangeRequestWF_PVT.get_sales_order_org(p_req_hdr_id => l_req_header_id);
5138:
5139: IF l_orgid is NOT NULL THEN
5140: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
5142:
5143:
5144: -- OM_API.is_req_line_changeable(l_req_header_id,l_req_line_id,x_return_status);
5157:
5158: l_orgid := PO_ReqChangeRequestWF_PVT.get_requisition_org( p_req_hdr_id => l_req_header_id);
5159:
5160: IF l_orgid is NOT NULL THEN
5161: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
5163:
5164: x_update_allowed := POR_UTIL_PKG.bool_to_varchar(l_update_allowed);
5165: x_cancel_allowed := POR_UTIL_PKG.bool_to_varchar(l_cancel_allowed);
6821:
6822: l_orgid := PO_ReqChangeRequestWF_PVT.get_sales_order_org(p_req_hdr_id => p_req_header_id);
6823:
6824: IF l_orgid is NOT NULL THEN
6825: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
6827:
6828: IF g_debug_stmt THEN
6829: po_debug.debug_stmt(l_log_head, l_progress, 'Calling OM API Validating the changes');
6847:
6848: l_orgid := PO_ReqChangeRequestWF_PVT.get_requisition_org( p_req_hdr_id => p_req_header_id);
6849:
6850: IF l_orgid is NOT NULL THEN
6851: PO_MOAC_UTILS_PVT.set_org_context(l_orgid) ; --
6853:
6854:
6855: IF g_debug_stmt THEN