51: X_LAST_UPDATED_BY,
52: X_LAST_UPDATE_LOGIN
53: );
54:
55: insert into FND_PRINTER_STYLES_TL (
56: PRINTER_STYLE_NAME,
57: USER_PRINTER_STYLE_NAME,
58: LAST_UPDATE_DATE,
59: LAST_UPDATED_BY,
75: from FND_LANGUAGES L
76: where L.INSTALLED_FLAG in ('I', 'B')
77: and not exists
78: (select NULL
79: from FND_PRINTER_STYLES_TL T
80: where T.PRINTER_STYLE_NAME = X_PRINTER_STYLE_NAME
81: and T.LANGUAGE = L.LANGUAGE_CODE);
82:
83: open c;
115: recinfo c%rowtype;
116:
117: cursor c1 is select
118: USER_PRINTER_STYLE_NAME
119: from FND_PRINTER_STYLES_TL
120: where PRINTER_STYLE_NAME = X_PRINTER_STYLE_NAME
121: and LANGUAGE = userenv('LANG')
122: for update of PRINTER_STYLE_NAME nowait;
123: tlinfo c1%rowtype;
198: if (sql%notfound) then
199: raise no_data_found;
200: end if;
201:
202: update FND_PRINTER_STYLES_TL set
203: USER_PRINTER_STYLE_NAME = X_USER_PRINTER_STYLE_NAME,
204: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
205: LAST_UPDATED_BY = X_LAST_UPDATED_BY,
206: LAST_UPDATE_LOGIN = X_LAST_UPDATE_LOGIN,
223: if (sql%notfound) then
224: raise no_data_found;
225: end if;
226:
227: delete from FND_PRINTER_STYLES_TL
228: where PRINTER_STYLE_NAME = X_PRINTER_STYLE_NAME;
229:
230: if (sql%notfound) then
231: raise no_data_found;
240: /* as a quick workaround to fix the time-consuming table handler issue */
241: /* Eventually we'll need to turn them into a separate fix_language procedure */
242: /*
243:
244: delete from FND_PRINTER_STYLES_TL T
245: where not exists
246: (select NULL
247: from FND_PRINTER_STYLES B
248: where B.PRINTER_STYLE_NAME = T.PRINTER_STYLE_NAME
247: from FND_PRINTER_STYLES B
248: where B.PRINTER_STYLE_NAME = T.PRINTER_STYLE_NAME
249: );
250:
251: update FND_PRINTER_STYLES_TL T set (
252: USER_PRINTER_STYLE_NAME
253: ) = (select
254: B.USER_PRINTER_STYLE_NAME
255: from FND_PRINTER_STYLES_TL B
251: update FND_PRINTER_STYLES_TL T set (
252: USER_PRINTER_STYLE_NAME
253: ) = (select
254: B.USER_PRINTER_STYLE_NAME
255: from FND_PRINTER_STYLES_TL B
256: where B.PRINTER_STYLE_NAME = T.PRINTER_STYLE_NAME
257: and B.LANGUAGE = T.SOURCE_LANG)
258: where (
259: T.PRINTER_STYLE_NAME,
260: T.LANGUAGE
261: ) in (select
262: SUBT.PRINTER_STYLE_NAME,
263: SUBT.LANGUAGE
264: from FND_PRINTER_STYLES_TL SUBB, FND_PRINTER_STYLES_TL SUBT
265: where SUBB.PRINTER_STYLE_NAME = SUBT.PRINTER_STYLE_NAME
266: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
267: and (SUBB.USER_PRINTER_STYLE_NAME <> SUBT.USER_PRINTER_STYLE_NAME
268: ));
267: and (SUBB.USER_PRINTER_STYLE_NAME <> SUBT.USER_PRINTER_STYLE_NAME
268: ));
269: */
270:
271: insert into FND_PRINTER_STYLES_TL (
272: PRINTER_STYLE_NAME,
273: USER_PRINTER_STYLE_NAME,
274: LAST_UPDATE_DATE,
275: LAST_UPDATED_BY,
287: B.CREATED_BY,
288: B.LAST_UPDATE_LOGIN,
289: L.LANGUAGE_CODE,
290: B.SOURCE_LANG
291: from FND_PRINTER_STYLES_TL B, FND_LANGUAGES L
292: where L.INSTALLED_FLAG in ('I', 'B')
293: and B.LANGUAGE = userenv('LANG')
294: and not exists
295: (select NULL
292: where L.INSTALLED_FLAG in ('I', 'B')
293: and B.LANGUAGE = userenv('LANG')
294: and not exists
295: (select NULL
296: from FND_PRINTER_STYLES_TL T
297: where T.PRINTER_STYLE_NAME = B.PRINTER_STYLE_NAME
298: and T.LANGUAGE = L.LANGUAGE_CODE);
299: end ADD_LANGUAGE;
300: