59: X_SEQUENCE,
60: X_OVERRIDE_LABEL
61: );
62:
63: INSERT INTO HR_NAVIGATION_PATHS_TL(
64: nav_path_id,
65: override_label,
66: language,
67: source_lang)
73: from FND_LANGUAGES L
74: where L.INSTALLED_FLAG in ('I', 'B')
75: and not exists
76: (select NULL
77: from HR_NAVIGATION_PATHS_TL T
78: where T.NAV_PATH_ID = X_NAV_PATH_ID
79: and T.LANGUAGE = L.LANGUAGE_CODE);
80:
81: open c;
105: from HR_NAVIGATION_PATHS
106: where NAV_PATH_ID = X_NAV_PATH_ID
107: for update of NAV_PATH_ID nowait;
108:
109: cursor CSR_HR_NAVIGATION_PATHS_TL is
110: select OVERRIDE_LABEL,
111: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
112: from HR_NAVIGATION_PATHS_TL TL
113: where nav_path_id = x_nav_path_id
108:
109: cursor CSR_HR_NAVIGATION_PATHS_TL is
110: select OVERRIDE_LABEL,
111: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
112: from HR_NAVIGATION_PATHS_TL TL
113: where nav_path_id = x_nav_path_id
114: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
115: for update of nav_path_id nowait;
116:
128: app_exception.raise_exception;
129: end if;
130: end loop;
131:
132: for tlinf in CSR_HR_NAVIGATION_PATHS_TL loop
133: if (tlinf.BASELANG = 'Y') then
134: if ( ((tlinf.OVERRIDE_LABEL = X_OVERRIDE_LABEL)
135: OR ((tlinf.OVERRIDE_LABEL is null) AND (X_OVERRIDE_LABEL is null)))
136: ) then
174: if (sql%notfound) then
175: raise no_data_found;
176: end if;
177:
178: update HR_NAVIGATION_PATHS_TL
179: set
180: OVERRIDE_LABEL = X_OVERRIDE_LABEL,
181: SOURCE_LANG = userenv('LANG')
182: where NAV_PATH_ID = X_NAV_PATH_ID
192: X_NAV_PATH_ID in NUMBER
193: ) is
194: begin
195:
196: delete from HR_NAVIGATION_PATHS_TL
197: where NAV_PATH_ID = X_NAV_PATH_ID;
198:
199: if (sql%notfound) then
200: raise no_data_found;
211:
212: procedure ADD_LANGUAGE
213: is
214: begin
215: delete from HR_NAVIGATION_PATHS_TL T
216: where not exists
217: (select NULL
218: from HR_NAVIGATION_PATHS B
219: where B.NAV_PATH_ID = T.NAV_PATH_ID
218: from HR_NAVIGATION_PATHS B
219: where B.NAV_PATH_ID = T.NAV_PATH_ID
220: );
221:
222: update HR_NAVIGATION_PATHS_TL T set (
223: OVERRIDE_LABEL
224: ) = (select
225: B.OVERRIDE_LABEL
226: from HR_NAVIGATION_PATHS_TL B
222: update HR_NAVIGATION_PATHS_TL T set (
223: OVERRIDE_LABEL
224: ) = (select
225: B.OVERRIDE_LABEL
226: from HR_NAVIGATION_PATHS_TL B
227: where B.NAV_PATH_ID = T.NAV_PATH_ID
228: and B.LANGUAGE = T.SOURCE_LANG)
229: where (
230: T.NAV_PATH_ID,
231: T.LANGUAGE
232: ) in (select
233: SUBT.NAV_PATH_ID,
234: SUBT.LANGUAGE
235: from HR_NAVIGATION_PATHS_TL SUBB, HR_NAVIGATION_PATHS_TL SUBT
236: where SUBB.NAV_PATH_ID = SUBT.NAV_PATH_ID
237: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
238: and (SUBB.OVERRIDE_LABEL <> SUBT.OVERRIDE_LABEL
239: or (SUBB.OVERRIDE_LABEL is null and SUBT.OVERRIDE_LABEL is not null)
239: or (SUBB.OVERRIDE_LABEL is null and SUBT.OVERRIDE_LABEL is not null)
240: or (SUBB.OVERRIDE_LABEL is not null and SUBT.OVERRIDE_LABEL is null)
241: ));
242:
243: insert into HR_NAVIGATION_PATHS_TL (
244: NAV_PATH_ID,
245: OVERRIDE_LABEL,
246: LANGUAGE,
247: SOURCE_LANG
249: B.NAV_PATH_ID,
250: B.OVERRIDE_LABEL,
251: L.LANGUAGE_CODE,
252: B.SOURCE_LANG
253: from HR_NAVIGATION_PATHS_TL B, FND_LANGUAGES L
254: where L.INSTALLED_FLAG in ('I', 'B')
255: and B.LANGUAGE = userenv('LANG')
256: and not exists
257: (select NULL
254: where L.INSTALLED_FLAG in ('I', 'B')
255: and B.LANGUAGE = userenv('LANG')
256: and not exists
257: (select NULL
258: from HR_NAVIGATION_PATHS_TL T
259: where T.NAV_PATH_ID = B.NAV_PATH_ID
260: and T.LANGUAGE = L.LANGUAGE_CODE);
261: end ADD_LANGUAGE;
262:
474: from dual;
475: end;
476:
477: begin
478: update HR_NAVIGATION_PATHS_TL
479: set OVERRIDE_LABEL = X_OVERRIDE_LABEL,
480: SOURCE_LANG = userenv('LANG')
481: where userenv('LANG') in (LANGUAGE,SOURCE_LANG)
482: and nav_path_id = x_nav_path_id;