22: l_api_version CONSTANT NUMBER := 1.0;
23: BEGIN
24: g_action := 'Field sync';
25: /* Initialize return status */
26: x_return_status := FND_API.G_RET_STS_SUCCESS;
27:
28: IF (l_Debug_Level <= 2) THEN
29: itg_debug_pub.Add('ENTERING PPN-Process_PoNumber',2);
30: END IF;
36: MO_GLOBAL.set_policy_context('S', p_org); -- MOAC
37: EXCEPTION
38: WHEN OTHERS THEN
39: itg_msg.invalid_org(p_org);
40: RAISE FND_API.G_EXC_ERROR;
41: END;
42:
43: ITG_Debug.setup(
44: p_reset => TRUE,
80: AND org_id = p_org;
81: EXCEPTION
82: WHEN NO_DATA_FOUND THEN
83: itg_msg.no_req_hdr(p_reqid,p_org);
84: RAISE FND_API.G_EXC_ERROR;
85: END;
86:
87: g_action := 'Requisition-line update';
88:
101: itg_debug_pub.Add('PPN - Update failed' ,1);
102: END IF;
103:
104: ITG_MSG.no_req_line(p_reqid, p_reqlinenum,p_org);
105: RAISE FND_API.G_EXC_ERROR;
106: END IF;
107:
108: COMMIT WORK;
109: EXCEPTION
106: END IF;
107:
108: COMMIT WORK;
109: EXCEPTION
110: WHEN FND_API.G_EXC_ERROR THEN
111: ROLLBACK TO Process_PoNumber_PVT;
112: x_return_status := FND_API.G_RET_STS_ERROR;
113: ITG_msg.checked_error(g_action);
114:
108: COMMIT WORK;
109: EXCEPTION
110: WHEN FND_API.G_EXC_ERROR THEN
111: ROLLBACK TO Process_PoNumber_PVT;
112: x_return_status := FND_API.G_RET_STS_ERROR;
113: ITG_msg.checked_error(g_action);
114:
115: WHEN OTHERS THEN
116: ROLLBACK TO Process_PoNumber_PVT;
113: ITG_msg.checked_error(g_action);
114:
115: WHEN OTHERS THEN
116: ROLLBACK TO Process_PoNumber_PVT;
117: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
118: itg_debug.msg('Unexpected error (Field sync) - ' || substr(SQLERRM,1,255),true);
119: ITG_msg.unexpected_error(g_action);
120: END;
121: