377: -- PROCEDURE add_language
378: ---------------------------------------------------------------------------
379: PROCEDURE add_language IS
380: BEGIN
381: DELETE FROM OKL_QUESTION_TYPES_TL T
382: WHERE NOT EXISTS (
383: SELECT NULL
384: FROM OKL_QUESTION_TYPES_B B --fixed bug 3321017 by kmotepal
385: WHERE B.ID = T.ID
384: FROM OKL_QUESTION_TYPES_B B --fixed bug 3321017 by kmotepal
385: WHERE B.ID = T.ID
386: );
387:
388: UPDATE OKL_QUESTION_TYPES_TL T SET (
389: NAME,
390: DESCRIPTION) = (SELECT
391: B.NAME,
392: B.DESCRIPTION
389: NAME,
390: DESCRIPTION) = (SELECT
391: B.NAME,
392: B.DESCRIPTION
393: FROM OKL_QUESTION_TYPES_TL B
394: WHERE B.ID = T.ID
395: AND B.LANGUAGE = T.SOURCE_LANG)
396: WHERE (
397: T.ID,
398: T.LANGUAGE)
399: IN (SELECT
400: SUBT.ID,
401: SUBT.LANGUAGE
402: FROM OKL_QUESTION_TYPES_TL SUBB, OKL_QUESTION_TYPES_TL SUBT
403: WHERE SUBB.ID = SUBT.ID
404: AND SUBB.LANGUAGE = SUBT.SOURCE_LANG
405: AND (SUBB.NAME <> SUBT.NAME
406: OR SUBB.DESCRIPTION <> SUBT.DESCRIPTION
407: OR (SUBB.DESCRIPTION IS NULL AND SUBT.DESCRIPTION IS NOT NULL)
408: OR (SUBB.DESCRIPTION IS NOT NULL AND SUBT.DESCRIPTION IS NULL)
409: ));
410:
411: INSERT INTO OKL_QUESTION_TYPES_TL (
412: ID,
413: LANGUAGE,
414: SOURCE_LANG,
415: SFWT_FLAG,
431: B.CREATION_DATE,
432: B.LAST_UPDATED_BY,
433: B.LAST_UPDATE_DATE,
434: B.LAST_UPDATE_LOGIN
435: FROM OKL_QUESTION_TYPES_TL B, FND_LANGUAGES L
436: WHERE L.INSTALLED_FLAG IN ('I', 'B')
437: AND B.LANGUAGE = USERENV('LANG')
438: AND NOT EXISTS(
439: SELECT NULL
436: WHERE L.INSTALLED_FLAG IN ('I', 'B')
437: AND B.LANGUAGE = USERENV('LANG')
438: AND NOT EXISTS(
439: SELECT NULL
440: FROM OKL_QUESTION_TYPES_TL T
441: WHERE T.ID = B.ID
442: AND T.LANGUAGE = L.LANGUAGE_CODE
443: );
444:
530: BEGIN
531: RETURN(get_rec(p_qty_rec, l_row_notfound));
532: END get_rec;
533: ---------------------------------------------------------------------------
534: -- FUNCTION get_rec for: OKL_QUESTION_TYPES_TL
535: ---------------------------------------------------------------------------
536: FUNCTION get_rec (
537: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
538: x_no_data_found OUT NOCOPY BOOLEAN
533: ---------------------------------------------------------------------------
534: -- FUNCTION get_rec for: OKL_QUESTION_TYPES_TL
535: ---------------------------------------------------------------------------
536: FUNCTION get_rec (
537: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
538: x_no_data_found OUT NOCOPY BOOLEAN
539: ) RETURN okl_question_types_tl_rec_type IS
540: CURSOR okl_question_types_tl_pk_csr (p_id IN NUMBER,
541: p_language IN VARCHAR2) IS
535: ---------------------------------------------------------------------------
536: FUNCTION get_rec (
537: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
538: x_no_data_found OUT NOCOPY BOOLEAN
539: ) RETURN okl_question_types_tl_rec_type IS
540: CURSOR okl_question_types_tl_pk_csr (p_id IN NUMBER,
541: p_language IN VARCHAR2) IS
542: SELECT
543: ID,
536: FUNCTION get_rec (
537: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
538: x_no_data_found OUT NOCOPY BOOLEAN
539: ) RETURN okl_question_types_tl_rec_type IS
540: CURSOR okl_question_types_tl_pk_csr (p_id IN NUMBER,
541: p_language IN VARCHAR2) IS
542: SELECT
543: ID,
544: LANGUAGE,
550: CREATION_DATE,
551: LAST_UPDATED_BY,
552: LAST_UPDATE_DATE,
553: LAST_UPDATE_LOGIN
554: FROM Okl_Question_Types_Tl
555: WHERE okl_question_types_tl.id = p_id
556: AND okl_question_types_tl.LANGUAGE = p_language;
557: l_okl_question_types_tl_pk okl_question_types_tl_pk_csr%ROWTYPE;
558: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
551: LAST_UPDATED_BY,
552: LAST_UPDATE_DATE,
553: LAST_UPDATE_LOGIN
554: FROM Okl_Question_Types_Tl
555: WHERE okl_question_types_tl.id = p_id
556: AND okl_question_types_tl.LANGUAGE = p_language;
557: l_okl_question_types_tl_pk okl_question_types_tl_pk_csr%ROWTYPE;
558: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
559: BEGIN
552: LAST_UPDATE_DATE,
553: LAST_UPDATE_LOGIN
554: FROM Okl_Question_Types_Tl
555: WHERE okl_question_types_tl.id = p_id
556: AND okl_question_types_tl.LANGUAGE = p_language;
557: l_okl_question_types_tl_pk okl_question_types_tl_pk_csr%ROWTYPE;
558: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
559: BEGIN
560: x_no_data_found := TRUE;
553: LAST_UPDATE_LOGIN
554: FROM Okl_Question_Types_Tl
555: WHERE okl_question_types_tl.id = p_id
556: AND okl_question_types_tl.LANGUAGE = p_language;
557: l_okl_question_types_tl_pk okl_question_types_tl_pk_csr%ROWTYPE;
558: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
559: BEGIN
560: x_no_data_found := TRUE;
561: -- Get current database values
554: FROM Okl_Question_Types_Tl
555: WHERE okl_question_types_tl.id = p_id
556: AND okl_question_types_tl.LANGUAGE = p_language;
557: l_okl_question_types_tl_pk okl_question_types_tl_pk_csr%ROWTYPE;
558: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
559: BEGIN
560: x_no_data_found := TRUE;
561: -- Get current database values
562: OPEN okl_question_types_tl_pk_csr (p_okl_question_types_tl_rec.id,
558: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
559: BEGIN
560: x_no_data_found := TRUE;
561: -- Get current database values
562: OPEN okl_question_types_tl_pk_csr (p_okl_question_types_tl_rec.id,
563: p_okl_question_types_tl_rec.LANGUAGE);
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
559: BEGIN
560: x_no_data_found := TRUE;
561: -- Get current database values
562: OPEN okl_question_types_tl_pk_csr (p_okl_question_types_tl_rec.id,
563: p_okl_question_types_tl_rec.LANGUAGE);
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
560: x_no_data_found := TRUE;
561: -- Get current database values
562: OPEN okl_question_types_tl_pk_csr (p_okl_question_types_tl_rec.id,
563: p_okl_question_types_tl_rec.LANGUAGE);
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
561: -- Get current database values
562: OPEN okl_question_types_tl_pk_csr (p_okl_question_types_tl_rec.id,
563: p_okl_question_types_tl_rec.LANGUAGE);
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
562: OPEN okl_question_types_tl_pk_csr (p_okl_question_types_tl_rec.id,
563: p_okl_question_types_tl_rec.LANGUAGE);
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
563: p_okl_question_types_tl_rec.LANGUAGE);
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
564: FETCH okl_question_types_tl_pk_csr INTO
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
565: l_okl_question_types_tl_rec.ID,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
566: l_okl_question_types_tl_rec.LANGUAGE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
567: l_okl_question_types_tl_rec.SOURCE_LANG,
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
568: l_okl_question_types_tl_rec.SFWT_FLAG,
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
569: l_okl_question_types_tl_rec.NAME,
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
577: CLOSE okl_question_types_tl_pk_csr;
570: l_okl_question_types_tl_rec.DESCRIPTION,
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
577: CLOSE okl_question_types_tl_pk_csr;
578: RETURN(l_okl_question_types_tl_rec);
571: l_okl_question_types_tl_rec.CREATED_BY,
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
577: CLOSE okl_question_types_tl_pk_csr;
578: RETURN(l_okl_question_types_tl_rec);
579: END get_rec;
572: l_okl_question_types_tl_rec.CREATION_DATE,
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
577: CLOSE okl_question_types_tl_pk_csr;
578: RETURN(l_okl_question_types_tl_rec);
579: END get_rec;
580:
573: l_okl_question_types_tl_rec.LAST_UPDATED_BY,
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
577: CLOSE okl_question_types_tl_pk_csr;
578: RETURN(l_okl_question_types_tl_rec);
579: END get_rec;
580:
581: FUNCTION get_rec (
574: l_okl_question_types_tl_rec.LAST_UPDATE_DATE,
575: l_okl_question_types_tl_rec.LAST_UPDATE_LOGIN;
576: x_no_data_found := okl_question_types_tl_pk_csr%NOTFOUND;
577: CLOSE okl_question_types_tl_pk_csr;
578: RETURN(l_okl_question_types_tl_rec);
579: END get_rec;
580:
581: FUNCTION get_rec (
582: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type
578: RETURN(l_okl_question_types_tl_rec);
579: END get_rec;
580:
581: FUNCTION get_rec (
582: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type
583: ) RETURN okl_question_types_tl_rec_type IS
584: l_row_notfound BOOLEAN := TRUE;
585: BEGIN
586: RETURN(get_rec(p_okl_question_types_tl_rec, l_row_notfound));
579: END get_rec;
580:
581: FUNCTION get_rec (
582: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type
583: ) RETURN okl_question_types_tl_rec_type IS
584: l_row_notfound BOOLEAN := TRUE;
585: BEGIN
586: RETURN(get_rec(p_okl_question_types_tl_rec, l_row_notfound));
587: END get_rec;
582: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type
583: ) RETURN okl_question_types_tl_rec_type IS
584: l_row_notfound BOOLEAN := TRUE;
585: BEGIN
586: RETURN(get_rec(p_okl_question_types_tl_rec, l_row_notfound));
587: END get_rec;
588: ---------------------------------------------------------------------------
589: -- FUNCTION get_rec for: OKL_QUESTION_TYPES_V
590: ---------------------------------------------------------------------------
994: p_to.last_update_login := p_from.last_update_login;
995: END migrate;
996: PROCEDURE migrate (
997: p_from IN qtyv_rec_type,
998: p_to OUT NOCOPY okl_question_types_tl_rec_type
999: ) IS
1000: BEGIN
1001: p_to.id := p_from.id;
1002: p_to.sfwt_flag := p_from.sfwt_flag;
1008: p_to.last_update_date := p_from.last_update_date;
1009: p_to.last_update_login := p_from.last_update_login;
1010: END migrate;
1011: PROCEDURE migrate (
1012: p_from IN okl_question_types_tl_rec_type,
1013: p_to OUT NOCOPY qtyv_rec_type
1014: ) IS
1015: BEGIN
1016: p_to.id := p_from.id;
1042: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
1043: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1044: l_qtyv_rec qtyv_rec_type := p_qtyv_rec;
1045: l_qty_rec qty_rec_type;
1046: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
1047: BEGIN
1048: l_return_status := okl_api.START_ACTIVITY(l_api_name,
1049: G_PKG_NAME,
1050: p_init_msg_list,
1313: '_PVT'
1314: );
1315: END insert_row;
1316: ------------------------------------------
1317: -- insert_row for:OKL_QUESTION_TYPES_TL --
1318: ------------------------------------------
1319: PROCEDURE insert_row(
1320: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
1321: x_return_status OUT NOCOPY VARCHAR2,
1320: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
1321: x_return_status OUT NOCOPY VARCHAR2,
1322: x_msg_count OUT NOCOPY NUMBER,
1323: x_msg_data OUT NOCOPY VARCHAR2,
1324: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
1325: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type) IS
1326:
1327: l_api_version CONSTANT NUMBER := 1;
1328: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1321: x_return_status OUT NOCOPY VARCHAR2,
1322: x_msg_count OUT NOCOPY NUMBER,
1323: x_msg_data OUT NOCOPY VARCHAR2,
1324: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
1325: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type) IS
1326:
1327: l_api_version CONSTANT NUMBER := 1;
1328: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1329: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1326:
1327: l_api_version CONSTANT NUMBER := 1;
1328: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1329: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1330: l_okl_question_types_tl_rec okl_question_types_tl_rec_type := p_okl_question_types_tl_rec;
1331: ldefoklquestiontypestlrec okl_question_types_tl_rec_type;
1332: CURSOR get_languages IS
1333: SELECT *
1334: FROM FND_LANGUAGES
1327: l_api_version CONSTANT NUMBER := 1;
1328: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1329: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1330: l_okl_question_types_tl_rec okl_question_types_tl_rec_type := p_okl_question_types_tl_rec;
1331: ldefoklquestiontypestlrec okl_question_types_tl_rec_type;
1332: CURSOR get_languages IS
1333: SELECT *
1334: FROM FND_LANGUAGES
1335: WHERE INSTALLED_FLAG IN ('I', 'B');
1333: SELECT *
1334: FROM FND_LANGUAGES
1335: WHERE INSTALLED_FLAG IN ('I', 'B');
1336: ----------------------------------------------
1337: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
1338: ----------------------------------------------
1339: FUNCTION Set_Attributes (
1340: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
1341: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
1336: ----------------------------------------------
1337: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
1338: ----------------------------------------------
1339: FUNCTION Set_Attributes (
1340: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
1341: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
1342: ) RETURN VARCHAR2 IS
1343: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1344: BEGIN
1337: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
1338: ----------------------------------------------
1339: FUNCTION Set_Attributes (
1340: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
1341: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
1342: ) RETURN VARCHAR2 IS
1343: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1344: BEGIN
1345: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
1341: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
1342: ) RETURN VARCHAR2 IS
1343: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1344: BEGIN
1345: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
1346: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
1347: x_okl_question_types_tl_rec.SOURCE_LANG := USERENV('LANG');
1348: RETURN(l_return_status);
1349: END Set_Attributes;
1342: ) RETURN VARCHAR2 IS
1343: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1344: BEGIN
1345: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
1346: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
1347: x_okl_question_types_tl_rec.SOURCE_LANG := USERENV('LANG');
1348: RETURN(l_return_status);
1349: END Set_Attributes;
1350: BEGIN
1343: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1344: BEGIN
1345: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
1346: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
1347: x_okl_question_types_tl_rec.SOURCE_LANG := USERENV('LANG');
1348: RETURN(l_return_status);
1349: END Set_Attributes;
1350: BEGIN
1351: l_return_status := okl_api.START_ACTIVITY(l_api_name,
1358: RAISE okl_api.G_EXCEPTION_ERROR;
1359: END IF;
1360: --- Setting item attributes
1361: l_return_status := Set_Attributes(
1362: p_okl_question_types_tl_rec, -- IN
1363: l_okl_question_types_tl_rec); -- OUT
1364: --- If any errors happen abort API
1365: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1366: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1359: END IF;
1360: --- Setting item attributes
1361: l_return_status := Set_Attributes(
1362: p_okl_question_types_tl_rec, -- IN
1363: l_okl_question_types_tl_rec); -- OUT
1364: --- If any errors happen abort API
1365: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1366: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1367: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1367: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1368: RAISE okl_api.G_EXCEPTION_ERROR;
1369: END IF;
1370: FOR l_lang_rec IN get_languages LOOP
1371: l_okl_question_types_tl_rec.LANGUAGE := l_lang_rec.language_code;
1372: INSERT INTO OKL_QUESTION_TYPES_TL(
1373: id,
1374: LANGUAGE,
1375: source_lang,
1368: RAISE okl_api.G_EXCEPTION_ERROR;
1369: END IF;
1370: FOR l_lang_rec IN get_languages LOOP
1371: l_okl_question_types_tl_rec.LANGUAGE := l_lang_rec.language_code;
1372: INSERT INTO OKL_QUESTION_TYPES_TL(
1373: id,
1374: LANGUAGE,
1375: source_lang,
1376: sfwt_flag,
1381: last_updated_by,
1382: last_update_date,
1383: last_update_login)
1384: VALUES (
1385: l_okl_question_types_tl_rec.id,
1386: l_okl_question_types_tl_rec.LANGUAGE,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1382: last_update_date,
1383: last_update_login)
1384: VALUES (
1385: l_okl_question_types_tl_rec.id,
1386: l_okl_question_types_tl_rec.LANGUAGE,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1383: last_update_login)
1384: VALUES (
1385: l_okl_question_types_tl_rec.id,
1386: l_okl_question_types_tl_rec.LANGUAGE,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1384: VALUES (
1385: l_okl_question_types_tl_rec.id,
1386: l_okl_question_types_tl_rec.LANGUAGE,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1385: l_okl_question_types_tl_rec.id,
1386: l_okl_question_types_tl_rec.LANGUAGE,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1386: l_okl_question_types_tl_rec.LANGUAGE,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1394: l_okl_question_types_tl_rec.last_update_date,
1387: l_okl_question_types_tl_rec.source_lang,
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1394: l_okl_question_types_tl_rec.last_update_date,
1395: l_okl_question_types_tl_rec.last_update_login);
1388: l_okl_question_types_tl_rec.sfwt_flag,
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1394: l_okl_question_types_tl_rec.last_update_date,
1395: l_okl_question_types_tl_rec.last_update_login);
1396: END LOOP;
1389: l_okl_question_types_tl_rec.name,
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1394: l_okl_question_types_tl_rec.last_update_date,
1395: l_okl_question_types_tl_rec.last_update_login);
1396: END LOOP;
1397: -- Set OUT values
1390: l_okl_question_types_tl_rec.description,
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1394: l_okl_question_types_tl_rec.last_update_date,
1395: l_okl_question_types_tl_rec.last_update_login);
1396: END LOOP;
1397: -- Set OUT values
1398: x_okl_question_types_tl_rec := l_okl_question_types_tl_rec;
1391: l_okl_question_types_tl_rec.created_by,
1392: l_okl_question_types_tl_rec.creation_date,
1393: l_okl_question_types_tl_rec.last_updated_by,
1394: l_okl_question_types_tl_rec.last_update_date,
1395: l_okl_question_types_tl_rec.last_update_login);
1396: END LOOP;
1397: -- Set OUT values
1398: x_okl_question_types_tl_rec := l_okl_question_types_tl_rec;
1399: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1394: l_okl_question_types_tl_rec.last_update_date,
1395: l_okl_question_types_tl_rec.last_update_login);
1396: END LOOP;
1397: -- Set OUT values
1398: x_okl_question_types_tl_rec := l_okl_question_types_tl_rec;
1399: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1400: EXCEPTION
1401: WHEN okl_api.G_EXCEPTION_ERROR THEN
1402: x_return_status := okl_api.HANDLE_EXCEPTIONS
1447: l_qtyv_rec qtyv_rec_type;
1448: l_def_qtyv_rec qtyv_rec_type;
1449: l_qty_rec qty_rec_type;
1450: lx_qty_rec qty_rec_type;
1451: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
1452: lx_okl_question_types_tl_rec okl_question_types_tl_rec_type;
1453: -------------------------------
1454: -- FUNCTION fill_who_columns --
1455: -------------------------------
1448: l_def_qtyv_rec qtyv_rec_type;
1449: l_qty_rec qty_rec_type;
1450: lx_qty_rec qty_rec_type;
1451: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
1452: lx_okl_question_types_tl_rec okl_question_types_tl_rec_type;
1453: -------------------------------
1454: -- FUNCTION fill_who_columns --
1455: -------------------------------
1456: FUNCTION fill_who_columns (
1523: --------------------------------------
1524: -- Move VIEW record to "Child" records
1525: --------------------------------------
1526: migrate(l_def_qtyv_rec, l_qty_rec);
1527: migrate(l_def_qtyv_rec, l_okl_question_types_tl_rec);
1528: --------------------------------------------
1529: -- Call the INSERT_ROW for each child record
1530: --------------------------------------------
1531: insert_row(
1546: p_init_msg_list,
1547: x_return_status,
1548: x_msg_count,
1549: x_msg_data,
1550: l_okl_question_types_tl_rec,
1551: lx_okl_question_types_tl_rec
1552: );
1553: IF (x_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1554: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1547: x_return_status,
1548: x_msg_count,
1549: x_msg_data,
1550: l_okl_question_types_tl_rec,
1551: lx_okl_question_types_tl_rec
1552: );
1553: IF (x_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1554: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1555: ELSIF (x_return_status = okl_api.G_RET_STS_ERROR) THEN
1554: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1555: ELSIF (x_return_status = okl_api.G_RET_STS_ERROR) THEN
1556: RAISE okl_api.G_EXCEPTION_ERROR;
1557: END IF;
1558: migrate(lx_okl_question_types_tl_rec, l_def_qtyv_rec);
1559: -- Set OUT values
1560: x_qtyv_rec := l_def_qtyv_rec;
1561: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
1562: EXCEPTION
1767: '_PVT'
1768: );
1769: END lock_row;
1770: ----------------------------------------
1771: -- lock_row for:OKL_QUESTION_TYPES_TL --
1772: ----------------------------------------
1773: PROCEDURE lock_row(
1774: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
1775: x_return_status OUT NOCOPY VARCHAR2,
1774: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
1775: x_return_status OUT NOCOPY VARCHAR2,
1776: x_msg_count OUT NOCOPY NUMBER,
1777: x_msg_data OUT NOCOPY VARCHAR2,
1778: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
1779:
1780: E_Resource_Busy EXCEPTION;
1781: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1782: CURSOR lock_csr (p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
1778: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
1779:
1780: E_Resource_Busy EXCEPTION;
1781: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1782: CURSOR lock_csr (p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
1783: SELECT *
1784: FROM OKL_QUESTION_TYPES_TL
1785: WHERE ID = p_okl_question_types_tl_rec.id
1786: FOR UPDATE NOWAIT;
1780: E_Resource_Busy EXCEPTION;
1781: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1782: CURSOR lock_csr (p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
1783: SELECT *
1784: FROM OKL_QUESTION_TYPES_TL
1785: WHERE ID = p_okl_question_types_tl_rec.id
1786: FOR UPDATE NOWAIT;
1787:
1788: l_api_version CONSTANT NUMBER := 1;
1781: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1782: CURSOR lock_csr (p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
1783: SELECT *
1784: FROM OKL_QUESTION_TYPES_TL
1785: WHERE ID = p_okl_question_types_tl_rec.id
1786: FOR UPDATE NOWAIT;
1787:
1788: l_api_version CONSTANT NUMBER := 1;
1789: l_api_name CONSTANT VARCHAR2(30) := 'TL_lock_row';
1801: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
1802: RAISE okl_api.G_EXCEPTION_ERROR;
1803: END IF;
1804: BEGIN
1805: OPEN lock_csr(p_okl_question_types_tl_rec);
1806: FETCH lock_csr INTO l_lock_var;
1807: l_row_notfound := lock_csr%NOTFOUND;
1808: CLOSE lock_csr;
1809: EXCEPTION
1866: l_api_version CONSTANT NUMBER := 1;
1867: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
1868: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
1869: l_qty_rec qty_rec_type;
1870: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
1871: BEGIN
1872: l_return_status := okl_api.START_ACTIVITY(l_api_name,
1873: G_PKG_NAME,
1874: p_init_msg_list,
1884: --------------------------------------
1885: -- Move VIEW record to "Child" records
1886: --------------------------------------
1887: migrate(p_qtyv_rec, l_qty_rec);
1888: migrate(p_qtyv_rec, l_okl_question_types_tl_rec);
1889: --------------------------------------------
1890: -- Call the LOCK_ROW for each child record
1891: --------------------------------------------
1892: lock_row(
1905: p_init_msg_list,
1906: x_return_status,
1907: x_msg_count,
1908: x_msg_data,
1909: l_okl_question_types_tl_rec
1910: );
1911: IF (x_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
1912: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
1913: ELSIF (x_return_status = okl_api.G_RET_STS_ERROR) THEN
2264: '_PVT'
2265: );
2266: END update_row;
2267: ------------------------------------------
2268: -- update_row for:OKL_QUESTION_TYPES_TL --
2269: ------------------------------------------
2270: PROCEDURE update_row(
2271: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
2272: x_return_status OUT NOCOPY VARCHAR2,
2271: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
2272: x_return_status OUT NOCOPY VARCHAR2,
2273: x_msg_count OUT NOCOPY NUMBER,
2274: x_msg_data OUT NOCOPY VARCHAR2,
2275: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2276: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type) IS
2277:
2278: l_api_version CONSTANT NUMBER := 1;
2279: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2272: x_return_status OUT NOCOPY VARCHAR2,
2273: x_msg_count OUT NOCOPY NUMBER,
2274: x_msg_data OUT NOCOPY VARCHAR2,
2275: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2276: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type) IS
2277:
2278: l_api_version CONSTANT NUMBER := 1;
2279: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2280: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2277:
2278: l_api_version CONSTANT NUMBER := 1;
2279: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2280: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2281: l_okl_question_types_tl_rec okl_question_types_tl_rec_type := p_okl_question_types_tl_rec;
2282: ldefoklquestiontypestlrec okl_question_types_tl_rec_type;
2283: l_row_notfound BOOLEAN := TRUE;
2284: ----------------------------------
2285: -- FUNCTION populate_new_record --
2278: l_api_version CONSTANT NUMBER := 1;
2279: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2280: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2281: l_okl_question_types_tl_rec okl_question_types_tl_rec_type := p_okl_question_types_tl_rec;
2282: ldefoklquestiontypestlrec okl_question_types_tl_rec_type;
2283: l_row_notfound BOOLEAN := TRUE;
2284: ----------------------------------
2285: -- FUNCTION populate_new_record --
2286: ----------------------------------
2284: ----------------------------------
2285: -- FUNCTION populate_new_record --
2286: ----------------------------------
2287: FUNCTION populate_new_record (
2288: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2289: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2290: ) RETURN VARCHAR2 IS
2291: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2292: l_row_notfound BOOLEAN := TRUE;
2285: -- FUNCTION populate_new_record --
2286: ----------------------------------
2287: FUNCTION populate_new_record (
2288: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2289: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2290: ) RETURN VARCHAR2 IS
2291: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2292: l_row_notfound BOOLEAN := TRUE;
2293: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2287: FUNCTION populate_new_record (
2288: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2289: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2290: ) RETURN VARCHAR2 IS
2291: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2292: l_row_notfound BOOLEAN := TRUE;
2293: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2294: BEGIN
2295: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2291: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2292: l_row_notfound BOOLEAN := TRUE;
2293: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2294: BEGIN
2295: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2296: -- Get current database values
2297: l_okl_question_types_tl_rec := get_rec(p_okl_question_types_tl_rec, l_row_notfound);
2298: IF (l_row_notfound) THEN
2299: l_return_status := okl_api.G_RET_STS_UNEXP_ERROR;
2293: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2294: BEGIN
2295: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2296: -- Get current database values
2297: l_okl_question_types_tl_rec := get_rec(p_okl_question_types_tl_rec, l_row_notfound);
2298: IF (l_row_notfound) THEN
2299: l_return_status := okl_api.G_RET_STS_UNEXP_ERROR;
2300: END IF;
2301: IF (x_okl_question_types_tl_rec.id = okl_api.G_MISS_NUM)
2297: l_okl_question_types_tl_rec := get_rec(p_okl_question_types_tl_rec, l_row_notfound);
2298: IF (l_row_notfound) THEN
2299: l_return_status := okl_api.G_RET_STS_UNEXP_ERROR;
2300: END IF;
2301: IF (x_okl_question_types_tl_rec.id = okl_api.G_MISS_NUM)
2302: THEN
2303: x_okl_question_types_tl_rec.id := l_okl_question_types_tl_rec.id;
2304: END IF;
2305: IF (x_okl_question_types_tl_rec.LANGUAGE = okl_api.G_MISS_CHAR)
2299: l_return_status := okl_api.G_RET_STS_UNEXP_ERROR;
2300: END IF;
2301: IF (x_okl_question_types_tl_rec.id = okl_api.G_MISS_NUM)
2302: THEN
2303: x_okl_question_types_tl_rec.id := l_okl_question_types_tl_rec.id;
2304: END IF;
2305: IF (x_okl_question_types_tl_rec.LANGUAGE = okl_api.G_MISS_CHAR)
2306: THEN
2307: x_okl_question_types_tl_rec.LANGUAGE := l_okl_question_types_tl_rec.LANGUAGE;
2301: IF (x_okl_question_types_tl_rec.id = okl_api.G_MISS_NUM)
2302: THEN
2303: x_okl_question_types_tl_rec.id := l_okl_question_types_tl_rec.id;
2304: END IF;
2305: IF (x_okl_question_types_tl_rec.LANGUAGE = okl_api.G_MISS_CHAR)
2306: THEN
2307: x_okl_question_types_tl_rec.LANGUAGE := l_okl_question_types_tl_rec.LANGUAGE;
2308: END IF;
2309: IF (x_okl_question_types_tl_rec.source_lang = okl_api.G_MISS_CHAR)
2303: x_okl_question_types_tl_rec.id := l_okl_question_types_tl_rec.id;
2304: END IF;
2305: IF (x_okl_question_types_tl_rec.LANGUAGE = okl_api.G_MISS_CHAR)
2306: THEN
2307: x_okl_question_types_tl_rec.LANGUAGE := l_okl_question_types_tl_rec.LANGUAGE;
2308: END IF;
2309: IF (x_okl_question_types_tl_rec.source_lang = okl_api.G_MISS_CHAR)
2310: THEN
2311: x_okl_question_types_tl_rec.source_lang := l_okl_question_types_tl_rec.source_lang;
2305: IF (x_okl_question_types_tl_rec.LANGUAGE = okl_api.G_MISS_CHAR)
2306: THEN
2307: x_okl_question_types_tl_rec.LANGUAGE := l_okl_question_types_tl_rec.LANGUAGE;
2308: END IF;
2309: IF (x_okl_question_types_tl_rec.source_lang = okl_api.G_MISS_CHAR)
2310: THEN
2311: x_okl_question_types_tl_rec.source_lang := l_okl_question_types_tl_rec.source_lang;
2312: END IF;
2313: IF (x_okl_question_types_tl_rec.sfwt_flag = okl_api.G_MISS_CHAR)
2307: x_okl_question_types_tl_rec.LANGUAGE := l_okl_question_types_tl_rec.LANGUAGE;
2308: END IF;
2309: IF (x_okl_question_types_tl_rec.source_lang = okl_api.G_MISS_CHAR)
2310: THEN
2311: x_okl_question_types_tl_rec.source_lang := l_okl_question_types_tl_rec.source_lang;
2312: END IF;
2313: IF (x_okl_question_types_tl_rec.sfwt_flag = okl_api.G_MISS_CHAR)
2314: THEN
2315: x_okl_question_types_tl_rec.sfwt_flag := l_okl_question_types_tl_rec.sfwt_flag;
2309: IF (x_okl_question_types_tl_rec.source_lang = okl_api.G_MISS_CHAR)
2310: THEN
2311: x_okl_question_types_tl_rec.source_lang := l_okl_question_types_tl_rec.source_lang;
2312: END IF;
2313: IF (x_okl_question_types_tl_rec.sfwt_flag = okl_api.G_MISS_CHAR)
2314: THEN
2315: x_okl_question_types_tl_rec.sfwt_flag := l_okl_question_types_tl_rec.sfwt_flag;
2316: END IF;
2317: IF (x_okl_question_types_tl_rec.name = okl_api.G_MISS_CHAR)
2311: x_okl_question_types_tl_rec.source_lang := l_okl_question_types_tl_rec.source_lang;
2312: END IF;
2313: IF (x_okl_question_types_tl_rec.sfwt_flag = okl_api.G_MISS_CHAR)
2314: THEN
2315: x_okl_question_types_tl_rec.sfwt_flag := l_okl_question_types_tl_rec.sfwt_flag;
2316: END IF;
2317: IF (x_okl_question_types_tl_rec.name = okl_api.G_MISS_CHAR)
2318: THEN
2319: x_okl_question_types_tl_rec.name := l_okl_question_types_tl_rec.name;
2313: IF (x_okl_question_types_tl_rec.sfwt_flag = okl_api.G_MISS_CHAR)
2314: THEN
2315: x_okl_question_types_tl_rec.sfwt_flag := l_okl_question_types_tl_rec.sfwt_flag;
2316: END IF;
2317: IF (x_okl_question_types_tl_rec.name = okl_api.G_MISS_CHAR)
2318: THEN
2319: x_okl_question_types_tl_rec.name := l_okl_question_types_tl_rec.name;
2320: END IF;
2321: IF (x_okl_question_types_tl_rec.description = okl_api.G_MISS_CHAR)
2315: x_okl_question_types_tl_rec.sfwt_flag := l_okl_question_types_tl_rec.sfwt_flag;
2316: END IF;
2317: IF (x_okl_question_types_tl_rec.name = okl_api.G_MISS_CHAR)
2318: THEN
2319: x_okl_question_types_tl_rec.name := l_okl_question_types_tl_rec.name;
2320: END IF;
2321: IF (x_okl_question_types_tl_rec.description = okl_api.G_MISS_CHAR)
2322: THEN
2323: x_okl_question_types_tl_rec.description := l_okl_question_types_tl_rec.description;
2317: IF (x_okl_question_types_tl_rec.name = okl_api.G_MISS_CHAR)
2318: THEN
2319: x_okl_question_types_tl_rec.name := l_okl_question_types_tl_rec.name;
2320: END IF;
2321: IF (x_okl_question_types_tl_rec.description = okl_api.G_MISS_CHAR)
2322: THEN
2323: x_okl_question_types_tl_rec.description := l_okl_question_types_tl_rec.description;
2324: END IF;
2325: IF (x_okl_question_types_tl_rec.created_by = okl_api.G_MISS_NUM)
2319: x_okl_question_types_tl_rec.name := l_okl_question_types_tl_rec.name;
2320: END IF;
2321: IF (x_okl_question_types_tl_rec.description = okl_api.G_MISS_CHAR)
2322: THEN
2323: x_okl_question_types_tl_rec.description := l_okl_question_types_tl_rec.description;
2324: END IF;
2325: IF (x_okl_question_types_tl_rec.created_by = okl_api.G_MISS_NUM)
2326: THEN
2327: x_okl_question_types_tl_rec.created_by := l_okl_question_types_tl_rec.created_by;
2321: IF (x_okl_question_types_tl_rec.description = okl_api.G_MISS_CHAR)
2322: THEN
2323: x_okl_question_types_tl_rec.description := l_okl_question_types_tl_rec.description;
2324: END IF;
2325: IF (x_okl_question_types_tl_rec.created_by = okl_api.G_MISS_NUM)
2326: THEN
2327: x_okl_question_types_tl_rec.created_by := l_okl_question_types_tl_rec.created_by;
2328: END IF;
2329: IF (x_okl_question_types_tl_rec.creation_date = okl_api.G_MISS_DATE)
2323: x_okl_question_types_tl_rec.description := l_okl_question_types_tl_rec.description;
2324: END IF;
2325: IF (x_okl_question_types_tl_rec.created_by = okl_api.G_MISS_NUM)
2326: THEN
2327: x_okl_question_types_tl_rec.created_by := l_okl_question_types_tl_rec.created_by;
2328: END IF;
2329: IF (x_okl_question_types_tl_rec.creation_date = okl_api.G_MISS_DATE)
2330: THEN
2331: x_okl_question_types_tl_rec.creation_date := l_okl_question_types_tl_rec.creation_date;
2325: IF (x_okl_question_types_tl_rec.created_by = okl_api.G_MISS_NUM)
2326: THEN
2327: x_okl_question_types_tl_rec.created_by := l_okl_question_types_tl_rec.created_by;
2328: END IF;
2329: IF (x_okl_question_types_tl_rec.creation_date = okl_api.G_MISS_DATE)
2330: THEN
2331: x_okl_question_types_tl_rec.creation_date := l_okl_question_types_tl_rec.creation_date;
2332: END IF;
2333: IF (x_okl_question_types_tl_rec.last_updated_by = okl_api.G_MISS_NUM)
2327: x_okl_question_types_tl_rec.created_by := l_okl_question_types_tl_rec.created_by;
2328: END IF;
2329: IF (x_okl_question_types_tl_rec.creation_date = okl_api.G_MISS_DATE)
2330: THEN
2331: x_okl_question_types_tl_rec.creation_date := l_okl_question_types_tl_rec.creation_date;
2332: END IF;
2333: IF (x_okl_question_types_tl_rec.last_updated_by = okl_api.G_MISS_NUM)
2334: THEN
2335: x_okl_question_types_tl_rec.last_updated_by := l_okl_question_types_tl_rec.last_updated_by;
2329: IF (x_okl_question_types_tl_rec.creation_date = okl_api.G_MISS_DATE)
2330: THEN
2331: x_okl_question_types_tl_rec.creation_date := l_okl_question_types_tl_rec.creation_date;
2332: END IF;
2333: IF (x_okl_question_types_tl_rec.last_updated_by = okl_api.G_MISS_NUM)
2334: THEN
2335: x_okl_question_types_tl_rec.last_updated_by := l_okl_question_types_tl_rec.last_updated_by;
2336: END IF;
2337: IF (x_okl_question_types_tl_rec.last_update_date = okl_api.G_MISS_DATE)
2331: x_okl_question_types_tl_rec.creation_date := l_okl_question_types_tl_rec.creation_date;
2332: END IF;
2333: IF (x_okl_question_types_tl_rec.last_updated_by = okl_api.G_MISS_NUM)
2334: THEN
2335: x_okl_question_types_tl_rec.last_updated_by := l_okl_question_types_tl_rec.last_updated_by;
2336: END IF;
2337: IF (x_okl_question_types_tl_rec.last_update_date = okl_api.G_MISS_DATE)
2338: THEN
2339: x_okl_question_types_tl_rec.last_update_date := l_okl_question_types_tl_rec.last_update_date;
2333: IF (x_okl_question_types_tl_rec.last_updated_by = okl_api.G_MISS_NUM)
2334: THEN
2335: x_okl_question_types_tl_rec.last_updated_by := l_okl_question_types_tl_rec.last_updated_by;
2336: END IF;
2337: IF (x_okl_question_types_tl_rec.last_update_date = okl_api.G_MISS_DATE)
2338: THEN
2339: x_okl_question_types_tl_rec.last_update_date := l_okl_question_types_tl_rec.last_update_date;
2340: END IF;
2341: IF (x_okl_question_types_tl_rec.last_update_login = okl_api.G_MISS_NUM)
2335: x_okl_question_types_tl_rec.last_updated_by := l_okl_question_types_tl_rec.last_updated_by;
2336: END IF;
2337: IF (x_okl_question_types_tl_rec.last_update_date = okl_api.G_MISS_DATE)
2338: THEN
2339: x_okl_question_types_tl_rec.last_update_date := l_okl_question_types_tl_rec.last_update_date;
2340: END IF;
2341: IF (x_okl_question_types_tl_rec.last_update_login = okl_api.G_MISS_NUM)
2342: THEN
2343: x_okl_question_types_tl_rec.last_update_login := l_okl_question_types_tl_rec.last_update_login;
2337: IF (x_okl_question_types_tl_rec.last_update_date = okl_api.G_MISS_DATE)
2338: THEN
2339: x_okl_question_types_tl_rec.last_update_date := l_okl_question_types_tl_rec.last_update_date;
2340: END IF;
2341: IF (x_okl_question_types_tl_rec.last_update_login = okl_api.G_MISS_NUM)
2342: THEN
2343: x_okl_question_types_tl_rec.last_update_login := l_okl_question_types_tl_rec.last_update_login;
2344: END IF;
2345: RETURN(l_return_status);
2339: x_okl_question_types_tl_rec.last_update_date := l_okl_question_types_tl_rec.last_update_date;
2340: END IF;
2341: IF (x_okl_question_types_tl_rec.last_update_login = okl_api.G_MISS_NUM)
2342: THEN
2343: x_okl_question_types_tl_rec.last_update_login := l_okl_question_types_tl_rec.last_update_login;
2344: END IF;
2345: RETURN(l_return_status);
2346: END populate_new_record;
2347: ----------------------------------------------
2344: END IF;
2345: RETURN(l_return_status);
2346: END populate_new_record;
2347: ----------------------------------------------
2348: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2349: ----------------------------------------------
2350: FUNCTION Set_Attributes (
2351: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2352: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2347: ----------------------------------------------
2348: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2349: ----------------------------------------------
2350: FUNCTION Set_Attributes (
2351: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2352: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2353: ) RETURN VARCHAR2 IS
2354: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2355: BEGIN
2348: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2349: ----------------------------------------------
2350: FUNCTION Set_Attributes (
2351: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2352: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2353: ) RETURN VARCHAR2 IS
2354: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2355: BEGIN
2356: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2352: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2353: ) RETURN VARCHAR2 IS
2354: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2355: BEGIN
2356: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2357: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
2358: x_okl_question_types_tl_rec.SOURCE_LANG := USERENV('LANG');
2359: RETURN(l_return_status);
2360: END Set_Attributes;
2353: ) RETURN VARCHAR2 IS
2354: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2355: BEGIN
2356: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2357: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
2358: x_okl_question_types_tl_rec.SOURCE_LANG := USERENV('LANG');
2359: RETURN(l_return_status);
2360: END Set_Attributes;
2361: BEGIN
2354: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2355: BEGIN
2356: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2357: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
2358: x_okl_question_types_tl_rec.SOURCE_LANG := USERENV('LANG');
2359: RETURN(l_return_status);
2360: END Set_Attributes;
2361: BEGIN
2362: l_return_status := okl_api.START_ACTIVITY(l_api_name,
2369: RAISE okl_api.G_EXCEPTION_ERROR;
2370: END IF;
2371: --- Setting item attributes
2372: l_return_status := Set_Attributes(
2373: p_okl_question_types_tl_rec, -- IN
2374: l_okl_question_types_tl_rec); -- OUT
2375: --- If any errors happen abort API
2376: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2377: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2370: END IF;
2371: --- Setting item attributes
2372: l_return_status := Set_Attributes(
2373: p_okl_question_types_tl_rec, -- IN
2374: l_okl_question_types_tl_rec); -- OUT
2375: --- If any errors happen abort API
2376: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2377: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2378: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2377: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2378: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2379: RAISE okl_api.G_EXCEPTION_ERROR;
2380: END IF;
2381: l_return_status := populate_new_record(l_okl_question_types_tl_rec, ldefoklquestiontypestlrec);
2382: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2383: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2384: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2385: RAISE okl_api.G_EXCEPTION_ERROR;
2383: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2384: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2385: RAISE okl_api.G_EXCEPTION_ERROR;
2386: END IF;
2387: UPDATE OKL_QUESTION_TYPES_TL
2388: SET NAME = ldefoklquestiontypestlrec.name,
2389: DESCRIPTION = ldefoklquestiontypestlrec.description,
2390: SOURCE_LANG = ldefoklquestiontypestlrec.source_lang,
2391: CREATED_BY = ldefoklquestiontypestlrec.created_by,
2395: LAST_UPDATE_LOGIN = ldefoklquestiontypestlrec.last_update_login
2396: WHERE ID = ldefoklquestiontypestlrec.id
2397: AND SOURCE_LANG = USERENV('LANG');
2398:
2399: UPDATE OKL_QUESTION_TYPES_TL
2400: SET SFWT_FLAG = 'Y'
2401: WHERE ID = ldefoklquestiontypestlrec.id
2402: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2403:
2400: SET SFWT_FLAG = 'Y'
2401: WHERE ID = ldefoklquestiontypestlrec.id
2402: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2403:
2404: x_okl_question_types_tl_rec := ldefoklquestiontypestlrec;
2405: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
2406: EXCEPTION
2407: WHEN okl_api.G_EXCEPTION_ERROR THEN
2408: x_return_status := okl_api.HANDLE_EXCEPTIONS
2451: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
2452: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2453: l_qtyv_rec qtyv_rec_type := p_qtyv_rec;
2454: l_def_qtyv_rec qtyv_rec_type;
2455: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2456: lx_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2457: l_qty_rec qty_rec_type;
2458: lx_qty_rec qty_rec_type;
2459: -------------------------------
2452: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2453: l_qtyv_rec qtyv_rec_type := p_qtyv_rec;
2454: l_def_qtyv_rec qtyv_rec_type;
2455: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2456: lx_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2457: l_qty_rec qty_rec_type;
2458: lx_qty_rec qty_rec_type;
2459: -------------------------------
2460: -- FUNCTION fill_who_columns --
2672:
2673: --------------------------------------
2674: -- Move VIEW record to "Child" records
2675: --------------------------------------
2676: migrate(l_def_qtyv_rec, l_okl_question_types_tl_rec);
2677: migrate(l_def_qtyv_rec, l_qty_rec);
2678: --------------------------------------------
2679: -- Call the UPDATE_ROW for each child record
2680: --------------------------------------------
2682: p_init_msg_list,
2683: x_return_status,
2684: x_msg_count,
2685: x_msg_data,
2686: l_okl_question_types_tl_rec,
2687: lx_okl_question_types_tl_rec
2688: );
2689: IF (x_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2690: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2683: x_return_status,
2684: x_msg_count,
2685: x_msg_data,
2686: l_okl_question_types_tl_rec,
2687: lx_okl_question_types_tl_rec
2688: );
2689: IF (x_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2690: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2691: ELSIF (x_return_status = okl_api.G_RET_STS_ERROR) THEN
2690: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2691: ELSIF (x_return_status = okl_api.G_RET_STS_ERROR) THEN
2692: RAISE okl_api.G_EXCEPTION_ERROR;
2693: END IF;
2694: migrate(lx_okl_question_types_tl_rec, l_def_qtyv_rec);
2695: update_row(
2696: p_init_msg_list,
2697: x_return_status,
2698: x_msg_count,
2871: '_PVT'
2872: );
2873: END delete_row;
2874: ------------------------------------------
2875: -- delete_row for:OKL_QUESTION_TYPES_TL --
2876: ------------------------------------------
2877: PROCEDURE delete_row(
2878: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
2879: x_return_status OUT NOCOPY VARCHAR2,
2878: p_init_msg_list IN VARCHAR2 DEFAULT okl_api.G_FALSE,
2879: x_return_status OUT NOCOPY VARCHAR2,
2880: x_msg_count OUT NOCOPY NUMBER,
2881: x_msg_data OUT NOCOPY VARCHAR2,
2882: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type) IS
2883:
2884: l_api_version CONSTANT NUMBER := 1;
2885: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
2886: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2883:
2884: l_api_version CONSTANT NUMBER := 1;
2885: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
2886: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2887: l_okl_question_types_tl_rec okl_question_types_tl_rec_type:= p_okl_question_types_tl_rec;
2888: l_row_notfound BOOLEAN := TRUE;
2889: ----------------------------------------------
2890: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2891: ----------------------------------------------
2886: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2887: l_okl_question_types_tl_rec okl_question_types_tl_rec_type:= p_okl_question_types_tl_rec;
2888: l_row_notfound BOOLEAN := TRUE;
2889: ----------------------------------------------
2890: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2891: ----------------------------------------------
2892: FUNCTION Set_Attributes (
2893: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2894: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2889: ----------------------------------------------
2890: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2891: ----------------------------------------------
2892: FUNCTION Set_Attributes (
2893: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2894: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2895: ) RETURN VARCHAR2 IS
2896: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2897: BEGIN
2890: -- Set_Attributes for:OKL_QUESTION_TYPES_TL --
2891: ----------------------------------------------
2892: FUNCTION Set_Attributes (
2893: p_okl_question_types_tl_rec IN okl_question_types_tl_rec_type,
2894: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2895: ) RETURN VARCHAR2 IS
2896: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2897: BEGIN
2898: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2894: x_okl_question_types_tl_rec OUT NOCOPY okl_question_types_tl_rec_type
2895: ) RETURN VARCHAR2 IS
2896: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2897: BEGIN
2898: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2899: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
2900: RETURN(l_return_status);
2901: END Set_Attributes;
2902: BEGIN
2895: ) RETURN VARCHAR2 IS
2896: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2897: BEGIN
2898: x_okl_question_types_tl_rec := p_okl_question_types_tl_rec;
2899: x_okl_question_types_tl_rec.LANGUAGE := USERENV('LANG');
2900: RETURN(l_return_status);
2901: END Set_Attributes;
2902: BEGIN
2903: l_return_status := okl_api.START_ACTIVITY(l_api_name,
2910: RAISE okl_api.G_EXCEPTION_ERROR;
2911: END IF;
2912: --- Setting item attributes
2913: l_return_status := Set_Attributes(
2914: p_okl_question_types_tl_rec, -- IN
2915: l_okl_question_types_tl_rec); -- OUT
2916: --- If any errors happen abort API
2917: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2918: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2911: END IF;
2912: --- Setting item attributes
2913: l_return_status := Set_Attributes(
2914: p_okl_question_types_tl_rec, -- IN
2915: l_okl_question_types_tl_rec); -- OUT
2916: --- If any errors happen abort API
2917: IF (l_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
2918: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2919: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2918: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
2919: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2920: RAISE okl_api.G_EXCEPTION_ERROR;
2921: END IF;
2922: DELETE FROM OKL_QUESTION_TYPES_TL
2923: WHERE ID = l_okl_question_types_tl_rec.id;
2924:
2925: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
2926: EXCEPTION
2919: ELSIF (l_return_status = okl_api.G_RET_STS_ERROR) THEN
2920: RAISE okl_api.G_EXCEPTION_ERROR;
2921: END IF;
2922: DELETE FROM OKL_QUESTION_TYPES_TL
2923: WHERE ID = l_okl_question_types_tl_rec.id;
2924:
2925: okl_api.END_ACTIVITY(x_msg_count, x_msg_data);
2926: EXCEPTION
2927: WHEN okl_api.G_EXCEPTION_ERROR THEN
2969: l_api_version CONSTANT NUMBER := 1;
2970: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
2971: l_return_status VARCHAR2(1) := okl_api.G_RET_STS_SUCCESS;
2972: l_qtyv_rec qtyv_rec_type := p_qtyv_rec;
2973: l_okl_question_types_tl_rec okl_question_types_tl_rec_type;
2974: l_qty_rec qty_rec_type;
2975: BEGIN
2976: l_return_status := okl_api.START_ACTIVITY(l_api_name,
2977: G_PKG_NAME,
2987: END IF;
2988: --------------------------------------
2989: -- Move VIEW record to "Child" records
2990: --------------------------------------
2991: migrate(l_qtyv_rec, l_okl_question_types_tl_rec);
2992: migrate(l_qtyv_rec, l_qty_rec);
2993: --------------------------------------------
2994: -- Call the DELETE_ROW for each child record
2995: --------------------------------------------
2997: p_init_msg_list,
2998: x_return_status,
2999: x_msg_count,
3000: x_msg_data,
3001: l_okl_question_types_tl_rec
3002: );
3003: IF (x_return_status = okl_api.G_RET_STS_UNEXP_ERROR) THEN
3004: RAISE okl_api.G_EXCEPTION_UNEXPECTED_ERROR;
3005: ELSIF (x_return_status = okl_api.G_RET_STS_ERROR) THEN