41: -- PROCEDURE add_language
42: ---------------------------------------------------------------------------
43: PROCEDURE add_language IS
44: BEGIN
45: DELETE FROM OKL_OPERANDS_TL T
46: WHERE NOT EXISTS (
47: SELECT NULL
48: FROM OKL_OPERANDS_B B --fixed bug 3321017 by kmotepal
49: WHERE B.ID = T.ID
48: FROM OKL_OPERANDS_B B --fixed bug 3321017 by kmotepal
49: WHERE B.ID = T.ID
50: );
51:
52: UPDATE OKL_OPERANDS_TL T SET (
53: DESCRIPTION) = (SELECT
54: B.DESCRIPTION
55: FROM OKL_OPERANDS_TL B
56: WHERE B.ID = T.ID
51:
52: UPDATE OKL_OPERANDS_TL T SET (
53: DESCRIPTION) = (SELECT
54: B.DESCRIPTION
55: FROM OKL_OPERANDS_TL B
56: WHERE B.ID = T.ID
57: AND B.LANGUAGE = T.SOURCE_LANG)
58: WHERE (
59: T.ID,
60: T.LANGUAGE)
61: IN (SELECT
62: SUBT.ID,
63: SUBT.LANGUAGE
64: FROM OKL_OPERANDS_TL SUBB, OKL_OPERANDS_TL SUBT
65: WHERE SUBB.ID = SUBT.ID
66: AND SUBB.LANGUAGE = SUBT.SOURCE_LANG
67: AND (SUBB.DESCRIPTION <> SUBT.DESCRIPTION
68: OR (SUBB.DESCRIPTION IS NULL AND SUBT.DESCRIPTION IS NOT NULL)
68: OR (SUBB.DESCRIPTION IS NULL AND SUBT.DESCRIPTION IS NOT NULL)
69: OR (SUBB.DESCRIPTION IS NOT NULL AND SUBT.DESCRIPTION IS NULL)
70: ));
71:
72: INSERT INTO OKL_OPERANDS_TL (
73: ID,
74: LANGUAGE,
75: SOURCE_LANG,
76: SFWT_FLAG,
90: B.CREATION_DATE,
91: B.LAST_UPDATED_BY,
92: B.LAST_UPDATE_DATE,
93: B.LAST_UPDATE_LOGIN
94: FROM OKL_OPERANDS_TL B, FND_LANGUAGES L
95: WHERE L.INSTALLED_FLAG IN ('I', 'B')
96: AND B.LANGUAGE = USERENV('LANG')
97: AND NOT EXISTS(
98: SELECT NULL
95: WHERE L.INSTALLED_FLAG IN ('I', 'B')
96: AND B.LANGUAGE = USERENV('LANG')
97: AND NOT EXISTS(
98: SELECT NULL
99: FROM OKL_OPERANDS_TL T
100: WHERE T.ID = B.ID
101: AND T.LANGUAGE = L.LANGUAGE_CODE
102: );
103:
165: BEGIN
166: RETURN(get_rec(p_opd_rec, l_row_notfound));
167: END get_rec;
168: ---------------------------------------------------------------------------
169: -- FUNCTION get_rec for: OKL_OPERANDS_TL
170: ---------------------------------------------------------------------------
171: FUNCTION get_rec (
172: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
173: x_no_data_found OUT NOCOPY BOOLEAN
168: ---------------------------------------------------------------------------
169: -- FUNCTION get_rec for: OKL_OPERANDS_TL
170: ---------------------------------------------------------------------------
171: FUNCTION get_rec (
172: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
173: x_no_data_found OUT NOCOPY BOOLEAN
174: ) RETURN okl_operands_tl_rec_type IS
175: CURSOR okl_operands_tl_pk_csr (p_id IN NUMBER,
176: p_language IN VARCHAR2) IS
170: ---------------------------------------------------------------------------
171: FUNCTION get_rec (
172: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
173: x_no_data_found OUT NOCOPY BOOLEAN
174: ) RETURN okl_operands_tl_rec_type IS
175: CURSOR okl_operands_tl_pk_csr (p_id IN NUMBER,
176: p_language IN VARCHAR2) IS
177: SELECT
178: ID,
171: FUNCTION get_rec (
172: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
173: x_no_data_found OUT NOCOPY BOOLEAN
174: ) RETURN okl_operands_tl_rec_type IS
175: CURSOR okl_operands_tl_pk_csr (p_id IN NUMBER,
176: p_language IN VARCHAR2) IS
177: SELECT
178: ID,
179: LANGUAGE,
184: CREATION_DATE,
185: LAST_UPDATED_BY,
186: LAST_UPDATE_DATE,
187: LAST_UPDATE_LOGIN
188: FROM Okl_Operands_Tl
189: WHERE okl_operands_tl.id = p_id
190: AND okl_operands_tl.language = p_language;
191: l_okl_operands_tl_pk okl_operands_tl_pk_csr%ROWTYPE;
192: l_okl_operands_tl_rec okl_operands_tl_rec_type;
185: LAST_UPDATED_BY,
186: LAST_UPDATE_DATE,
187: LAST_UPDATE_LOGIN
188: FROM Okl_Operands_Tl
189: WHERE okl_operands_tl.id = p_id
190: AND okl_operands_tl.language = p_language;
191: l_okl_operands_tl_pk okl_operands_tl_pk_csr%ROWTYPE;
192: l_okl_operands_tl_rec okl_operands_tl_rec_type;
193: BEGIN
186: LAST_UPDATE_DATE,
187: LAST_UPDATE_LOGIN
188: FROM Okl_Operands_Tl
189: WHERE okl_operands_tl.id = p_id
190: AND okl_operands_tl.language = p_language;
191: l_okl_operands_tl_pk okl_operands_tl_pk_csr%ROWTYPE;
192: l_okl_operands_tl_rec okl_operands_tl_rec_type;
193: BEGIN
194: x_no_data_found := TRUE;
187: LAST_UPDATE_LOGIN
188: FROM Okl_Operands_Tl
189: WHERE okl_operands_tl.id = p_id
190: AND okl_operands_tl.language = p_language;
191: l_okl_operands_tl_pk okl_operands_tl_pk_csr%ROWTYPE;
192: l_okl_operands_tl_rec okl_operands_tl_rec_type;
193: BEGIN
194: x_no_data_found := TRUE;
195: -- Get current database values
188: FROM Okl_Operands_Tl
189: WHERE okl_operands_tl.id = p_id
190: AND okl_operands_tl.language = p_language;
191: l_okl_operands_tl_pk okl_operands_tl_pk_csr%ROWTYPE;
192: l_okl_operands_tl_rec okl_operands_tl_rec_type;
193: BEGIN
194: x_no_data_found := TRUE;
195: -- Get current database values
196: OPEN okl_operands_tl_pk_csr (p_okl_operands_tl_rec.id,
192: l_okl_operands_tl_rec okl_operands_tl_rec_type;
193: BEGIN
194: x_no_data_found := TRUE;
195: -- Get current database values
196: OPEN okl_operands_tl_pk_csr (p_okl_operands_tl_rec.id,
197: p_okl_operands_tl_rec.language);
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
193: BEGIN
194: x_no_data_found := TRUE;
195: -- Get current database values
196: OPEN okl_operands_tl_pk_csr (p_okl_operands_tl_rec.id,
197: p_okl_operands_tl_rec.language);
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
194: x_no_data_found := TRUE;
195: -- Get current database values
196: OPEN okl_operands_tl_pk_csr (p_okl_operands_tl_rec.id,
197: p_okl_operands_tl_rec.language);
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
195: -- Get current database values
196: OPEN okl_operands_tl_pk_csr (p_okl_operands_tl_rec.id,
197: p_okl_operands_tl_rec.language);
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
196: OPEN okl_operands_tl_pk_csr (p_okl_operands_tl_rec.id,
197: p_okl_operands_tl_rec.language);
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
197: p_okl_operands_tl_rec.language);
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
198: FETCH okl_operands_tl_pk_csr INTO
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
199: l_okl_operands_tl_rec.ID,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
200: l_okl_operands_tl_rec.LANGUAGE,
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
201: l_okl_operands_tl_rec.SOURCE_LANG,
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
202: l_okl_operands_tl_rec.SFWT_FLAG,
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
210: CLOSE okl_operands_tl_pk_csr;
203: l_okl_operands_tl_rec.DESCRIPTION,
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
210: CLOSE okl_operands_tl_pk_csr;
211: RETURN(l_okl_operands_tl_rec);
204: l_okl_operands_tl_rec.CREATED_BY,
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
210: CLOSE okl_operands_tl_pk_csr;
211: RETURN(l_okl_operands_tl_rec);
212: END get_rec;
205: l_okl_operands_tl_rec.CREATION_DATE,
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
210: CLOSE okl_operands_tl_pk_csr;
211: RETURN(l_okl_operands_tl_rec);
212: END get_rec;
213:
206: l_okl_operands_tl_rec.LAST_UPDATED_BY,
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
210: CLOSE okl_operands_tl_pk_csr;
211: RETURN(l_okl_operands_tl_rec);
212: END get_rec;
213:
214: FUNCTION get_rec (
207: l_okl_operands_tl_rec.LAST_UPDATE_DATE,
208: l_okl_operands_tl_rec.LAST_UPDATE_LOGIN;
209: x_no_data_found := okl_operands_tl_pk_csr%NOTFOUND;
210: CLOSE okl_operands_tl_pk_csr;
211: RETURN(l_okl_operands_tl_rec);
212: END get_rec;
213:
214: FUNCTION get_rec (
215: p_okl_operands_tl_rec IN okl_operands_tl_rec_type
211: RETURN(l_okl_operands_tl_rec);
212: END get_rec;
213:
214: FUNCTION get_rec (
215: p_okl_operands_tl_rec IN okl_operands_tl_rec_type
216: ) RETURN okl_operands_tl_rec_type IS
217: l_row_notfound BOOLEAN := TRUE;
218: BEGIN
219: RETURN(get_rec(p_okl_operands_tl_rec, l_row_notfound));
212: END get_rec;
213:
214: FUNCTION get_rec (
215: p_okl_operands_tl_rec IN okl_operands_tl_rec_type
216: ) RETURN okl_operands_tl_rec_type IS
217: l_row_notfound BOOLEAN := TRUE;
218: BEGIN
219: RETURN(get_rec(p_okl_operands_tl_rec, l_row_notfound));
220: END get_rec;
215: p_okl_operands_tl_rec IN okl_operands_tl_rec_type
216: ) RETURN okl_operands_tl_rec_type IS
217: l_row_notfound BOOLEAN := TRUE;
218: BEGIN
219: RETURN(get_rec(p_okl_operands_tl_rec, l_row_notfound));
220: END get_rec;
221: ---------------------------------------------------------------------------
222: -- FUNCTION get_rec for: OKL_OPERANDS_V
223: ---------------------------------------------------------------------------
1521: p_to.end_date := p_from.end_date;
1522: END migrate;
1523: PROCEDURE migrate (
1524: p_from IN opdv_rec_type,
1525: p_to IN OUT NOCOPY okl_operands_tl_rec_type
1526: ) IS
1527: BEGIN
1528: p_to.id := p_from.id;
1529: p_to.sfwt_flag := p_from.sfwt_flag;
1534: p_to.last_update_date := p_from.last_update_date;
1535: p_to.last_update_login := p_from.last_update_login;
1536: END migrate;
1537: PROCEDURE migrate (
1538: p_from IN okl_operands_tl_rec_type,
1539: p_to IN OUT NOCOPY opdv_rec_type
1540: ) IS
1541: BEGIN
1542: p_to.id := p_from.id;
1567: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_row';
1568: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1569: l_opdv_rec opdv_rec_type := p_opdv_rec;
1570: l_opd_rec opd_rec_type;
1571: l_okl_operands_tl_rec okl_operands_tl_rec_type;
1572: BEGIN
1573: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1574: G_PKG_NAME,
1575: p_init_msg_list,
1825: '_PVT'
1826: );
1827: END insert_row;
1828: ------------------------------------
1829: -- insert_row for:OKL_OPERANDS_TL --
1830: ------------------------------------
1831: PROCEDURE insert_row(
1832: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
1833: x_return_status OUT NOCOPY VARCHAR2,
1832: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
1833: x_return_status OUT NOCOPY VARCHAR2,
1834: x_msg_count OUT NOCOPY NUMBER,
1835: x_msg_data OUT NOCOPY VARCHAR2,
1836: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
1837: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type) IS
1838:
1839: l_api_version CONSTANT NUMBER := 1;
1840: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1833: x_return_status OUT NOCOPY VARCHAR2,
1834: x_msg_count OUT NOCOPY NUMBER,
1835: x_msg_data OUT NOCOPY VARCHAR2,
1836: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
1837: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type) IS
1838:
1839: l_api_version CONSTANT NUMBER := 1;
1840: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1841: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1838:
1839: l_api_version CONSTANT NUMBER := 1;
1840: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1841: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1842: l_okl_operands_tl_rec okl_operands_tl_rec_type := p_okl_operands_tl_rec;
1843: l_def_okl_operands_tl_rec okl_operands_tl_rec_type;
1844: CURSOR get_languages IS
1845: SELECT *
1846: FROM FND_LANGUAGES
1839: l_api_version CONSTANT NUMBER := 1;
1840: l_api_name CONSTANT VARCHAR2(30) := 'TL_insert_row';
1841: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1842: l_okl_operands_tl_rec okl_operands_tl_rec_type := p_okl_operands_tl_rec;
1843: l_def_okl_operands_tl_rec okl_operands_tl_rec_type;
1844: CURSOR get_languages IS
1845: SELECT *
1846: FROM FND_LANGUAGES
1847: WHERE INSTALLED_FLAG IN ('I', 'B');
1845: SELECT *
1846: FROM FND_LANGUAGES
1847: WHERE INSTALLED_FLAG IN ('I', 'B');
1848: ----------------------------------------
1849: -- Set_Attributes for:OKL_OPERANDS_TL --
1850: ----------------------------------------
1851: FUNCTION Set_Attributes (
1852: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
1853: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
1848: ----------------------------------------
1849: -- Set_Attributes for:OKL_OPERANDS_TL --
1850: ----------------------------------------
1851: FUNCTION Set_Attributes (
1852: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
1853: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
1854: ) RETURN VARCHAR2 IS
1855: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1856: BEGIN
1849: -- Set_Attributes for:OKL_OPERANDS_TL --
1850: ----------------------------------------
1851: FUNCTION Set_Attributes (
1852: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
1853: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
1854: ) RETURN VARCHAR2 IS
1855: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1856: BEGIN
1857: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
1853: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
1854: ) RETURN VARCHAR2 IS
1855: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1856: BEGIN
1857: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
1858: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
1859: x_okl_operands_tl_rec.SOURCE_LANG := USERENV('LANG');
1860: RETURN(l_return_status);
1861: END Set_Attributes;
1854: ) RETURN VARCHAR2 IS
1855: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1856: BEGIN
1857: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
1858: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
1859: x_okl_operands_tl_rec.SOURCE_LANG := USERENV('LANG');
1860: RETURN(l_return_status);
1861: END Set_Attributes;
1862: BEGIN
1855: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1856: BEGIN
1857: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
1858: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
1859: x_okl_operands_tl_rec.SOURCE_LANG := USERENV('LANG');
1860: RETURN(l_return_status);
1861: END Set_Attributes;
1862: BEGIN
1863: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1870: RAISE OKC_API.G_EXCEPTION_ERROR;
1871: END IF;
1872: --- Setting item attributes
1873: l_return_status := Set_Attributes(
1874: p_okl_operands_tl_rec, -- IN
1875: l_okl_operands_tl_rec); -- OUT
1876: --- If any errors happen abort API
1877: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1878: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1871: END IF;
1872: --- Setting item attributes
1873: l_return_status := Set_Attributes(
1874: p_okl_operands_tl_rec, -- IN
1875: l_okl_operands_tl_rec); -- OUT
1876: --- If any errors happen abort API
1877: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1878: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1879: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1879: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1880: RAISE OKC_API.G_EXCEPTION_ERROR;
1881: END IF;
1882: FOR l_lang_rec IN get_languages LOOP
1883: l_okl_operands_tl_rec.language := l_lang_rec.language_code;
1884: INSERT INTO OKL_OPERANDS_TL(
1885: id,
1886: language,
1887: source_lang,
1880: RAISE OKC_API.G_EXCEPTION_ERROR;
1881: END IF;
1882: FOR l_lang_rec IN get_languages LOOP
1883: l_okl_operands_tl_rec.language := l_lang_rec.language_code;
1884: INSERT INTO OKL_OPERANDS_TL(
1885: id,
1886: language,
1887: source_lang,
1888: sfwt_flag,
1892: last_updated_by,
1893: last_update_date,
1894: last_update_login)
1895: VALUES (
1896: l_okl_operands_tl_rec.id,
1897: l_okl_operands_tl_rec.language,
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1893: last_update_date,
1894: last_update_login)
1895: VALUES (
1896: l_okl_operands_tl_rec.id,
1897: l_okl_operands_tl_rec.language,
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1894: last_update_login)
1895: VALUES (
1896: l_okl_operands_tl_rec.id,
1897: l_okl_operands_tl_rec.language,
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1895: VALUES (
1896: l_okl_operands_tl_rec.id,
1897: l_okl_operands_tl_rec.language,
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1896: l_okl_operands_tl_rec.id,
1897: l_okl_operands_tl_rec.language,
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1904: l_okl_operands_tl_rec.last_update_date,
1897: l_okl_operands_tl_rec.language,
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1904: l_okl_operands_tl_rec.last_update_date,
1905: l_okl_operands_tl_rec.last_update_login);
1898: l_okl_operands_tl_rec.source_lang,
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1904: l_okl_operands_tl_rec.last_update_date,
1905: l_okl_operands_tl_rec.last_update_login);
1906: END LOOP;
1899: l_okl_operands_tl_rec.sfwt_flag,
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1904: l_okl_operands_tl_rec.last_update_date,
1905: l_okl_operands_tl_rec.last_update_login);
1906: END LOOP;
1907: -- Set OUT values
1900: l_okl_operands_tl_rec.description,
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1904: l_okl_operands_tl_rec.last_update_date,
1905: l_okl_operands_tl_rec.last_update_login);
1906: END LOOP;
1907: -- Set OUT values
1908: x_okl_operands_tl_rec := l_okl_operands_tl_rec;
1901: l_okl_operands_tl_rec.created_by,
1902: l_okl_operands_tl_rec.creation_date,
1903: l_okl_operands_tl_rec.last_updated_by,
1904: l_okl_operands_tl_rec.last_update_date,
1905: l_okl_operands_tl_rec.last_update_login);
1906: END LOOP;
1907: -- Set OUT values
1908: x_okl_operands_tl_rec := l_okl_operands_tl_rec;
1909: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1904: l_okl_operands_tl_rec.last_update_date,
1905: l_okl_operands_tl_rec.last_update_login);
1906: END LOOP;
1907: -- Set OUT values
1908: x_okl_operands_tl_rec := l_okl_operands_tl_rec;
1909: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1910: EXCEPTION
1911: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1912: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1957: l_opdv_rec opdv_rec_type;
1958: l_def_opdv_rec opdv_rec_type;
1959: l_opd_rec opd_rec_type;
1960: lx_opd_rec opd_rec_type;
1961: l_okl_operands_tl_rec okl_operands_tl_rec_type;
1962: lx_okl_operands_tl_rec okl_operands_tl_rec_type;
1963: -------------------------------
1964: -- FUNCTION fill_who_columns --
1965: -------------------------------
1958: l_def_opdv_rec opdv_rec_type;
1959: l_opd_rec opd_rec_type;
1960: lx_opd_rec opd_rec_type;
1961: l_okl_operands_tl_rec okl_operands_tl_rec_type;
1962: lx_okl_operands_tl_rec okl_operands_tl_rec_type;
1963: -------------------------------
1964: -- FUNCTION fill_who_columns --
1965: -------------------------------
1966: FUNCTION fill_who_columns (
2033: --------------------------------------
2034: -- Move VIEW record to "Child" records
2035: --------------------------------------
2036: migrate(l_def_opdv_rec, l_opd_rec);
2037: migrate(l_def_opdv_rec, l_okl_operands_tl_rec);
2038: --------------------------------------------
2039: -- Call the INSERT_ROW for each child record
2040: --------------------------------------------
2041: insert_row(
2056: p_init_msg_list,
2057: x_return_status,
2058: x_msg_count,
2059: x_msg_data,
2060: l_okl_operands_tl_rec,
2061: lx_okl_operands_tl_rec
2062: );
2063: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2064: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2057: x_return_status,
2058: x_msg_count,
2059: x_msg_data,
2060: l_okl_operands_tl_rec,
2061: lx_okl_operands_tl_rec
2062: );
2063: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2064: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2065: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2064: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2065: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2066: RAISE OKC_API.G_EXCEPTION_ERROR;
2067: END IF;
2068: migrate(lx_okl_operands_tl_rec, l_def_opdv_rec);
2069: -- Set OUT values
2070: x_opdv_rec := l_def_opdv_rec;
2071: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2072: EXCEPTION
2288: '_PVT'
2289: );
2290: END lock_row;
2291: ----------------------------------
2292: -- lock_row for:OKL_OPERANDS_TL --
2293: ----------------------------------
2294: PROCEDURE lock_row(
2295: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
2296: x_return_status OUT NOCOPY VARCHAR2,
2295: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
2296: x_return_status OUT NOCOPY VARCHAR2,
2297: x_msg_count OUT NOCOPY NUMBER,
2298: x_msg_data OUT NOCOPY VARCHAR2,
2299: p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
2300:
2301: E_Resource_Busy EXCEPTION;
2302: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2303: CURSOR lock_csr (p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
2299: p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
2300:
2301: E_Resource_Busy EXCEPTION;
2302: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2303: CURSOR lock_csr (p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
2304: SELECT *
2305: FROM OKL_OPERANDS_TL
2306: WHERE ID = p_okl_operands_tl_rec.id
2307: FOR UPDATE NOWAIT;
2301: E_Resource_Busy EXCEPTION;
2302: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2303: CURSOR lock_csr (p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
2304: SELECT *
2305: FROM OKL_OPERANDS_TL
2306: WHERE ID = p_okl_operands_tl_rec.id
2307: FOR UPDATE NOWAIT;
2308:
2309: l_api_version CONSTANT NUMBER := 1;
2302: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
2303: CURSOR lock_csr (p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
2304: SELECT *
2305: FROM OKL_OPERANDS_TL
2306: WHERE ID = p_okl_operands_tl_rec.id
2307: FOR UPDATE NOWAIT;
2308:
2309: l_api_version CONSTANT NUMBER := 1;
2310: l_api_name CONSTANT VARCHAR2(30) := 'TL_lock_row';
2322: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2323: RAISE OKC_API.G_EXCEPTION_ERROR;
2324: END IF;
2325: BEGIN
2326: OPEN lock_csr(p_okl_operands_tl_rec);
2327: FETCH lock_csr INTO l_lock_var;
2328: l_row_notfound := lock_csr%NOTFOUND;
2329: CLOSE lock_csr;
2330: EXCEPTION
2387: l_api_version CONSTANT NUMBER := 1;
2388: l_api_name CONSTANT VARCHAR2(30) := 'V_lock_row';
2389: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2390: l_opd_rec opd_rec_type;
2391: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2392: BEGIN
2393: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2394: G_PKG_NAME,
2395: p_init_msg_list,
2405: --------------------------------------
2406: -- Move VIEW record to "Child" records
2407: --------------------------------------
2408: migrate(p_opdv_rec, l_opd_rec);
2409: migrate(p_opdv_rec, l_okl_operands_tl_rec);
2410: --------------------------------------------
2411: -- Call the LOCK_ROW for each child record
2412: --------------------------------------------
2413: lock_row(
2426: p_init_msg_list,
2427: x_return_status,
2428: x_msg_count,
2429: x_msg_data,
2430: l_okl_operands_tl_rec
2431: );
2432: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2433: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2434: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2735: '_PVT'
2736: );
2737: END update_row;
2738: ------------------------------------
2739: -- update_row for:OKL_OPERANDS_TL --
2740: ------------------------------------
2741: PROCEDURE update_row(
2742: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
2743: x_return_status OUT NOCOPY VARCHAR2,
2742: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
2743: x_return_status OUT NOCOPY VARCHAR2,
2744: x_msg_count OUT NOCOPY NUMBER,
2745: x_msg_data OUT NOCOPY VARCHAR2,
2746: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2747: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type) IS
2748:
2749: l_api_version CONSTANT NUMBER := 1;
2750: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2743: x_return_status OUT NOCOPY VARCHAR2,
2744: x_msg_count OUT NOCOPY NUMBER,
2745: x_msg_data OUT NOCOPY VARCHAR2,
2746: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2747: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type) IS
2748:
2749: l_api_version CONSTANT NUMBER := 1;
2750: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2751: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2748:
2749: l_api_version CONSTANT NUMBER := 1;
2750: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2751: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2752: l_okl_operands_tl_rec okl_operands_tl_rec_type := p_okl_operands_tl_rec;
2753: l_def_okl_operands_tl_rec okl_operands_tl_rec_type;
2754: l_row_notfound BOOLEAN := TRUE;
2755: ----------------------------------
2756: -- FUNCTION populate_new_record --
2749: l_api_version CONSTANT NUMBER := 1;
2750: l_api_name CONSTANT VARCHAR2(30) := 'TL_update_row';
2751: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2752: l_okl_operands_tl_rec okl_operands_tl_rec_type := p_okl_operands_tl_rec;
2753: l_def_okl_operands_tl_rec okl_operands_tl_rec_type;
2754: l_row_notfound BOOLEAN := TRUE;
2755: ----------------------------------
2756: -- FUNCTION populate_new_record --
2757: ----------------------------------
2755: ----------------------------------
2756: -- FUNCTION populate_new_record --
2757: ----------------------------------
2758: FUNCTION populate_new_record (
2759: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2760: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2761: ) RETURN VARCHAR2 IS
2762: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2763: l_row_notfound BOOLEAN := TRUE;
2756: -- FUNCTION populate_new_record --
2757: ----------------------------------
2758: FUNCTION populate_new_record (
2759: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2760: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2761: ) RETURN VARCHAR2 IS
2762: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2763: l_row_notfound BOOLEAN := TRUE;
2764: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2758: FUNCTION populate_new_record (
2759: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2760: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2761: ) RETURN VARCHAR2 IS
2762: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2763: l_row_notfound BOOLEAN := TRUE;
2764: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2765: BEGIN
2766: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2762: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2763: l_row_notfound BOOLEAN := TRUE;
2764: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2765: BEGIN
2766: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2767: -- Get current database values
2768: l_okl_operands_tl_rec := get_rec(p_okl_operands_tl_rec, l_row_notfound);
2769: IF (l_row_notfound) THEN
2770: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2764: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2765: BEGIN
2766: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2767: -- Get current database values
2768: l_okl_operands_tl_rec := get_rec(p_okl_operands_tl_rec, l_row_notfound);
2769: IF (l_row_notfound) THEN
2770: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2771: END IF;
2772: IF (x_okl_operands_tl_rec.id = OKC_API.G_MISS_NUM)
2768: l_okl_operands_tl_rec := get_rec(p_okl_operands_tl_rec, l_row_notfound);
2769: IF (l_row_notfound) THEN
2770: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2771: END IF;
2772: IF (x_okl_operands_tl_rec.id = OKC_API.G_MISS_NUM)
2773: THEN
2774: x_okl_operands_tl_rec.id := l_okl_operands_tl_rec.id;
2775: END IF;
2776: IF (x_okl_operands_tl_rec.language = OKC_API.G_MISS_CHAR)
2770: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2771: END IF;
2772: IF (x_okl_operands_tl_rec.id = OKC_API.G_MISS_NUM)
2773: THEN
2774: x_okl_operands_tl_rec.id := l_okl_operands_tl_rec.id;
2775: END IF;
2776: IF (x_okl_operands_tl_rec.language = OKC_API.G_MISS_CHAR)
2777: THEN
2778: x_okl_operands_tl_rec.language := l_okl_operands_tl_rec.language;
2772: IF (x_okl_operands_tl_rec.id = OKC_API.G_MISS_NUM)
2773: THEN
2774: x_okl_operands_tl_rec.id := l_okl_operands_tl_rec.id;
2775: END IF;
2776: IF (x_okl_operands_tl_rec.language = OKC_API.G_MISS_CHAR)
2777: THEN
2778: x_okl_operands_tl_rec.language := l_okl_operands_tl_rec.language;
2779: END IF;
2780: IF (x_okl_operands_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2774: x_okl_operands_tl_rec.id := l_okl_operands_tl_rec.id;
2775: END IF;
2776: IF (x_okl_operands_tl_rec.language = OKC_API.G_MISS_CHAR)
2777: THEN
2778: x_okl_operands_tl_rec.language := l_okl_operands_tl_rec.language;
2779: END IF;
2780: IF (x_okl_operands_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2781: THEN
2782: x_okl_operands_tl_rec.source_lang := l_okl_operands_tl_rec.source_lang;
2776: IF (x_okl_operands_tl_rec.language = OKC_API.G_MISS_CHAR)
2777: THEN
2778: x_okl_operands_tl_rec.language := l_okl_operands_tl_rec.language;
2779: END IF;
2780: IF (x_okl_operands_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2781: THEN
2782: x_okl_operands_tl_rec.source_lang := l_okl_operands_tl_rec.source_lang;
2783: END IF;
2784: IF (x_okl_operands_tl_rec.sfwt_flag = OKC_API.G_MISS_CHAR)
2778: x_okl_operands_tl_rec.language := l_okl_operands_tl_rec.language;
2779: END IF;
2780: IF (x_okl_operands_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2781: THEN
2782: x_okl_operands_tl_rec.source_lang := l_okl_operands_tl_rec.source_lang;
2783: END IF;
2784: IF (x_okl_operands_tl_rec.sfwt_flag = OKC_API.G_MISS_CHAR)
2785: THEN
2786: x_okl_operands_tl_rec.sfwt_flag := l_okl_operands_tl_rec.sfwt_flag;
2780: IF (x_okl_operands_tl_rec.source_lang = OKC_API.G_MISS_CHAR)
2781: THEN
2782: x_okl_operands_tl_rec.source_lang := l_okl_operands_tl_rec.source_lang;
2783: END IF;
2784: IF (x_okl_operands_tl_rec.sfwt_flag = OKC_API.G_MISS_CHAR)
2785: THEN
2786: x_okl_operands_tl_rec.sfwt_flag := l_okl_operands_tl_rec.sfwt_flag;
2787: END IF;
2788: IF (x_okl_operands_tl_rec.description = OKC_API.G_MISS_CHAR)
2782: x_okl_operands_tl_rec.source_lang := l_okl_operands_tl_rec.source_lang;
2783: END IF;
2784: IF (x_okl_operands_tl_rec.sfwt_flag = OKC_API.G_MISS_CHAR)
2785: THEN
2786: x_okl_operands_tl_rec.sfwt_flag := l_okl_operands_tl_rec.sfwt_flag;
2787: END IF;
2788: IF (x_okl_operands_tl_rec.description = OKC_API.G_MISS_CHAR)
2789: THEN
2790: x_okl_operands_tl_rec.description := l_okl_operands_tl_rec.description;
2784: IF (x_okl_operands_tl_rec.sfwt_flag = OKC_API.G_MISS_CHAR)
2785: THEN
2786: x_okl_operands_tl_rec.sfwt_flag := l_okl_operands_tl_rec.sfwt_flag;
2787: END IF;
2788: IF (x_okl_operands_tl_rec.description = OKC_API.G_MISS_CHAR)
2789: THEN
2790: x_okl_operands_tl_rec.description := l_okl_operands_tl_rec.description;
2791: END IF;
2792: IF (x_okl_operands_tl_rec.created_by = OKC_API.G_MISS_NUM)
2786: x_okl_operands_tl_rec.sfwt_flag := l_okl_operands_tl_rec.sfwt_flag;
2787: END IF;
2788: IF (x_okl_operands_tl_rec.description = OKC_API.G_MISS_CHAR)
2789: THEN
2790: x_okl_operands_tl_rec.description := l_okl_operands_tl_rec.description;
2791: END IF;
2792: IF (x_okl_operands_tl_rec.created_by = OKC_API.G_MISS_NUM)
2793: THEN
2794: x_okl_operands_tl_rec.created_by := l_okl_operands_tl_rec.created_by;
2788: IF (x_okl_operands_tl_rec.description = OKC_API.G_MISS_CHAR)
2789: THEN
2790: x_okl_operands_tl_rec.description := l_okl_operands_tl_rec.description;
2791: END IF;
2792: IF (x_okl_operands_tl_rec.created_by = OKC_API.G_MISS_NUM)
2793: THEN
2794: x_okl_operands_tl_rec.created_by := l_okl_operands_tl_rec.created_by;
2795: END IF;
2796: IF (x_okl_operands_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2790: x_okl_operands_tl_rec.description := l_okl_operands_tl_rec.description;
2791: END IF;
2792: IF (x_okl_operands_tl_rec.created_by = OKC_API.G_MISS_NUM)
2793: THEN
2794: x_okl_operands_tl_rec.created_by := l_okl_operands_tl_rec.created_by;
2795: END IF;
2796: IF (x_okl_operands_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2797: THEN
2798: x_okl_operands_tl_rec.creation_date := l_okl_operands_tl_rec.creation_date;
2792: IF (x_okl_operands_tl_rec.created_by = OKC_API.G_MISS_NUM)
2793: THEN
2794: x_okl_operands_tl_rec.created_by := l_okl_operands_tl_rec.created_by;
2795: END IF;
2796: IF (x_okl_operands_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2797: THEN
2798: x_okl_operands_tl_rec.creation_date := l_okl_operands_tl_rec.creation_date;
2799: END IF;
2800: IF (x_okl_operands_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2794: x_okl_operands_tl_rec.created_by := l_okl_operands_tl_rec.created_by;
2795: END IF;
2796: IF (x_okl_operands_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2797: THEN
2798: x_okl_operands_tl_rec.creation_date := l_okl_operands_tl_rec.creation_date;
2799: END IF;
2800: IF (x_okl_operands_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2801: THEN
2802: x_okl_operands_tl_rec.last_updated_by := l_okl_operands_tl_rec.last_updated_by;
2796: IF (x_okl_operands_tl_rec.creation_date = OKC_API.G_MISS_DATE)
2797: THEN
2798: x_okl_operands_tl_rec.creation_date := l_okl_operands_tl_rec.creation_date;
2799: END IF;
2800: IF (x_okl_operands_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2801: THEN
2802: x_okl_operands_tl_rec.last_updated_by := l_okl_operands_tl_rec.last_updated_by;
2803: END IF;
2804: IF (x_okl_operands_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2798: x_okl_operands_tl_rec.creation_date := l_okl_operands_tl_rec.creation_date;
2799: END IF;
2800: IF (x_okl_operands_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2801: THEN
2802: x_okl_operands_tl_rec.last_updated_by := l_okl_operands_tl_rec.last_updated_by;
2803: END IF;
2804: IF (x_okl_operands_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2805: THEN
2806: x_okl_operands_tl_rec.last_update_date := l_okl_operands_tl_rec.last_update_date;
2800: IF (x_okl_operands_tl_rec.last_updated_by = OKC_API.G_MISS_NUM)
2801: THEN
2802: x_okl_operands_tl_rec.last_updated_by := l_okl_operands_tl_rec.last_updated_by;
2803: END IF;
2804: IF (x_okl_operands_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2805: THEN
2806: x_okl_operands_tl_rec.last_update_date := l_okl_operands_tl_rec.last_update_date;
2807: END IF;
2808: IF (x_okl_operands_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2802: x_okl_operands_tl_rec.last_updated_by := l_okl_operands_tl_rec.last_updated_by;
2803: END IF;
2804: IF (x_okl_operands_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2805: THEN
2806: x_okl_operands_tl_rec.last_update_date := l_okl_operands_tl_rec.last_update_date;
2807: END IF;
2808: IF (x_okl_operands_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2809: THEN
2810: x_okl_operands_tl_rec.last_update_login := l_okl_operands_tl_rec.last_update_login;
2804: IF (x_okl_operands_tl_rec.last_update_date = OKC_API.G_MISS_DATE)
2805: THEN
2806: x_okl_operands_tl_rec.last_update_date := l_okl_operands_tl_rec.last_update_date;
2807: END IF;
2808: IF (x_okl_operands_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2809: THEN
2810: x_okl_operands_tl_rec.last_update_login := l_okl_operands_tl_rec.last_update_login;
2811: END IF;
2812: RETURN(l_return_status);
2806: x_okl_operands_tl_rec.last_update_date := l_okl_operands_tl_rec.last_update_date;
2807: END IF;
2808: IF (x_okl_operands_tl_rec.last_update_login = OKC_API.G_MISS_NUM)
2809: THEN
2810: x_okl_operands_tl_rec.last_update_login := l_okl_operands_tl_rec.last_update_login;
2811: END IF;
2812: RETURN(l_return_status);
2813: END populate_new_record;
2814: ----------------------------------------
2811: END IF;
2812: RETURN(l_return_status);
2813: END populate_new_record;
2814: ----------------------------------------
2815: -- Set_Attributes for:OKL_OPERANDS_TL --
2816: ----------------------------------------
2817: FUNCTION Set_Attributes (
2818: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2819: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2814: ----------------------------------------
2815: -- Set_Attributes for:OKL_OPERANDS_TL --
2816: ----------------------------------------
2817: FUNCTION Set_Attributes (
2818: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2819: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2820: ) RETURN VARCHAR2 IS
2821: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2822: BEGIN
2815: -- Set_Attributes for:OKL_OPERANDS_TL --
2816: ----------------------------------------
2817: FUNCTION Set_Attributes (
2818: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
2819: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2820: ) RETURN VARCHAR2 IS
2821: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2822: BEGIN
2823: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2819: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
2820: ) RETURN VARCHAR2 IS
2821: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2822: BEGIN
2823: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2824: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
2825: x_okl_operands_tl_rec.SOURCE_LANG := USERENV('LANG');
2826: RETURN(l_return_status);
2827: END Set_Attributes;
2820: ) RETURN VARCHAR2 IS
2821: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2822: BEGIN
2823: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2824: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
2825: x_okl_operands_tl_rec.SOURCE_LANG := USERENV('LANG');
2826: RETURN(l_return_status);
2827: END Set_Attributes;
2828: BEGIN
2821: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2822: BEGIN
2823: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
2824: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
2825: x_okl_operands_tl_rec.SOURCE_LANG := USERENV('LANG');
2826: RETURN(l_return_status);
2827: END Set_Attributes;
2828: BEGIN
2829: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2836: RAISE OKC_API.G_EXCEPTION_ERROR;
2837: END IF;
2838: --- Setting item attributes
2839: l_return_status := Set_Attributes(
2840: p_okl_operands_tl_rec, -- IN
2841: l_okl_operands_tl_rec); -- OUT
2842: --- If any errors happen abort API
2843: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2844: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2837: END IF;
2838: --- Setting item attributes
2839: l_return_status := Set_Attributes(
2840: p_okl_operands_tl_rec, -- IN
2841: l_okl_operands_tl_rec); -- OUT
2842: --- If any errors happen abort API
2843: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2844: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2845: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2844: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2845: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2846: RAISE OKC_API.G_EXCEPTION_ERROR;
2847: END IF;
2848: l_return_status := populate_new_record(l_okl_operands_tl_rec, l_def_okl_operands_tl_rec);
2849: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2850: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2851: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2852: RAISE OKC_API.G_EXCEPTION_ERROR;
2850: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2851: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2852: RAISE OKC_API.G_EXCEPTION_ERROR;
2853: END IF;
2854: UPDATE OKL_OPERANDS_TL
2855: SET DESCRIPTION = l_def_okl_operands_tl_rec.description,
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2851: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2852: RAISE OKC_API.G_EXCEPTION_ERROR;
2853: END IF;
2854: UPDATE OKL_OPERANDS_TL
2855: SET DESCRIPTION = l_def_okl_operands_tl_rec.description,
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2852: RAISE OKC_API.G_EXCEPTION_ERROR;
2853: END IF;
2854: UPDATE OKL_OPERANDS_TL
2855: SET DESCRIPTION = l_def_okl_operands_tl_rec.description,
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2853: END IF;
2854: UPDATE OKL_OPERANDS_TL
2855: SET DESCRIPTION = l_def_okl_operands_tl_rec.description,
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2861: LAST_UPDATE_LOGIN = l_def_okl_operands_tl_rec.last_update_login
2854: UPDATE OKL_OPERANDS_TL
2855: SET DESCRIPTION = l_def_okl_operands_tl_rec.description,
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2861: LAST_UPDATE_LOGIN = l_def_okl_operands_tl_rec.last_update_login
2862: WHERE ID = l_def_okl_operands_tl_rec.id
2855: SET DESCRIPTION = l_def_okl_operands_tl_rec.description,
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2861: LAST_UPDATE_LOGIN = l_def_okl_operands_tl_rec.last_update_login
2862: WHERE ID = l_def_okl_operands_tl_rec.id
2863: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2856: CREATED_BY = l_def_okl_operands_tl_rec.created_by,
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2861: LAST_UPDATE_LOGIN = l_def_okl_operands_tl_rec.last_update_login
2862: WHERE ID = l_def_okl_operands_tl_rec.id
2863: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2864: --AND SOURCE_LANG = USERENV('LANG');
2857: SOURCE_LANG = l_def_okl_operands_tl_rec.source_lang,
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2861: LAST_UPDATE_LOGIN = l_def_okl_operands_tl_rec.last_update_login
2862: WHERE ID = l_def_okl_operands_tl_rec.id
2863: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2864: --AND SOURCE_LANG = USERENV('LANG');
2865:
2858: CREATION_DATE = l_def_okl_operands_tl_rec.creation_date,
2859: LAST_UPDATED_BY = l_def_okl_operands_tl_rec.last_updated_by,
2860: LAST_UPDATE_DATE = l_def_okl_operands_tl_rec.last_update_date,
2861: LAST_UPDATE_LOGIN = l_def_okl_operands_tl_rec.last_update_login
2862: WHERE ID = l_def_okl_operands_tl_rec.id
2863: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2864: --AND SOURCE_LANG = USERENV('LANG');
2865:
2866: UPDATE OKL_OPERANDS_TL
2862: WHERE ID = l_def_okl_operands_tl_rec.id
2863: AND USERENV('LANG') in (SOURCE_LANG, LANGUAGE);
2864: --AND SOURCE_LANG = USERENV('LANG');
2865:
2866: UPDATE OKL_OPERANDS_TL
2867: SET SFWT_FLAG = 'Y'
2868: WHERE ID = l_def_okl_operands_tl_rec.id
2869: AND SOURCE_LANG <> USERENV('LANG');
2870:
2864: --AND SOURCE_LANG = USERENV('LANG');
2865:
2866: UPDATE OKL_OPERANDS_TL
2867: SET SFWT_FLAG = 'Y'
2868: WHERE ID = l_def_okl_operands_tl_rec.id
2869: AND SOURCE_LANG <> USERENV('LANG');
2870:
2871: x_okl_operands_tl_rec := l_def_okl_operands_tl_rec;
2872: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2867: SET SFWT_FLAG = 'Y'
2868: WHERE ID = l_def_okl_operands_tl_rec.id
2869: AND SOURCE_LANG <> USERENV('LANG');
2870:
2871: x_okl_operands_tl_rec := l_def_okl_operands_tl_rec;
2872: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2873: EXCEPTION
2874: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2875: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2918: l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
2919: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2920: l_opdv_rec opdv_rec_type := p_opdv_rec;
2921: l_def_opdv_rec opdv_rec_type;
2922: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2923: lx_okl_operands_tl_rec okl_operands_tl_rec_type;
2924: l_opd_rec opd_rec_type;
2925: lx_opd_rec opd_rec_type;
2926: -------------------------------
2919: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2920: l_opdv_rec opdv_rec_type := p_opdv_rec;
2921: l_def_opdv_rec opdv_rec_type;
2922: l_okl_operands_tl_rec okl_operands_tl_rec_type;
2923: lx_okl_operands_tl_rec okl_operands_tl_rec_type;
2924: l_opd_rec opd_rec_type;
2925: lx_opd_rec opd_rec_type;
2926: -------------------------------
2927: -- FUNCTION fill_who_columns --
3087:
3088: --------------------------------------
3089: -- Move VIEW record to "Child" records
3090: --------------------------------------
3091: migrate(l_def_opdv_rec, l_okl_operands_tl_rec);
3092: migrate(l_def_opdv_rec, l_opd_rec);
3093: --------------------------------------------
3094: -- Call the UPDATE_ROW for each child record
3095: --------------------------------------------
3097: p_init_msg_list,
3098: x_return_status,
3099: x_msg_count,
3100: x_msg_data,
3101: l_okl_operands_tl_rec,
3102: lx_okl_operands_tl_rec
3103: );
3104: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3105: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3098: x_return_status,
3099: x_msg_count,
3100: x_msg_data,
3101: l_okl_operands_tl_rec,
3102: lx_okl_operands_tl_rec
3103: );
3104: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3105: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3106: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3105: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3106: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3107: RAISE OKC_API.G_EXCEPTION_ERROR;
3108: END IF;
3109: migrate(lx_okl_operands_tl_rec, l_def_opdv_rec);
3110: update_row(
3111: p_init_msg_list,
3112: x_return_status,
3113: x_msg_count,
3296: '_PVT'
3297: );
3298: END delete_row;
3299: ------------------------------------
3300: -- delete_row for:OKL_OPERANDS_TL --
3301: ------------------------------------
3302: PROCEDURE delete_row(
3303: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
3304: x_return_status OUT NOCOPY VARCHAR2,
3303: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
3304: x_return_status OUT NOCOPY VARCHAR2,
3305: x_msg_count OUT NOCOPY NUMBER,
3306: x_msg_data OUT NOCOPY VARCHAR2,
3307: p_okl_operands_tl_rec IN okl_operands_tl_rec_type) IS
3308:
3309: l_api_version CONSTANT NUMBER := 1;
3310: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
3311: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3308:
3309: l_api_version CONSTANT NUMBER := 1;
3310: l_api_name CONSTANT VARCHAR2(30) := 'TL_delete_row';
3311: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3312: l_okl_operands_tl_rec okl_operands_tl_rec_type:= p_okl_operands_tl_rec;
3313: l_row_notfound BOOLEAN := TRUE;
3314: ----------------------------------------
3315: -- Set_Attributes for:OKL_OPERANDS_TL --
3316: ----------------------------------------
3311: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3312: l_okl_operands_tl_rec okl_operands_tl_rec_type:= p_okl_operands_tl_rec;
3313: l_row_notfound BOOLEAN := TRUE;
3314: ----------------------------------------
3315: -- Set_Attributes for:OKL_OPERANDS_TL --
3316: ----------------------------------------
3317: FUNCTION Set_Attributes (
3318: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
3319: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
3314: ----------------------------------------
3315: -- Set_Attributes for:OKL_OPERANDS_TL --
3316: ----------------------------------------
3317: FUNCTION Set_Attributes (
3318: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
3319: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
3320: ) RETURN VARCHAR2 IS
3321: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3322: BEGIN
3315: -- Set_Attributes for:OKL_OPERANDS_TL --
3316: ----------------------------------------
3317: FUNCTION Set_Attributes (
3318: p_okl_operands_tl_rec IN okl_operands_tl_rec_type,
3319: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
3320: ) RETURN VARCHAR2 IS
3321: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3322: BEGIN
3323: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
3319: x_okl_operands_tl_rec OUT NOCOPY okl_operands_tl_rec_type
3320: ) RETURN VARCHAR2 IS
3321: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3322: BEGIN
3323: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
3324: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
3325: RETURN(l_return_status);
3326: END Set_Attributes;
3327: BEGIN
3320: ) RETURN VARCHAR2 IS
3321: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3322: BEGIN
3323: x_okl_operands_tl_rec := p_okl_operands_tl_rec;
3324: x_okl_operands_tl_rec.LANGUAGE := USERENV('LANG');
3325: RETURN(l_return_status);
3326: END Set_Attributes;
3327: BEGIN
3328: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3335: RAISE OKC_API.G_EXCEPTION_ERROR;
3336: END IF;
3337: --- Setting item attributes
3338: l_return_status := Set_Attributes(
3339: p_okl_operands_tl_rec, -- IN
3340: l_okl_operands_tl_rec); -- OUT
3341: --- If any errors happen abort API
3342: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3336: END IF;
3337: --- Setting item attributes
3338: l_return_status := Set_Attributes(
3339: p_okl_operands_tl_rec, -- IN
3340: l_okl_operands_tl_rec); -- OUT
3341: --- If any errors happen abort API
3342: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3344: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3344: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3347: DELETE FROM OKL_OPERANDS_TL
3348: WHERE ID = l_okl_operands_tl_rec.id;
3349:
3350: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3351: EXCEPTION
3344: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3347: DELETE FROM OKL_OPERANDS_TL
3348: WHERE ID = l_okl_operands_tl_rec.id;
3349:
3350: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3351: EXCEPTION
3352: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3394: l_api_version CONSTANT NUMBER := 1;
3395: l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
3396: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3397: l_opdv_rec opdv_rec_type := p_opdv_rec;
3398: l_okl_operands_tl_rec okl_operands_tl_rec_type;
3399: l_opd_rec opd_rec_type;
3400: BEGIN
3401: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3402: G_PKG_NAME,
3412: END IF;
3413: --------------------------------------
3414: -- Move VIEW record to "Child" records
3415: --------------------------------------
3416: migrate(l_opdv_rec, l_okl_operands_tl_rec);
3417: migrate(l_opdv_rec, l_opd_rec);
3418: --------------------------------------------
3419: -- Call the DELETE_ROW for each child record
3420: --------------------------------------------
3422: p_init_msg_list,
3423: x_return_status,
3424: x_msg_count,
3425: x_msg_data,
3426: l_okl_operands_tl_rec
3427: );
3428: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3429: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3430: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3572: f_ludate := nvl(to_date(p_last_update_date, 'YYYY/MM/DD'), sysdate);
3573:
3574: SELECT LAST_UPDATED_BY, LAST_UPDATE_DATE
3575: INTO db_luby, db_ludate
3576: FROM OKL_OPERANDS_TL
3577: where ID = to_number(p_opdv_rec.id)
3578: and USERENV('LANG') =language;
3579:
3580: IF(fnd_load_util.upload_test(f_luby, f_ludate, db_luby,
3578: and USERENV('LANG') =language;
3579:
3580: IF(fnd_load_util.upload_test(f_luby, f_ludate, db_luby,
3581: db_ludate, '')) then
3582: UPDATE OKL_OPERANDS_TL
3583: SET DESCRIPTION = p_opdv_rec.description,
3584: LAST_UPDATE_DATE = f_ludate,
3585: LAST_UPDATED_BY = f_luby,
3586: LAST_UPDATE_LOGIN = 0,
3633: LAST_UPDATED_BY = f_luby,
3634: LAST_UPDATE_LOGIN = 0
3635: WHERE ID = to_number(p_opdv_rec.id);
3636: --Update _TL
3637: UPDATE OKL_OPERANDS_TL
3638: SET DESCRIPTION = p_opdv_rec.DESCRIPTION,
3639: LAST_UPDATE_DATE = f_ludate,
3640: LAST_UPDATED_BY = f_luby,
3641: LAST_UPDATE_LOGIN = 0,
3643: WHERE ID = to_number(p_opdv_rec.id)
3644: AND USERENV('LANG') IN (language,source_lang);
3645: IF(sql%notfound) THEN
3646:
3647: INSERT INTO OKL_OPERANDS_TL
3648: (
3649: ID,
3650: LANGUAGE,
3651: SOURCE_LANG,
3670: FROM FND_LANGUAGES L
3671: WHERE L.INSTALLED_FLAG IN ('I','B')
3672: AND NOT EXISTS
3673: (SELECT NULL
3674: FROM OKL_OPERANDS_TL TL
3675: WHERE TL.ID = TO_NUMBER(p_opdv_rec.id)
3676: AND TL.LANGUAGE = L.LANGUAGE_CODE);
3677: end if;
3678:
3722: from OKL_OPERANDS_B
3723: where ( ID = TO_NUMBER(p_opdv_rec.id) OR
3724: (NAME = p_opdv_rec.name AND VERSION = p_opdv_rec.version)));
3725:
3726: INSERT INTO OKL_OPERANDS_TL
3727: (
3728: ID,
3729: LANGUAGE,
3730: SOURCE_LANG,
3750: FROM FND_LANGUAGES L
3751: WHERE L.INSTALLED_FLAG IN ('I','B')
3752: AND NOT EXISTS
3753: (SELECT NULL
3754: FROM OKL_OPERANDS_TL TL
3755: WHERE TL.ID = TO_NUMBER(p_opdv_rec.id)
3756: AND TL.LANGUAGE = L.LANGUAGE_CODE);
3757:
3758: END LOAD_ROW;