1: PACKAGE BODY csi_systems_b_pkg AS
2: /* $Header: csitsysb.pls 120.0.12010000.2 2008/11/06 20:30:23 mashah ship $ */
3: -- start of comments
4: -- package name : csi_systems_b_pkg
5: -- purpose :
1: PACKAGE BODY csi_systems_b_pkg AS
2: /* $Header: csitsysb.pls 120.0.12010000.2 2008/11/06 20:30:23 mashah ship $ */
3: -- start of comments
4: -- package name : csi_systems_b_pkg
5: -- purpose :
6: -- history :
7: -- note :
8: -- end of comments
7: -- note :
8: -- end of comments
9:
10:
11: g_pkg_name constant VARCHAR2(30):= 'csi_systems_b_pkg';
12: g_file_name constant VARCHAR2(12) := 'csitsysb.pls';
13:
14: PROCEDURE insert_row(
15: px_system_id IN OUT NOCOPY NUMBER ,
68: OPEN c2;
69: FETCH c2 INTO px_system_id;
70: CLOSE c2;
71: END IF;
72: INSERT INTO csi_systems_b(
73: system_id,
74: customer_id,
75: system_type_code,
76: system_number,
242: p_program_id NUMBER ,
243: p_program_update_date DATE )
244: IS
245: BEGIN
246: update csi_systems_b
247: set
248: customer_id = decode( p_customer_id, fnd_api.g_miss_num, customer_id, p_customer_id),
249: system_type_code = decode( p_system_type_code, fnd_api.g_miss_char, system_type_code, p_system_type_code),
250: system_number = decode( p_system_number, fnd_api.g_miss_char, system_number, p_system_number),
356: p_program_id NUMBER ,
357: p_program_update_date DATE )
358: IS
359: BEGIN
360: update csi_systems_b
361: set
362: customer_id = decode( p_customer_id, fnd_api.g_miss_num, customer_id, p_customer_id),
363: system_type_code = decode( p_system_type_code, fnd_api.g_miss_char, system_type_code, p_system_type_code),
364: system_number = decode( p_system_number, fnd_api.g_miss_char, system_number, p_system_number),
424: PROCEDURE delete_row(
425: p_system_id NUMBER)
426: is
427: BEGIN
428: delete FROM csi_systems_b
429: WHERE system_id = p_system_id;
430: if (sql%notfound) THEN
431: raise no_data_found;
432: END IF;
476:
477: is
478: CURSOR c IS
479: SELECT *
480: FROM csi_systems_b
481: WHERE system_id = p_system_id
482: FOR UPDATE OF system_id NOWAIT;
483: recinfo c%rowtype;
484:
533: /********* COMMENTED FOR BUG 4238439 (Refer 3723612 for solution)
534: DELETE FROM csi_systems_tl t
535: WHERE NOT EXISTS
536: (SELECT NULL
537: FROM csi_systems_b b
538: WHERE b.system_id = t.system_id
539: );
540:
541: UPDATE csi_systems_tl t
614: END translate_row;
615:
616:
617:
618: end csi_systems_b_pkg;