[Home] [Help]
PACKAGE BODY: APPS.CUG_UPDATE_SERVICEREQUEST
Source
1 Package Body CUG_UPDATE_SERVICEREQUEST AS
2 /* $Header: CUGUPSRB.pls 115.5 2003/10/15 22:26:43 aneemuch ship $ */
3 --
4 -- To modify this template, edit file PKGBODY.TXT in TEMPLATE
5 -- directory of SQL Navigator
6 --
7 -- Purpose: Briefly explain the functionality of the package body
8 --
9 -- MODIFICATION HISTORY
10 -- Person Date Comments
11 -- --------- ------ ------------------------------------------
12 -- dejoseph 12-05-02 Replaced reference to install_site_use_id with
13 -- install_site_id. ER# 2695480.
14 -- aneemuch 15-Oct-03 Removed SR update validation code that was getting
15 -- called from SR update vertical hook
16 --
17 -- Enter procedure, function bodies as shown below
18
19 PROCEDURE Prevent_Update_ServiceRequest
20 ( p_api_version IN NUMBER,
21 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
22 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
23 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full,
24 x_return_status OUT NOCOPY VARCHAR2,
25 x_msg_count OUT NOCOPY NUMBER,
26 x_msg_data OUT NOCOPY VARCHAR2,
27 p_request_id IN NUMBER,
28 p_object_version_number IN NUMBER,
29 p_resp_appl_id IN NUMBER DEFAULT NULL,
30 p_resp_id IN NUMBER DEFAULT NULL,
31 p_last_updated_by IN NUMBER,
32 p_last_update_login IN NUMBER DEFAULT NULL,
33 p_last_update_date IN DATE,
34 p_service_request_rec IN CS_ServiceRequest_PVT.service_request_rec_type,
35 p_update_desc_flex IN VARCHAR2 DEFAULT fnd_api.g_false,
36 p_notes IN CS_ServiceRequest_PVT.notes_table,
37 p_contacts IN CS_ServiceRequest_PVT.contacts_table,
38 p_audit_comments IN VARCHAR2 DEFAULT NULL,
39 p_called_by_workflow IN VARCHAR2 DEFAULT fnd_api.g_false,
40 p_workflow_process_id IN NUMBER DEFAULT NULL,
41 x_workflow_process_id OUT NOCOPY NUMBER,
42 x_interaction_id OUT NOCOPY NUMBER
43 )
44 IS
45 l_request_id NUMBER;
46 l_type_id NUMBER;
47 l_status_id NUMBER;
48 l_severity_id NUMBER;
49 l_urgency_id NUMBER;
50 l_owner_id NUMBER;
51 l_owner_group_id NUMBER;
52 l_install_site_id NUMBER;
53
54 l_api_name_full CONSTANT VARCHAR2(61) := 'CS_SERVICEREQUEST_VUHK'||'.'||'Update_ServiceRequest_Pre';
55
56 /*
57 CURSOR l_CurrentServiceRequest_csr IS
58 SELECT * FROM CS_INCIDENTS_ALL_B WHERE
59 incident_id = l_request_id;
60 l_CurrentServiceRequest_rec l_CurrentServiceRequest_csr%ROWTYPE;
61
62
63 CURSOR l_IncidentDetails_csr IS
64 SELECT * FROM CUG_INCIDNT_ATTR_VALS_VL WHERE incident_id = l_request_id;
65 l_IncidentDetails_rec l_IncidentDetails_csr%ROWTYPE;
66 */
67
68 BEGIN
69 RETURN;
70
71 -- Start of changes by aneemuch, 15-Oct-2003
72 /*
73 BEGIN
74 l_request_id := p_request_id;
75 l_type_id := p_service_request_rec.type_id;
76 l_status_id := p_service_request_rec.status_id;
77 l_severity_id := p_service_request_rec.severity_id;
78 l_urgency_id := p_service_request_rec.urgency_id;
79 l_owner_id := p_service_request_rec.owner_id;
80 l_owner_group_id := p_service_request_rec.owner_group_id;
81 l_install_site_id := p_service_request_rec.install_site_id;
82
83
84 OPEN l_CurrentServiceRequest_csr;
85 FETCH l_CurrentServiceRequest_csr INTO l_CurrentServiceRequest_rec;
86
87 IF (l_CurrentServiceRequest_csr%NOTFOUND) THEN
88 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
89 END IF;
90
91
92 IF (l_type_id <> l_CurrentServiceRequest_rec.incident_type_id OR
93 l_status_id <> l_CurrentServiceRequest_rec.incident_status_id OR
94 l_severity_id <> l_CurrentServiceRequest_rec.incident_severity_id OR
95 l_urgency_id <> l_CurrentServiceRequest_rec.incident_urgency_id OR
96 l_owner_id <> l_CurrentServiceRequest_rec.incident_owner_id
97 )
98 THEN
99 RAISE FND_API.G_EXC_ERROR;
100 ELSIF (l_install_site_id <> l_CurrentServiceRequest_rec.install_site_id) THEN
101 OPEN l_CurrentServiceRequest_csr;
102 FETCH l_CurrentServiceRequest_csr INTO l_CurrentServiceRequest_rec;
103
104 IF (l_CurrentServiceRequest_csr%NOTFOUND) THEN
105 x_return_status := FND_API.G_RET_STS_SUCCESS;
106 ELSE
107 x_return_status := FND_API.G_RET_STS_ERROR;
108 RAISE FND_API.G_EXC_ERROR;
109 END IF;
110
111 END IF;
112
113 EXCEPTION
114 WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
115 x_return_status := FND_API.G_RET_STS_ERROR;
116 FND_MSG_PUB.Count_And_Get
117 ( p_count => x_msg_count,
118 p_data => x_msg_data
119 );
120 WHEN FND_API.G_EXC_ERROR THEN
121 x_return_status := FND_API.G_RET_STS_ERROR;
122 FND_MSG_PUB.Count_And_Get
123 ( p_count => x_msg_count,
124 p_data => x_msg_data
125 );
126 */
127 -- End of changes by aneemuch, 15-Oct-2003
128
129 END Prevent_Update_ServiceRequest;
130
131 END;