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: ---------------------------------------------------------------------------
1041: p_to.request_id := p_from.request_id;
1042: END migrate;
1043: PROCEDURE migrate (
1044: p_from IN hstv_rec_type,
1045: p_to IN OUT NOCOPY okc_k_history_tl_rec_type
1046: ) IS
1047: BEGIN
1048: p_to.id := p_from.id;
1049: p_to.comments := p_from.comments;
1053: p_to.last_update_date := p_from.last_update_date;
1054: p_to.last_update_login := p_from.last_update_login;
1055: END migrate;
1056: PROCEDURE migrate (
1057: p_from IN okc_k_history_tl_rec_type,
1058: p_to IN OUT NOCOPY hstv_rec_type
1059: ) IS
1060: BEGIN
1061: p_to.id := p_from.id;
1084: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
1085: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1086: l_hstv_rec hstv_rec_type := p_hstv_rec;
1087: l_hst_rec hst_rec_type;
1088: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1089: BEGIN
1090: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1091: G_PKG_NAME,
1092: p_init_msg_list,
1433: '_PVT'
1434: );
1435: END insert_row;
1436: -------------------------------------
1437: -- insert_row for:OKC_K_HISTORY_TL --
1438: -------------------------------------
1439: PROCEDURE insert_row(
1440: p_init_msg_list IN VARCHAR2 ,
1441: x_return_status OUT NOCOPY VARCHAR2,
1440: p_init_msg_list IN VARCHAR2 ,
1441: x_return_status OUT NOCOPY VARCHAR2,
1442: x_msg_count OUT NOCOPY NUMBER,
1443: x_msg_data OUT NOCOPY VARCHAR2,
1444: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1445: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
1446:
1447: l_api_version CONSTANT NUMBER := 1;
1448: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1441: x_return_status OUT NOCOPY VARCHAR2,
1442: x_msg_count OUT NOCOPY NUMBER,
1443: x_msg_data OUT NOCOPY VARCHAR2,
1444: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1445: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
1446:
1447: l_api_version CONSTANT NUMBER := 1;
1448: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1449: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1446:
1447: l_api_version CONSTANT NUMBER := 1;
1448: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1449: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1450: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
1451: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1452: CURSOR get_languages IS
1453: SELECT *
1454: FROM FND_LANGUAGES
1447: l_api_version CONSTANT NUMBER := 1;
1448: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1449: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1450: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
1451: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1452: CURSOR get_languages IS
1453: SELECT *
1454: FROM FND_LANGUAGES
1455: WHERE INSTALLED_FLAG IN ('I', 'B');
1453: SELECT *
1454: FROM FND_LANGUAGES
1455: WHERE INSTALLED_FLAG IN ('I', 'B');
1456: -----------------------------------------
1457: -- Set_Attributes for:OKC_K_HISTORY_TL --
1458: -----------------------------------------
1459: FUNCTION Set_Attributes (
1460: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1461: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1456: -----------------------------------------
1457: -- Set_Attributes for:OKC_K_HISTORY_TL --
1458: -----------------------------------------
1459: FUNCTION Set_Attributes (
1460: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1461: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1462: ) RETURN VARCHAR2 IS
1463: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1464: BEGIN
1457: -- Set_Attributes for:OKC_K_HISTORY_TL --
1458: -----------------------------------------
1459: FUNCTION Set_Attributes (
1460: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
1461: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1462: ) RETURN VARCHAR2 IS
1463: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1464: BEGIN
1465: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1461: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
1462: ) RETURN VARCHAR2 IS
1463: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1464: BEGIN
1465: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1466: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
1467: x_okc_k_history_tl_rec.SOURCE_LANG := USERENV('LANG');
1468: RETURN(l_return_status);
1469: END Set_Attributes;
1462: ) RETURN VARCHAR2 IS
1463: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1464: BEGIN
1465: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1466: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
1467: x_okc_k_history_tl_rec.SOURCE_LANG := USERENV('LANG');
1468: RETURN(l_return_status);
1469: END Set_Attributes;
1470: BEGIN
1463: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1464: BEGIN
1465: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
1466: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
1467: x_okc_k_history_tl_rec.SOURCE_LANG := USERENV('LANG');
1468: RETURN(l_return_status);
1469: END Set_Attributes;
1470: BEGIN
1471: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1478: RAISE OKC_API.G_EXCEPTION_ERROR;
1479: END IF;
1480: --- Setting item attributes
1481: l_return_status := Set_Attributes(
1482: p_okc_k_history_tl_rec, -- IN
1483: l_okc_k_history_tl_rec); -- OUT
1484: --- If any errors happen abort API
1485: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1486: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1479: END IF;
1480: --- Setting item attributes
1481: l_return_status := Set_Attributes(
1482: p_okc_k_history_tl_rec, -- IN
1483: l_okc_k_history_tl_rec); -- OUT
1484: --- If any errors happen abort API
1485: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1486: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1487: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1487: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1488: RAISE OKC_API.G_EXCEPTION_ERROR;
1489: END IF;
1490: FOR l_lang_rec IN get_languages LOOP
1491: l_okc_k_history_tl_rec.language := l_lang_rec.language_code;
1492: INSERT INTO OKC_K_HISTORY_TL(
1493: id,
1494: language,
1495: source_lang,
1488: RAISE OKC_API.G_EXCEPTION_ERROR;
1489: END IF;
1490: FOR l_lang_rec IN get_languages LOOP
1491: l_okc_k_history_tl_rec.language := l_lang_rec.language_code;
1492: INSERT INTO OKC_K_HISTORY_TL(
1493: id,
1494: language,
1495: source_lang,
1496: comments,
1499: last_updated_by,
1500: last_update_date,
1501: last_update_login)
1502: VALUES (
1503: l_okc_k_history_tl_rec.id,
1504: l_okc_k_history_tl_rec.language,
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1500: last_update_date,
1501: last_update_login)
1502: VALUES (
1503: l_okc_k_history_tl_rec.id,
1504: l_okc_k_history_tl_rec.language,
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1501: last_update_login)
1502: VALUES (
1503: l_okc_k_history_tl_rec.id,
1504: l_okc_k_history_tl_rec.language,
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1502: VALUES (
1503: l_okc_k_history_tl_rec.id,
1504: l_okc_k_history_tl_rec.language,
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1510: l_okc_k_history_tl_rec.last_update_date,
1503: l_okc_k_history_tl_rec.id,
1504: l_okc_k_history_tl_rec.language,
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1510: l_okc_k_history_tl_rec.last_update_date,
1511: l_okc_k_history_tl_rec.last_update_login);
1504: l_okc_k_history_tl_rec.language,
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1510: l_okc_k_history_tl_rec.last_update_date,
1511: l_okc_k_history_tl_rec.last_update_login);
1512: END LOOP;
1505: l_okc_k_history_tl_rec.source_lang,
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1510: l_okc_k_history_tl_rec.last_update_date,
1511: l_okc_k_history_tl_rec.last_update_login);
1512: END LOOP;
1513: -- Set OUT values
1506: l_okc_k_history_tl_rec.comments,
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1510: l_okc_k_history_tl_rec.last_update_date,
1511: l_okc_k_history_tl_rec.last_update_login);
1512: END LOOP;
1513: -- Set OUT values
1514: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
1507: l_okc_k_history_tl_rec.created_by,
1508: l_okc_k_history_tl_rec.creation_date,
1509: l_okc_k_history_tl_rec.last_updated_by,
1510: l_okc_k_history_tl_rec.last_update_date,
1511: l_okc_k_history_tl_rec.last_update_login);
1512: END LOOP;
1513: -- Set OUT values
1514: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
1515: x_return_status := l_return_status;
1510: l_okc_k_history_tl_rec.last_update_date,
1511: l_okc_k_history_tl_rec.last_update_login);
1512: END LOOP;
1513: -- Set OUT values
1514: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
1515: x_return_status := l_return_status;
1516: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1517: EXCEPTION
1518: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1564: l_hstv_rec hstv_rec_type := p_hstv_rec;
1565: l_def_hstv_rec hstv_rec_type;
1566: l_hst_rec hst_rec_type;
1567: lx_hst_rec hst_rec_type;
1568: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1569: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1570: -------------------------------
1571: -- FUNCTION fill_who_columns --
1572: -------------------------------
1565: l_def_hstv_rec hstv_rec_type;
1566: l_hst_rec hst_rec_type;
1567: lx_hst_rec hst_rec_type;
1568: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1569: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
1570: -------------------------------
1571: -- FUNCTION fill_who_columns --
1572: -------------------------------
1573: FUNCTION fill_who_columns (
1678: -----------------------------------------
1679: -- Move VIEW record to "Child" records --
1680: -----------------------------------------
1681: migrate(l_def_hstv_rec, l_hst_rec);
1682: migrate(l_def_hstv_rec, l_okc_k_history_tl_rec);
1683: -----------------------------------------------
1684: -- Call the INSERT_ROW for each child record --
1685: -----------------------------------------------
1686: insert_row(
1701: p_init_msg_list,
1702: l_return_status,
1703: x_msg_count,
1704: x_msg_data,
1705: l_okc_k_history_tl_rec,
1706: lx_okc_k_history_tl_rec
1707: );
1708: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1709: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1702: l_return_status,
1703: x_msg_count,
1704: x_msg_data,
1705: l_okc_k_history_tl_rec,
1706: lx_okc_k_history_tl_rec
1707: );
1708: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1709: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1710: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1709: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1710: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1711: RAISE OKC_API.G_EXCEPTION_ERROR;
1712: END IF;
1713: migrate(lx_okc_k_history_tl_rec, l_def_hstv_rec);
1714: -- Set OUT values
1715: x_hstv_rec := l_def_hstv_rec;
1716: x_return_status := l_return_status;
1717: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2019: '_PVT'
2020: );
2021: END lock_row;
2022: -----------------------------------
2023: -- lock_row for:OKC_K_HISTORY_TL --
2024: -----------------------------------
2025: PROCEDURE lock_row(
2026: p_init_msg_list IN VARCHAR2 ,
2027: x_return_status OUT NOCOPY VARCHAR2,
2026: p_init_msg_list IN VARCHAR2 ,
2027: x_return_status OUT NOCOPY VARCHAR2,
2028: x_msg_count OUT NOCOPY NUMBER,
2029: x_msg_data OUT NOCOPY VARCHAR2,
2030: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2031:
2032: E_Resource_Busy EXCEPTION;
2033: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2034: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2030: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2031:
2032: E_Resource_Busy EXCEPTION;
2033: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2034: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2035: SELECT *
2036: FROM OKC_K_HISTORY_TL
2037: WHERE ID = p_okc_k_history_tl_rec.id
2038: FOR UPDATE NOWAIT;
2032: E_Resource_Busy EXCEPTION;
2033: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2034: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2035: SELECT *
2036: FROM OKC_K_HISTORY_TL
2037: WHERE ID = p_okc_k_history_tl_rec.id
2038: FOR UPDATE NOWAIT;
2039:
2040: l_api_version CONSTANT NUMBER := 1;
2033: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2034: CURSOR lock_csr (p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
2035: SELECT *
2036: FROM OKC_K_HISTORY_TL
2037: WHERE ID = p_okc_k_history_tl_rec.id
2038: FOR UPDATE NOWAIT;
2039:
2040: l_api_version CONSTANT NUMBER := 1;
2041: l_api_name CONSTANT VARCHAR2(30) := 'TL_lock_row';
2053: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2054: RAISE OKC_API.G_EXCEPTION_ERROR;
2055: END IF;
2056: BEGIN
2057: OPEN lock_csr(p_okc_k_history_tl_rec);
2058: FETCH lock_csr INTO l_lock_var;
2059: l_row_notfound := lock_csr%NOTFOUND;
2060: CLOSE lock_csr;
2061: EXCEPTION
2119: l_api_version CONSTANT NUMBER := 1;
2120: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
2121: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2122: l_hst_rec hst_rec_type;
2123: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2124: BEGIN
2125: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2126: G_PKG_NAME,
2127: p_init_msg_list,
2137: -----------------------------------------
2138: -- Move VIEW record to "Child" records --
2139: -----------------------------------------
2140: migrate(p_hstv_rec, l_hst_rec);
2141: migrate(p_hstv_rec, l_okc_k_history_tl_rec);
2142: ---------------------------------------------
2143: -- Call the LOCK_ROW for each child record --
2144: ---------------------------------------------
2145: lock_row(
2158: p_init_msg_list,
2159: l_return_status,
2160: x_msg_count,
2161: x_msg_data,
2162: l_okc_k_history_tl_rec
2163: );
2164: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2165: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2166: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2570: '_PVT'
2571: );
2572: END update_row;
2573: -------------------------------------
2574: -- update_row for:OKC_K_HISTORY_TL --
2575: -------------------------------------
2576: PROCEDURE update_row(
2577: p_init_msg_list IN VARCHAR2 ,
2578: x_return_status OUT NOCOPY VARCHAR2,
2577: p_init_msg_list IN VARCHAR2 ,
2578: x_return_status OUT NOCOPY VARCHAR2,
2579: x_msg_count OUT NOCOPY NUMBER,
2580: x_msg_data OUT NOCOPY VARCHAR2,
2581: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2582: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
2583:
2584: l_api_version CONSTANT NUMBER := 1;
2585: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2578: x_return_status OUT NOCOPY VARCHAR2,
2579: x_msg_count OUT NOCOPY NUMBER,
2580: x_msg_data OUT NOCOPY VARCHAR2,
2581: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2582: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type) IS
2583:
2584: l_api_version CONSTANT NUMBER := 1;
2585: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2586: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2583:
2584: l_api_version CONSTANT NUMBER := 1;
2585: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2586: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2587: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
2588: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2589: l_row_notfound BOOLEAN := TRUE;
2590: ----------------------------------
2591: -- FUNCTION populate_new_record --
2584: l_api_version CONSTANT NUMBER := 1;
2585: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2586: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2587: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
2588: l_def_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2589: l_row_notfound BOOLEAN := TRUE;
2590: ----------------------------------
2591: -- FUNCTION populate_new_record --
2592: ----------------------------------
2590: ----------------------------------
2591: -- FUNCTION populate_new_record --
2592: ----------------------------------
2593: FUNCTION populate_new_record (
2594: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2595: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2596: ) RETURN VARCHAR2 IS
2597: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2598: l_row_notfound BOOLEAN := TRUE;
2591: -- FUNCTION populate_new_record --
2592: ----------------------------------
2593: FUNCTION populate_new_record (
2594: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2595: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2596: ) RETURN VARCHAR2 IS
2597: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2598: l_row_notfound BOOLEAN := TRUE;
2599: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2593: FUNCTION populate_new_record (
2594: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2595: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2596: ) RETURN VARCHAR2 IS
2597: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2598: l_row_notfound BOOLEAN := TRUE;
2599: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2600: BEGIN
2601: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2597: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2598: l_row_notfound BOOLEAN := TRUE;
2599: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2600: BEGIN
2601: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2602: -- Get current database values
2603: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2604: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2605: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2599: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2600: BEGIN
2601: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2602: -- Get current database values
2603: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2604: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2605: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2606: THEN
2607: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2601: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2602: -- Get current database values
2603: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2604: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2605: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2606: THEN
2607: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2603: l_okc_k_history_tl_rec := get_rec(p_okc_k_history_tl_rec, l_return_status);
2604: IF (l_return_status = OKC_API.G_RET_STS_SUCCESS) THEN
2605: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2606: THEN
2607: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2605: IF (x_okc_k_history_tl_rec.id = OKC_API.G_MISS_NUM)
2606: THEN
2607: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2607: x_okc_k_history_tl_rec.id := l_okc_k_history_tl_rec.id;
2608: END IF;
2609: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2609: IF (x_okc_k_history_tl_rec.language = OKC_API.G_MISS_CHAR)
2610: THEN
2611: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2611: x_okc_k_history_tl_rec.language := l_okc_k_history_tl_rec.language;
2612: END IF;
2613: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2618: THEN
2619: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2613: IF (x_okc_k_history_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2614: THEN
2615: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2618: THEN
2619: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2615: x_okc_k_history_tl_rec.source_lang := l_okc_k_history_tl_rec.source_lang;
2616: END IF;
2617: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2618: THEN
2619: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2622: THEN
2623: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2617: IF (x_okc_k_history_tl_rec.comments = OKC_API.G_MISS_CHAR)
2618: THEN
2619: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2622: THEN
2623: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2619: x_okc_k_history_tl_rec.comments := l_okc_k_history_tl_rec.comments;
2620: END IF;
2621: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2622: THEN
2623: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2626: THEN
2627: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2621: IF (x_okc_k_history_tl_rec.created_by = OKC_API.G_MISS_NUM)
2622: THEN
2623: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2626: THEN
2627: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2623: x_okc_k_history_tl_rec.created_by := l_okc_k_history_tl_rec.created_by;
2624: END IF;
2625: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2626: THEN
2627: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2630: THEN
2631: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2625: IF (x_okc_k_history_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2626: THEN
2627: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2630: THEN
2631: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2627: x_okc_k_history_tl_rec.creation_date := l_okc_k_history_tl_rec.creation_date;
2628: END IF;
2629: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2630: THEN
2631: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2629: IF (x_okc_k_history_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2630: THEN
2631: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2636: END IF;
2637: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2631: x_okc_k_history_tl_rec.last_updated_by := l_okc_k_history_tl_rec.last_updated_by;
2632: END IF;
2633: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2636: END IF;
2637: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2638: THEN
2639: x_okc_k_history_tl_rec.last_update_login := l_okc_k_history_tl_rec.last_update_login;
2633: IF (x_okc_k_history_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2634: THEN
2635: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2636: END IF;
2637: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2638: THEN
2639: x_okc_k_history_tl_rec.last_update_login := l_okc_k_history_tl_rec.last_update_login;
2640: END IF;
2641: END IF;
2635: x_okc_k_history_tl_rec.last_update_date := l_okc_k_history_tl_rec.last_update_date;
2636: END IF;
2637: IF (x_okc_k_history_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2638: THEN
2639: x_okc_k_history_tl_rec.last_update_login := l_okc_k_history_tl_rec.last_update_login;
2640: END IF;
2641: END IF;
2642: RETURN(l_return_status);
2643: END populate_new_record;
2641: END IF;
2642: RETURN(l_return_status);
2643: END populate_new_record;
2644: -----------------------------------------
2645: -- Set_Attributes for:OKC_K_HISTORY_TL --
2646: -----------------------------------------
2647: FUNCTION Set_Attributes (
2648: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2649: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2644: -----------------------------------------
2645: -- Set_Attributes for:OKC_K_HISTORY_TL --
2646: -----------------------------------------
2647: FUNCTION Set_Attributes (
2648: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2649: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2650: ) RETURN VARCHAR2 IS
2651: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2652: BEGIN
2645: -- Set_Attributes for:OKC_K_HISTORY_TL --
2646: -----------------------------------------
2647: FUNCTION Set_Attributes (
2648: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type,
2649: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2650: ) RETURN VARCHAR2 IS
2651: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2652: BEGIN
2653: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2649: x_okc_k_history_tl_rec OUT NOCOPY okc_k_history_tl_rec_type
2650: ) RETURN VARCHAR2 IS
2651: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2652: BEGIN
2653: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2654: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2655: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2656: RETURN(l_return_status);
2657: END Set_Attributes;
2650: ) RETURN VARCHAR2 IS
2651: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2652: BEGIN
2653: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2654: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2655: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2656: RETURN(l_return_status);
2657: END Set_Attributes;
2658: BEGIN
2651: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2652: BEGIN
2653: x_okc_k_history_tl_rec := p_okc_k_history_tl_rec;
2654: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2655: x_okc_k_history_tl_rec.LANGUAGE := USERENV('LANG');
2656: RETURN(l_return_status);
2657: END Set_Attributes;
2658: BEGIN
2659: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2666: RAISE OKC_API.G_EXCEPTION_ERROR;
2667: END IF;
2668: --- Setting item attributes
2669: l_return_status := Set_Attributes(
2670: p_okc_k_history_tl_rec, -- IN
2671: l_okc_k_history_tl_rec); -- OUT
2672: --- If any errors happen abort API
2673: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2674: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2667: END IF;
2668: --- Setting item attributes
2669: l_return_status := Set_Attributes(
2670: p_okc_k_history_tl_rec, -- IN
2671: l_okc_k_history_tl_rec); -- OUT
2672: --- If any errors happen abort API
2673: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2674: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2675: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2674: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2675: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2676: RAISE OKC_API.G_EXCEPTION_ERROR;
2677: END IF;
2678: l_return_status := populate_new_record(l_okc_k_history_tl_rec, l_def_okc_k_history_tl_rec);
2679: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2680: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2681: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2682: RAISE OKC_API.G_EXCEPTION_ERROR;
2680: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2681: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2682: RAISE OKC_API.G_EXCEPTION_ERROR;
2683: END IF;
2684: UPDATE OKC_K_HISTORY_TL
2685: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2681: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2682: RAISE OKC_API.G_EXCEPTION_ERROR;
2683: END IF;
2684: UPDATE OKC_K_HISTORY_TL
2685: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2682: RAISE OKC_API.G_EXCEPTION_ERROR;
2683: END IF;
2684: UPDATE OKC_K_HISTORY_TL
2685: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2690: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2683: END IF;
2684: UPDATE OKC_K_HISTORY_TL
2685: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2690: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2691: WHERE ID = l_def_okc_k_history_tl_rec.id
2684: UPDATE OKC_K_HISTORY_TL
2685: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2690: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2691: WHERE ID = l_def_okc_k_history_tl_rec.id
2692: AND SOURCE_LANG = USERENV('LANG');
2685: SET COMMENTS = l_def_okc_k_history_tl_rec.comments,
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2690: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2691: WHERE ID = l_def_okc_k_history_tl_rec.id
2692: AND SOURCE_LANG = USERENV('LANG');
2693:
2686: CREATED_BY = l_def_okc_k_history_tl_rec.created_by,
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2690: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2691: WHERE ID = l_def_okc_k_history_tl_rec.id
2692: AND SOURCE_LANG = USERENV('LANG');
2693:
2694: /* below code came with TAPI but there is no column by name sfwt_flag in
2687: CREATION_DATE = l_def_okc_k_history_tl_rec.creation_date,
2688: LAST_UPDATED_BY = l_def_okc_k_history_tl_rec.last_updated_by,
2689: LAST_UPDATE_DATE = l_def_okc_k_history_tl_rec.last_update_date,
2690: LAST_UPDATE_LOGIN = l_def_okc_k_history_tl_rec.last_update_login
2691: WHERE ID = l_def_okc_k_history_tl_rec.id
2692: AND SOURCE_LANG = USERENV('LANG');
2693:
2694: /* below code came with TAPI but there is no column by name sfwt_flag in
2695: tl table. commenting the code. */
2692: AND SOURCE_LANG = USERENV('LANG');
2693:
2694: /* below code came with TAPI but there is no column by name sfwt_flag in
2695: tl table. commenting the code. */
2696: --UPDATE OKC_K_HISTORY_TL
2697: --SET SFWT_FLAG = 'Y'
2698: --WHERE ID = l_def_okc_k_history_tl_rec.id
2699: -- AND SOURCE_LANG <> USERENV('LANG');
2700:
2694: /* below code came with TAPI but there is no column by name sfwt_flag in
2695: tl table. commenting the code. */
2696: --UPDATE OKC_K_HISTORY_TL
2697: --SET SFWT_FLAG = 'Y'
2698: --WHERE ID = l_def_okc_k_history_tl_rec.id
2699: -- AND SOURCE_LANG <> USERENV('LANG');
2700:
2701: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
2702: x_return_status := l_return_status;
2697: --SET SFWT_FLAG = 'Y'
2698: --WHERE ID = l_def_okc_k_history_tl_rec.id
2699: -- AND SOURCE_LANG <> USERENV('LANG');
2700:
2701: x_okc_k_history_tl_rec := l_okc_k_history_tl_rec;
2702: x_return_status := l_return_status;
2703: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2704: EXCEPTION
2705: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2752: l_def_hstv_rec hstv_rec_type;
2753: l_db_hstv_rec hstv_rec_type;
2754: l_hst_rec hst_rec_type;
2755: lx_hst_rec hst_rec_type;
2756: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2757: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2758: -------------------------------
2759: -- FUNCTION fill_who_columns --
2760: -------------------------------
2753: l_db_hstv_rec hstv_rec_type;
2754: l_hst_rec hst_rec_type;
2755: lx_hst_rec hst_rec_type;
2756: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2757: lx_okc_k_history_tl_rec okc_k_history_tl_rec_type;
2758: -------------------------------
2759: -- FUNCTION fill_who_columns --
2760: -------------------------------
2761: FUNCTION fill_who_columns (
2941: -----------------------------------------
2942: -- Move VIEW record to "Child" records --
2943: -----------------------------------------
2944: migrate(l_def_hstv_rec, l_hst_rec);
2945: migrate(l_def_hstv_rec, l_okc_k_history_tl_rec);
2946: -----------------------------------------------
2947: -- Call the UPDATE_ROW for each child record --
2948: -----------------------------------------------
2949: update_row(
2964: p_init_msg_list,
2965: l_return_status,
2966: x_msg_count,
2967: x_msg_data,
2968: l_okc_k_history_tl_rec,
2969: lx_okc_k_history_tl_rec
2970: );
2971: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2972: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2965: l_return_status,
2966: x_msg_count,
2967: x_msg_data,
2968: l_okc_k_history_tl_rec,
2969: lx_okc_k_history_tl_rec
2970: );
2971: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2972: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2973: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2972: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2973: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2974: RAISE OKC_API.G_EXCEPTION_ERROR;
2975: END IF;
2976: migrate(lx_okc_k_history_tl_rec, l_def_hstv_rec);
2977: x_hstv_rec := l_def_hstv_rec;
2978: x_return_status := l_return_status;
2979: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2980: EXCEPTION
3237: '_PVT'
3238: );
3239: END delete_row;
3240: -------------------------------------
3241: -- delete_row for:OKC_K_HISTORY_TL --
3242: -------------------------------------
3243: PROCEDURE delete_row(
3244: p_init_msg_list IN VARCHAR2 ,
3245: x_return_status OUT NOCOPY VARCHAR2,
3244: p_init_msg_list IN VARCHAR2 ,
3245: x_return_status OUT NOCOPY VARCHAR2,
3246: x_msg_count OUT NOCOPY NUMBER,
3247: x_msg_data OUT NOCOPY VARCHAR2,
3248: p_okc_k_history_tl_rec IN okc_k_history_tl_rec_type) IS
3249:
3250: l_api_version CONSTANT NUMBER := 1;
3251: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
3252: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3249:
3250: l_api_version CONSTANT NUMBER := 1;
3251: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
3252: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3253: l_okc_k_history_tl_rec okc_k_history_tl_rec_type := p_okc_k_history_tl_rec;
3254: l_row_notfound BOOLEAN := TRUE;
3255: BEGIN
3256: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3257: p_init_msg_list,
3262: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3263: RAISE OKC_API.G_EXCEPTION_ERROR;
3264: END IF;
3265:
3266: DELETE FROM OKC_K_HISTORY_TL
3267: WHERE ID = p_okc_k_history_tl_rec.id;
3268:
3269: x_return_status := l_return_status;
3270: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3263: RAISE OKC_API.G_EXCEPTION_ERROR;
3264: END IF;
3265:
3266: DELETE FROM OKC_K_HISTORY_TL
3267: WHERE ID = p_okc_k_history_tl_rec.id;
3268:
3269: x_return_status := l_return_status;
3270: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3271: EXCEPTION
3314: l_api_version CONSTANT NUMBER := 1;
3315: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
3316: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3317: l_hstv_rec hstv_rec_type := p_hstv_rec;
3318: l_okc_k_history_tl_rec okc_k_history_tl_rec_type;
3319: l_hst_rec hst_rec_type;
3320: BEGIN
3321: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3322: G_PKG_NAME,
3332: END IF;
3333: -----------------------------------------
3334: -- Move VIEW record to "Child" records --
3335: -----------------------------------------
3336: migrate(l_hstv_rec, l_okc_k_history_tl_rec);
3337: migrate(l_hstv_rec, l_hst_rec);
3338: -----------------------------------------------
3339: -- Call the DELETE_ROW for each child record --
3340: -----------------------------------------------
3342: p_init_msg_list,
3343: l_return_status,
3344: x_msg_count,
3345: x_msg_data,
3346: l_okc_k_history_tl_rec
3347: );
3348: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3349: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3350: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3558: -- PROCEDURE delete_all_rows
3559: ---------------------------------------------------------------------------
3560:
3561: --------------------------------------------------------------
3562: -- delete_all_rows for:OKC_K_HISTORY_TL and OKC_K_HISTORY_B --
3563: --------------------------------------------------------------
3564: PROCEDURE delete_all_rows(
3565: p_init_msg_list IN VARCHAR2 ,
3566: x_return_status OUT NOCOPY VARCHAR2,
3583: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3584: RAISE OKC_API.G_EXCEPTION_ERROR;
3585: END IF;
3586:
3587: DELETE FROM OKC_K_HISTORY_TL
3588: WHERE ID IN (SELECT ID
3589: FROM OKC_K_HISTORY_B
3590: WHERE CHR_ID = p_chr_id);
3591: