1: package body FND_SVC_COMP_REQUESTS_H_PKG as
2: /* $Header: AFSVCHTB.pls 115.2 2002/12/27 20:41:30 ankung noship $ */
3:
4: procedure INSERT_ROW (
5: X_ROWID in out nocopy VARCHAR2,
21: X_LAST_UPDATE_DATE in DATE,
22: X_LAST_UPDATED_BY in NUMBER,
23: X_LAST_UPDATE_LOGIN in NUMBER
24: ) is
25: cursor C is select ROWID from FND_SVC_COMP_REQUESTS_H
26: where REQUEST_HISTORY_ID = X_REQUEST_HISTORY_ID
27: ;
28: begin
29: insert into FND_SVC_COMP_REQUESTS_H (
25: cursor C is select ROWID from FND_SVC_COMP_REQUESTS_H
26: where REQUEST_HISTORY_ID = X_REQUEST_HISTORY_ID
27: ;
28: begin
29: insert into FND_SVC_COMP_REQUESTS_H (
30: REQUEST_HISTORY_ID,
31: COMPONENT_ID,
32: EVENT_NAME,
33: REQUEST_STATUS,
75: close c;
76:
77: exception
78: when others then
79: wf_core.context('FND_SVC_COMP_REQUESTS_H_PKG', 'Insert_Row', X_COMPONENT_ID, X_EVENT_NAME);
80: raise;
81:
82: end INSERT_ROW;
83:
108: CONTAINER_TYPE,
109: CONTAINER_NAME,
110: EVENT_PARAMS,
111: OBJECT_VERSION_NUMBER
112: from FND_SVC_COMP_REQUESTS_H
113: where REQUEST_HISTORY_ID = X_REQUEST_HISTORY_ID
114: for update of REQUEST_HISTORY_ID nowait;
115:
116: recinfo c%rowtype;
147: return;
148:
149: exception
150: when others then
151: wf_core.context('FND_SVC_COMP_REQUESTS_H_PKG', 'Lock_Row', X_REQUEST_HISTORY_ID);
152: raise;
153: end LOCK_ROW;
154:
155: procedure UPDATE_ROW (
183: -- Allow update. Increment the database's OVN by 1
184: --
185: select OBJECT_VERSION_NUMBER
186: into l_object_version_number
187: from FND_SVC_COMP_REQUESTS_H
188: where REQUEST_HISTORY_ID = X_REQUEST_HISTORY_ID;
189:
190: l_object_version_number := l_object_version_number + 1;
191:
200: --
201:
202: select OBJECT_VERSION_NUMBER
203: into l_object_version_number
204: from FND_SVC_COMP_REQUESTS_H
205: where REQUEST_HISTORY_ID = X_REQUEST_HISTORY_ID
206: for update;
207:
208: if (l_object_version_number = X_OBJECT_VERSION_NUMBER) then
216: end if;
217:
218: end if;
219:
220: update FND_SVC_COMP_REQUESTS_H set
221: COMPONENT_ID = X_COMPONENT_ID,
222: EVENT_NAME = X_EVENT_NAME,
223: REQUEST_STATUS = X_REQUEST_STATUS,
224: REQUESTED_BY_USER = X_REQUESTED_BY_USER,
241:
242:
243: exception
244: when others then
245: wf_core.context('FND_SVC_COMP_REQUESTS_H_PKG', 'Update_Row', X_REQUEST_HISTORY_ID);
246: raise;
247: end UPDATE_ROW;
248:
249: procedure DELETE_ROW (
249: procedure DELETE_ROW (
250: X_REQUEST_HISTORY_ID in NUMBER
251: ) is
252: begin
253: delete from FND_SVC_COMP_REQUESTS_H
254: where REQUEST_HISTORY_ID = X_REQUEST_HISTORY_ID;
255:
256: if (sql%notfound) then
257: raise no_data_found;
259:
260:
261: exception
262: when others then
263: wf_core.context('FND_SVC_COMP_REQUESTS_H_PKG', 'Delete_Row', X_REQUEST_HISTORY_ID);
264: raise;
265: end DELETE_ROW;
266:
267: end FND_SVC_COMP_REQUESTS_H_PKG;
263: wf_core.context('FND_SVC_COMP_REQUESTS_H_PKG', 'Delete_Row', X_REQUEST_HISTORY_ID);
264: raise;
265: end DELETE_ROW;
266:
267: end FND_SVC_COMP_REQUESTS_H_PKG;