99: BEGIN
100: --mmadhavi
101: /* Commenting delete and update for bug 3723874 */
102: /*
103: DELETE FROM OKC_K_HISTORY_TL T
104: WHERE NOT EXISTS (
105: SELECT NULL
106: FROM OKC_K_HISTORY_B B
107: WHERE B.ID =T.ID
106: FROM OKC_K_HISTORY_B B
107: WHERE B.ID =T.ID
108: );
109:
110: UPDATE OKC_K_HISTORY_TL T SET(
111: COMMENTS) = (SELECT
112: B.COMMENTS
113: FROM OKC_K_HISTORY_TL B
114: WHERE B.ID = T.ID
109:
110: UPDATE OKC_K_HISTORY_TL T SET(
111: COMMENTS) = (SELECT
112: B.COMMENTS
113: FROM OKC_K_HISTORY_TL B
114: WHERE B.ID = T.ID
115: AND B.LANGUAGE = T.SOURCE_LANG)
116: WHERE ( T.ID,
117: T.LANGUAGE)
117: T.LANGUAGE)
118: IN (SELECT
119: SUBT.ID,
120: SUBT.LANGUAGE
121: FROM OKC_K_HISTORY_TL SUBB, OKC_K_HISTORY_TL SUBT
122: WHERE SUBB.ID = SUBT.ID
123: AND SUBB.LANGUAGE = SUBT.SOURCE_LANG
124: AND (SUBB.COMMENTS <> SUBT.COMMENTS
125: OR (SUBB.COMMENTS IS NULL AND SUBT.COMMENTS IS NOT NULL)
125: OR (SUBB.COMMENTS IS NULL AND SUBT.COMMENTS IS NOT NULL)
126: ));
127: */
128: /* Modifying Insert as per performance guidelines given in bug 3723874 */
129: INSERT /*+ append parallel(tt) */ INTO OKC_K_HISTORY_TL tt (
130: ID,
131: LANGUAGE,
132: SOURCE_LANG,
133: COMMENTS,
146: B.CREATION_DATE,
147: B.LAST_UPDATED_BY,
148: B.LAST_UPDATE_DATE,
149: B.LAST_UPDATE_LOGIN
150: FROM OKC_K_HISTORY_TL B, FND_LANGUAGES L
151: WHERE L.INSTALLED_FLAG IN ('I', 'B')
152: AND B.LANGUAGE = USERENV('LANG')
153: ) v , OKC_K_HISTORY_TL t
154: WHERE t.ID(+) = v.ID
149: B.LAST_UPDATE_LOGIN
150: FROM OKC_K_HISTORY_TL B, FND_LANGUAGES L
151: WHERE L.INSTALLED_FLAG IN ('I', 'B')
152: AND B.LANGUAGE = USERENV('LANG')
153: ) v , OKC_K_HISTORY_TL t
154: WHERE t.ID(+) = v.ID
155: AND t.LANGUAGE(+) = v.LANGUAGE_CODE
156: AND t.id IS NULL;
157:
341: BEGIN
342: RETURN(get_rec(p_hst_rec, l_row_not_found));
343: END get_rec;
344: ---------------------------------------------------------------------------
345: -- FUNCTION get_rec for: OKC_K_HISTORY_TL
346: ---------------------------------------------------------------------------
347: FUNCTION get_rec (
348: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
349: x_no_data_found OUT NOCOPY BOOLEAN
344: ---------------------------------------------------------------------------
345: -- FUNCTION get_rec for: OKC_K_HISTORY_TL
346: ---------------------------------------------------------------------------
347: FUNCTION get_rec (
348: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
349: x_no_data_found OUT NOCOPY BOOLEAN
350: ) RETURN okc_k_history_tl_rec_type IS
351: CURSOR okc_k_history_tl_pk_csr (p_id IN NUMBER,
352: p_language IN VARCHAR2) IS
346: ---------------------------------------------------------------------------
347: FUNCTION get_rec (
348: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
349: x_no_data_found OUT NOCOPY BOOLEAN
350: ) RETURN okc_k_history_tl_rec_type IS
351: CURSOR okc_k_history_tl_pk_csr (p_id IN NUMBER,
352: p_language IN VARCHAR2) IS
353: SELECT
354: ID,
347: FUNCTION get_rec (
348: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
349: x_no_data_found OUT NOCOPY BOOLEAN
350: ) RETURN okc_k_history_tl_rec_type IS
351: CURSOR okc_k_history_tl_pk_csr (p_id IN NUMBER,
352: p_language IN VARCHAR2) IS
353: SELECT
354: ID,
355: LANGUAGE,
359: CREATION_DATE,
360: LAST_UPDATED_BY,
361: LAST_UPDATE_DATE,
362: LAST_UPDATE_LOGIN
363: FROM Okc_K_History_Tl
364: WHERE okc_k_history_tl.id = p_id
365: AND okc_k_history_tl.language = p_language;
366: l_okc_k_history_tl_pk okc_k_history_tl_pk_csr%ROWTYPE;
367: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
360: LAST_UPDATED_BY,
361: LAST_UPDATE_DATE,
362: LAST_UPDATE_LOGIN
363: FROM Okc_K_History_Tl
364: WHERE okc_k_history_tl.id = p_id
365: AND okc_k_history_tl.language = p_language;
366: l_okc_k_history_tl_pk okc_k_history_tl_pk_csr%ROWTYPE;
367: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
368: BEGIN
361: LAST_UPDATE_DATE,
362: LAST_UPDATE_LOGIN
363: FROM Okc_K_History_Tl
364: WHERE okc_k_history_tl.id = p_id
365: AND okc_k_history_tl.language = p_language;
366: l_okc_k_history_tl_pk okc_k_history_tl_pk_csr%ROWTYPE;
367: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
368: BEGIN
369: x_no_data_found := TRUE;
362: LAST_UPDATE_LOGIN
363: FROM Okc_K_History_Tl
364: WHERE okc_k_history_tl.id = p_id
365: AND okc_k_history_tl.language = p_language;
366: l_okc_k_history_tl_pk okc_k_history_tl_pk_csr%ROWTYPE;
367: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
368: BEGIN
369: x_no_data_found := TRUE;
370: -- Get current database values
363: FROM Okc_K_History_Tl
364: WHERE okc_k_history_tl.id = p_id
365: AND okc_k_history_tl.language = p_language;
366: l_okc_k_history_tl_pk okc_k_history_tl_pk_csr%ROWTYPE;
367: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
368: BEGIN
369: x_no_data_found := TRUE;
370: -- Get current database values
371: OPEN okc_k_history_tl_pk_csr (p_okc_k_history_tl_rec.id,
367: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
368: BEGIN
369: x_no_data_found := TRUE;
370: -- Get current database values
371: OPEN okc_k_history_tl_pk_csr (p_okc_k_history_tl_rec.id,
372: p_okc_k_history_tl_rec.language);
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
368: BEGIN
369: x_no_data_found := TRUE;
370: -- Get current database values
371: OPEN okc_k_history_tl_pk_csr (p_okc_k_history_tl_rec.id,
372: p_okc_k_history_tl_rec.language);
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
369: x_no_data_found := TRUE;
370: -- Get current database values
371: OPEN okc_k_history_tl_pk_csr (p_okc_k_history_tl_rec.id,
372: p_okc_k_history_tl_rec.language);
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
370: -- Get current database values
371: OPEN okc_k_history_tl_pk_csr (p_okc_k_history_tl_rec.id,
372: p_okc_k_history_tl_rec.language);
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
371: OPEN okc_k_history_tl_pk_csr (p_okc_k_history_tl_rec.id,
372: p_okc_k_history_tl_rec.language);
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
372: p_okc_k_history_tl_rec.language);
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
373: FETCH okc_k_history_tl_pk_csr INTO
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
374: l_okc_k_history_tl_rec.id,
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
375: l_okc_k_history_tl_rec.language,
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
376: l_okc_k_history_tl_rec.source_lang,
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
384: CLOSE okc_k_history_tl_pk_csr;
377: l_okc_k_history_tl_rec.comments,
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
384: CLOSE okc_k_history_tl_pk_csr;
385: RETURN(l_okc_k_history_tl_rec);
378: l_okc_k_history_tl_rec.created_by,
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
384: CLOSE okc_k_history_tl_pk_csr;
385: RETURN(l_okc_k_history_tl_rec);
386: END get_rec;
379: l_okc_k_history_tl_rec.creation_date,
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
384: CLOSE okc_k_history_tl_pk_csr;
385: RETURN(l_okc_k_history_tl_rec);
386: END get_rec;
387:
380: l_okc_k_history_tl_rec.last_updated_by,
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
384: CLOSE okc_k_history_tl_pk_csr;
385: RETURN(l_okc_k_history_tl_rec);
386: END get_rec;
387:
388: ------------------------------------------------------------------
381: l_okc_k_history_tl_rec.last_update_date,
382: l_okc_k_history_tl_rec.last_update_login;
383: x_no_data_found := okc_k_history_tl_pk_csr%NOTFOUND;
384: CLOSE okc_k_history_tl_pk_csr;
385: RETURN(l_okc_k_history_tl_rec);
386: END get_rec;
387:
388: ------------------------------------------------------------------
389: -- This version of get_rec sets error messages if no data found --
388: ------------------------------------------------------------------
389: -- This version of get_rec sets error messages if no data found --
390: ------------------------------------------------------------------
391: FUNCTION get_rec (
392: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
393: x_return_status OUT NOCOPY VARCHAR2
394: ) RETURN okc_k_history_tl_rec_type IS
395: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
396: l_row_notfound BOOLEAN := TRUE;
390: ------------------------------------------------------------------
391: FUNCTION get_rec (
392: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
393: x_return_status OUT NOCOPY VARCHAR2
394: ) RETURN okc_k_history_tl_rec_type IS
395: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
396: l_row_notfound BOOLEAN := TRUE;
397: BEGIN
398: x_return_status := OKC_API.G_RET_STS_SUCCESS;
391: FUNCTION get_rec (
392: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
393: x_return_status OUT NOCOPY VARCHAR2
394: ) RETURN okc_k_history_tl_rec_type IS
395: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
396: l_row_notfound BOOLEAN := TRUE;
397: BEGIN
398: x_return_status := OKC_API.G_RET_STS_SUCCESS;
399: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_row_notfound);
395: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
396: l_row_notfound BOOLEAN := TRUE;
397: BEGIN
398: x_return_status := OKC_API.G_RET_STS_SUCCESS;
399: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_row_notfound);
400: IF (l_row_notfound) THEN
401: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'ID');
402: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'LANGUAGE');
403: x_return_status := OKC_API.G_RET_STS_ERROR;
401: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'ID');
402: OKC_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'LANGUAGE');
403: x_return_status := OKC_API.G_RET_STS_ERROR;
404: END IF;
405: RETURN(l_okc_k_history_tl_rec);
406: END get_rec;
407: -----------------------------------------------------------
408: -- So we don't have to pass an "l_row_notfound" variable --
409: -----------------------------------------------------------
407: -----------------------------------------------------------
408: -- So we don't have to pass an "l_row_notfound" variable --
409: -----------------------------------------------------------
410: FUNCTION get_rec (
411: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type
412: ) RETURN okc_k_history_tl_rec_type IS
413: l_row_not_found BOOLEAN := TRUE;
414: BEGIN
415: RETURN(get_rec(p_okc_k_history_tl_rec, l_row_not_found));
408: -- So we don't have to pass an "l_row_notfound" variable --
409: -----------------------------------------------------------
410: FUNCTION get_rec (
411: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type
412: ) RETURN okc_k_history_tl_rec_type IS
413: l_row_not_found BOOLEAN := TRUE;
414: BEGIN
415: RETURN(get_rec(p_okc_k_history_tl_rec, l_row_not_found));
416: END get_rec;
411: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type
412: ) RETURN okc_k_history_tl_rec_type IS
413: l_row_not_found BOOLEAN := TRUE;
414: BEGIN
415: RETURN(get_rec(p_okc_k_history_tl_rec, l_row_not_found));
416: END get_rec;
417: ---------------------------------------------------------------------------
418: -- FUNCTION null_out_defaults for: OKC_K_HISTORY_V
419: ---------------------------------------------------------------------------
1037: p_to.request_id := p_from.request_id;
1038: END migrate;
1039: PROCEDURE migrate (
1040: p_from IN hstv_rec_type,
1041: p_to IN OUT NOCOPY okc_k_history_tl_rec_type
1042: ) IS
1043: BEGIN
1044: p_to.id := p_from.id;
1045: p_to.comments := p_from.comments;
1049: p_to.last_update_date := p_from.last_update_date;
1050: p_to.last_update_login := p_from.last_update_login;
1051: END migrate;
1052: PROCEDURE migrate (
1053: p_from IN okc_k_history_tl_rec_type,
1054: p_to IN OUT NOCOPY hstv_rec_type
1055: ) IS
1056: BEGIN
1057: p_to.id := p_from.id;
1080: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
1081: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1082: l_hstv_rec hstv_rec_type := p_hstv_rec;
1083: l_hst_rec hst_rec_type;
1084: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1085: BEGIN
1086: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1087: G_PKG_NAME,
1088: p_init_msg_list,
1429: '_PVT'
1430: );
1431: END insert_row;
1432: -------------------------------------
1433: -- insert_row for:OKC_K_HISTORY_TL --
1434: -------------------------------------
1435: PROCEDURE insert_row(
1436: p_init_msg_list IN VARCHAR2 ,
1437: x_return_status OUT NOCOPY VARCHAR2,
1436: p_init_msg_list IN VARCHAR2 ,
1437: x_return_status OUT NOCOPY VARCHAR2,
1438: x_msg_count OUT NOCOPY NUMBER,
1439: x_msg_data OUT NOCOPY VARCHAR2,
1440: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1441: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
1442:
1443: l_api_version CONSTANT NUMBER := 1;
1444: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1437: x_return_status OUT NOCOPY VARCHAR2,
1438: x_msg_count OUT NOCOPY NUMBER,
1439: x_msg_data OUT NOCOPY VARCHAR2,
1440: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1441: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
1442:
1443: l_api_version CONSTANT NUMBER := 1;
1444: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1445: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1442:
1443: l_api_version CONSTANT NUMBER := 1;
1444: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1445: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1446: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
1447: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1448: CURSOR get_languages IS
1449: SELECT *
1450: FROM FND_LANGUAGES
1443: l_api_version CONSTANT NUMBER := 1;
1444: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1445: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1446: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
1447: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1448: CURSOR get_languages IS
1449: SELECT *
1450: FROM FND_LANGUAGES
1451: WHERE INSTALLED_FLAG IN ('I', 'B');
1449: SELECT *
1450: FROM FND_LANGUAGES
1451: WHERE INSTALLED_FLAG IN ('I', 'B');
1452: -----------------------------------------
1453: -- Set_Attributes for:OKC_K_HISTORY_TL --
1454: -----------------------------------------
1455: FUNCTION Set_Attributes (
1456: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1457: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1452: -----------------------------------------
1453: -- Set_Attributes for:OKC_K_HISTORY_TL --
1454: -----------------------------------------
1455: FUNCTION Set_Attributes (
1456: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1457: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1458: ) RETURN VARCHAR2 IS
1459: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1460: BEGIN
1453: -- Set_Attributes for:OKC_K_HISTORY_TL --
1454: -----------------------------------------
1455: FUNCTION Set_Attributes (
1456: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1457: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1458: ) RETURN VARCHAR2 IS
1459: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1460: BEGIN
1461: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1457: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1458: ) RETURN VARCHAR2 IS
1459: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1460: BEGIN
1461: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1462: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
1463: x_okc_k_history_tl_rec.SOURCE_LANG := USERENV('LANG');
1464: RETURN(l_return_status);
1465: END Set_Attributes;
1458: ) RETURN VARCHAR2 IS
1459: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1460: BEGIN
1461: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1462: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
1463: x_okc_k_history_tl_rec.SOURCE_LANG := USERENV('LANG');
1464: RETURN(l_return_status);
1465: END Set_Attributes;
1466: BEGIN
1459: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1460: BEGIN
1461: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1462: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
1463: x_okc_k_history_tl_rec.SOURCE_LANG := USERENV('LANG');
1464: RETURN(l_return_status);
1465: END Set_Attributes;
1466: BEGIN
1467: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1474: RAISE OKC_API.G_EXCEPTION_ERROR;
1475: END IF;
1476: --- Setting item attributes
1477: l_return_status := Set_Attributes(
1478: p_okc_k_history_tl_rec, -- IN
1479: l_okc_k_history_tl_rec); -- OUT
1480: --- If any errors happen abort API
1481: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1482: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1475: END IF;
1476: --- Setting item attributes
1477: l_return_status := Set_Attributes(
1478: p_okc_k_history_tl_rec, -- IN
1479: l_okc_k_history_tl_rec); -- OUT
1480: --- If any errors happen abort API
1481: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1482: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1483: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1483: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1484: RAISE OKC_API.G_EXCEPTION_ERROR;
1485: END IF;
1486: FOR l_lang_rec IN get_languages LOOP
1487: l_okc_k_history_tl_rec.language := l_lang_rec.language_code;
1488: INSERT INTO OKC_K_HISTORY_TL(
1489: id,
1490: language,
1491: source_lang,
1484: RAISE OKC_API.G_EXCEPTION_ERROR;
1485: END IF;
1486: FOR l_lang_rec IN get_languages LOOP
1487: l_okc_k_history_tl_rec.language := l_lang_rec.language_code;
1488: INSERT INTO OKC_K_HISTORY_TL(
1489: id,
1490: language,
1491: source_lang,
1492: comments,
1495: last_updated_by,
1496: last_update_date,
1497: last_update_login)
1498: VALUES (
1499: l_okc_k_history_tl_rec.id,
1500: l_okc_k_history_tl_rec.language,
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1496: last_update_date,
1497: last_update_login)
1498: VALUES (
1499: l_okc_k_history_tl_rec.id,
1500: l_okc_k_history_tl_rec.language,
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1497: last_update_login)
1498: VALUES (
1499: l_okc_k_history_tl_rec.id,
1500: l_okc_k_history_tl_rec.language,
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1498: VALUES (
1499: l_okc_k_history_tl_rec.id,
1500: l_okc_k_history_tl_rec.language,
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1506: l_okc_k_history_tl_rec.last_update_date,
1499: l_okc_k_history_tl_rec.id,
1500: l_okc_k_history_tl_rec.language,
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1506: l_okc_k_history_tl_rec.last_update_date,
1507: l_okc_k_history_tl_rec.last_update_login);
1500: l_okc_k_history_tl_rec.language,
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1506: l_okc_k_history_tl_rec.last_update_date,
1507: l_okc_k_history_tl_rec.last_update_login);
1508: END LOOP;
1501: l_okc_k_history_tl_rec.source_lang,
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1506: l_okc_k_history_tl_rec.last_update_date,
1507: l_okc_k_history_tl_rec.last_update_login);
1508: END LOOP;
1509: -- Set OUT values
1502: l_okc_k_history_tl_rec.comments,
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1506: l_okc_k_history_tl_rec.last_update_date,
1507: l_okc_k_history_tl_rec.last_update_login);
1508: END LOOP;
1509: -- Set OUT values
1510: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
1503: l_okc_k_history_tl_rec.created_by,
1504: l_okc_k_history_tl_rec.creation_date,
1505: l_okc_k_history_tl_rec.last_updated_by,
1506: l_okc_k_history_tl_rec.last_update_date,
1507: l_okc_k_history_tl_rec.last_update_login);
1508: END LOOP;
1509: -- Set OUT values
1510: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
1511: x_return_status := l_return_status;
1506: l_okc_k_history_tl_rec.last_update_date,
1507: l_okc_k_history_tl_rec.last_update_login);
1508: END LOOP;
1509: -- Set OUT values
1510: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
1511: x_return_status := l_return_status;
1512: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1513: EXCEPTION
1514: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1560: l_hstv_rec hstv_rec_type := p_hstv_rec;
1561: l_def_hstv_rec hstv_rec_type;
1562: l_hst_rec hst_rec_type;
1563: lx_hst_rec hst_rec_type;
1564: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1565: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1566: -------------------------------
1567: -- FUNCTION fill_who_columns --
1568: -------------------------------
1561: l_def_hstv_rec hstv_rec_type;
1562: l_hst_rec hst_rec_type;
1563: lx_hst_rec hst_rec_type;
1564: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1565: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1566: -------------------------------
1567: -- FUNCTION fill_who_columns --
1568: -------------------------------
1569: FUNCTION fill_who_columns (
1674: -----------------------------------------
1675: -- Move VIEW record to "Child" records --
1676: -----------------------------------------
1677: migrate(l_def_hstv_rec, l_hst_rec);
1678: migrate(l_def_hstv_rec, l_okc_k_history_tl_rec);
1679: -----------------------------------------------
1680: -- Call the INSERT_ROW for each child record --
1681: -----------------------------------------------
1682: insert_row(
1697: p_init_msg_list,
1698: l_return_status,
1699: x_msg_count,
1700: x_msg_data,
1701: l_okc_k_history_tl_rec,
1702: lx_okc_k_history_tl_rec
1703: );
1704: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1705: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1698: l_return_status,
1699: x_msg_count,
1700: x_msg_data,
1701: l_okc_k_history_tl_rec,
1702: lx_okc_k_history_tl_rec
1703: );
1704: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1705: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1706: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1705: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1706: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1707: RAISE OKC_API.G_EXCEPTION_ERROR;
1708: END IF;
1709: migrate(lx_okc_k_history_tl_rec, l_def_hstv_rec);
1710: -- Set OUT values
1711: x_hstv_rec := l_def_hstv_rec;
1712: x_return_status := l_return_status;
1713: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2015: '_PVT'
2016: );
2017: END lock_row;
2018: -----------------------------------
2019: -- lock_row for:OKC_K_HISTORY_TL --
2020: -----------------------------------
2021: PROCEDURE lock_row(
2022: p_init_msg_list IN VARCHAR2 ,
2023: x_return_status OUT NOCOPY VARCHAR2,
2022: p_init_msg_list IN VARCHAR2 ,
2023: x_return_status OUT NOCOPY VARCHAR2,
2024: x_msg_count OUT NOCOPY NUMBER,
2025: x_msg_data OUT NOCOPY VARCHAR2,
2026: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2027:
2028: E_Resource_Busy EXCEPTION;
2029: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2030: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2026: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2027:
2028: E_Resource_Busy EXCEPTION;
2029: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2030: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2031: SELECT *
2032: FROM OKC_K_HISTORY_TL
2033: WHERE ID = p_okc_k_history_tl_rec.id
2034: FOR UPDATE NOWAIT;
2028: E_Resource_Busy EXCEPTION;
2029: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2030: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2031: SELECT *
2032: FROM OKC_K_HISTORY_TL
2033: WHERE ID = p_okc_k_history_tl_rec.id
2034: FOR UPDATE NOWAIT;
2035:
2036: l_api_version CONSTANT NUMBER := 1;
2029: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2030: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2031: SELECT *
2032: FROM OKC_K_HISTORY_TL
2033: WHERE ID = p_okc_k_history_tl_rec.id
2034: FOR UPDATE NOWAIT;
2035:
2036: l_api_version CONSTANT NUMBER := 1;
2037: l_api_name CONSTANT VARCHAR2(30) := 'TL_lock_row';
2049: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2050: RAISE OKC_API.G_EXCEPTION_ERROR;
2051: END IF;
2052: BEGIN
2053: OPEN lock_csr(p_okc_k_history_tl_rec);
2054: FETCH lock_csr INTO l_lock_var;
2055: l_row_notfound := lock_csr%NOTFOUND;
2056: CLOSE lock_csr;
2057: EXCEPTION
2115: l_api_version CONSTANT NUMBER := 1;
2116: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
2117: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2118: l_hst_rec hst_rec_type;
2119: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2120: BEGIN
2121: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2122: G_PKG_NAME,
2123: p_init_msg_list,
2133: -----------------------------------------
2134: -- Move VIEW record to "Child" records --
2135: -----------------------------------------
2136: migrate(p_hstv_rec, l_hst_rec);
2137: migrate(p_hstv_rec, l_okc_k_history_tl_rec);
2138: ---------------------------------------------
2139: -- Call the LOCK_ROW for each child record --
2140: ---------------------------------------------
2141: lock_row(
2154: p_init_msg_list,
2155: l_return_status,
2156: x_msg_count,
2157: x_msg_data,
2158: l_okc_k_history_tl_rec
2159: );
2160: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2161: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2162: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2566: '_PVT'
2567: );
2568: END update_row;
2569: -------------------------------------
2570: -- update_row for:OKC_K_HISTORY_TL --
2571: -------------------------------------
2572: PROCEDURE update_row(
2573: p_init_msg_list IN VARCHAR2 ,
2574: x_return_status OUT NOCOPY VARCHAR2,
2573: p_init_msg_list IN VARCHAR2 ,
2574: x_return_status OUT NOCOPY VARCHAR2,
2575: x_msg_count OUT NOCOPY NUMBER,
2576: x_msg_data OUT NOCOPY VARCHAR2,
2577: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2578: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
2579:
2580: l_api_version CONSTANT NUMBER := 1;
2581: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2574: x_return_status OUT NOCOPY VARCHAR2,
2575: x_msg_count OUT NOCOPY NUMBER,
2576: x_msg_data OUT NOCOPY VARCHAR2,
2577: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2578: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
2579:
2580: l_api_version CONSTANT NUMBER := 1;
2581: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2582: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2579:
2580: l_api_version CONSTANT NUMBER := 1;
2581: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2582: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2583: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
2584: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2585: l_row_notfound BOOLEAN := TRUE;
2586: ----------------------------------
2587: -- FUNCTION populate_new_record --
2580: l_api_version CONSTANT NUMBER := 1;
2581: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2582: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2583: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
2584: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2585: l_row_notfound BOOLEAN := TRUE;
2586: ----------------------------------
2587: -- FUNCTION populate_new_record --
2588: ----------------------------------
2586: ----------------------------------
2587: -- FUNCTION populate_new_record --
2588: ----------------------------------
2589: FUNCTION populate_new_record (
2590: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2591: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2592: ) RETURN VARCHAR2 IS
2593: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2594: l_row_notfound BOOLEAN := TRUE;
2587: -- FUNCTION populate_new_record --
2588: ----------------------------------
2589: FUNCTION populate_new_record (
2590: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2591: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2592: ) RETURN VARCHAR2 IS
2593: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2594: l_row_notfound BOOLEAN := TRUE;
2595: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2589: FUNCTION populate_new_record (
2590: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2591: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2592: ) RETURN VARCHAR2 IS
2593: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2594: l_row_notfound BOOLEAN := TRUE;
2595: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2596: BEGIN
2597: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2593: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2594: l_row_notfound BOOLEAN := TRUE;
2595: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2596: BEGIN
2597: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2598: -- Get current database values
2599: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2600: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2601: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2595: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2596: BEGIN
2597: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2598: -- Get current database values
2599: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2600: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2601: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2602: THEN
2603: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2597: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2598: -- Get current database values
2599: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2600: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2601: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2602: THEN
2603: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2604: END IF;
2605: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2599: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2600: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2601: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2602: THEN
2603: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2604: END IF;
2605: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2606: THEN
2607: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2601: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2602: THEN
2603: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2604: END IF;
2605: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2606: THEN
2607: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2603: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2604: END IF;
2605: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2606: THEN
2607: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2605: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2606: THEN
2607: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2607: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2609: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2611: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2618: THEN
2619: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2613: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2618: THEN
2619: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2615: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2618: THEN
2619: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2622: THEN
2623: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2617: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2618: THEN
2619: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2622: THEN
2623: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2619: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2622: THEN
2623: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2626: THEN
2627: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2621: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2622: THEN
2623: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2626: THEN
2627: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2623: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2626: THEN
2627: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2630: THEN
2631: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2625: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2626: THEN
2627: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2630: THEN
2631: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2627: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2630: THEN
2631: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_login := l_okc_k_history_tl_rec.last_update_login;
2629: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2630: THEN
2631: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_login := l_okc_k_history_tl_rec.last_update_login;
2636: END IF;
2637: END IF;
2631: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_login := l_okc_k_history_tl_rec.last_update_login;
2636: END IF;
2637: END IF;
2638: RETURN(l_return_status);
2639: END populate_new_record;
2637: END IF;
2638: RETURN(l_return_status);
2639: END populate_new_record;
2640: -----------------------------------------
2641: -- Set_Attributes for:OKC_K_HISTORY_TL --
2642: -----------------------------------------
2643: FUNCTION Set_Attributes (
2644: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2645: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2640: -----------------------------------------
2641: -- Set_Attributes for:OKC_K_HISTORY_TL --
2642: -----------------------------------------
2643: FUNCTION Set_Attributes (
2644: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2645: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2646: ) RETURN VARCHAR2 IS
2647: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2648: BEGIN
2641: -- Set_Attributes for:OKC_K_HISTORY_TL --
2642: -----------------------------------------
2643: FUNCTION Set_Attributes (
2644: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2645: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2646: ) RETURN VARCHAR2 IS
2647: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2648: BEGIN
2649: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2645: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2646: ) RETURN VARCHAR2 IS
2647: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2648: BEGIN
2649: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2650: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2651: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2652: RETURN(l_return_status);
2653: END Set_Attributes;
2646: ) RETURN VARCHAR2 IS
2647: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2648: BEGIN
2649: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2650: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2651: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2652: RETURN(l_return_status);
2653: END Set_Attributes;
2654: BEGIN
2647: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2648: BEGIN
2649: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2650: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2651: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2652: RETURN(l_return_status);
2653: END Set_Attributes;
2654: BEGIN
2655: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2662: RAISE OKC_API.G_EXCEPTION_ERROR;
2663: END IF;
2664: --- Setting item attributes
2665: l_return_status := Set_Attributes(
2666: p_okc_k_history_tl_rec, -- IN
2667: l_okc_k_history_tl_rec); -- OUT
2668: --- If any errors happen abort API
2669: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2670: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2663: END IF;
2664: --- Setting item attributes
2665: l_return_status := Set_Attributes(
2666: p_okc_k_history_tl_rec, -- IN
2667: l_okc_k_history_tl_rec); -- OUT
2668: --- If any errors happen abort API
2669: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2670: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2671: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2670: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2671: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2672: RAISE OKC_API.G_EXCEPTION_ERROR;
2673: END IF;
2674: l_return_status := populate_new_record(l_okc_k_history_tl_rec, l_def_okc_k_history_tl_rec);
2675: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2676: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2677: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2678: RAISE OKC_API.G_EXCEPTION_ERROR;
2676: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2677: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2678: RAISE OKC_API.G_EXCEPTION_ERROR;
2679: END IF;
2680: UPDATE OKC_K_HISTORY_TL
2681: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2677: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2678: RAISE OKC_API.G_EXCEPTION_ERROR;
2679: END IF;
2680: UPDATE OKC_K_HISTORY_TL
2681: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2678: RAISE OKC_API.G_EXCEPTION_ERROR;
2679: END IF;
2680: UPDATE OKC_K_HISTORY_TL
2681: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2686: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2679: END IF;
2680: UPDATE OKC_K_HISTORY_TL
2681: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2686: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2687: WHERE ID = l_def_okc_k_history_tl_rec.id
2680: UPDATE OKC_K_HISTORY_TL
2681: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2686: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2687: WHERE ID = l_def_okc_k_history_tl_rec.id
2688: AND SOURCE_LANG = USERENV('LANG');
2681: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2686: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2687: WHERE ID = l_def_okc_k_history_tl_rec.id
2688: AND SOURCE_LANG = USERENV('LANG');
2689:
2682: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2686: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2687: WHERE ID = l_def_okc_k_history_tl_rec.id
2688: AND SOURCE_LANG = USERENV('LANG');
2689:
2690: /* below code came with TAPI but there is no column by name sfwt_flag in
2683: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2684: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2685: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2686: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2687: WHERE ID = l_def_okc_k_history_tl_rec.id
2688: AND SOURCE_LANG = USERENV('LANG');
2689:
2690: /* below code came with TAPI but there is no column by name sfwt_flag in
2691: tl table. commenting the code. */
2688: AND SOURCE_LANG = USERENV('LANG');
2689:
2690: /* below code came with TAPI but there is no column by name sfwt_flag in
2691: tl table. commenting the code. */
2692: --UPDATE OKC_K_HISTORY_TL
2693: --SET SFWT_FLAG = 'Y'
2694: --WHERE ID = l_def_okc_k_history_tl_rec.id
2695: -- AND SOURCE_LANG <> USERENV('LANG');
2696:
2690: /* below code came with TAPI but there is no column by name sfwt_flag in
2691: tl table. commenting the code. */
2692: --UPDATE OKC_K_HISTORY_TL
2693: --SET SFWT_FLAG = 'Y'
2694: --WHERE ID = l_def_okc_k_history_tl_rec.id
2695: -- AND SOURCE_LANG <> USERENV('LANG');
2696:
2697: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
2698: x_return_status := l_return_status;
2693: --SET SFWT_FLAG = 'Y'
2694: --WHERE ID = l_def_okc_k_history_tl_rec.id
2695: -- AND SOURCE_LANG <> USERENV('LANG');
2696:
2697: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
2698: x_return_status := l_return_status;
2699: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2700: EXCEPTION
2701: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2748: l_def_hstv_rec hstv_rec_type;
2749: l_db_hstv_rec hstv_rec_type;
2750: l_hst_rec hst_rec_type;
2751: lx_hst_rec hst_rec_type;
2752: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2753: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2754: -------------------------------
2755: -- FUNCTION fill_who_columns --
2756: -------------------------------
2749: l_db_hstv_rec hstv_rec_type;
2750: l_hst_rec hst_rec_type;
2751: lx_hst_rec hst_rec_type;
2752: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2753: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2754: -------------------------------
2755: -- FUNCTION fill_who_columns --
2756: -------------------------------
2757: FUNCTION fill_who_columns (
2937: -----------------------------------------
2938: -- Move VIEW record to "Child" records --
2939: -----------------------------------------
2940: migrate(l_def_hstv_rec, l_hst_rec);
2941: migrate(l_def_hstv_rec, l_okc_k_history_tl_rec);
2942: -----------------------------------------------
2943: -- Call the UPDATE_ROW for each child record --
2944: -----------------------------------------------
2945: update_row(
2960: p_init_msg_list,
2961: l_return_status,
2962: x_msg_count,
2963: x_msg_data,
2964: l_okc_k_history_tl_rec,
2965: lx_okc_k_history_tl_rec
2966: );
2967: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2968: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2961: l_return_status,
2962: x_msg_count,
2963: x_msg_data,
2964: l_okc_k_history_tl_rec,
2965: lx_okc_k_history_tl_rec
2966: );
2967: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2968: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2969: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2968: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2969: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2970: RAISE OKC_API.G_EXCEPTION_ERROR;
2971: END IF;
2972: migrate(lx_okc_k_history_tl_rec, l_def_hstv_rec);
2973: x_hstv_rec := l_def_hstv_rec;
2974: x_return_status := l_return_status;
2975: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2976: EXCEPTION
3233: '_PVT'
3234: );
3235: END delete_row;
3236: -------------------------------------
3237: -- delete_row for:OKC_K_HISTORY_TL --
3238: -------------------------------------
3239: PROCEDURE delete_row(
3240: p_init_msg_list IN VARCHAR2 ,
3241: x_return_status OUT NOCOPY VARCHAR2,
3240: p_init_msg_list IN VARCHAR2 ,
3241: x_return_status OUT NOCOPY VARCHAR2,
3242: x_msg_count OUT NOCOPY NUMBER,
3243: x_msg_data OUT NOCOPY VARCHAR2,
3244: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
3245:
3246: l_api_version CONSTANT NUMBER := 1;
3247: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
3248: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3245:
3246: l_api_version CONSTANT NUMBER := 1;
3247: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
3248: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3249: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
3250: l_row_notfound BOOLEAN := TRUE;
3251: BEGIN
3252: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3253: p_init_msg_list,
3258: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3259: RAISE OKC_API.G_EXCEPTION_ERROR;
3260: END IF;
3261:
3262: DELETE FROM OKC_K_HISTORY_TL
3263: WHERE ID = p_okc_k_history_tl_rec.id;
3264:
3265: x_return_status := l_return_status;
3266: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3259: RAISE OKC_API.G_EXCEPTION_ERROR;
3260: END IF;
3261:
3262: DELETE FROM OKC_K_HISTORY_TL
3263: WHERE ID = p_okc_k_history_tl_rec.id;
3264:
3265: x_return_status := l_return_status;
3266: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3267: EXCEPTION
3310: l_api_version CONSTANT NUMBER := 1;
3311: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
3312: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3313: l_hstv_rec hstv_rec_type := p_hstv_rec;
3314: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
3315: l_hst_rec hst_rec_type;
3316: BEGIN
3317: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3318: G_PKG_NAME,
3328: END IF;
3329: -----------------------------------------
3330: -- Move VIEW record to "Child" records --
3331: -----------------------------------------
3332: migrate(l_hstv_rec, l_okc_k_history_tl_rec);
3333: migrate(l_hstv_rec, l_hst_rec);
3334: -----------------------------------------------
3335: -- Call the DELETE_ROW for each child record --
3336: -----------------------------------------------
3338: p_init_msg_list,
3339: l_return_status,
3340: x_msg_count,
3341: x_msg_data,
3342: l_okc_k_history_tl_rec
3343: );
3344: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3346: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3554: -- PROCEDURE delete_all_rows
3555: ---------------------------------------------------------------------------
3556:
3557: --------------------------------------------------------------
3558: -- delete_all_rows for:OKC_K_HISTORY_TL and OKC_K_HISTORY_B --
3559: --------------------------------------------------------------
3560: PROCEDURE delete_all_rows(
3561: p_init_msg_list IN VARCHAR2 ,
3562: x_return_status OUT NOCOPY VARCHAR2,
3579: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3580: RAISE OKC_API.G_EXCEPTION_ERROR;
3581: END IF;
3582:
3583: DELETE FROM OKC_K_HISTORY_TL
3584: WHERE ID IN (SELECT ID
3585: FROM OKC_K_HISTORY_B
3586: WHERE CHR_ID = p_chr_id);
3587: