[Home] [Help]
PACKAGE BODY: APPS.GME_RESOURCE_TXNS_GTMP_DBL
Source
1 PACKAGE BODY gme_resource_txns_gtmp_dbl AS
2 /* $Header: GMEVGRGB.pls 120.2 2005/07/12 12:35:30 snene noship $ */
3
4 /* Global Variables */
5 g_table_name VARCHAR2 (80) DEFAULT 'GME_RESOURCE_TXNS_GTMP';
6
7 /*============================================================================
8 | Copyright (c) 2001 Oracle Corporation
9 | TVP, Reading
10 | All rights reserved
11 =============================================================================
12 | FILENAME
13 | GMEVGRGB.pls
14 |
15 | DESCRIPTION
16 |
17 |
18 |
19 |
20 | NOTES
21 |
22 | HISTORY
23 | 26-MAR-01 Thomas Daniel Created
24 |
25 | - insert_row
26 | - fetch_row
27 | - update_row
28 |
29 |
30 =============================================================================
31 */
32
33 /* Api start of comments
34 +============================================================================
35 | FUNCTION NAME
36 | insert_row
37 |
38 | TYPE
39 | Private
40 | USAGE
41 | Insert_Row will insert a row in gme_resource_txns_gtmp
42 |
43 |
44 | DESCRIPTION
45 | Insert_Row will insert a row in gme_resource_txns_gtmp
46 |
47 |
48 |
49 | PARAMETERS
50 | p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE
51 | x_resource_txns IN OUT NOCOPY gme_resource_txns_gtmp%ROWTYPE
52 |
53 | RETURNS
54 | BOOLEAN
55 | HISTORY
56 | 12-MAR-01 Thomas Daniel Created
57 |
58 | 16-March-2005 Punit Kumar Convergence changes
59 |
60 +=============================================================================
61 Api end of comments
62 */
63 FUNCTION insert_row (
64 p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE
65 ,x_resource_txns IN OUT NOCOPY gme_resource_txns_gtmp%ROWTYPE)
66 RETURN BOOLEAN
67 IS
68 BEGIN
69 x_resource_txns := p_resource_txns;
70
71 INSERT INTO gme_resource_txns_gtmp
72 (poc_trans_id
73 /*start Punit Kumar*/
74 , organization_id
75 /*end*/
76
77 --,ORGN_CODE
78 , doc_type, doc_id
79 ,line_type, line_id
80 ,resources
81 ,resource_usage, trans_um
82 ,trans_date
83 ,completed_ind, event_id
84 ,instance_id
85 ,sequence_dependent_ind
86 ,posted_ind
87 ,overrided_protected_ind
88 ,reason_code, reason_id, start_date
89 ,end_date, delete_mark
90 ,text_code, action_code
91 ,transaction_no
92 /*start Punit Kumar*/
93 , attribute1, attribute2
94 ,attribute3, attribute4
95 ,attribute5, attribute6
96 ,attribute7, attribute8
97 ,attribute9, attribute10
98 ,attribute11, attribute12
99 ,attribute13, attribute14
100 ,attribute15, attribute16
101 ,attribute17, attribute18
102 ,attribute19, attribute20
103 ,attribute21, attribute22
104 ,attribute23, attribute24
105 ,attribute25, attribute26
106 ,attribute27, attribute28
107 ,attribute29, attribute30
108 /*end */
109 )
110 VALUES (gem5_poc_trans_id_s.NEXTVAL
111 /*start Punit Kumar*/
112 , x_resource_txns.organization_id
113 /*end*/
114
115 --,x_resource_txns.ORGN_CODE
116 , x_resource_txns.doc_type, x_resource_txns.doc_id
117 ,x_resource_txns.line_type, x_resource_txns.line_id
118 ,x_resource_txns.resources
119 ,x_resource_txns.resource_usage, x_resource_txns.trans_um
120 ,x_resource_txns.trans_date
121 ,x_resource_txns.completed_ind, x_resource_txns.event_id
122 ,x_resource_txns.instance_id
123 ,x_resource_txns.sequence_dependent_ind
124 ,x_resource_txns.posted_ind
125 ,x_resource_txns.overrided_protected_ind
126 ,x_resource_txns.reason_code, x_resource_txns.reason_id, x_resource_txns.start_date
127 ,x_resource_txns.end_date, x_resource_txns.delete_mark
128 ,x_resource_txns.text_code, x_resource_txns.action_code
129 ,x_resource_txns.transaction_no
130 /*start Punit Kumar*/
131 , x_resource_txns.attribute1, x_resource_txns.attribute2
132 ,x_resource_txns.attribute3, x_resource_txns.attribute4
133 ,x_resource_txns.attribute5, x_resource_txns.attribute6
134 ,x_resource_txns.attribute7, x_resource_txns.attribute8
135 ,x_resource_txns.attribute9, x_resource_txns.attribute10
136 ,x_resource_txns.attribute11, x_resource_txns.attribute12
137 ,x_resource_txns.attribute13, x_resource_txns.attribute14
138 ,x_resource_txns.attribute15, x_resource_txns.attribute16
139 ,x_resource_txns.attribute17, x_resource_txns.attribute18
140 ,x_resource_txns.attribute19, x_resource_txns.attribute20
141 ,x_resource_txns.attribute21, x_resource_txns.attribute22
142 ,x_resource_txns.attribute23, x_resource_txns.attribute24
143 ,x_resource_txns.attribute25, x_resource_txns.attribute26
144 ,x_resource_txns.attribute27, x_resource_txns.attribute28
145 ,x_resource_txns.attribute29, x_resource_txns.attribute30
146 /*end */
147 )
148 RETURNING poc_trans_id
149 INTO x_resource_txns.poc_trans_id;
150
151 IF SQL%FOUND THEN
152 RETURN TRUE;
153 ELSE
154 RETURN FALSE;
155 END IF;
156 EXCEPTION
157 WHEN OTHERS THEN
158 gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
159 ,SQLERRM);
160 RETURN FALSE;
161 END insert_row;
162
163 /* Api start of comments
164 +============================================================================
165 | FUNCTION NAME
166 | fetch_row
167 |
168 | TYPE
169 | Private
170 | USAGE
171 | Fetch_Row will fetch a row in gme_resource_txns_gtmp
172 |
173 |
174 | DESCRIPTION
175 | Fetch_Row will fetch a row in gme_resource_txns_gtmp
176 |
177 |
178 |
179 | PARAMETERS
180 | p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE
181 | x_resource_txns IN OUT NOCOPY gme_resource_txns_gtmp%ROWTYPE
182 |
183 | RETURNS
184 | BOOLEAN
185 | HISTORY
186 | 12-MAR-01 Thomas Daniel Created
187 |
188 | 16-March-2005 Punit Kumar Convergence changes
189 |
190 +=============================================================================
191 Api end of comments
192 */
193 FUNCTION fetch_row (
194 p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE
195 ,x_resource_txns IN OUT NOCOPY gme_resource_txns_gtmp%ROWTYPE)
196 RETURN BOOLEAN
197 IS
198 BEGIN
199 IF p_resource_txns.poc_trans_id IS NOT NULL THEN
200 SELECT poc_trans_id
201 /*start Punit Kumar*/
202 , organization_id
203 /*end*/
204
205 --,ORGN_CODE
206 , doc_type
207 ,doc_id, line_type
208 ,line_id, resources
209 ,resource_usage, trans_um
210 ,trans_date, completed_ind
211 ,event_id, instance_id
212 ,sequence_dependent_ind
213 ,posted_ind
214 ,overrided_protected_ind
215 ,reason_code, reason_id, start_date
216 ,end_date, delete_mark
217 ,text_code, action_code
218 ,transaction_no
219 /*start Punit Kumar*/
220 , attribute1
221 ,attribute2, attribute3
222 ,attribute4, attribute5
223 ,attribute6, attribute7
224 ,attribute8, attribute9
225 ,attribute10, attribute11
226 ,attribute12, attribute13
227 ,attribute14, attribute15
228 ,attribute16, attribute17
229 ,attribute18, attribute19
230 ,attribute20, attribute21
231 ,attribute22, attribute23
232 ,attribute24, attribute25
233 ,attribute26, attribute27
234 ,attribute28, attribute29
235 ,attribute30
236 /*end */
237 INTO x_resource_txns.poc_trans_id
238 /*start Punit Kumar*/
239 , x_resource_txns.organization_id
240 /*end*/
241
242 --,x_resource_txns.ORGN_CODE
243 , x_resource_txns.doc_type
244 ,x_resource_txns.doc_id, x_resource_txns.line_type
245 ,x_resource_txns.line_id, x_resource_txns.resources
246 ,x_resource_txns.resource_usage, x_resource_txns.trans_um
247 ,x_resource_txns.trans_date, x_resource_txns.completed_ind
248 ,x_resource_txns.event_id, x_resource_txns.instance_id
249 ,x_resource_txns.sequence_dependent_ind
250 ,x_resource_txns.posted_ind
251 ,x_resource_txns.overrided_protected_ind
252 ,x_resource_txns.reason_code, x_resource_txns.reason_id, x_resource_txns.start_date
253 ,x_resource_txns.end_date, x_resource_txns.delete_mark
254 ,x_resource_txns.text_code, x_resource_txns.action_code
255 ,x_resource_txns.transaction_no
256 /*start Punit Kumar*/
257 , x_resource_txns.attribute1
258 ,x_resource_txns.attribute2, x_resource_txns.attribute3
259 ,x_resource_txns.attribute4, x_resource_txns.attribute5
260 ,x_resource_txns.attribute6, x_resource_txns.attribute7
261 ,x_resource_txns.attribute8, x_resource_txns.attribute9
262 ,x_resource_txns.attribute10, x_resource_txns.attribute11
263 ,x_resource_txns.attribute12, x_resource_txns.attribute13
264 ,x_resource_txns.attribute14, x_resource_txns.attribute15
265 ,x_resource_txns.attribute16, x_resource_txns.attribute17
266 ,x_resource_txns.attribute18, x_resource_txns.attribute19
267 ,x_resource_txns.attribute20, x_resource_txns.attribute21
268 ,x_resource_txns.attribute22, x_resource_txns.attribute23
269 ,x_resource_txns.attribute24, x_resource_txns.attribute25
270 ,x_resource_txns.attribute26, x_resource_txns.attribute27
271 ,x_resource_txns.attribute28, x_resource_txns.attribute29
272 ,x_resource_txns.attribute30
273 /*end */
274 FROM gme_resource_txns_gtmp
275 WHERE poc_trans_id = p_resource_txns.poc_trans_id;
276 ELSE
277 gme_common_pvt.log_message ('GME_NO_KEYS'
278 ,'TABLE_NAME'
279 ,g_table_name);
280 RETURN FALSE;
281 END IF;
282
283 RETURN TRUE;
284 EXCEPTION
285 WHEN NO_DATA_FOUND THEN
286 gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
287 ,'TABLE_NAME'
288 ,g_table_name);
289 RETURN FALSE;
290 WHEN OTHERS THEN
291 gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
292 ,SQLERRM);
293 RETURN FALSE;
294 END fetch_row;
295
296 /* Api start of comments
297 +============================================================================
298 | FUNCTION NAME
299 | delete_row
300 |
301 | TYPE
302 | Private
303 | USAGE
304 | Delete_Row will delete a row in gme_resource_txns_gtmp
305 |
306 |
307 | DESCRIPTION
308 | Delete_Row will delete a row in gme_resource_txns_gtmp
309 |
310 |
311 |
312 | PARAMETERS
313 | p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE
314 |
315 | RETURNS
316 | BOOLEAN
317 | HISTORY
318 | 12-MAR-01 Thomas Daniel Created
319 |
320 |
321 |
322 +=============================================================================
323 Api end of comments
324 */
325 FUNCTION delete_row (p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE)
326 RETURN BOOLEAN
327 IS
328 BEGIN
329 IF p_resource_txns.poc_trans_id IS NOT NULL THEN
330 UPDATE gme_resource_txns_gtmp
331 SET delete_mark = 1
332 WHERE poc_trans_id = p_resource_txns.poc_trans_id;
333 ELSE
334 gme_common_pvt.log_message ('GME_NO_KEYS'
335 ,'TABLE_NAME'
336 ,g_table_name);
337 RETURN FALSE;
338 END IF;
339
340 IF SQL%FOUND THEN
341 RETURN TRUE;
342 ELSE
343 gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
344 ,'TABLE_NAME'
345 ,g_table_name);
346 RETURN FALSE;
347 END IF;
348 EXCEPTION
349 WHEN OTHERS THEN
350 gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
351 ,SQLERRM);
352 RETURN FALSE;
353 END delete_row;
354
355 /* Api start of comments
356 +============================================================================
357 | FUNCTION NAME
358 | update_row
359 |
360 | TYPE
361 | Private
362 | USAGE
363 | Update_Row will update a row in gme_resource_txns_gtmp
364 |
365 |
366 | DESCRIPTION
367 | Update_Row will update a row in gme_resource_txns_gtmp
368 |
369 |
370 |
371 | PARAMETERS
372 | p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE
373 |
374 | RETURNS
375 | BOOLEAN
376 | HISTORY
377 | 12-MAR-01 Thomas Daniel Created
378 |
379 |
380 | 16-March-2005 Punit Kumar Convergence changes
381 +=============================================================================
382 Api end of comments
383 */
384 FUNCTION update_row (p_resource_txns IN gme_resource_txns_gtmp%ROWTYPE)
385 RETURN BOOLEAN
386 IS
387 BEGIN
388 IF p_resource_txns.poc_trans_id IS NOT NULL THEN
389 UPDATE gme_resource_txns_gtmp
390 SET
391 --ORGN_CODE = p_resource_txns.ORGN_CODE
392
393 /* start , Punit Kumar */
394 organization_id = p_resource_txns.organization_id
395 /*end */
396 , doc_type = p_resource_txns.doc_type
397 ,doc_id = p_resource_txns.doc_id
398 ,line_type = p_resource_txns.line_type
399 ,line_id = p_resource_txns.line_id
400 ,resources = p_resource_txns.resources
401 ,resource_usage = p_resource_txns.resource_usage
402 ,trans_um = p_resource_txns.trans_um
403 ,trans_date = p_resource_txns.trans_date
404 ,completed_ind = p_resource_txns.completed_ind
405 ,event_id = p_resource_txns.event_id
406 ,instance_id = p_resource_txns.instance_id
407 ,sequence_dependent_ind =
408 p_resource_txns.sequence_dependent_ind
409 ,posted_ind = p_resource_txns.posted_ind
410 ,overrided_protected_ind =
411 p_resource_txns.overrided_protected_ind
412 ,reason_code = p_resource_txns.reason_code
413 ,reason_id = p_resource_txns.reason_id
414 ,start_date = p_resource_txns.start_date
415 ,end_date = p_resource_txns.end_date
416 ,delete_mark = p_resource_txns.delete_mark
417 ,text_code = p_resource_txns.text_code
418 ,action_code = p_resource_txns.action_code
419 ,transaction_no = p_resource_txns.transaction_no
420 /*start Punit Kumar*/
421 , attribute1 = p_resource_txns.attribute1
422 ,attribute2 = p_resource_txns.attribute2
423 ,attribute3 = p_resource_txns.attribute3
424 ,attribute4 = p_resource_txns.attribute4
425 ,attribute5 = p_resource_txns.attribute5
426 ,attribute6 = p_resource_txns.attribute6
427 ,attribute7 = p_resource_txns.attribute7
428 ,attribute8 = p_resource_txns.attribute8
429 ,attribute9 = p_resource_txns.attribute9
430 ,attribute10 = p_resource_txns.attribute10
431 ,attribute11 = p_resource_txns.attribute11
432 ,attribute12 = p_resource_txns.attribute12
433 ,attribute13 = p_resource_txns.attribute13
434 ,attribute14 = p_resource_txns.attribute14
435 ,attribute15 = p_resource_txns.attribute15
436 ,attribute16 = p_resource_txns.attribute16
437 ,attribute17 = p_resource_txns.attribute17
438 ,attribute18 = p_resource_txns.attribute18
439 ,attribute19 = p_resource_txns.attribute19
440 ,attribute20 = p_resource_txns.attribute20
441 ,attribute21 = p_resource_txns.attribute21
442 ,attribute22 = p_resource_txns.attribute22
443 ,attribute23 = p_resource_txns.attribute23
444 ,attribute24 = p_resource_txns.attribute24
445 ,attribute25 = p_resource_txns.attribute25
446 ,attribute26 = p_resource_txns.attribute26
447 ,attribute27 = p_resource_txns.attribute27
448 ,attribute28 = p_resource_txns.attribute28
449 ,attribute29 = p_resource_txns.attribute29
450 ,attribute30 = p_resource_txns.attribute30
451 /*end */
452 WHERE poc_trans_id = p_resource_txns.poc_trans_id;
453 ELSE
454 gme_common_pvt.log_message ('GME_NO_KEYS'
455 ,'TABLE_NAME'
456 ,g_table_name);
457 RETURN FALSE;
458 END IF;
459
460 IF SQL%FOUND THEN
461 RETURN TRUE;
462 ELSE
463 gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
464 ,'TABLE_NAME'
465 ,g_table_name);
466 RETURN FALSE;
467 END IF;
468 EXCEPTION
469 WHEN OTHERS THEN
470 gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
471 ,SQLERRM);
472 RETURN FALSE;
473 END update_row;
474 END gme_resource_txns_gtmp_dbl;