52: X_LAST_UPDATED_BY,
53: X_LAST_UPDATE_LOGIN
54: );
55:
56: insert into BNE_CACHE_DIRECTIVES_TL (
57: APPLICATION_ID,
58: DIRECTIVE_CODE,
59: USER_NAME,
60: CREATED_BY,
78: from FND_LANGUAGES L
79: where L.INSTALLED_FLAG in ('I', 'B')
80: and not exists
81: (select NULL
82: from BNE_CACHE_DIRECTIVES_TL T
83: where T.APPLICATION_ID = X_APPLICATION_ID
84: and T.DIRECTIVE_CODE = X_DIRECTIVE_CODE
85: and T.LANGUAGE = L.LANGUAGE_CODE);
86:
120:
121: cursor c1 is select
122: USER_NAME,
123: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
124: from BNE_CACHE_DIRECTIVES_TL
125: where APPLICATION_ID = X_APPLICATION_ID
126: and DIRECTIVE_CODE = X_DIRECTIVE_CODE
127: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
128: for update of APPLICATION_ID nowait;
196: if (sql%notfound) then
197: raise no_data_found;
198: end if;
199:
200: update BNE_CACHE_DIRECTIVES_TL set
201: USER_NAME = X_USER_NAME,
202: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
203: LAST_UPDATED_BY = X_LAST_UPDATED_BY,
204: LAST_UPDATE_LOGIN = X_LAST_UPDATE_LOGIN,
216: X_APPLICATION_ID in NUMBER,
217: X_DIRECTIVE_CODE in VARCHAR2
218: ) is
219: begin
220: delete from BNE_CACHE_DIRECTIVES_TL
221: where APPLICATION_ID = X_APPLICATION_ID
222: and DIRECTIVE_CODE = X_DIRECTIVE_CODE;
223:
224: if (sql%notfound) then
236:
237: procedure ADD_LANGUAGE
238: is
239: begin
240: delete from BNE_CACHE_DIRECTIVES_TL T
241: where not exists
242: (select NULL
243: from BNE_CACHE_DIRECTIVES_B B
244: where B.APPLICATION_ID = T.APPLICATION_ID
244: where B.APPLICATION_ID = T.APPLICATION_ID
245: and B.DIRECTIVE_CODE = T.DIRECTIVE_CODE
246: );
247:
248: update BNE_CACHE_DIRECTIVES_TL T set (
249: USER_NAME
250: ) = (select
251: B.USER_NAME
252: from BNE_CACHE_DIRECTIVES_TL B
248: update BNE_CACHE_DIRECTIVES_TL T set (
249: USER_NAME
250: ) = (select
251: B.USER_NAME
252: from BNE_CACHE_DIRECTIVES_TL B
253: where B.APPLICATION_ID = T.APPLICATION_ID
254: and B.DIRECTIVE_CODE = T.DIRECTIVE_CODE
255: and B.LANGUAGE = T.SOURCE_LANG)
256: where (
260: ) in (select
261: SUBT.APPLICATION_ID,
262: SUBT.DIRECTIVE_CODE,
263: SUBT.LANGUAGE
264: from BNE_CACHE_DIRECTIVES_TL SUBB, BNE_CACHE_DIRECTIVES_TL SUBT
265: where SUBB.APPLICATION_ID = SUBT.APPLICATION_ID
266: and SUBB.DIRECTIVE_CODE = SUBT.DIRECTIVE_CODE
267: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
268: and (SUBB.USER_NAME <> SUBT.USER_NAME
267: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
268: and (SUBB.USER_NAME <> SUBT.USER_NAME
269: ));
270:
271: insert into BNE_CACHE_DIRECTIVES_TL (
272: APPLICATION_ID,
273: DIRECTIVE_CODE,
274: USER_NAME,
275: CREATED_BY,
289: B.LAST_UPDATE_LOGIN,
290: B.LAST_UPDATE_DATE,
291: L.LANGUAGE_CODE,
292: B.SOURCE_LANG
293: from BNE_CACHE_DIRECTIVES_TL B, FND_LANGUAGES L
294: where L.INSTALLED_FLAG in ('I', 'B')
295: and B.LANGUAGE = userenv('LANG')
296: and not exists
297: (select NULL
294: where L.INSTALLED_FLAG in ('I', 'B')
295: and B.LANGUAGE = userenv('LANG')
296: and not exists
297: (select NULL
298: from BNE_CACHE_DIRECTIVES_TL T
299: where T.APPLICATION_ID = B.APPLICATION_ID
300: and T.DIRECTIVE_CODE = B.DIRECTIVE_CODE
301: and T.LANGUAGE = L.LANGUAGE_CODE);
302: end ADD_LANGUAGE;
339: f_ludate := nvl(to_date(x_last_update_date, 'YYYY/MM/DD'), sysdate);
340: begin
341: select LAST_UPDATED_BY, LAST_UPDATE_DATE
342: into db_luby, db_ludate
343: from BNE_CACHE_DIRECTIVES_TL
344: where APPLICATION_ID = l_app_id
345: and DIRECTIVE_CODE = x_directive_code
346: and LANGUAGE = userenv('LANG');
347:
348: -- Test for customization and version
349: if (fnd_load_util.upload_test(f_luby, f_ludate, db_luby,
350: db_ludate, x_custom_mode)) then
351:
352: update BNE_CACHE_DIRECTIVES_TL
353: set USER_NAME = x_user_name,
354: LAST_UPDATE_DATE = f_ludate,
355: LAST_UPDATED_BY = f_luby,
356: LAST_UPDATE_LOGIN = 0,