16: IF (SQL%NOTFOUND) THEN
17: RAISE no_data_found;
18: END IF;
19:
20: UPDATE ieu_WP_PARAM_DEFS_tl SET
21: param_user_label = p_WP_PARAM_DEFS_rec.PARAM_USER_LABEL,
22: param_description = p_WP_PARAM_DEFS_rec.PARAM_DESCRIPTION,
23: source_lang = USERENV('LANG'),
24: last_updated_by = p_WP_PARAM_DEFS_rec.last_updated_by,
109: -- only UPDATE rows that have not been altered by user
110:
111: user_id := fnd_load_util.owner_id(P_OWNER);
112:
113: UPDATE ieu_WP_PARAM_DEFS_tl SET
114: param_user_label = p_param_user_label,
115: param_description = p_param_description,
116: source_lang = userenv('LANG'),
117: last_update_date = decode(p_last_update_date, null,sysdate,to_date(p_last_update_date,'YYYY/MM/DD')),
127: procedure DELETE_ROW (
128: r_PARAM_ID in NUMBER
129: ) is
130: begin
131: delete from IEU_WP_PARAM_DEFS_TL
132: where PARAM_ID = r_PARAM_ID;
133:
134: if (sql%notfound) then
135: raise no_data_found;
171: FND_GLOBAL.LOGIN_ID,
172: p_WP_PARAM_DEFS_rec.param_name,
173: p_WP_PARAM_DEFS_rec.data_type,
174: 1);
175: INSERT INTO ieu_WP_PARAM_DEFS_tl (
176: PARAM_ID,
177: language,
178: created_by,
179: creation_date,
199: FROM fnd_languages l
200: WHERE l.installed_flag IN ('I', 'B')
201: AND NOT EXISTS
202: (SELECT NULL
203: FROM ieu_WP_PARAM_DEFS_tl t
204: WHERE t.PARAM_ID = p_WP_PARAM_DEFS_rec.PARAM_ID
205: AND t.language = l.language_code);
206:
207: OPEN c;
216:
217: procedure ADD_LANGUAGE
218: is
219: begin
220: delete from IEU_WP_PARAM_DEFS_TL T
221: where not exists
222: (select NULL
223: from IEU_WP_PARAM_DEFS_B B
224: where B.PARAM_ID = T.PARAM_ID
223: from IEU_WP_PARAM_DEFS_B B
224: where B.PARAM_ID = T.PARAM_ID
225: );
226:
227: update IEU_WP_PARAM_DEFS_TL T set (
228: PARAM_USER_LABEL,
229: PARAM_DESCRIPTION
230: ) = (select
231: B.PARAM_USER_LABEL,
229: PARAM_DESCRIPTION
230: ) = (select
231: B.PARAM_USER_LABEL,
232: B.PARAM_DESCRIPTION
233: from IEU_WP_PARAM_DEFS_TL B
234: where B.PARAM_ID = T.PARAM_ID
235: and B.LANGUAGE = T.SOURCE_LANG)
236: where (
237: T.PARAM_ID,
238: T.LANGUAGE
239: ) in (select
240: SUBT.PARAM_ID,
241: SUBT.LANGUAGE
242: from IEU_WP_PARAM_DEFS_TL SUBB, IEU_WP_PARAM_DEFS_TL SUBT
243: where SUBB.PARAM_ID = SUBT.PARAM_ID
244: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
245: and (SUBB.PARAM_USER_LABEL <> SUBT.PARAM_USER_LABEL
246: or SUBB.PARAM_DESCRIPTION <> SUBT.PARAM_DESCRIPTION
247: or (SUBB.PARAM_DESCRIPTION is null and SUBT.PARAM_DESCRIPTION is not null)
248: or (SUBB.PARAM_DESCRIPTION is not null and SUBT.PARAM_DESCRIPTION is null)
249: ));
250:
251: insert into IEU_WP_PARAM_DEFS_TL (
252: PARAM_ID,
253: OBJECT_VERSION_NUMBER,
254: CREATED_BY,
255: CREATION_DATE,
273: B.PARAM_USER_LABEL,
274: B.PARAM_DESCRIPTION,
275: L.LANGUAGE_CODE,
276: B.SOURCE_LANG
277: from IEU_WP_PARAM_DEFS_TL B, FND_LANGUAGES L
278: where L.INSTALLED_FLAG in ('I', 'B')
279: and B.LANGUAGE = userenv('LANG')
280: and not exists
281: (select NULL
278: where L.INSTALLED_FLAG in ('I', 'B')
279: and B.LANGUAGE = userenv('LANG')
280: and not exists
281: (select NULL
282: from IEU_WP_PARAM_DEFS_TL T
283: where T.PARAM_ID = B.PARAM_ID
284: and T.LANGUAGE = L.LANGUAGE_CODE);
285: end ADD_LANGUAGE;
286: