104: X_LAST_UPDATED_BY,
105: X_LAST_UPDATE_LOGIN
106: );
107:
108: insert into AHL_PC_HEADERS_TL (
109: PC_HEADER_ID,
110: DESCRIPTION,
111: LAST_UPDATE_DATE,
112: LAST_UPDATED_BY,
130: from FND_LANGUAGES L
131: where L.INSTALLED_FLAG in ('I', 'B')
132: and not exists
133: (select NULL
134: from AHL_PC_HEADERS_TL T
135: where T.PC_HEADER_ID = X_PC_HEADER_ID
136: and T.LANGUAGE = L.LANGUAGE_CODE);
137:
138: open c;
207:
208: cursor c1 is select
209: DESCRIPTION,
210: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
211: from AHL_PC_HEADERS_TL
212: where PC_HEADER_ID = X_PC_HEADER_ID
213: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
214: for update of PC_HEADER_ID nowait;
215: begin
353: if (sql%notfound) then
354: raise no_data_found;
355: end if;
356:
357: update AHL_PC_HEADERS_TL set
358: DESCRIPTION = X_DESCRIPTION,
359: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
360: LAST_UPDATED_BY = X_LAST_UPDATED_BY,
361: LAST_UPDATE_LOGIN = X_LAST_UPDATE_LOGIN,
371: procedure DELETE_ROW (
372: X_PC_HEADER_ID in NUMBER
373: ) is
374: begin
375: delete from AHL_PC_HEADERS_TL
376: where PC_HEADER_ID = X_PC_HEADER_ID;
377:
378: if (sql%notfound) then
379: raise no_data_found;
389:
390: procedure ADD_LANGUAGE
391: is
392: begin
393: delete from AHL_PC_HEADERS_TL T
394: where not exists
395: (select NULL
396: from AHL_PC_HEADERS_B B
397: where B.PC_HEADER_ID = T.PC_HEADER_ID
396: from AHL_PC_HEADERS_B B
397: where B.PC_HEADER_ID = T.PC_HEADER_ID
398: );
399:
400: update AHL_PC_HEADERS_TL T set (
401: DESCRIPTION
402: ) = (select
403: B.DESCRIPTION
404: from AHL_PC_HEADERS_TL B
400: update AHL_PC_HEADERS_TL T set (
401: DESCRIPTION
402: ) = (select
403: B.DESCRIPTION
404: from AHL_PC_HEADERS_TL B
405: where B.PC_HEADER_ID = T.PC_HEADER_ID
406: and B.LANGUAGE = T.SOURCE_LANG)
407: where (
408: T.PC_HEADER_ID,
409: T.LANGUAGE
410: ) in (select
411: SUBT.PC_HEADER_ID,
412: SUBT.LANGUAGE
413: from AHL_PC_HEADERS_TL SUBB, AHL_PC_HEADERS_TL SUBT
414: where SUBB.PC_HEADER_ID = SUBT.PC_HEADER_ID
415: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
416: and (SUBB.DESCRIPTION <> SUBT.DESCRIPTION
417: or (SUBB.DESCRIPTION is null and SUBT.DESCRIPTION is not null)
417: or (SUBB.DESCRIPTION is null and SUBT.DESCRIPTION is not null)
418: or (SUBB.DESCRIPTION is not null and SUBT.DESCRIPTION is null)
419: ));
420:
421: insert into AHL_PC_HEADERS_TL (
422: PC_HEADER_ID,
423: DESCRIPTION,
424: LAST_UPDATE_DATE,
425: LAST_UPDATED_BY,
439: B.LAST_UPDATE_LOGIN,
440: B.SECURITY_GROUP_ID,
441: L.LANGUAGE_CODE,
442: B.SOURCE_LANG
443: from AHL_PC_HEADERS_TL B, FND_LANGUAGES L
444: where L.INSTALLED_FLAG in ('I', 'B')
445: and B.LANGUAGE = userenv('LANG')
446: and not exists
447: (select NULL
444: where L.INSTALLED_FLAG in ('I', 'B')
445: and B.LANGUAGE = userenv('LANG')
446: and not exists
447: (select NULL
448: from AHL_PC_HEADERS_TL T
449: where T.PC_HEADER_ID = B.PC_HEADER_ID
450: and T.LANGUAGE = L.LANGUAGE_CODE);
451: end ADD_LANGUAGE;
452: