100: -- PROCEDURE add_language
101: ---------------------------------------------------------------------------
102: PROCEDURE add_language IS
103: BEGIN
104: DELETE FROM OKL_REPORTS_TL T
105: WHERE NOT EXISTS (
106: SELECT NULL
107: FROM OKL_REPORTS_B B
108: WHERE B.REPORT_ID =T.REPORT_ID
107: FROM OKL_REPORTS_B B
108: WHERE B.REPORT_ID =T.REPORT_ID
109: );
110:
111: UPDATE OKL_REPORTS_TL T SET(
112: NAME,
113: DESCRIPTION) = (SELECT
114: B.NAME,
115: B.DESCRIPTION
112: NAME,
113: DESCRIPTION) = (SELECT
114: B.NAME,
115: B.DESCRIPTION
116: FROM OKL_REPORTS_TL B
117: WHERE B.REPORT_ID = T.REPORT_ID
118: AND B.LANGUAGE = T.SOURCE_LANG)
119: WHERE ( T.REPORT_ID,
120: T.LANGUAGE)
120: T.LANGUAGE)
121: IN (SELECT
122: SUBT.REPORT_ID,
123: SUBT.LANGUAGE
124: FROM OKL_REPORTS_TL SUBB, OKL_REPORTS_TL SUBT
125: WHERE SUBB.REPORT_ID = SUBT.REPORT_ID
126: AND SUBB.LANGUAGE = SUBT.SOURCE_LANG
127: AND (SUBB.NAME <> SUBT.NAME
128: OR SUBB.DESCRIPTION <> SUBT.DESCRIPTION
129: OR (SUBB.NAME IS NULL AND SUBT.NAME IS NOT NULL)
130: OR (SUBB.DESCRIPTION IS NULL AND SUBT.DESCRIPTION IS NOT NULL)
131: ));
132:
133: INSERT INTO OKL_REPORTS_TL (
134: REPORT_ID,
135: LANGUAGE,
136: SOURCE_LANG,
137: SFWT_FLAG,
153: B.CREATION_DATE,
154: B.LAST_UPDATED_BY,
155: B.LAST_UPDATE_DATE,
156: B.LAST_UPDATE_LOGIN
157: FROM OKL_REPORTS_TL B, FND_LANGUAGES L
158: WHERE L.INSTALLED_FLAG IN ('I', 'B')
159: AND B.LANGUAGE = USERENV('LANG')
160: AND NOT EXISTS (
161: SELECT NULL
158: WHERE L.INSTALLED_FLAG IN ('I', 'B')
159: AND B.LANGUAGE = USERENV('LANG')
160: AND NOT EXISTS (
161: SELECT NULL
162: FROM OKL_REPORTS_TL T
163: WHERE T.REPORT_ID = B.REPORT_ID
164: AND T.LANGUAGE = L.LANGUAGE_CODE
165: );
166: END add_language;
338: BEGIN
339: RETURN(get_rec(p_rep_rec, l_row_not_found));
340: END get_rec;
341: ---------------------------------------------------------------------------
342: -- FUNCTION get_rec for: OKL_REPORTS_TL
343: ---------------------------------------------------------------------------
344: FUNCTION get_rec (
345: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
346: x_no_data_found OUT NOCOPY BOOLEAN
341: ---------------------------------------------------------------------------
342: -- FUNCTION get_rec for: OKL_REPORTS_TL
343: ---------------------------------------------------------------------------
344: FUNCTION get_rec (
345: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
346: x_no_data_found OUT NOCOPY BOOLEAN
347: ) RETURN okl_reports_tl_rec_type IS
348: CURSOR okl_reports_tl_pk_csr (p_report_id IN NUMBER,
349: p_language IN VARCHAR2) IS
343: ---------------------------------------------------------------------------
344: FUNCTION get_rec (
345: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
346: x_no_data_found OUT NOCOPY BOOLEAN
347: ) RETURN okl_reports_tl_rec_type IS
348: CURSOR okl_reports_tl_pk_csr (p_report_id IN NUMBER,
349: p_language IN VARCHAR2) IS
350: SELECT
351: REPORT_ID,
344: FUNCTION get_rec (
345: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
346: x_no_data_found OUT NOCOPY BOOLEAN
347: ) RETURN okl_reports_tl_rec_type IS
348: CURSOR okl_reports_tl_pk_csr (p_report_id IN NUMBER,
349: p_language IN VARCHAR2) IS
350: SELECT
351: REPORT_ID,
352: LANGUAGE,
358: CREATION_DATE,
359: LAST_UPDATED_BY,
360: LAST_UPDATE_DATE,
361: LAST_UPDATE_LOGIN
362: FROM Okl_Reports_Tl
363: WHERE okl_reports_tl.report_id = p_report_id
364: AND okl_reports_tl.language = p_language;
365: l_okl_reports_tl_pk okl_reports_tl_pk_csr%ROWTYPE;
366: l_okl_reports_tl_rec okl_reports_tl_rec_type;
359: LAST_UPDATED_BY,
360: LAST_UPDATE_DATE,
361: LAST_UPDATE_LOGIN
362: FROM Okl_Reports_Tl
363: WHERE okl_reports_tl.report_id = p_report_id
364: AND okl_reports_tl.language = p_language;
365: l_okl_reports_tl_pk okl_reports_tl_pk_csr%ROWTYPE;
366: l_okl_reports_tl_rec okl_reports_tl_rec_type;
367: BEGIN
360: LAST_UPDATE_DATE,
361: LAST_UPDATE_LOGIN
362: FROM Okl_Reports_Tl
363: WHERE okl_reports_tl.report_id = p_report_id
364: AND okl_reports_tl.language = p_language;
365: l_okl_reports_tl_pk okl_reports_tl_pk_csr%ROWTYPE;
366: l_okl_reports_tl_rec okl_reports_tl_rec_type;
367: BEGIN
368: x_no_data_found := TRUE;
361: LAST_UPDATE_LOGIN
362: FROM Okl_Reports_Tl
363: WHERE okl_reports_tl.report_id = p_report_id
364: AND okl_reports_tl.language = p_language;
365: l_okl_reports_tl_pk okl_reports_tl_pk_csr%ROWTYPE;
366: l_okl_reports_tl_rec okl_reports_tl_rec_type;
367: BEGIN
368: x_no_data_found := TRUE;
369: -- Get current database values
362: FROM Okl_Reports_Tl
363: WHERE okl_reports_tl.report_id = p_report_id
364: AND okl_reports_tl.language = p_language;
365: l_okl_reports_tl_pk okl_reports_tl_pk_csr%ROWTYPE;
366: l_okl_reports_tl_rec okl_reports_tl_rec_type;
367: BEGIN
368: x_no_data_found := TRUE;
369: -- Get current database values
370: OPEN okl_reports_tl_pk_csr (p_okl_reports_tl_rec.report_id,
366: l_okl_reports_tl_rec okl_reports_tl_rec_type;
367: BEGIN
368: x_no_data_found := TRUE;
369: -- Get current database values
370: OPEN okl_reports_tl_pk_csr (p_okl_reports_tl_rec.report_id,
371: p_okl_reports_tl_rec.language);
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
367: BEGIN
368: x_no_data_found := TRUE;
369: -- Get current database values
370: OPEN okl_reports_tl_pk_csr (p_okl_reports_tl_rec.report_id,
371: p_okl_reports_tl_rec.language);
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
368: x_no_data_found := TRUE;
369: -- Get current database values
370: OPEN okl_reports_tl_pk_csr (p_okl_reports_tl_rec.report_id,
371: p_okl_reports_tl_rec.language);
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
369: -- Get current database values
370: OPEN okl_reports_tl_pk_csr (p_okl_reports_tl_rec.report_id,
371: p_okl_reports_tl_rec.language);
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
370: OPEN okl_reports_tl_pk_csr (p_okl_reports_tl_rec.report_id,
371: p_okl_reports_tl_rec.language);
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
371: p_okl_reports_tl_rec.language);
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
372: FETCH okl_reports_tl_pk_csr INTO
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
373: l_okl_reports_tl_rec.report_id,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
374: l_okl_reports_tl_rec.language,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
375: l_okl_reports_tl_rec.source_lang,
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
376: l_okl_reports_tl_rec.sfwt_flag,
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
377: l_okl_reports_tl_rec.name,
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
385: CLOSE okl_reports_tl_pk_csr;
378: l_okl_reports_tl_rec.description,
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
385: CLOSE okl_reports_tl_pk_csr;
386: RETURN(l_okl_reports_tl_rec);
379: l_okl_reports_tl_rec.created_by,
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
385: CLOSE okl_reports_tl_pk_csr;
386: RETURN(l_okl_reports_tl_rec);
387: END get_rec;
380: l_okl_reports_tl_rec.creation_date,
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
385: CLOSE okl_reports_tl_pk_csr;
386: RETURN(l_okl_reports_tl_rec);
387: END get_rec;
388:
381: l_okl_reports_tl_rec.last_updated_by,
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
385: CLOSE okl_reports_tl_pk_csr;
386: RETURN(l_okl_reports_tl_rec);
387: END get_rec;
388:
389: ------------------------------------------------------------------
382: l_okl_reports_tl_rec.last_update_date,
383: l_okl_reports_tl_rec.last_update_login;
384: x_no_data_found := okl_reports_tl_pk_csr%NOTFOUND;
385: CLOSE okl_reports_tl_pk_csr;
386: RETURN(l_okl_reports_tl_rec);
387: END get_rec;
388:
389: ------------------------------------------------------------------
390: -- This version of get_rec sets error messages if no data found --
389: ------------------------------------------------------------------
390: -- This version of get_rec sets error messages if no data found --
391: ------------------------------------------------------------------
392: FUNCTION get_rec (
393: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
394: x_return_status OUT NOCOPY VARCHAR2
395: ) RETURN okl_reports_tl_rec_type IS
396: l_okl_reports_tl_rec okl_reports_tl_rec_type;
397: l_row_notfound BOOLEAN := TRUE;
391: ------------------------------------------------------------------
392: FUNCTION get_rec (
393: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
394: x_return_status OUT NOCOPY VARCHAR2
395: ) RETURN okl_reports_tl_rec_type IS
396: l_okl_reports_tl_rec okl_reports_tl_rec_type;
397: l_row_notfound BOOLEAN := TRUE;
398: BEGIN
399: x_return_status := OKL_API.G_RET_STS_SUCCESS;
392: FUNCTION get_rec (
393: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
394: x_return_status OUT NOCOPY VARCHAR2
395: ) RETURN okl_reports_tl_rec_type IS
396: l_okl_reports_tl_rec okl_reports_tl_rec_type;
397: l_row_notfound BOOLEAN := TRUE;
398: BEGIN
399: x_return_status := OKL_API.G_RET_STS_SUCCESS;
400: l_okl_reports_tl_rec := get_rec(p_okl_reports_tl_rec, l_row_notfound);
396: l_okl_reports_tl_rec okl_reports_tl_rec_type;
397: l_row_notfound BOOLEAN := TRUE;
398: BEGIN
399: x_return_status := OKL_API.G_RET_STS_SUCCESS;
400: l_okl_reports_tl_rec := get_rec(p_okl_reports_tl_rec, l_row_notfound);
401: IF (l_row_notfound) THEN
402: OKL_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'REPORT_ID');
403: OKL_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'LANGUAGE');
404: x_return_status := OKL_API.G_RET_STS_ERROR;
402: OKL_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'REPORT_ID');
403: OKL_API.set_message(G_APP_NAME,G_INVALID_VALUE,G_COL_NAME_TOKEN,'LANGUAGE');
404: x_return_status := OKL_API.G_RET_STS_ERROR;
405: END IF;
406: RETURN(l_okl_reports_tl_rec);
407: END get_rec;
408: -----------------------------------------------------------
409: -- So we don't have to pass an "l_row_notfound" variable --
410: -----------------------------------------------------------
408: -----------------------------------------------------------
409: -- So we don't have to pass an "l_row_notfound" variable --
410: -----------------------------------------------------------
411: FUNCTION get_rec (
412: p_okl_reports_tl_rec IN okl_reports_tl_rec_type
413: ) RETURN okl_reports_tl_rec_type IS
414: l_row_not_found BOOLEAN := TRUE;
415: BEGIN
416: RETURN(get_rec(p_okl_reports_tl_rec, l_row_not_found));
409: -- So we don't have to pass an "l_row_notfound" variable --
410: -----------------------------------------------------------
411: FUNCTION get_rec (
412: p_okl_reports_tl_rec IN okl_reports_tl_rec_type
413: ) RETURN okl_reports_tl_rec_type IS
414: l_row_not_found BOOLEAN := TRUE;
415: BEGIN
416: RETURN(get_rec(p_okl_reports_tl_rec, l_row_not_found));
417: END get_rec;
412: p_okl_reports_tl_rec IN okl_reports_tl_rec_type
413: ) RETURN okl_reports_tl_rec_type IS
414: l_row_not_found BOOLEAN := TRUE;
415: BEGIN
416: RETURN(get_rec(p_okl_reports_tl_rec, l_row_not_found));
417: END get_rec;
418: ---------------------------------------------------------------------------
419: -- FUNCTION null_out_defaults for: OKL_REPORTS_V
420: ---------------------------------------------------------------------------
558: p_to.last_update_login := p_from.last_update_login;
559: END migrate;
560: PROCEDURE migrate (
561: p_from IN repv_rec_type,
562: p_to IN OUT NOCOPY okl_reports_tl_rec_type
563: ) IS
564: BEGIN
565: p_to.report_id := p_from.report_id;
566: p_to.language := p_from.language;
574: p_to.last_update_date := p_from.last_update_date;
575: p_to.last_update_login := p_from.last_update_login;
576: END migrate;
577: PROCEDURE migrate (
578: p_from IN okl_reports_tl_rec_type,
579: p_to IN OUT NOCOPY repv_rec_type
580: ) IS
581: BEGIN
582: p_to.report_id := p_from.report_id;
791: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
792: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
793: l_repv_rec repv_rec_type := p_repv_rec;
794: l_rep_rec rep_rec_type;
795: l_okl_reports_tl_rec okl_reports_tl_rec_type;
796: BEGIN
797: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
798: G_PKG_NAME,
799: p_init_msg_list,
1133: '_PVT'
1134: );
1135: END insert_row;
1136: -----------------------------------
1137: -- insert_row for:OKL_REPORTS_TL --
1138: -----------------------------------
1139: PROCEDURE insert_row(
1140: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
1141: x_return_status OUT NOCOPY VARCHAR2,
1140: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
1141: x_return_status OUT NOCOPY VARCHAR2,
1142: x_msg_count OUT NOCOPY NUMBER,
1143: x_msg_data OUT NOCOPY VARCHAR2,
1144: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
1145: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type) IS
1146:
1147: l_api_version CONSTANT NUMBER := 1;
1148: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1141: x_return_status OUT NOCOPY VARCHAR2,
1142: x_msg_count OUT NOCOPY NUMBER,
1143: x_msg_data OUT NOCOPY VARCHAR2,
1144: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
1145: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type) IS
1146:
1147: l_api_version CONSTANT NUMBER := 1;
1148: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1149: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1146:
1147: l_api_version CONSTANT NUMBER := 1;
1148: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1149: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1150: l_okl_reports_tl_rec okl_reports_tl_rec_type := p_okl_reports_tl_rec;
1151: l_def_okl_reports_tl_rec okl_reports_tl_rec_type;
1152: CURSOR get_languages IS
1153: SELECT *
1154: FROM FND_LANGUAGES
1147: l_api_version CONSTANT NUMBER := 1;
1148: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1149: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1150: l_okl_reports_tl_rec okl_reports_tl_rec_type := p_okl_reports_tl_rec;
1151: l_def_okl_reports_tl_rec okl_reports_tl_rec_type;
1152: CURSOR get_languages IS
1153: SELECT *
1154: FROM FND_LANGUAGES
1155: WHERE INSTALLED_FLAG IN ('I', 'B');
1153: SELECT *
1154: FROM FND_LANGUAGES
1155: WHERE INSTALLED_FLAG IN ('I', 'B');
1156: ---------------------------------------
1157: -- Set_Attributes for:OKL_REPORTS_TL --
1158: ---------------------------------------
1159: FUNCTION Set_Attributes (
1160: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
1161: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
1156: ---------------------------------------
1157: -- Set_Attributes for:OKL_REPORTS_TL --
1158: ---------------------------------------
1159: FUNCTION Set_Attributes (
1160: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
1161: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
1162: ) RETURN VARCHAR2 IS
1163: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1164: BEGIN
1157: -- Set_Attributes for:OKL_REPORTS_TL --
1158: ---------------------------------------
1159: FUNCTION Set_Attributes (
1160: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
1161: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
1162: ) RETURN VARCHAR2 IS
1163: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1164: BEGIN
1165: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
1161: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
1162: ) RETURN VARCHAR2 IS
1163: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1164: BEGIN
1165: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
1166: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
1167: x_okl_reports_tl_rec.SOURCE_LANG := USERENV('LANG');
1168: RETURN(l_return_status);
1169: END Set_Attributes;
1162: ) RETURN VARCHAR2 IS
1163: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1164: BEGIN
1165: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
1166: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
1167: x_okl_reports_tl_rec.SOURCE_LANG := USERENV('LANG');
1168: RETURN(l_return_status);
1169: END Set_Attributes;
1170: BEGIN
1163: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1164: BEGIN
1165: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
1166: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
1167: x_okl_reports_tl_rec.SOURCE_LANG := USERENV('LANG');
1168: RETURN(l_return_status);
1169: END Set_Attributes;
1170: BEGIN
1171: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
1178: RAISE OKL_API.G_EXCEPTION_ERROR;
1179: END IF;
1180: --- Setting item attributes
1181: l_return_status := Set_Attributes(
1182: p_okl_reports_tl_rec, -- IN
1183: l_okl_reports_tl_rec); -- OUT
1184: --- If any errors happen abort API
1185: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1186: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1179: END IF;
1180: --- Setting item attributes
1181: l_return_status := Set_Attributes(
1182: p_okl_reports_tl_rec, -- IN
1183: l_okl_reports_tl_rec); -- OUT
1184: --- If any errors happen abort API
1185: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1186: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1187: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
1187: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
1188: RAISE OKL_API.G_EXCEPTION_ERROR;
1189: END IF;
1190: FOR l_lang_rec IN get_languages LOOP
1191: l_okl_reports_tl_rec.language := l_lang_rec.language_code;
1192: INSERT INTO OKL_REPORTS_TL(
1193: report_id,
1194: language,
1195: source_lang,
1188: RAISE OKL_API.G_EXCEPTION_ERROR;
1189: END IF;
1190: FOR l_lang_rec IN get_languages LOOP
1191: l_okl_reports_tl_rec.language := l_lang_rec.language_code;
1192: INSERT INTO OKL_REPORTS_TL(
1193: report_id,
1194: language,
1195: source_lang,
1196: sfwt_flag,
1201: last_updated_by,
1202: last_update_date,
1203: last_update_login)
1204: VALUES (
1205: l_okl_reports_tl_rec.report_id,
1206: l_okl_reports_tl_rec.language,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1202: last_update_date,
1203: last_update_login)
1204: VALUES (
1205: l_okl_reports_tl_rec.report_id,
1206: l_okl_reports_tl_rec.language,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1203: last_update_login)
1204: VALUES (
1205: l_okl_reports_tl_rec.report_id,
1206: l_okl_reports_tl_rec.language,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1204: VALUES (
1205: l_okl_reports_tl_rec.report_id,
1206: l_okl_reports_tl_rec.language,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1205: l_okl_reports_tl_rec.report_id,
1206: l_okl_reports_tl_rec.language,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1206: l_okl_reports_tl_rec.language,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1214: l_okl_reports_tl_rec.last_update_date,
1207: l_okl_reports_tl_rec.source_lang,
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1214: l_okl_reports_tl_rec.last_update_date,
1215: l_okl_reports_tl_rec.last_update_login);
1208: l_okl_reports_tl_rec.sfwt_flag,
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1214: l_okl_reports_tl_rec.last_update_date,
1215: l_okl_reports_tl_rec.last_update_login);
1216: END LOOP;
1209: l_okl_reports_tl_rec.name,
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1214: l_okl_reports_tl_rec.last_update_date,
1215: l_okl_reports_tl_rec.last_update_login);
1216: END LOOP;
1217: -- Set OUT values
1210: l_okl_reports_tl_rec.description,
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1214: l_okl_reports_tl_rec.last_update_date,
1215: l_okl_reports_tl_rec.last_update_login);
1216: END LOOP;
1217: -- Set OUT values
1218: x_okl_reports_tl_rec := l_okl_reports_tl_rec;
1211: l_okl_reports_tl_rec.created_by,
1212: l_okl_reports_tl_rec.creation_date,
1213: l_okl_reports_tl_rec.last_updated_by,
1214: l_okl_reports_tl_rec.last_update_date,
1215: l_okl_reports_tl_rec.last_update_login);
1216: END LOOP;
1217: -- Set OUT values
1218: x_okl_reports_tl_rec := l_okl_reports_tl_rec;
1219: x_return_status := l_return_status;
1214: l_okl_reports_tl_rec.last_update_date,
1215: l_okl_reports_tl_rec.last_update_login);
1216: END LOOP;
1217: -- Set OUT values
1218: x_okl_reports_tl_rec := l_okl_reports_tl_rec;
1219: x_return_status := l_return_status;
1220: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
1221: EXCEPTION
1222: WHEN OKL_API.G_EXCEPTION_ERROR THEN
1268: l_repv_rec repv_rec_type := p_repv_rec;
1269: l_def_repv_rec repv_rec_type;
1270: l_rep_rec rep_rec_type;
1271: lx_rep_rec rep_rec_type;
1272: l_okl_reports_tl_rec okl_reports_tl_rec_type;
1273: lx_okl_reports_tl_rec okl_reports_tl_rec_type;
1274: -------------------------------
1275: -- FUNCTION fill_who_columns --
1276: -------------------------------
1269: l_def_repv_rec repv_rec_type;
1270: l_rep_rec rep_rec_type;
1271: lx_rep_rec rep_rec_type;
1272: l_okl_reports_tl_rec okl_reports_tl_rec_type;
1273: lx_okl_reports_tl_rec okl_reports_tl_rec_type;
1274: -------------------------------
1275: -- FUNCTION fill_who_columns --
1276: -------------------------------
1277: FUNCTION fill_who_columns (
1355: -- Move VIEW record to "Child" records --
1356: -----------------------------------------
1357: migrate(l_def_repv_rec, l_rep_rec);
1358:
1359: migrate(l_def_repv_rec, l_okl_reports_tl_rec);
1360:
1361: -----------------------------------------------
1362: -- Call the INSERT_ROW for each child record --
1363: -----------------------------------------------
1379:
1380: migrate(lx_rep_rec, l_def_repv_rec);
1381:
1382:
1383: l_okl_reports_tl_rec.report_id := l_def_repv_rec.report_id;
1384:
1385: insert_row(
1386: p_init_msg_list,
1387: l_return_status,
1386: p_init_msg_list,
1387: l_return_status,
1388: x_msg_count,
1389: x_msg_data,
1390: l_okl_reports_tl_rec,
1391: lx_okl_reports_tl_rec
1392: );
1393:
1394:
1387: l_return_status,
1388: x_msg_count,
1389: x_msg_data,
1390: l_okl_reports_tl_rec,
1391: lx_okl_reports_tl_rec
1392: );
1393:
1394:
1395: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1397: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
1398: RAISE OKL_API.G_EXCEPTION_ERROR;
1399: END IF;
1400:
1401: migrate(lx_okl_reports_tl_rec, l_def_repv_rec);
1402:
1403: -- Set OUT values
1404: x_repv_rec := l_def_repv_rec;
1405: x_return_status := l_return_status;
1693: '_PVT'
1694: );
1695: END lock_row;
1696: ---------------------------------
1697: -- lock_row for:OKL_REPORTS_TL --
1698: ---------------------------------
1699: PROCEDURE lock_row(
1700: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
1701: x_return_status OUT NOCOPY VARCHAR2,
1700: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
1701: x_return_status OUT NOCOPY VARCHAR2,
1702: x_msg_count OUT NOCOPY NUMBER,
1703: x_msg_data OUT NOCOPY VARCHAR2,
1704: p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
1705:
1706: E_Resource_Busy EXCEPTION;
1707: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1708: CURSOR lock_csr (p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
1704: p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
1705:
1706: E_Resource_Busy EXCEPTION;
1707: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1708: CURSOR lock_csr (p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
1709: SELECT *
1710: FROM OKL_REPORTS_TL
1711: WHERE REPORT_ID = p_okl_reports_tl_rec.report_id
1712: FOR UPDATE NOWAIT;
1706: E_Resource_Busy EXCEPTION;
1707: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1708: CURSOR lock_csr (p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
1709: SELECT *
1710: FROM OKL_REPORTS_TL
1711: WHERE REPORT_ID = p_okl_reports_tl_rec.report_id
1712: FOR UPDATE NOWAIT;
1713:
1714: l_api_version CONSTANT NUMBER := 1;
1707: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1708: CURSOR lock_csr (p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
1709: SELECT *
1710: FROM OKL_REPORTS_TL
1711: WHERE REPORT_ID = p_okl_reports_tl_rec.report_id
1712: FOR UPDATE NOWAIT;
1713:
1714: l_api_version CONSTANT NUMBER := 1;
1715: l_api_name CONSTANT VARCHAR2(30) := 'TL_lock_row';
1727: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
1728: RAISE OKL_API.G_EXCEPTION_ERROR;
1729: END IF;
1730: BEGIN
1731: OPEN lock_csr(p_okl_reports_tl_rec);
1732: FETCH lock_csr INTO l_lock_var;
1733: l_row_notfound := lock_csr%NOTFOUND;
1734: CLOSE lock_csr;
1735: EXCEPTION
1793: l_api_version CONSTANT NUMBER := 1;
1794: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
1795: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
1796: l_rep_rec rep_rec_type;
1797: l_okl_reports_tl_rec okl_reports_tl_rec_type;
1798: BEGIN
1799: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
1800: G_PKG_NAME,
1801: p_init_msg_list,
1811: -----------------------------------------
1812: -- Move VIEW record to "Child" records --
1813: -----------------------------------------
1814: migrate(p_repv_rec, l_rep_rec);
1815: migrate(p_repv_rec, l_okl_reports_tl_rec);
1816: ---------------------------------------------
1817: -- Call the LOCK_ROW for each child record --
1818: ---------------------------------------------
1819: lock_row(
1832: p_init_msg_list,
1833: l_return_status,
1834: x_msg_count,
1835: x_msg_data,
1836: l_okl_reports_tl_rec
1837: );
1838: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
1839: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
1840: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2207: '_PVT'
2208: );
2209: END update_row;
2210: -----------------------------------
2211: -- update_row for:OKL_REPORTS_TL --
2212: -----------------------------------
2213: PROCEDURE update_row(
2214: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
2215: x_return_status OUT NOCOPY VARCHAR2,
2214: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
2215: x_return_status OUT NOCOPY VARCHAR2,
2216: x_msg_count OUT NOCOPY NUMBER,
2217: x_msg_data OUT NOCOPY VARCHAR2,
2218: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2219: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type) IS
2220:
2221: l_api_version CONSTANT NUMBER := 1;
2222: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2215: x_return_status OUT NOCOPY VARCHAR2,
2216: x_msg_count OUT NOCOPY NUMBER,
2217: x_msg_data OUT NOCOPY VARCHAR2,
2218: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2219: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type) IS
2220:
2221: l_api_version CONSTANT NUMBER := 1;
2222: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2223: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2220:
2221: l_api_version CONSTANT NUMBER := 1;
2222: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2223: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2224: l_okl_reports_tl_rec okl_reports_tl_rec_type := p_okl_reports_tl_rec;
2225: l_def_okl_reports_tl_rec okl_reports_tl_rec_type;
2226: l_row_notfound BOOLEAN := TRUE;
2227: ----------------------------------
2228: -- FUNCTION populate_new_record --
2221: l_api_version CONSTANT NUMBER := 1;
2222: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2223: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2224: l_okl_reports_tl_rec okl_reports_tl_rec_type := p_okl_reports_tl_rec;
2225: l_def_okl_reports_tl_rec okl_reports_tl_rec_type;
2226: l_row_notfound BOOLEAN := TRUE;
2227: ----------------------------------
2228: -- FUNCTION populate_new_record --
2229: ----------------------------------
2227: ----------------------------------
2228: -- FUNCTION populate_new_record --
2229: ----------------------------------
2230: FUNCTION populate_new_record (
2231: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2232: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2233: ) RETURN VARCHAR2 IS
2234: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2235: l_row_notfound BOOLEAN := TRUE;
2228: -- FUNCTION populate_new_record --
2229: ----------------------------------
2230: FUNCTION populate_new_record (
2231: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2232: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2233: ) RETURN VARCHAR2 IS
2234: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2235: l_row_notfound BOOLEAN := TRUE;
2236: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2230: FUNCTION populate_new_record (
2231: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2232: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2233: ) RETURN VARCHAR2 IS
2234: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2235: l_row_notfound BOOLEAN := TRUE;
2236: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2237: BEGIN
2238: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2234: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2235: l_row_notfound BOOLEAN := TRUE;
2236: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2237: BEGIN
2238: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2239: -- Get current database values
2240: l_okl_reports_tl_rec := get_rec(p_okl_reports_tl_rec, l_return_status);
2241: IF (l_return_status = OKL_API.G_RET_STS_SUCCESS) THEN
2242: IF x_okl_reports_tl_rec.report_id IS NULL OR x_okl_reports_tl_rec.report_id = OKL_API.G_MISS_NUM THEN
2236: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2237: BEGIN
2238: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2239: -- Get current database values
2240: l_okl_reports_tl_rec := get_rec(p_okl_reports_tl_rec, l_return_status);
2241: IF (l_return_status = OKL_API.G_RET_STS_SUCCESS) THEN
2242: IF x_okl_reports_tl_rec.report_id IS NULL OR x_okl_reports_tl_rec.report_id = OKL_API.G_MISS_NUM THEN
2243: x_okl_reports_tl_rec.report_id := l_okl_reports_tl_rec.report_id;
2244: END IF;
2238: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2239: -- Get current database values
2240: l_okl_reports_tl_rec := get_rec(p_okl_reports_tl_rec, l_return_status);
2241: IF (l_return_status = OKL_API.G_RET_STS_SUCCESS) THEN
2242: IF x_okl_reports_tl_rec.report_id IS NULL OR x_okl_reports_tl_rec.report_id = OKL_API.G_MISS_NUM THEN
2243: x_okl_reports_tl_rec.report_id := l_okl_reports_tl_rec.report_id;
2244: END IF;
2245: IF x_okl_reports_tl_rec.language IS NULL OR x_okl_reports_tl_rec.language = OKL_API.G_MISS_CHAR THEN
2246: x_okl_reports_tl_rec.language := l_okl_reports_tl_rec.language;
2239: -- Get current database values
2240: l_okl_reports_tl_rec := get_rec(p_okl_reports_tl_rec, l_return_status);
2241: IF (l_return_status = OKL_API.G_RET_STS_SUCCESS) THEN
2242: IF x_okl_reports_tl_rec.report_id IS NULL OR x_okl_reports_tl_rec.report_id = OKL_API.G_MISS_NUM THEN
2243: x_okl_reports_tl_rec.report_id := l_okl_reports_tl_rec.report_id;
2244: END IF;
2245: IF x_okl_reports_tl_rec.language IS NULL OR x_okl_reports_tl_rec.language = OKL_API.G_MISS_CHAR THEN
2246: x_okl_reports_tl_rec.language := l_okl_reports_tl_rec.language;
2247: END IF;
2241: IF (l_return_status = OKL_API.G_RET_STS_SUCCESS) THEN
2242: IF x_okl_reports_tl_rec.report_id IS NULL OR x_okl_reports_tl_rec.report_id = OKL_API.G_MISS_NUM THEN
2243: x_okl_reports_tl_rec.report_id := l_okl_reports_tl_rec.report_id;
2244: END IF;
2245: IF x_okl_reports_tl_rec.language IS NULL OR x_okl_reports_tl_rec.language = OKL_API.G_MISS_CHAR THEN
2246: x_okl_reports_tl_rec.language := l_okl_reports_tl_rec.language;
2247: END IF;
2248: IF x_okl_reports_tl_rec.source_lang IS NULL OR x_okl_reports_tl_rec.source_lang = OKL_API.G_MISS_CHAR THEN
2249: x_okl_reports_tl_rec.source_lang := l_okl_reports_tl_rec.source_lang;
2242: IF x_okl_reports_tl_rec.report_id IS NULL OR x_okl_reports_tl_rec.report_id = OKL_API.G_MISS_NUM THEN
2243: x_okl_reports_tl_rec.report_id := l_okl_reports_tl_rec.report_id;
2244: END IF;
2245: IF x_okl_reports_tl_rec.language IS NULL OR x_okl_reports_tl_rec.language = OKL_API.G_MISS_CHAR THEN
2246: x_okl_reports_tl_rec.language := l_okl_reports_tl_rec.language;
2247: END IF;
2248: IF x_okl_reports_tl_rec.source_lang IS NULL OR x_okl_reports_tl_rec.source_lang = OKL_API.G_MISS_CHAR THEN
2249: x_okl_reports_tl_rec.source_lang := l_okl_reports_tl_rec.source_lang;
2250: END IF;
2244: END IF;
2245: IF x_okl_reports_tl_rec.language IS NULL OR x_okl_reports_tl_rec.language = OKL_API.G_MISS_CHAR THEN
2246: x_okl_reports_tl_rec.language := l_okl_reports_tl_rec.language;
2247: END IF;
2248: IF x_okl_reports_tl_rec.source_lang IS NULL OR x_okl_reports_tl_rec.source_lang = OKL_API.G_MISS_CHAR THEN
2249: x_okl_reports_tl_rec.source_lang := l_okl_reports_tl_rec.source_lang;
2250: END IF;
2251: IF x_okl_reports_tl_rec.sfwt_flag IS NULL OR x_okl_reports_tl_rec.sfwt_flag = OKL_API.G_MISS_CHAR THEN
2252: x_okl_reports_tl_rec.sfwt_flag := l_okl_reports_tl_rec.sfwt_flag;
2245: IF x_okl_reports_tl_rec.language IS NULL OR x_okl_reports_tl_rec.language = OKL_API.G_MISS_CHAR THEN
2246: x_okl_reports_tl_rec.language := l_okl_reports_tl_rec.language;
2247: END IF;
2248: IF x_okl_reports_tl_rec.source_lang IS NULL OR x_okl_reports_tl_rec.source_lang = OKL_API.G_MISS_CHAR THEN
2249: x_okl_reports_tl_rec.source_lang := l_okl_reports_tl_rec.source_lang;
2250: END IF;
2251: IF x_okl_reports_tl_rec.sfwt_flag IS NULL OR x_okl_reports_tl_rec.sfwt_flag = OKL_API.G_MISS_CHAR THEN
2252: x_okl_reports_tl_rec.sfwt_flag := l_okl_reports_tl_rec.sfwt_flag;
2253: END IF;
2247: END IF;
2248: IF x_okl_reports_tl_rec.source_lang IS NULL OR x_okl_reports_tl_rec.source_lang = OKL_API.G_MISS_CHAR THEN
2249: x_okl_reports_tl_rec.source_lang := l_okl_reports_tl_rec.source_lang;
2250: END IF;
2251: IF x_okl_reports_tl_rec.sfwt_flag IS NULL OR x_okl_reports_tl_rec.sfwt_flag = OKL_API.G_MISS_CHAR THEN
2252: x_okl_reports_tl_rec.sfwt_flag := l_okl_reports_tl_rec.sfwt_flag;
2253: END IF;
2254: IF x_okl_reports_tl_rec.name = OKL_API.G_MISS_CHAR THEN
2255: x_okl_reports_tl_rec.name := l_okl_reports_tl_rec.name;
2248: IF x_okl_reports_tl_rec.source_lang IS NULL OR x_okl_reports_tl_rec.source_lang = OKL_API.G_MISS_CHAR THEN
2249: x_okl_reports_tl_rec.source_lang := l_okl_reports_tl_rec.source_lang;
2250: END IF;
2251: IF x_okl_reports_tl_rec.sfwt_flag IS NULL OR x_okl_reports_tl_rec.sfwt_flag = OKL_API.G_MISS_CHAR THEN
2252: x_okl_reports_tl_rec.sfwt_flag := l_okl_reports_tl_rec.sfwt_flag;
2253: END IF;
2254: IF x_okl_reports_tl_rec.name = OKL_API.G_MISS_CHAR THEN
2255: x_okl_reports_tl_rec.name := l_okl_reports_tl_rec.name;
2256: END IF;
2250: END IF;
2251: IF x_okl_reports_tl_rec.sfwt_flag IS NULL OR x_okl_reports_tl_rec.sfwt_flag = OKL_API.G_MISS_CHAR THEN
2252: x_okl_reports_tl_rec.sfwt_flag := l_okl_reports_tl_rec.sfwt_flag;
2253: END IF;
2254: IF x_okl_reports_tl_rec.name = OKL_API.G_MISS_CHAR THEN
2255: x_okl_reports_tl_rec.name := l_okl_reports_tl_rec.name;
2256: END IF;
2257: IF x_okl_reports_tl_rec.description = OKL_API.G_MISS_CHAR THEN
2258: x_okl_reports_tl_rec.description := l_okl_reports_tl_rec.description;
2251: IF x_okl_reports_tl_rec.sfwt_flag IS NULL OR x_okl_reports_tl_rec.sfwt_flag = OKL_API.G_MISS_CHAR THEN
2252: x_okl_reports_tl_rec.sfwt_flag := l_okl_reports_tl_rec.sfwt_flag;
2253: END IF;
2254: IF x_okl_reports_tl_rec.name = OKL_API.G_MISS_CHAR THEN
2255: x_okl_reports_tl_rec.name := l_okl_reports_tl_rec.name;
2256: END IF;
2257: IF x_okl_reports_tl_rec.description = OKL_API.G_MISS_CHAR THEN
2258: x_okl_reports_tl_rec.description := l_okl_reports_tl_rec.description;
2259: END IF;
2253: END IF;
2254: IF x_okl_reports_tl_rec.name = OKL_API.G_MISS_CHAR THEN
2255: x_okl_reports_tl_rec.name := l_okl_reports_tl_rec.name;
2256: END IF;
2257: IF x_okl_reports_tl_rec.description = OKL_API.G_MISS_CHAR THEN
2258: x_okl_reports_tl_rec.description := l_okl_reports_tl_rec.description;
2259: END IF;
2260: IF x_okl_reports_tl_rec.created_by IS NULL OR x_okl_reports_tl_rec.created_by = OKL_API.G_MISS_NUM THEN
2261: x_okl_reports_tl_rec.created_by := l_okl_reports_tl_rec.created_by;
2254: IF x_okl_reports_tl_rec.name = OKL_API.G_MISS_CHAR THEN
2255: x_okl_reports_tl_rec.name := l_okl_reports_tl_rec.name;
2256: END IF;
2257: IF x_okl_reports_tl_rec.description = OKL_API.G_MISS_CHAR THEN
2258: x_okl_reports_tl_rec.description := l_okl_reports_tl_rec.description;
2259: END IF;
2260: IF x_okl_reports_tl_rec.created_by IS NULL OR x_okl_reports_tl_rec.created_by = OKL_API.G_MISS_NUM THEN
2261: x_okl_reports_tl_rec.created_by := l_okl_reports_tl_rec.created_by;
2262: END IF;
2256: END IF;
2257: IF x_okl_reports_tl_rec.description = OKL_API.G_MISS_CHAR THEN
2258: x_okl_reports_tl_rec.description := l_okl_reports_tl_rec.description;
2259: END IF;
2260: IF x_okl_reports_tl_rec.created_by IS NULL OR x_okl_reports_tl_rec.created_by = OKL_API.G_MISS_NUM THEN
2261: x_okl_reports_tl_rec.created_by := l_okl_reports_tl_rec.created_by;
2262: END IF;
2263: IF x_okl_reports_tl_rec.creation_date IS NULL OR x_okl_reports_tl_rec.creation_date = OKL_API.G_MISS_DATE THEN
2264: x_okl_reports_tl_rec.creation_date := l_okl_reports_tl_rec.creation_date;
2257: IF x_okl_reports_tl_rec.description = OKL_API.G_MISS_CHAR THEN
2258: x_okl_reports_tl_rec.description := l_okl_reports_tl_rec.description;
2259: END IF;
2260: IF x_okl_reports_tl_rec.created_by IS NULL OR x_okl_reports_tl_rec.created_by = OKL_API.G_MISS_NUM THEN
2261: x_okl_reports_tl_rec.created_by := l_okl_reports_tl_rec.created_by;
2262: END IF;
2263: IF x_okl_reports_tl_rec.creation_date IS NULL OR x_okl_reports_tl_rec.creation_date = OKL_API.G_MISS_DATE THEN
2264: x_okl_reports_tl_rec.creation_date := l_okl_reports_tl_rec.creation_date;
2265: END IF;
2259: END IF;
2260: IF x_okl_reports_tl_rec.created_by IS NULL OR x_okl_reports_tl_rec.created_by = OKL_API.G_MISS_NUM THEN
2261: x_okl_reports_tl_rec.created_by := l_okl_reports_tl_rec.created_by;
2262: END IF;
2263: IF x_okl_reports_tl_rec.creation_date IS NULL OR x_okl_reports_tl_rec.creation_date = OKL_API.G_MISS_DATE THEN
2264: x_okl_reports_tl_rec.creation_date := l_okl_reports_tl_rec.creation_date;
2265: END IF;
2266: IF x_okl_reports_tl_rec.last_updated_by IS NULL OR x_okl_reports_tl_rec.last_updated_by = OKL_API.G_MISS_NUM THEN
2267: x_okl_reports_tl_rec.last_updated_by := l_okl_reports_tl_rec.last_updated_by;
2260: IF x_okl_reports_tl_rec.created_by IS NULL OR x_okl_reports_tl_rec.created_by = OKL_API.G_MISS_NUM THEN
2261: x_okl_reports_tl_rec.created_by := l_okl_reports_tl_rec.created_by;
2262: END IF;
2263: IF x_okl_reports_tl_rec.creation_date IS NULL OR x_okl_reports_tl_rec.creation_date = OKL_API.G_MISS_DATE THEN
2264: x_okl_reports_tl_rec.creation_date := l_okl_reports_tl_rec.creation_date;
2265: END IF;
2266: IF x_okl_reports_tl_rec.last_updated_by IS NULL OR x_okl_reports_tl_rec.last_updated_by = OKL_API.G_MISS_NUM THEN
2267: x_okl_reports_tl_rec.last_updated_by := l_okl_reports_tl_rec.last_updated_by;
2268: END IF;
2262: END IF;
2263: IF x_okl_reports_tl_rec.creation_date IS NULL OR x_okl_reports_tl_rec.creation_date = OKL_API.G_MISS_DATE THEN
2264: x_okl_reports_tl_rec.creation_date := l_okl_reports_tl_rec.creation_date;
2265: END IF;
2266: IF x_okl_reports_tl_rec.last_updated_by IS NULL OR x_okl_reports_tl_rec.last_updated_by = OKL_API.G_MISS_NUM THEN
2267: x_okl_reports_tl_rec.last_updated_by := l_okl_reports_tl_rec.last_updated_by;
2268: END IF;
2269: IF x_okl_reports_tl_rec.last_update_date IS NULL OR x_okl_reports_tl_rec.last_update_date = OKL_API.G_MISS_DATE THEN
2270: x_okl_reports_tl_rec.last_update_date := l_okl_reports_tl_rec.last_update_date;
2263: IF x_okl_reports_tl_rec.creation_date IS NULL OR x_okl_reports_tl_rec.creation_date = OKL_API.G_MISS_DATE THEN
2264: x_okl_reports_tl_rec.creation_date := l_okl_reports_tl_rec.creation_date;
2265: END IF;
2266: IF x_okl_reports_tl_rec.last_updated_by IS NULL OR x_okl_reports_tl_rec.last_updated_by = OKL_API.G_MISS_NUM THEN
2267: x_okl_reports_tl_rec.last_updated_by := l_okl_reports_tl_rec.last_updated_by;
2268: END IF;
2269: IF x_okl_reports_tl_rec.last_update_date IS NULL OR x_okl_reports_tl_rec.last_update_date = OKL_API.G_MISS_DATE THEN
2270: x_okl_reports_tl_rec.last_update_date := l_okl_reports_tl_rec.last_update_date;
2271: END IF;
2265: END IF;
2266: IF x_okl_reports_tl_rec.last_updated_by IS NULL OR x_okl_reports_tl_rec.last_updated_by = OKL_API.G_MISS_NUM THEN
2267: x_okl_reports_tl_rec.last_updated_by := l_okl_reports_tl_rec.last_updated_by;
2268: END IF;
2269: IF x_okl_reports_tl_rec.last_update_date IS NULL OR x_okl_reports_tl_rec.last_update_date = OKL_API.G_MISS_DATE THEN
2270: x_okl_reports_tl_rec.last_update_date := l_okl_reports_tl_rec.last_update_date;
2271: END IF;
2272: IF x_okl_reports_tl_rec.last_update_login = OKL_API.G_MISS_NUM THEN
2273: x_okl_reports_tl_rec.last_update_login := l_okl_reports_tl_rec.last_update_login;
2266: IF x_okl_reports_tl_rec.last_updated_by IS NULL OR x_okl_reports_tl_rec.last_updated_by = OKL_API.G_MISS_NUM THEN
2267: x_okl_reports_tl_rec.last_updated_by := l_okl_reports_tl_rec.last_updated_by;
2268: END IF;
2269: IF x_okl_reports_tl_rec.last_update_date IS NULL OR x_okl_reports_tl_rec.last_update_date = OKL_API.G_MISS_DATE THEN
2270: x_okl_reports_tl_rec.last_update_date := l_okl_reports_tl_rec.last_update_date;
2271: END IF;
2272: IF x_okl_reports_tl_rec.last_update_login = OKL_API.G_MISS_NUM THEN
2273: x_okl_reports_tl_rec.last_update_login := l_okl_reports_tl_rec.last_update_login;
2274: END IF;
2268: END IF;
2269: IF x_okl_reports_tl_rec.last_update_date IS NULL OR x_okl_reports_tl_rec.last_update_date = OKL_API.G_MISS_DATE THEN
2270: x_okl_reports_tl_rec.last_update_date := l_okl_reports_tl_rec.last_update_date;
2271: END IF;
2272: IF x_okl_reports_tl_rec.last_update_login = OKL_API.G_MISS_NUM THEN
2273: x_okl_reports_tl_rec.last_update_login := l_okl_reports_tl_rec.last_update_login;
2274: END IF;
2275: END IF;
2276: RETURN(l_return_status);
2269: IF x_okl_reports_tl_rec.last_update_date IS NULL OR x_okl_reports_tl_rec.last_update_date = OKL_API.G_MISS_DATE THEN
2270: x_okl_reports_tl_rec.last_update_date := l_okl_reports_tl_rec.last_update_date;
2271: END IF;
2272: IF x_okl_reports_tl_rec.last_update_login = OKL_API.G_MISS_NUM THEN
2273: x_okl_reports_tl_rec.last_update_login := l_okl_reports_tl_rec.last_update_login;
2274: END IF;
2275: END IF;
2276: RETURN(l_return_status);
2277: END populate_new_record;
2275: END IF;
2276: RETURN(l_return_status);
2277: END populate_new_record;
2278: ---------------------------------------
2279: -- Set_Attributes for:OKL_REPORTS_TL --
2280: ---------------------------------------
2281: FUNCTION Set_Attributes (
2282: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2283: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2278: ---------------------------------------
2279: -- Set_Attributes for:OKL_REPORTS_TL --
2280: ---------------------------------------
2281: FUNCTION Set_Attributes (
2282: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2283: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2284: ) RETURN VARCHAR2 IS
2285: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2286: BEGIN
2279: -- Set_Attributes for:OKL_REPORTS_TL --
2280: ---------------------------------------
2281: FUNCTION Set_Attributes (
2282: p_okl_reports_tl_rec IN okl_reports_tl_rec_type,
2283: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2284: ) RETURN VARCHAR2 IS
2285: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2286: BEGIN
2287: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2283: x_okl_reports_tl_rec OUT NOCOPY okl_reports_tl_rec_type
2284: ) RETURN VARCHAR2 IS
2285: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2286: BEGIN
2287: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2288: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
2289: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
2290: RETURN(l_return_status);
2291: END Set_Attributes;
2284: ) RETURN VARCHAR2 IS
2285: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2286: BEGIN
2287: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2288: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
2289: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
2290: RETURN(l_return_status);
2291: END Set_Attributes;
2292: BEGIN
2285: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2286: BEGIN
2287: x_okl_reports_tl_rec := p_okl_reports_tl_rec;
2288: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
2289: x_okl_reports_tl_rec.LANGUAGE := USERENV('LANG');
2290: RETURN(l_return_status);
2291: END Set_Attributes;
2292: BEGIN
2293: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
2300: RAISE OKL_API.G_EXCEPTION_ERROR;
2301: END IF;
2302: --- Setting item attributes
2303: l_return_status := Set_Attributes(
2304: p_okl_reports_tl_rec, -- IN
2305: l_okl_reports_tl_rec); -- OUT
2306: --- If any errors happen abort API
2307: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2308: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2301: END IF;
2302: --- Setting item attributes
2303: l_return_status := Set_Attributes(
2304: p_okl_reports_tl_rec, -- IN
2305: l_okl_reports_tl_rec); -- OUT
2306: --- If any errors happen abort API
2307: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2308: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2309: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2308: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2309: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2310: RAISE OKL_API.G_EXCEPTION_ERROR;
2311: END IF;
2312: l_return_status := populate_new_record(l_okl_reports_tl_rec, l_def_okl_reports_tl_rec);
2313: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2314: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2315: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2316: RAISE OKL_API.G_EXCEPTION_ERROR;
2314: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2315: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2316: RAISE OKL_API.G_EXCEPTION_ERROR;
2317: END IF;
2318: UPDATE OKL_REPORTS_TL
2319: SET NAME = l_def_okl_reports_tl_rec.name,
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2315: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2316: RAISE OKL_API.G_EXCEPTION_ERROR;
2317: END IF;
2318: UPDATE OKL_REPORTS_TL
2319: SET NAME = l_def_okl_reports_tl_rec.name,
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2316: RAISE OKL_API.G_EXCEPTION_ERROR;
2317: END IF;
2318: UPDATE OKL_REPORTS_TL
2319: SET NAME = l_def_okl_reports_tl_rec.name,
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2317: END IF;
2318: UPDATE OKL_REPORTS_TL
2319: SET NAME = l_def_okl_reports_tl_rec.name,
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2318: UPDATE OKL_REPORTS_TL
2319: SET NAME = l_def_okl_reports_tl_rec.name,
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2326: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2319: SET NAME = l_def_okl_reports_tl_rec.name,
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2326: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2327: AND SOURCE_LANG = USERENV('LANG');
2320: DESCRIPTION = l_def_okl_reports_tl_rec.description,
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2326: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2327: AND SOURCE_LANG = USERENV('LANG');
2328:
2321: CREATED_BY = l_def_okl_reports_tl_rec.created_by,
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2326: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2327: AND SOURCE_LANG = USERENV('LANG');
2328:
2329: UPDATE OKL_REPORTS_TL
2322: CREATION_DATE = l_def_okl_reports_tl_rec.creation_date,
2323: LAST_UPDATED_BY = l_def_okl_reports_tl_rec.last_updated_by,
2324: LAST_UPDATE_DATE = l_def_okl_reports_tl_rec.last_update_date,
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2326: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2327: AND SOURCE_LANG = USERENV('LANG');
2328:
2329: UPDATE OKL_REPORTS_TL
2330: SET SFWT_FLAG = 'Y'
2325: LAST_UPDATE_LOGIN = l_def_okl_reports_tl_rec.last_update_login
2326: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2327: AND SOURCE_LANG = USERENV('LANG');
2328:
2329: UPDATE OKL_REPORTS_TL
2330: SET SFWT_FLAG = 'Y'
2331: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2332: AND SOURCE_LANG <> USERENV('LANG');
2333:
2327: AND SOURCE_LANG = USERENV('LANG');
2328:
2329: UPDATE OKL_REPORTS_TL
2330: SET SFWT_FLAG = 'Y'
2331: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2332: AND SOURCE_LANG <> USERENV('LANG');
2333:
2334: x_okl_reports_tl_rec := l_okl_reports_tl_rec;
2335: x_return_status := l_return_status;
2330: SET SFWT_FLAG = 'Y'
2331: WHERE REPORT_ID = l_def_okl_reports_tl_rec.report_id
2332: AND SOURCE_LANG <> USERENV('LANG');
2333:
2334: x_okl_reports_tl_rec := l_okl_reports_tl_rec;
2335: x_return_status := l_return_status;
2336: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2337: EXCEPTION
2338: WHEN OKL_API.G_EXCEPTION_ERROR THEN
2385: l_def_repv_rec repv_rec_type;
2386: l_db_repv_rec repv_rec_type;
2387: l_rep_rec rep_rec_type;
2388: lx_rep_rec rep_rec_type;
2389: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2390: lx_okl_reports_tl_rec okl_reports_tl_rec_type;
2391: -------------------------------
2392: -- FUNCTION fill_who_columns --
2393: -------------------------------
2386: l_db_repv_rec repv_rec_type;
2387: l_rep_rec rep_rec_type;
2388: lx_rep_rec rep_rec_type;
2389: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2390: lx_okl_reports_tl_rec okl_reports_tl_rec_type;
2391: -------------------------------
2392: -- FUNCTION fill_who_columns --
2393: -------------------------------
2394: FUNCTION fill_who_columns (
2555: -----------------------------------------
2556: -- Move VIEW record to "Child" records --
2557: -----------------------------------------
2558: migrate(l_def_repv_rec, l_rep_rec);
2559: migrate(l_def_repv_rec, l_okl_reports_tl_rec);
2560: -----------------------------------------------
2561: -- Call the UPDATE_ROW for each child record --
2562: -----------------------------------------------
2563: update_row(
2578: p_init_msg_list,
2579: l_return_status,
2580: x_msg_count,
2581: x_msg_data,
2582: l_okl_reports_tl_rec,
2583: lx_okl_reports_tl_rec
2584: );
2585: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2586: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2579: l_return_status,
2580: x_msg_count,
2581: x_msg_data,
2582: l_okl_reports_tl_rec,
2583: lx_okl_reports_tl_rec
2584: );
2585: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2586: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2587: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2586: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2587: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2588: RAISE OKL_API.G_EXCEPTION_ERROR;
2589: END IF;
2590: migrate(lx_okl_reports_tl_rec, l_def_repv_rec);
2591: x_repv_rec := l_def_repv_rec;
2592: x_return_status := l_return_status;
2593: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2594: EXCEPTION
2851: '_PVT'
2852: );
2853: END delete_row;
2854: -----------------------------------
2855: -- delete_row for:OKL_REPORTS_TL --
2856: -----------------------------------
2857: PROCEDURE delete_row(
2858: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
2859: x_return_status OUT NOCOPY VARCHAR2,
2858: p_init_msg_list IN VARCHAR2 DEFAULT OKL_API.G_FALSE,
2859: x_return_status OUT NOCOPY VARCHAR2,
2860: x_msg_count OUT NOCOPY NUMBER,
2861: x_msg_data OUT NOCOPY VARCHAR2,
2862: p_okl_reports_tl_rec IN okl_reports_tl_rec_type) IS
2863:
2864: l_api_version CONSTANT NUMBER := 1;
2865: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
2866: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2863:
2864: l_api_version CONSTANT NUMBER := 1;
2865: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
2866: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2867: l_okl_reports_tl_rec okl_reports_tl_rec_type := p_okl_reports_tl_rec;
2868: l_row_notfound BOOLEAN := TRUE;
2869: BEGIN
2870: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
2871: p_init_msg_list,
2876: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
2877: RAISE OKL_API.G_EXCEPTION_ERROR;
2878: END IF;
2879:
2880: DELETE FROM OKL_REPORTS_TL
2881: WHERE REPORT_ID = p_okl_reports_tl_rec.report_id;
2882:
2883: x_return_status := l_return_status;
2884: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2877: RAISE OKL_API.G_EXCEPTION_ERROR;
2878: END IF;
2879:
2880: DELETE FROM OKL_REPORTS_TL
2881: WHERE REPORT_ID = p_okl_reports_tl_rec.report_id;
2882:
2883: x_return_status := l_return_status;
2884: OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
2885: EXCEPTION
2928: l_api_version CONSTANT NUMBER := 1;
2929: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
2930: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
2931: l_repv_rec repv_rec_type := p_repv_rec;
2932: l_okl_reports_tl_rec okl_reports_tl_rec_type;
2933: l_rep_rec rep_rec_type;
2934: BEGIN
2935: l_return_status := OKL_API.START_ACTIVITY(l_api_name,
2936: G_PKG_NAME,
2946: END IF;
2947: -----------------------------------------
2948: -- Move VIEW record to "Child" records --
2949: -----------------------------------------
2950: migrate(l_repv_rec, l_okl_reports_tl_rec);
2951: migrate(l_repv_rec, l_rep_rec);
2952: -----------------------------------------------
2953: -- Call the DELETE_ROW for each child record --
2954: -----------------------------------------------
2956: p_init_msg_list,
2957: l_return_status,
2958: x_msg_count,
2959: x_msg_data,
2960: l_okl_reports_tl_rec
2961: );
2962: IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
2963: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
2964: ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN