1: package body BIS_LEVELS_MLS AS
2: /* $Header: BISLMLSB.pls 115.1 99/07/17 16:08:19 porting ship $ */
3:
4: procedure ADD_LANGUAGE
5: is
3:
4: procedure ADD_LANGUAGE
5: is
6: begin
7: delete from BIS_LEVELS_TL T
8: where not exists
9: (select NULL
10: from BIS_LEVELS B
11: where B.LEVEL_ID = T.LEVEL_ID
6: begin
7: delete from BIS_LEVELS_TL T
8: where not exists
9: (select NULL
10: from BIS_LEVELS B
11: where B.LEVEL_ID = T.LEVEL_ID
12: );
13:
14: update BIS_LEVELS_TL T set (
10: from BIS_LEVELS B
11: where B.LEVEL_ID = T.LEVEL_ID
12: );
13:
14: update BIS_LEVELS_TL T set (
15: NAME,
16: DESCRIPTION
17: ) = (select
18: B.NAME,
16: DESCRIPTION
17: ) = (select
18: B.NAME,
19: B.DESCRIPTION
20: from BIS_LEVELS_TL B
21: where B.LEVEL_ID = T.LEVEL_ID
22: and B.LANGUAGE = T.SOURCE_LANG)
23: where (
24: T.LEVEL_ID,
25: T.LANGUAGE
26: ) in (select
27: SUBT.LEVEL_ID,
28: SUBT.LANGUAGE
29: from BIS_LEVELS_TL SUBB, BIS_LEVELS_TL SUBT
30: where SUBB.LEVEL_ID = SUBT.LEVEL_ID
31: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
32: and (SUBB.NAME <> SUBT.NAME
33: or SUBB.DESCRIPTION <> SUBT.DESCRIPTION
34: or (SUBB.DESCRIPTION is null and SUBT.DESCRIPTION is not null)
35: or (SUBB.DESCRIPTION is not null and SUBT.DESCRIPTION is null)
36: ));
37:
38: insert into BIS_LEVELS_TL (
39: LEVEL_ID,
40: NAME,
41: DESCRIPTION,
42: CREATION_DATE,
56: B.LAST_UPDATED_BY,
57: B.LAST_UPDATE_LOGIN,
58: L.LANGUAGE_CODE,
59: B.SOURCE_LANG
60: from BIS_LEVELS_TL B, FND_LANGUAGES L
61: where L.INSTALLED_FLAG in ('I', 'B')
62: and B.LANGUAGE = userenv('LANG')
63: and not exists
64: (select NULL
61: where L.INSTALLED_FLAG in ('I', 'B')
62: and B.LANGUAGE = userenv('LANG')
63: and not exists
64: (select NULL
65: from BIS_LEVELS_TL T
66: where T.LEVEL_ID = B.LEVEL_ID
67: and T.LANGUAGE = L.LANGUAGE_CODE);
68:
69: end ADD_LANGUAGE;
67: and T.LANGUAGE = L.LANGUAGE_CODE);
68:
69: end ADD_LANGUAGE;
70:
71: end BIS_LEVELS_MLS;