100: P_LAST_UPDATED_BY,
101: P_LAST_UPDATE_LOGIN
102: );
103:
104: insert into CSD_FLOW_STATUSES_TL (
105: FLOW_STATUS_ID,
106: EXTERNAL_DISPLAY_STATUS,
107: CREATED_BY,
108: CREATION_DATE,
124: from FND_LANGUAGES L
125: where L.INSTALLED_FLAG in ('I', 'B')
126: and not exists
127: (select NULL
128: from CSD_FLOW_STATUSES_TL T
129: where T.FLOW_STATUS_ID = PX_FLOW_STATUS_ID
130: and T.LANGUAGE = L.LANGUAGE_CODE);
131:
132: open c;
268: if (sql%notfound) then
269: raise no_data_found;
270: end if;
271:
272: update CSD_FLOW_STATUSES_TL set
273: EXTERNAL_DISPLAY_STATUS = P_EXTERNAL_DISPLAY_STATUS,
274: LAST_UPDATE_DATE = P_LAST_UPDATE_DATE,
275: LAST_UPDATED_BY = P_LAST_UPDATED_BY,
276: LAST_UPDATE_LOGIN = P_LAST_UPDATE_LOGIN,
286: procedure DELETE_ROW (
287: P_FLOW_STATUS_ID in NUMBER
288: ) is
289: begin
290: delete from CSD_FLOW_STATUSES_TL
291: where FLOW_STATUS_ID = P_FLOW_STATUS_ID;
292:
293: if (sql%notfound) then
294: raise no_data_found;
304:
305: procedure ADD_LANGUAGE
306: is
307: begin
308: delete from CSD_FLOW_STATUSES_TL T
309: where not exists
310: (select NULL
311: from CSD_FLOW_STATUSES_B B
312: where B.FLOW_STATUS_ID = T.FLOW_STATUS_ID
311: from CSD_FLOW_STATUSES_B B
312: where B.FLOW_STATUS_ID = T.FLOW_STATUS_ID
313: );
314:
315: update CSD_FLOW_STATUSES_TL T set (
316: EXTERNAL_DISPLAY_STATUS
317: ) = (select
318: B.EXTERNAL_DISPLAY_STATUS
319: from CSD_FLOW_STATUSES_TL B
315: update CSD_FLOW_STATUSES_TL T set (
316: EXTERNAL_DISPLAY_STATUS
317: ) = (select
318: B.EXTERNAL_DISPLAY_STATUS
319: from CSD_FLOW_STATUSES_TL B
320: where B.FLOW_STATUS_ID = T.FLOW_STATUS_ID
321: and B.LANGUAGE = T.SOURCE_LANG)
322: where (
323: T.FLOW_STATUS_ID,
324: T.LANGUAGE
325: ) in (select
326: SUBT.FLOW_STATUS_ID,
327: SUBT.LANGUAGE
328: from CSD_FLOW_STATUSES_TL SUBB, CSD_FLOW_STATUSES_TL SUBT
329: where SUBB.FLOW_STATUS_ID = SUBT.FLOW_STATUS_ID
330: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
331: and (SUBB.EXTERNAL_DISPLAY_STATUS <> SUBT.EXTERNAL_DISPLAY_STATUS
332: or (SUBB.EXTERNAL_DISPLAY_STATUS is null and SUBT.EXTERNAL_DISPLAY_STATUS is not null)
332: or (SUBB.EXTERNAL_DISPLAY_STATUS is null and SUBT.EXTERNAL_DISPLAY_STATUS is not null)
333: or (SUBB.EXTERNAL_DISPLAY_STATUS is not null and SUBT.EXTERNAL_DISPLAY_STATUS is null)
334: ));
335:
336: insert into CSD_FLOW_STATUSES_TL (
337: FLOW_STATUS_ID,
338: EXTERNAL_DISPLAY_STATUS,
339: CREATED_BY,
340: CREATION_DATE,
352: B.LAST_UPDATE_DATE,
353: B.LAST_UPDATE_LOGIN,
354: L.LANGUAGE_CODE,
355: B.SOURCE_LANG
356: from CSD_FLOW_STATUSES_TL B, FND_LANGUAGES L
357: where L.INSTALLED_FLAG in ('I', 'B')
358: and B.LANGUAGE = userenv('LANG')
359: and not exists
360: (select NULL
357: where L.INSTALLED_FLAG in ('I', 'B')
358: and B.LANGUAGE = userenv('LANG')
359: and not exists
360: (select NULL
361: from CSD_FLOW_STATUSES_TL T
362: where T.FLOW_STATUS_ID = B.FLOW_STATUS_ID
363: and T.LANGUAGE = L.LANGUAGE_CODE);
364: end ADD_LANGUAGE;
365: