42: X_LAST_UPDATE_LOGIN,
43: nvl(X_PRODUCT_CODE,X_APPLICATION_SHORT_NAME)
44: );
45:
46: insert into FND_APPLICATION_TL (
47: APPLICATION_ID,
48: APPLICATION_NAME,
49: DESCRIPTION,
50: CREATED_BY,
73: from FND_LANGUAGES L
74: where L.INSTALLED_FLAG in ('I', 'B')
75: and not exists
76: (select NULL
77: from FND_APPLICATION_TL T
78: where T.APPLICATION_ID = X_APPLICATION_ID
79: and T.LANGUAGE = L.LANGUAGE_CODE);
80:
81: open c;
106:
107: cursor c1 is select
108: APPLICATION_NAME,
109: DESCRIPTION
110: from FND_APPLICATION_TL
111: where APPLICATION_ID = X_APPLICATION_ID
112: and LANGUAGE = userenv('LANG')
113: for update of APPLICATION_ID nowait;
114: tlinfo c1%rowtype;
219: if (sql%notfound) then
220: raise no_data_found;
221: end if;
222:
223: update FND_APPLICATION_TL set
224: APPLICATION_NAME = X_APPLICATION_NAME,
225: DESCRIPTION = decode(X_DESCRIPTION,
226: fnd_load_util.null_value,
227: null,
446:
447: begin
448: select LAST_UPDATED_BY, LAST_UPDATE_DATE
449: into db_luby, db_ludate
450: from fnd_application_tl
451: where application_id =
452: (select application_id
453: from fnd_application
454: where application_short_name = X_APPLICATION_SHORT_NAME)
455: and LANGUAGE = userenv('LANG');
456:
457: if (fnd_load_util.upload_test(f_luby, f_ludate, db_luby,
458: db_ludate, X_CUSTOM_MODE)) then
459: update fnd_application_tl set
460: application_name = nvl(X_APPLICATION_NAME, application_name),
461: description = decode(X_DESCRIPTION,
462: fnd_load_util.null_value,
463: null,
495: if (sql%notfound) then
496: raise no_data_found;
497: end if;
498:
499: delete from FND_APPLICATION_TL
500: where APPLICATION_ID = X_APPLICATION_ID;
501:
502: if (sql%notfound) then
503: raise no_data_found;
513: /* The following delete and update statements are commented out */
514: /* as a quick workaround to fix the time-consuming table handler issue */
515: /* Eventually we'll need to turn them into a separate fix_language procedure */
516: /*
517: delete from FND_APPLICATION_TL T
518: where not exists
519: (select NULL
520: from FND_APPLICATION B
521: where B.APPLICATION_ID = T.APPLICATION_ID
520: from FND_APPLICATION B
521: where B.APPLICATION_ID = T.APPLICATION_ID
522: );
523:
524: update FND_APPLICATION_TL T set (
525: APPLICATION_NAME,
526: DESCRIPTION
527: ) = (select
528: B.APPLICATION_NAME,
526: DESCRIPTION
527: ) = (select
528: B.APPLICATION_NAME,
529: B.DESCRIPTION
530: from FND_APPLICATION_TL B
531: where B.APPLICATION_ID = T.APPLICATION_ID
532: and B.LANGUAGE = T.SOURCE_LANG)
533: where (
534: T.APPLICATION_ID,
535: T.LANGUAGE
536: ) in (select
537: SUBT.APPLICATION_ID,
538: SUBT.LANGUAGE
539: from FND_APPLICATION_TL SUBB, FND_APPLICATION_TL SUBT
540: where SUBB.APPLICATION_ID = SUBT.APPLICATION_ID
541: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
542: and (SUBB.APPLICATION_NAME <> SUBT.APPLICATION_NAME
543: or SUBB.DESCRIPTION <> SUBT.DESCRIPTION
546: ))
547: -- ***** BEGIN NEW CLAUSE FOR UPDATE *****
548: and not exists
549: (select null
550: from FND_APPLICATION_TL DUP
551: where DUP.LANGUAGE = T.LANGUAGE
552: and (DUP.APPLICATION_NAME) =
553: (select
554: B.APPLICATION_NAME
551: where DUP.LANGUAGE = T.LANGUAGE
552: and (DUP.APPLICATION_NAME) =
553: (select
554: B.APPLICATION_NAME
555: from FND_APPLICATION_TL B
556: where B.APPLICATION_ID = T.APPLICATION_ID
557: and B.LANGUAGE = T.SOURCE_LANG));
558: -- ***** END NEW CLAUSE FOR UPDATE *****
559:
558: -- ***** END NEW CLAUSE FOR UPDATE *****
559:
560: -- ***** NEW CODE FOR INSERT HERE *****
561: loop
562: update FND_APPLICATION_TL set
563: APPLICATION_NAME = '@'||APPLICATION_NAME
564: where (APPLICATION_NAME, LANGUAGE) in
565: (select
566: B.APPLICATION_NAME,
564: where (APPLICATION_NAME, LANGUAGE) in
565: (select
566: B.APPLICATION_NAME,
567: L.LANGUAGE_CODE
568: from FND_APPLICATION_TL B, FND_LANGUAGES L
569: where L.INSTALLED_FLAG in ('I', 'B')
570: and B.LANGUAGE = userenv('LANG')
571: and not exists
572: (select NULL
569: where L.INSTALLED_FLAG in ('I', 'B')
570: and B.LANGUAGE = userenv('LANG')
571: and not exists
572: (select NULL
573: from FND_APPLICATION_TL T
574: where T.APPLICATION_ID = B.APPLICATION_ID
575: and T.LANGUAGE = L.LANGUAGE_CODE));
576:
577: exit when SQL%ROWCOUNT = 0;
578: end loop;
579: -- ***** END CODE FOR INSERT HERE *****
580:
581: */
582: insert into FND_APPLICATION_TL (
583: APPLICATION_ID,
584: APPLICATION_NAME,
585: DESCRIPTION,
586: CREATED_BY,
600: B.LAST_UPDATE_DATE,
601: B.LAST_UPDATE_LOGIN,
602: L.LANGUAGE_CODE,
603: B.SOURCE_LANG
604: from FND_APPLICATION_TL B, FND_LANGUAGES L
605: where L.INSTALLED_FLAG in ('I', 'B')
606: and B.LANGUAGE = userenv('LANG')
607: and not exists
608: (select NULL
605: where L.INSTALLED_FLAG in ('I', 'B')
606: and B.LANGUAGE = userenv('LANG')
607: and not exists
608: (select NULL
609: from FND_APPLICATION_TL T
610: where T.APPLICATION_ID = B.APPLICATION_ID
611: and T.LANGUAGE = L.LANGUAGE_CODE);
612: end ADD_LANGUAGE;
613: