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