104: --
105:
106: BEGIN
107: PER_RIC_PKG.chk_integrity (
108: p_entity_name => 'HR_NAVIGATION_PATHS_TL',
109: p_ref_entity => 'HR_NAVIGATION_PATHS',
110: p_ref_column_name => 'NAV_PATH_ID',
111: p_ref_col_value_number => X_NAV_PATH_ID,
112: p_ref_col_value_varchar => NULL,
117: --
118: -- Code Ends Here.
119: --
120:
121: INSERT INTO HR_NAVIGATION_PATHS_TL(
122: nav_path_id,
123: override_label,
124: language,
125: source_lang)
131: from FND_LANGUAGES L
132: where L.INSTALLED_FLAG in ('I', 'B')
133: and not exists
134: (select NULL
135: from HR_NAVIGATION_PATHS_TL T
136: where T.NAV_PATH_ID = X_NAV_PATH_ID
137: and T.LANGUAGE = L.LANGUAGE_CODE);
138:
139: open c;
163: from HR_NAVIGATION_PATHS
164: where NAV_PATH_ID = X_NAV_PATH_ID
165: for update of NAV_PATH_ID nowait;
166:
167: cursor CSR_HR_NAVIGATION_PATHS_TL is
168: select OVERRIDE_LABEL,
169: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
170: from HR_NAVIGATION_PATHS_TL TL
171: where nav_path_id = x_nav_path_id
166:
167: cursor CSR_HR_NAVIGATION_PATHS_TL is
168: select OVERRIDE_LABEL,
169: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
170: from HR_NAVIGATION_PATHS_TL TL
171: where nav_path_id = x_nav_path_id
172: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
173: for update of nav_path_id nowait;
174:
186: app_exception.raise_exception;
187: end if;
188: end loop;
189:
190: for tlinf in CSR_HR_NAVIGATION_PATHS_TL loop
191: if (tlinf.BASELANG = 'Y') then
192: if ( ((tlinf.OVERRIDE_LABEL = X_OVERRIDE_LABEL)
193: OR ((tlinf.OVERRIDE_LABEL is null) AND (X_OVERRIDE_LABEL is null)))
194: ) then
232: if (sql%notfound) then
233: raise no_data_found;
234: end if;
235:
236: update HR_NAVIGATION_PATHS_TL
237: set
238: OVERRIDE_LABEL = X_OVERRIDE_LABEL,
239: SOURCE_LANG = userenv('LANG')
240: where NAV_PATH_ID = X_NAV_PATH_ID
250: X_NAV_PATH_ID in NUMBER
251: ) is
252: begin
253:
254: delete from HR_NAVIGATION_PATHS_TL
255: where NAV_PATH_ID = X_NAV_PATH_ID;
256:
257: if (sql%notfound) then
258: raise no_data_found;
269:
270: procedure ADD_LANGUAGE
271: is
272: begin
273: delete from HR_NAVIGATION_PATHS_TL T
274: where not exists
275: (select NULL
276: from HR_NAVIGATION_PATHS B
277: where B.NAV_PATH_ID = T.NAV_PATH_ID
276: from HR_NAVIGATION_PATHS B
277: where B.NAV_PATH_ID = T.NAV_PATH_ID
278: );
279:
280: update HR_NAVIGATION_PATHS_TL T set (
281: OVERRIDE_LABEL
282: ) = (select
283: B.OVERRIDE_LABEL
284: from HR_NAVIGATION_PATHS_TL B
280: update HR_NAVIGATION_PATHS_TL T set (
281: OVERRIDE_LABEL
282: ) = (select
283: B.OVERRIDE_LABEL
284: from HR_NAVIGATION_PATHS_TL B
285: where B.NAV_PATH_ID = T.NAV_PATH_ID
286: and B.LANGUAGE = T.SOURCE_LANG)
287: where (
288: T.NAV_PATH_ID,
289: T.LANGUAGE
290: ) in (select
291: SUBT.NAV_PATH_ID,
292: SUBT.LANGUAGE
293: from HR_NAVIGATION_PATHS_TL SUBB, HR_NAVIGATION_PATHS_TL SUBT
294: where SUBB.NAV_PATH_ID = SUBT.NAV_PATH_ID
295: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
296: and (SUBB.OVERRIDE_LABEL <> SUBT.OVERRIDE_LABEL
297: or (SUBB.OVERRIDE_LABEL is null and SUBT.OVERRIDE_LABEL is not null)
297: or (SUBB.OVERRIDE_LABEL is null and SUBT.OVERRIDE_LABEL is not null)
298: or (SUBB.OVERRIDE_LABEL is not null and SUBT.OVERRIDE_LABEL is null)
299: ));
300:
301: insert into HR_NAVIGATION_PATHS_TL (
302: NAV_PATH_ID,
303: OVERRIDE_LABEL,
304: LANGUAGE,
305: SOURCE_LANG
307: B.NAV_PATH_ID,
308: B.OVERRIDE_LABEL,
309: L.LANGUAGE_CODE,
310: B.SOURCE_LANG
311: from HR_NAVIGATION_PATHS_TL B, FND_LANGUAGES L
312: where L.INSTALLED_FLAG in ('I', 'B')
313: and B.LANGUAGE = userenv('LANG')
314: and not exists
315: (select NULL
312: where L.INSTALLED_FLAG in ('I', 'B')
313: and B.LANGUAGE = userenv('LANG')
314: and not exists
315: (select NULL
316: from HR_NAVIGATION_PATHS_TL T
317: where T.NAV_PATH_ID = B.NAV_PATH_ID
318: and T.LANGUAGE = L.LANGUAGE_CODE);
319: end ADD_LANGUAGE;
320:
532: from dual;
533: end;
534:
535: begin
536: update HR_NAVIGATION_PATHS_TL
537: set OVERRIDE_LABEL = X_OVERRIDE_LABEL,
538: SOURCE_LANG = userenv('LANG')
539: where userenv('LANG') in (LANGUAGE,SOURCE_LANG)
540: and nav_path_id = x_nav_path_id;