1: PACKAGE BODY CN_TABLE_MAPS_PKG AS
2: -- $Header: cncotmb.pls 120.5 2005/10/24 00:45:41 apink noship $
3: --
4: -- Public Procedures
5: --
5: --
6:
7: PROCEDURE insert_row (
8: X_rowid OUT NOCOPY ROWID,
9: X_table_map_id IN OUT NOCOPY cn_table_maps.table_map_id%TYPE,
10: X_mapping_type cn_table_maps.mapping_type%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
6:
7: PROCEDURE insert_row (
8: X_rowid OUT NOCOPY ROWID,
9: X_table_map_id IN OUT NOCOPY cn_table_maps.table_map_id%TYPE,
10: X_mapping_type cn_table_maps.mapping_type%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
7: PROCEDURE insert_row (
8: X_rowid OUT NOCOPY ROWID,
9: X_table_map_id IN OUT NOCOPY cn_table_maps.table_map_id%TYPE,
10: X_mapping_type cn_table_maps.mapping_type%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
8: X_rowid OUT NOCOPY ROWID,
9: X_table_map_id IN OUT NOCOPY cn_table_maps.table_map_id%TYPE,
10: X_mapping_type cn_table_maps.mapping_type%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
9: X_table_map_id IN OUT NOCOPY cn_table_maps.table_map_id%TYPE,
10: X_mapping_type cn_table_maps.mapping_type%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
10: X_mapping_type cn_table_maps.mapping_type%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
11: X_module_id cn_table_maps.module_id%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
12: X_source_table_id cn_table_maps.source_table_id%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
13: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
21: X_created_by cn_table_maps.created_by%TYPE,
14: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
21: X_created_by cn_table_maps.created_by%TYPE,
22: X_org_id cn_table_maps.org_id%TYPE) IS
15: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
21: X_created_by cn_table_maps.created_by%TYPE,
22: X_org_id cn_table_maps.org_id%TYPE) IS
23:
16: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
21: X_created_by cn_table_maps.created_by%TYPE,
22: X_org_id cn_table_maps.org_id%TYPE) IS
23:
24: BEGIN
17: X_notify_where cn_table_maps.notify_where%TYPE,
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
21: X_created_by cn_table_maps.created_by%TYPE,
22: X_org_id cn_table_maps.org_id%TYPE) IS
23:
24: BEGIN
25:
18: X_collect_where cn_table_maps.collect_where%TYPE,
19: X_delete_flag cn_table_maps.delete_flag%TYPE,
20: X_creation_date cn_table_maps.creation_date%TYPE,
21: X_created_by cn_table_maps.created_by%TYPE,
22: X_org_id cn_table_maps.org_id%TYPE) IS
23:
24: BEGIN
25:
26: IF X_table_map_id IS NULL THEN
23:
24: BEGIN
25:
26: IF X_table_map_id IS NULL THEN
27: SELECT cn_table_maps_s.NEXTVAL
28: INTO X_table_map_id
29: FROM dual;
30: END IF;
31:
28: INTO X_table_map_id
29: FROM dual;
30: END IF;
31:
32: INSERT INTO cn_table_maps (
33: object_version_number,
34: table_map_id,
35: mapping_type,
36: module_id,
62: X_created_by); -- Modified For R12
63:
64: SELECT ROWID
65: INTO X_rowid
66: FROM cn_table_maps
67: WHERE table_map_id = X_table_map_id
68: AND org_id = X_org_id; -- Modified For R12 MOAC
69:
70: IF (SQL%NOTFOUND) THEN
73:
74: END insert_row;
75:
76: PROCEDURE lock_row (
77: X_table_map_id cn_table_maps.table_map_id%TYPE,
78: X_mapping_type cn_table_maps.mapping_type%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
74: END insert_row;
75:
76: PROCEDURE lock_row (
77: X_table_map_id cn_table_maps.table_map_id%TYPE,
78: X_mapping_type cn_table_maps.mapping_type%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
75:
76: PROCEDURE lock_row (
77: X_table_map_id cn_table_maps.table_map_id%TYPE,
78: X_mapping_type cn_table_maps.mapping_type%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
76: PROCEDURE lock_row (
77: X_table_map_id cn_table_maps.table_map_id%TYPE,
78: X_mapping_type cn_table_maps.mapping_type%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
77: X_table_map_id cn_table_maps.table_map_id%TYPE,
78: X_mapping_type cn_table_maps.mapping_type%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
78: X_mapping_type cn_table_maps.mapping_type%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
86: X_collect_where cn_table_maps.collect_where%TYPE,
79: X_module_id cn_table_maps.module_id%TYPE,
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
86: X_collect_where cn_table_maps.collect_where%TYPE,
87: X_delete_flag cn_table_maps.delete_flag%TYPE) IS
80: X_source_table_id cn_table_maps.source_table_id%TYPE,
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
86: X_collect_where cn_table_maps.collect_where%TYPE,
87: X_delete_flag cn_table_maps.delete_flag%TYPE) IS
88: --
81: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
86: X_collect_where cn_table_maps.collect_where%TYPE,
87: X_delete_flag cn_table_maps.delete_flag%TYPE) IS
88: --
89: CURSOR c1 IS SELECT
82: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
86: X_collect_where cn_table_maps.collect_where%TYPE,
87: X_delete_flag cn_table_maps.delete_flag%TYPE) IS
88: --
89: CURSOR c1 IS SELECT
90: mapping_type,
83: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
84: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
85: X_notify_where cn_table_maps.notify_where%TYPE,
86: X_collect_where cn_table_maps.collect_where%TYPE,
87: X_delete_flag cn_table_maps.delete_flag%TYPE) IS
88: --
89: CURSOR c1 IS SELECT
90: mapping_type,
91: module_id,
96: source_tbl_hdr_fkcol_id,
97: notify_where,
98: collect_where,
99: delete_flag
100: FROM cn_table_maps
101: WHERE table_map_id = x_table_map_id
102: FOR UPDATE OF table_map_id NOWAIT;
103:
104: tlinfo c1%ROWTYPE;
133: RETURN;
134: END lock_row;
135:
136: PROCEDURE update_row (
137: X_table_map_id cn_table_maps.table_map_id%TYPE,
138: X_mapping_type cn_table_maps.mapping_type%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
134: END lock_row;
135:
136: PROCEDURE update_row (
137: X_table_map_id cn_table_maps.table_map_id%TYPE,
138: X_mapping_type cn_table_maps.mapping_type%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
135:
136: PROCEDURE update_row (
137: X_table_map_id cn_table_maps.table_map_id%TYPE,
138: X_mapping_type cn_table_maps.mapping_type%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
136: PROCEDURE update_row (
137: X_table_map_id cn_table_maps.table_map_id%TYPE,
138: X_mapping_type cn_table_maps.mapping_type%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
137: X_table_map_id cn_table_maps.table_map_id%TYPE,
138: X_mapping_type cn_table_maps.mapping_type%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
138: X_mapping_type cn_table_maps.mapping_type%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
139: X_module_id cn_table_maps.module_id%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
140: X_source_table_id cn_table_maps.source_table_id%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
141: X_source_tbl_pkcol_id cn_table_maps.source_tbl_pkcol_id%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
142: X_destination_table_id cn_table_maps.destination_table_id%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
150: X_last_update_login cn_table_maps.last_update_login%TYPE,
143: X_source_hdr_tbl_pkcol_id cn_table_maps.source_hdr_tbl_pkcol_id%TYPE,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
150: X_last_update_login cn_table_maps.last_update_login%TYPE,
151: x_object_version_number NUMBER := cn_api.G_MISS_NUM,
144: X_source_tbl_hdr_fkcol_id cn_table_maps.source_tbl_hdr_fkcol_id%TYPE,
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
150: X_last_update_login cn_table_maps.last_update_login%TYPE,
151: x_object_version_number NUMBER := cn_api.G_MISS_NUM,
152: x_org_id cn_table_maps.org_id%TYPE) IS
145: X_notify_where cn_table_maps.notify_where%TYPE,
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
150: X_last_update_login cn_table_maps.last_update_login%TYPE,
151: x_object_version_number NUMBER := cn_api.G_MISS_NUM,
152: x_org_id cn_table_maps.org_id%TYPE) IS
153:
146: X_collect_where cn_table_maps.collect_where%TYPE,
147: X_delete_flag cn_table_maps.delete_flag%TYPE,
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
150: X_last_update_login cn_table_maps.last_update_login%TYPE,
151: x_object_version_number NUMBER := cn_api.G_MISS_NUM,
152: x_org_id cn_table_maps.org_id%TYPE) IS
153:
154:
148: X_last_update_date cn_table_maps.last_update_date%TYPE,
149: X_last_updated_by cn_table_maps.last_updated_by%TYPE,
150: X_last_update_login cn_table_maps.last_update_login%TYPE,
151: x_object_version_number NUMBER := cn_api.G_MISS_NUM,
152: x_org_id cn_table_maps.org_id%TYPE) IS
153:
154:
155: CURSOR l_ovn_csr IS
156: SELECT object_version_number
153:
154:
155: CURSOR l_ovn_csr IS
156: SELECT object_version_number
157: FROM cn_table_maps
158: WHERE table_map_id = x_table_map_id
159: AND org_id = x_org_id;
160:
161: l_ovn NUMBER;
168: SELECT DECODE(x_object_version_number, cn_api.G_MISS_NUM,
169: l_ovn,x_object_version_number)
170: INTO l_ovn FROM dual;
171:
172: UPDATE cn_table_maps SET
173: mapping_type = x_mapping_type,
174: module_id = x_module_id,
175: source_table_id = x_source_table_id,
176: source_tbl_pkcol_id = x_source_tbl_pkcol_id,
196: X_table_map_id IN NUMBER,
197: X_org_id IN NUMBER
198: ) IS
199: BEGIN
200: DELETE FROM cn_table_maps
201: WHERE table_map_id = x_table_map_id
202: AND org_id = X_org_id;
203:
204: IF (SQL%NOTFOUND) THEN
242: ELSE
243: USER_ID := 0;
244: END IF;
245:
246: update cn_table_maps_all set
247: MAPPING_TYPE = x_MAPPING_TYPE,
248: SOURCE_TABLE_ID = to_number(x_SOURCE_TABLE_ID),
249: DESTINATION_TABLE_ID = to_number(x_DESTINATION_TABLE_ID),
250: MODULE_ID = to_number(x_MODULE_ID),
269: and ORG_ID = x_ORG_ID;
270:
271: IF (SQL%NOTFOUND) THEN
272: -- Insert new record to CN_OBJECTS_TABLE table
273: insert into cn_table_maps_all
274: (TABLE_MAP_ID,
275: MAPPING_TYPE,
276: SOURCE_TABLE_ID,
277: DESTINATION_TABLE_ID,
349: x_OWNER in varchar2)
350: IS
351: BEGIN
352: if (x_upload_mode = 'NLS') then
353: --CN_TABLE_MAPS_PKG.TRANSLATE_ROW(x_owner);
354: -- As this ldt is not required to loaded translated data, you could leave it blank.
355: null;
356: else
357: CN_TABLE_MAPS_PKG.load_row(x_TABLE_MAP_ID,
353: --CN_TABLE_MAPS_PKG.TRANSLATE_ROW(x_owner);
354: -- As this ldt is not required to loaded translated data, you could leave it blank.
355: null;
356: else
357: CN_TABLE_MAPS_PKG.load_row(x_TABLE_MAP_ID,
358: x_MAPPING_TYPE,
359: x_SOURCE_TABLE_ID,
360: x_DESTINATION_TABLE_ID,
361: x_MODULE_ID,
381: null;
382: end if;
383: END load_seed_row;
384:
385: END cn_table_maps_pkg;