[Home] [Help]
113: X_LAST_UPDATED_BY,
114: X_LAST_UPDATE_LOGIN
115: );
116:
117: insert into AHL_SUBSCRIPTIONS_TL (
118: CREATION_DATE,
119: CREATED_BY,
120: LAST_UPDATE_LOGIN,
121: COMMENTS,
137: from FND_LANGUAGES L
138: where L.INSTALLED_FLAG in ('I', 'B')
139: and not exists
140: (select NULL
141: from AHL_SUBSCRIPTIONS_TL T
142: where T.SUBSCRIPTION_ID = X_SUBSCRIPTION_ID
143: and T.LANGUAGE = L.LANGUAGE_CODE);
144:
145: open c;
220:
221: cursor c1 is select
222: COMMENTS,
223: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
224: from AHL_SUBSCRIPTIONS_TL
225: where SUBSCRIPTION_ID = X_SUBSCRIPTION_ID
226: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
227: for update of SUBSCRIPTION_ID nowait;
228: begin
380: if (sql%notfound) then
381: raise no_data_found;
382: end if;
383:
384: update AHL_SUBSCRIPTIONS_TL set
385: COMMENTS = X_COMMENTS,
386: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
387: LAST_UPDATED_BY = X_LAST_UPDATED_BY,
388: LAST_UPDATE_LOGIN = X_LAST_UPDATE_LOGIN,
398: procedure DELETE_ROW (
399: X_SUBSCRIPTION_ID in NUMBER
400: ) is
401: begin
402: delete from AHL_SUBSCRIPTIONS_TL
403: where SUBSCRIPTION_ID = X_SUBSCRIPTION_ID;
404:
405: if (sql%notfound) then
406: raise no_data_found;
416:
417: procedure ADD_LANGUAGE
418: is
419: begin
420: delete from AHL_SUBSCRIPTIONS_TL T
421: where not exists
422: (select NULL
423: from AHL_SUBSCRIPTIONS_B B
424: where B.SUBSCRIPTION_ID = T.SUBSCRIPTION_ID
423: from AHL_SUBSCRIPTIONS_B B
424: where B.SUBSCRIPTION_ID = T.SUBSCRIPTION_ID
425: );
426:
427: update AHL_SUBSCRIPTIONS_TL T set (
428: COMMENTS
429: ) = (select
430: B.COMMENTS
431: from AHL_SUBSCRIPTIONS_TL B
427: update AHL_SUBSCRIPTIONS_TL T set (
428: COMMENTS
429: ) = (select
430: B.COMMENTS
431: from AHL_SUBSCRIPTIONS_TL B
432: where B.SUBSCRIPTION_ID = T.SUBSCRIPTION_ID
433: and B.LANGUAGE = T.SOURCE_LANG)
434: where (
435: T.SUBSCRIPTION_ID,
436: T.LANGUAGE
437: ) in (select
438: SUBT.SUBSCRIPTION_ID,
439: SUBT.LANGUAGE
440: from AHL_SUBSCRIPTIONS_TL SUBB, AHL_SUBSCRIPTIONS_TL SUBT
441: where SUBB.SUBSCRIPTION_ID = SUBT.SUBSCRIPTION_ID
442: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
443: and (SUBB.COMMENTS <> SUBT.COMMENTS
444: or (SUBB.COMMENTS is null and SUBT.COMMENTS is not null)
444: or (SUBB.COMMENTS is null and SUBT.COMMENTS is not null)
445: or (SUBB.COMMENTS is not null and SUBT.COMMENTS is null)
446: ));
447:
448: insert into AHL_SUBSCRIPTIONS_TL (
449: CREATION_DATE,
450: CREATED_BY,
451: LAST_UPDATE_LOGIN,
452: COMMENTS,
464: B.LAST_UPDATE_DATE,
465: B.LAST_UPDATED_BY,
466: L.LANGUAGE_CODE,
467: B.SOURCE_LANG
468: from AHL_SUBSCRIPTIONS_TL B, FND_LANGUAGES L
469: where L.INSTALLED_FLAG in ('I', 'B')
470: and B.LANGUAGE = userenv('LANG')
471: and not exists
472: (select NULL
469: where L.INSTALLED_FLAG in ('I', 'B')
470: and B.LANGUAGE = userenv('LANG')
471: and not exists
472: (select NULL
473: from AHL_SUBSCRIPTIONS_TL T
474: where T.SUBSCRIPTION_ID = B.SUBSCRIPTION_ID
475: and T.LANGUAGE = L.LANGUAGE_CODE);
476: end ADD_LANGUAGE;
477:
646: X_OWNER in VARCHAR2
647: ) IS
648:
649: begin
650: update AHL_SUBSCRIPTIONS_TL set
651: comments = nvl(X_COMMENTS, comments),
652: source_lang = userenv('LANG'),
653: last_update_date = sysdate,
654: last_updated_by = decode(x_owner, 'SEED', 1, 0),