[Home] [Help]
1: package body icx_pages_pkg as
2: /* $Header: ICXPAGHB.pls 115.2 1999/11/23 18:44:46 pkm ship $ */
3:
4: -- ***********************************************
5: -- procedure INSERT_ROW
22: x_last_updated_by in number,
23: x_last_update_login in number
24: ) is
25:
26: cursor C is select ROWID from ICX_PAGES
27: where PAGE_ID = X_PAGE_ID;
28:
29: begin
30: insert into ICX_PAGES (
26: cursor C is select ROWID from ICX_PAGES
27: where PAGE_ID = X_PAGE_ID;
28:
29: begin
30: insert into ICX_PAGES (
31: page_code,
32: main_region_id,
33: sequence_number,
34: page_type,
56: x_last_updated_by,
57: x_last_update_login
58: );
59:
60: insert into ICX_PAGES_TL (
61: page_id,
62: page_name,
63: page_description,
64: last_update_date,
82: from fnd_languages l
83: where L.INSTALLED_FLAG in ('I', 'B')
84: and not exists
85: (select NULL
86: from ICX_PAGES_TL T
87: where T.PAGE_ID = X_PAGE_ID
88: and T.LANGUAGE = L.LANGUAGE_CODE);
89:
90: open c;
115: x_last_updated_by in number,
116: x_last_update_login in number
117: ) is
118: begin
119: update icx_pages set
120: page_code = x_page_code,
121: main_region_id = x_main_region_id,
122: sequence_number = x_sequence_number,
123: page_type = x_page_type,
131: if (sql%notfound) then
132: raise no_data_found;
133: end if;
134:
135: update icx_pages_tl set
136: page_name = x_page_name,
137: page_description = x_page_description,
138: last_update_date = x_last_update_date,
139: last_updated_by = x_last_updated_by,
154:
155: procedure ADD_LANGUAGE
156: is
157: begin
158: delete from ICX_PAGES_TL T
159: where not exists
160: (select NULL
161: from ICX_PAGES B
162: where B.PAGE_ID = T.PAGE_ID
157: begin
158: delete from ICX_PAGES_TL T
159: where not exists
160: (select NULL
161: from ICX_PAGES B
162: where B.PAGE_ID = T.PAGE_ID
163: );
164:
165: update icx_pages_tl t set (
161: from ICX_PAGES B
162: where B.PAGE_ID = T.PAGE_ID
163: );
164:
165: update icx_pages_tl t set (
166: page_name,
167: page_description
168: ) = (select
169: b.page_name,
167: page_description
168: ) = (select
169: b.page_name,
170: b.page_description
171: from icx_pages_tl b
172: where b.page_id = t.page_id
173: and b.language = t.source_lang)
174: where (
175: t.page_id,
176: t.language
177: ) in (select
178: subt.page_id,
179: subt.language
180: from icx_pages_tl subb, icx_pages_tl subt
181: where subb.page_id = subt.page_id
182: and subb.language = subt.source_lang
183: and (subb.page_name <> subt.page_name
184: or (subb.page_name is null and subt.page_name is not null)
187: or (subb.page_description is null and subt.page_description is not null)
188: or (subb.page_description is not null and subt.page_description is null)
189: ));
190:
191: insert into ICX_PAGES_TL (
192: page_id,
193: page_name,
194: page_description,
195: last_update_date,
209: b.created_by,
210: b.last_update_login,
211: l.language_code,
212: b.source_lang
213: from ICX_PAGES_TL b, FND_LANGUAGES l
214: where l.installed_flag in ('I', 'B')
215: and b.language = userenv('LANG')
216: and not exists
217: (select NULL
214: where l.installed_flag in ('I', 'B')
215: and b.language = userenv('LANG')
216: and not exists
217: (select NULL
218: from icx_pages_tl t
219: where t.page_id = b.page_id
220: and t.language = l.language_code);
221: end ADD_LANGUAGE;
222:
226: x_page_description in varchar2
227: ) is
228: begin
229:
230: update ICX_PAGES_tl set
231: page_name = X_PAGE_NAME,
232: page_description = X_PAGE_DESCRIPTION,
233: SOURCE_LANG = userenv('LANG'),
234: last_update_date = sysdate,
258:
259: begin
260:
261: select PAGE_ID into l_page_id
262: from ICX_PAGES
263: where PAGE_ID = X_PAGE_ID;
264:
265: icx_pages_pkg.UPDATE_ROW (
266: x_page_id => x_page_id,
261: select PAGE_ID into l_page_id
262: from ICX_PAGES
263: where PAGE_ID = X_PAGE_ID;
264:
265: icx_pages_pkg.UPDATE_ROW (
266: x_page_id => x_page_id,
267: x_page_code => x_page_code,
268: x_main_region_id => x_main_region_id,
269: x_sequence_number => x_sequence_number,
278:
279: exception
280: when NO_DATA_FOUND then
281:
282: icx_pages_pkg.INSERT_ROW (
283: X_ROWID => row_id,
284: x_page_id => x_page_id,
285: x_page_code => x_page_code,
286: x_main_region_id => x_main_region_id,
297: x_last_update_login => 0);
298: end;
299: end LOAD_ROW;
300:
301: end ICX_PAGES_PKG;