DBA Data[Home] [Help]

APPS.DT_API dependencies on DT_API

Line 1: PACKAGE BODY DT_API AS

1: PACKAGE BODY DT_API AS
2: /* $Header: dtapiapi.pkb 120.0 2005/05/27 23:09:43 appldev noship $ */
3: g_package VARCHAR2(33) := ' dt_api.'; -- Global package name
4: g_debug BOOLEAN; -- debug var. no need to initialise here because
5: -- it is set on every entry point into dt_api

Line 3: g_package VARCHAR2(33) := ' dt_api.'; -- Global package name

1: PACKAGE BODY DT_API AS
2: /* $Header: dtapiapi.pkb 120.0 2005/05/27 23:09:43 appldev noship $ */
3: g_package VARCHAR2(33) := ' dt_api.'; -- Global package name
4: g_debug BOOLEAN; -- debug var. no need to initialise here because
5: -- it is set on every entry point into dt_api
6: -- (i.e. every public proc/fct)
7: g_oracle_db_version CONSTANT NUMBER := hr_general2.get_oracle_db_version;

Line 5: -- it is set on every entry point into dt_api

1: PACKAGE BODY DT_API AS
2: /* $Header: dtapiapi.pkb 120.0 2005/05/27 23:09:43 appldev noship $ */
3: g_package VARCHAR2(33) := ' dt_api.'; -- Global package name
4: g_debug BOOLEAN; -- debug var. no need to initialise here because
5: -- it is set on every entry point into dt_api
6: -- (i.e. every public proc/fct)
7: g_oracle_db_version CONSTANT NUMBER := hr_general2.get_oracle_db_version;
8: -- holds the current ORACLE DB Major
9: -- release number (e.g. 8.1, 9.0, 9.1)

Line 11: ' /* dynamic SQL from dt_api.{proc} for'||

7: g_oracle_db_version CONSTANT NUMBER := hr_general2.get_oracle_db_version;
8: -- holds the current ORACLE DB Major
9: -- release number (e.g. 8.1, 9.0, 9.1)
10: g_dynamic_sql_comment CONSTANT VARCHAR2(500) :=
11: ' /* dynamic SQL from dt_api.{proc} for'||
12: ' ORACLE '||TO_CHAR(g_oracle_db_version)||' */'; -- dynamic SQL comment str
13: g_dynamic_sql VARCHAR2(2000); -- dynamic SQL text string
14: -- set private package vars once to avoid cross package calls to hr_api
15: -- even though it might be redundant because they are defined as

Line 112: dt_api.g_dynamic_sql :=

108: -- add locking condition
109: g_dynamic_sql := g_dynamic_sql || ' FOR UPDATE NOWAIT';
110: END IF;
111: -- set the dynamic SQL comment for identification
112: dt_api.g_dynamic_sql :=
113: dt_api.g_dynamic_sql||
114: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_effective_rows');
115: -- open cursor, bulk fetch all the rows and close
116: OPEN l_csr FOR g_dynamic_sql USING p_base_key_value, p_date_from;

Line 113: dt_api.g_dynamic_sql||

109: g_dynamic_sql := g_dynamic_sql || ' FOR UPDATE NOWAIT';
110: END IF;
111: -- set the dynamic SQL comment for identification
112: dt_api.g_dynamic_sql :=
113: dt_api.g_dynamic_sql||
114: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_effective_rows');
115: -- open cursor, bulk fetch all the rows and close
116: OPEN l_csr FOR g_dynamic_sql USING p_base_key_value, p_date_from;
117: -- NOTE: ORACLE VERSION CODE SWITCH

Line 114: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_effective_rows');

110: END IF;
111: -- set the dynamic SQL comment for identification
112: dt_api.g_dynamic_sql :=
113: dt_api.g_dynamic_sql||
114: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_effective_rows');
115: -- open cursor, bulk fetch all the rows and close
116: OPEN l_csr FOR g_dynamic_sql USING p_base_key_value, p_date_from;
117: -- NOTE: ORACLE VERSION CODE SWITCH
118: -- ================================

Line 155: p_effective_rows := dt_api.g_empty_effective_rows;

151: END LOOP;
152: -- do we need to check that the current row exists and raise an error?
153: IF p_date_from_valid AND l_idx = 0 THEN
154: -- clear the returning OUTs
155: p_effective_rows := dt_api.g_empty_effective_rows;
156: p_date_from_row_idx := NULL;
157: -- As no rows were returned we must error
158: hr_utility.set_message(801, 'HR_7180_DT_NO_ROW_EXIST');
159: hr_utility.set_message_token('TABLE_NAME', p_base_table_name);

Line 174: p_effective_rows := dt_api.g_empty_effective_rows;

170: IF l_csr%ISOPEN THEN
171: CLOSE l_csr;
172: END IF;
173: -- clear the returning OUTs
174: p_effective_rows := dt_api.g_empty_effective_rows;
175: p_date_from_row_idx := NULL;
176: -- no rows exist as of the date passed in
177: -- therefore a serious integrity problem has ocurred
178: hr_utility.set_message(801, 'HR_7423_DT_INVALID_ID');

Line 187: p_effective_rows := dt_api.g_empty_effective_rows;

183: IF l_csr%ISOPEN THEN
184: CLOSE l_csr;
185: END IF;
186: -- clear the returning OUTs
187: p_effective_rows := dt_api.g_empty_effective_rows;
188: p_date_from_row_idx := NULL;
189: -- The object is locked therefore we need to supply a meaningful
190: -- error message.
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');

Line 200: p_effective_rows := dt_api.g_empty_effective_rows;

196: IF l_csr%ISOPEN THEN
197: CLOSE l_csr;
198: END IF;
199: -- clear the returning OUTs
200: p_effective_rows := dt_api.g_empty_effective_rows;
201: p_date_from_row_idx := NULL;
202: -- unexpected system error, so raise
203: RAISE;
204: END get_effective_rows;

Line 253: l_return_date DATE := dt_api.g_eot; -- default the returning date to eot

249: l_table_name VARCHAR2(30);
250: l_key_column VARCHAR2(30);
251: l_key_value NUMBER(15);
252: l_proc VARCHAR2(72);
253: l_return_date DATE := dt_api.g_eot; -- default the returning date to eot
254: l_max_date DATE;
255: l_csr g_csr_type;
256: --
257: BEGIN

Line 307: IF NOT ((NVL(l_table_name, dt_api.g_varchar2) =

303: l_key_value := p_key_value10;
304: END IF;
305: -- Ensure that all the working details have been specified
306: -- note: it is ignored if not set correctly
307: IF NOT ((NVL(l_table_name, dt_api.g_varchar2) =
308: dt_api.g_varchar2) OR
309: (NVL(l_key_column, dt_api.g_varchar2) =
310: dt_api.g_varchar2) OR
311: (NVL(l_key_value, dt_api.g_number) =

Line 308: dt_api.g_varchar2) OR

304: END IF;
305: -- Ensure that all the working details have been specified
306: -- note: it is ignored if not set correctly
307: IF NOT ((NVL(l_table_name, dt_api.g_varchar2) =
308: dt_api.g_varchar2) OR
309: (NVL(l_key_column, dt_api.g_varchar2) =
310: dt_api.g_varchar2) OR
311: (NVL(l_key_value, dt_api.g_number) =
312: dt_api.g_number)) THEN

Line 309: (NVL(l_key_column, dt_api.g_varchar2) =

305: -- Ensure that all the working details have been specified
306: -- note: it is ignored if not set correctly
307: IF NOT ((NVL(l_table_name, dt_api.g_varchar2) =
308: dt_api.g_varchar2) OR
309: (NVL(l_key_column, dt_api.g_varchar2) =
310: dt_api.g_varchar2) OR
311: (NVL(l_key_value, dt_api.g_number) =
312: dt_api.g_number)) THEN
313: -- we lower the table and column name to always ensure that the

Line 310: dt_api.g_varchar2) OR

306: -- note: it is ignored if not set correctly
307: IF NOT ((NVL(l_table_name, dt_api.g_varchar2) =
308: dt_api.g_varchar2) OR
309: (NVL(l_key_column, dt_api.g_varchar2) =
310: dt_api.g_varchar2) OR
311: (NVL(l_key_value, dt_api.g_number) =
312: dt_api.g_number)) THEN
313: -- we lower the table and column name to always ensure that the
314: -- SQL will be exactly the same because callers may have passed

Line 311: (NVL(l_key_value, dt_api.g_number) =

307: IF NOT ((NVL(l_table_name, dt_api.g_varchar2) =
308: dt_api.g_varchar2) OR
309: (NVL(l_key_column, dt_api.g_varchar2) =
310: dt_api.g_varchar2) OR
311: (NVL(l_key_value, dt_api.g_number) =
312: dt_api.g_number)) THEN
313: -- we lower the table and column name to always ensure that the
314: -- SQL will be exactly the same because callers may have passed
315: -- the table/column name in any case format

Line 312: dt_api.g_number)) THEN

308: dt_api.g_varchar2) OR
309: (NVL(l_key_column, dt_api.g_varchar2) =
310: dt_api.g_varchar2) OR
311: (NVL(l_key_value, dt_api.g_number) =
312: dt_api.g_number)) THEN
313: -- we lower the table and column name to always ensure that the
314: -- SQL will be exactly the same because callers may have passed
315: -- the table/column name in any case format
316: l_table_name := LOWER(l_table_name);

Line 327: dt_api.g_dynamic_sql :=

323: -- note: if locking is required, then all rows identified by the query
324: -- (not just the 1 row returned) will be locked.
325: -- the subquery is used to ensure that at least one row exists before
326: -- the proposed effective date
327: dt_api.g_dynamic_sql :=
328: 'SELECT oq.effective_end_date '||
329: 'FROM '||l_table_name||' oq '||
330: 'WHERE oq.'||l_key_column||' = :l_key_value '||
331: 'AND oq.effective_end_date >= :p_effective_date '||

Line 338: dt_api.g_dynamic_sql := dt_api.g_dynamic_sql||' FOR UPDATE NOWAIT';

334: ' AND sq.effective_start_date <= :p_effective_date) '||
335: 'ORDER BY oq.effective_end_date DESC';
336: -- do we need to lock?
337: IF p_lock_rows THEN
338: dt_api.g_dynamic_sql := dt_api.g_dynamic_sql||' FOR UPDATE NOWAIT';
339: END IF;
340: -- set the dynamic SQL comment for identification
341: dt_api.g_dynamic_sql :=
342: dt_api.g_dynamic_sql||

Line 341: dt_api.g_dynamic_sql :=

337: IF p_lock_rows THEN
338: dt_api.g_dynamic_sql := dt_api.g_dynamic_sql||' FOR UPDATE NOWAIT';
339: END IF;
340: -- set the dynamic SQL comment for identification
341: dt_api.g_dynamic_sql :=
342: dt_api.g_dynamic_sql||
343: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_parent_min_date');
344: -- OPEN the cursor
345: OPEN l_csr

Line 342: dt_api.g_dynamic_sql||

338: dt_api.g_dynamic_sql := dt_api.g_dynamic_sql||' FOR UPDATE NOWAIT';
339: END IF;
340: -- set the dynamic SQL comment for identification
341: dt_api.g_dynamic_sql :=
342: dt_api.g_dynamic_sql||
343: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_parent_min_date');
344: -- OPEN the cursor
345: OPEN l_csr
346: FOR g_dynamic_sql

Line 343: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_parent_min_date');

339: END IF;
340: -- set the dynamic SQL comment for identification
341: dt_api.g_dynamic_sql :=
342: dt_api.g_dynamic_sql||
343: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_parent_min_date');
344: -- OPEN the cursor
345: OPEN l_csr
346: FOR g_dynamic_sql
347: USING l_key_value, p_effective_date, p_effective_date;

Line 432: IF (p_effective_date < dt_api.g_sot) THEN

428: p_argument => 'p_effective_date',
429: p_argument_value => p_effective_date);
430: END IF;
431: -- [ end of change 30.14 ]
432: IF (p_effective_date < dt_api.g_sot) THEN
433: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE', l_proc);
435: hr_utility.set_message_token('STEP','10');
436: hr_utility.raise_error;

Line 438: -- Ensure p_effective_date is not later than dt_api.g_eot end of time

434: hr_utility.set_message_token('PROCEDURE', l_proc);
435: hr_utility.set_message_token('STEP','10');
436: hr_utility.raise_error;
437: END IF;
438: -- Ensure p_effective_date is not later than dt_api.g_eot end of time
439: IF (p_effective_date > dt_api.g_eot) THEN
440: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
441: hr_utility.set_message_token('PROCEDURE', l_proc);
442: hr_utility.set_message_token('STEP','20');

Line 439: IF (p_effective_date > dt_api.g_eot) THEN

435: hr_utility.set_message_token('STEP','10');
436: hr_utility.raise_error;
437: END IF;
438: -- Ensure p_effective_date is not later than dt_api.g_eot end of time
439: IF (p_effective_date > dt_api.g_eot) THEN
440: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
441: hr_utility.set_message_token('PROCEDURE', l_proc);
442: hr_utility.set_message_token('STEP','20');
443: hr_utility.raise_error;

Line 504: dt_api.g_dynamic_sql :=

500: 'SELECT MAX(t.effective_end_date) '||
501: 'FROM '||LOWER(p_base_table_name)||' t '||
502: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
503: -- set the dynamic SQL comment for identification
504: dt_api.g_dynamic_sql :=
505: dt_api.g_dynamic_sql||
506: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_max_end_date');
507: --
508: EXECUTE IMMEDIATE g_dynamic_sql

Line 505: dt_api.g_dynamic_sql||

501: 'FROM '||LOWER(p_base_table_name)||' t '||
502: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
503: -- set the dynamic SQL comment for identification
504: dt_api.g_dynamic_sql :=
505: dt_api.g_dynamic_sql||
506: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_max_end_date');
507: --
508: EXECUTE IMMEDIATE g_dynamic_sql
509: INTO l_max_date

Line 506: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_max_end_date');

502: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
503: -- set the dynamic SQL comment for identification
504: dt_api.g_dynamic_sql :=
505: dt_api.g_dynamic_sql||
506: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','return_max_end_date');
507: --
508: EXECUTE IMMEDIATE g_dynamic_sql
509: INTO l_max_date
510: USING p_base_key_value;

Line 600: dt_api.g_dynamic_sql :=

596: 'WHERE t2.'||p_child_key_column||' = t1.'||p_child_key_column||
597: ' GROUP BY t2.'||p_child_key_column||')'||
598: ' FOR UPDATE NOWAIT';
599: -- set the dynamic SQL comment for identification
600: dt_api.g_dynamic_sql :=
601: dt_api.g_dynamic_sql||
602: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','lck_child');
603: -- open a cursor
604: OPEN l_cursor FOR g_dynamic_sql USING p_parent_key_value;

Line 601: dt_api.g_dynamic_sql||

597: ' GROUP BY t2.'||p_child_key_column||')'||
598: ' FOR UPDATE NOWAIT';
599: -- set the dynamic SQL comment for identification
600: dt_api.g_dynamic_sql :=
601: dt_api.g_dynamic_sql||
602: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','lck_child');
603: -- open a cursor
604: OPEN l_cursor FOR g_dynamic_sql USING p_parent_key_value;
605: -- NOTE: ORACLE VERSION CODE SWITCH

Line 602: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','lck_child');

598: ' FOR UPDATE NOWAIT';
599: -- set the dynamic SQL comment for identification
600: dt_api.g_dynamic_sql :=
601: dt_api.g_dynamic_sql||
602: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','lck_child');
603: -- open a cursor
604: OPEN l_cursor FOR g_dynamic_sql USING p_parent_key_value;
605: -- NOTE: ORACLE VERSION CODE SWITCH
606: -- ================================

Line 982: dt_api.g_dynamic_sql :=

978: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value '||
979: 'AND :p_effective_date '||
980: 'BETWEEN t.effective_start_date AND t.effective_end_date';
981: -- set the dynamic SQL comment for identification
982: dt_api.g_dynamic_sql :=
983: dt_api.g_dynamic_sql||
984: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_correction_dates');
985: -- native dynamic PL/SQL call placing result directly into
986: -- OUT params

Line 983: dt_api.g_dynamic_sql||

979: 'AND :p_effective_date '||
980: 'BETWEEN t.effective_start_date AND t.effective_end_date';
981: -- set the dynamic SQL comment for identification
982: dt_api.g_dynamic_sql :=
983: dt_api.g_dynamic_sql||
984: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_correction_dates');
985: -- native dynamic PL/SQL call placing result directly into
986: -- OUT params
987: EXECUTE IMMEDIATE g_dynamic_sql

Line 984: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_correction_dates');

980: 'BETWEEN t.effective_start_date AND t.effective_end_date';
981: -- set the dynamic SQL comment for identification
982: dt_api.g_dynamic_sql :=
983: dt_api.g_dynamic_sql||
984: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_correction_dates');
985: -- native dynamic PL/SQL call placing result directly into
986: -- OUT params
987: EXECUTE IMMEDIATE g_dynamic_sql
988: INTO p_validation_start_date

Line 1257: (p_date_from => dt_api.g_sot,

1253: Hr_Utility.Set_Location('Entering:'||l_proc, 5);
1254: END IF;
1255: -- get and lock the effective rows from the start of time
1256: get_effective_rows
1257: (p_date_from => dt_api.g_sot,
1258: p_base_table_name => p_base_table_name,
1259: p_base_key_column => p_base_key_column,
1260: p_base_key_value => p_base_key_value,
1261: p_lock_rows => TRUE,

Line 1402: ((NVL(l_child_table_name, dt_api.g_varchar2) =

1398: l_child_alt_base_key_column := p_child_alt_base_key_column10;
1399: END IF;
1400: -- ensure that all the working child details have been specified
1401: IF ((p_base_key_value IS NOT NULL) AND NOT
1402: ((NVL(l_child_table_name, dt_api.g_varchar2) =
1403: dt_api.g_varchar2) OR
1404: (NVL(l_child_key_column, dt_api.g_varchar2) =
1405: dt_api.g_varchar2))) THEN
1406: -- all the child arguments have been specified therefore we must lock

Line 1403: dt_api.g_varchar2) OR

1399: END IF;
1400: -- ensure that all the working child details have been specified
1401: IF ((p_base_key_value IS NOT NULL) AND NOT
1402: ((NVL(l_child_table_name, dt_api.g_varchar2) =
1403: dt_api.g_varchar2) OR
1404: (NVL(l_child_key_column, dt_api.g_varchar2) =
1405: dt_api.g_varchar2))) THEN
1406: -- all the child arguments have been specified therefore we must lock
1407: -- the child rows (if they exist).

Line 1404: (NVL(l_child_key_column, dt_api.g_varchar2) =

1400: -- ensure that all the working child details have been specified
1401: IF ((p_base_key_value IS NOT NULL) AND NOT
1402: ((NVL(l_child_table_name, dt_api.g_varchar2) =
1403: dt_api.g_varchar2) OR
1404: (NVL(l_child_key_column, dt_api.g_varchar2) =
1405: dt_api.g_varchar2))) THEN
1406: -- all the child arguments have been specified therefore we must lock
1407: -- the child rows (if they exist).
1408: Lck_Child

Line 1405: dt_api.g_varchar2))) THEN

1401: IF ((p_base_key_value IS NOT NULL) AND NOT
1402: ((NVL(l_child_table_name, dt_api.g_varchar2) =
1403: dt_api.g_varchar2) OR
1404: (NVL(l_child_key_column, dt_api.g_varchar2) =
1405: dt_api.g_varchar2))) THEN
1406: -- all the child arguments have been specified therefore we must lock
1407: -- the child rows (if they exist).
1408: Lck_Child
1409: (p_child_table_name => LOWER(l_child_table_name),

Line 1514: dt_api.g_eot) THEN

1510: p_date_from_row_idx => l_date_from_row_idx);
1511: -- Providing the current effective end date is not the end of time
1512: -- then we must set the validation dates
1513: IF (l_effective_rows(l_date_from_row_idx).effective_end_date <>
1514: dt_api.g_eot) THEN
1515: -- get the parent min end date
1516: l_validation_end_date :=
1517: return_parent_min_date
1518: (p_effective_date => p_effective_date,

Line 1652: dt_api.g_eot) THEN

1648: p_date_from_row_idx => l_date_from_row_idx);
1649: -- Providing the current effective end date is not the end of time
1650: -- then we must set the validation dates
1651: IF (l_effective_rows(l_date_from_row_idx).effective_end_date <>
1652: dt_api.g_eot) THEN
1653: -- check to see if future rows exist
1654: IF l_effective_rows.COUNT > l_date_from_row_idx THEN
1655: -- future rows exist so set the future effective end date
1656: -- to the end date of the next datetrack row after the row for the

Line 1705: NVL(l_future_effective_end_date,dt_api.g_eot));

1701: p_key_value9 => p_parent_key_value9,
1702: p_table_name10 => p_parent_table_name10,
1703: p_key_column10 => p_parent_key_column10,
1704: p_key_value10 => p_parent_key_value10),
1705: NVL(l_future_effective_end_date,dt_api.g_eot));
1706: -- if the validation end date is set to the current effective end date
1707: -- then we must error as we cannot extend the end date of the current
1708: -- row
1709: IF (l_validation_end_date <=

Line 1887: IF (l_datetrack_mode = dt_api.g_insert) THEN

1883: -- removed the hr_api.mandatory_arg_error for p_base_key_value
1884: -- [ end of change 30.15 ]
1885: -- [ end of change 30.14 ]
1886: --
1887: IF (l_datetrack_mode = dt_api.g_insert) THEN
1888: --
1889: Get_Insert_Dates
1890: (p_effective_date => p_effective_date,
1891: p_base_table_name => p_base_table_name,

Line 1928: ELSIF (l_datetrack_mode = dt_api.g_correction) THEN

1924: p_enforce_foreign_locking => p_enforce_foreign_locking,
1925: p_validation_start_date => p_validation_start_date,
1926: p_validation_end_date => p_validation_end_date);
1927: --
1928: ELSIF (l_datetrack_mode = dt_api.g_correction) THEN
1929: --
1930: Get_Correction_Dates
1931: (p_effective_date => p_effective_date,
1932: p_base_table_name => p_base_table_name,

Line 1938: ELSIF (l_datetrack_mode = dt_api.g_update) THEN

1934: p_base_key_value => p_base_key_value,
1935: p_validation_start_date => p_validation_start_date,
1936: p_validation_end_date => p_validation_end_date);
1937: --
1938: ELSIF (l_datetrack_mode = dt_api.g_update) THEN
1939: --
1940: Get_Update_Dates
1941: (p_effective_date => p_effective_date,
1942: p_base_table_name => p_base_table_name,

Line 1948: ELSIF (l_datetrack_mode = dt_api.g_zap) THEN

1944: p_base_key_value => p_base_key_value,
1945: p_validation_start_date => p_validation_start_date,
1946: p_validation_end_date => p_validation_end_date);
1947: --
1948: ELSIF (l_datetrack_mode = dt_api.g_zap) THEN
1949: --
1950: Get_Zap_Dates
1951: (p_effective_date => p_effective_date,
1952: p_base_table_name => p_base_table_name,

Line 1958: ELSIF (l_datetrack_mode = dt_api.g_delete) THEN

1954: p_base_key_value => p_base_key_value,
1955: p_validation_start_date => p_validation_start_date,
1956: p_validation_end_date => p_validation_end_date);
1957: --
1958: ELSIF (l_datetrack_mode = dt_api.g_delete) THEN
1959: --
1960: Get_Delete_Dates
1961: (p_effective_date => p_effective_date,
1962: p_base_table_name => p_base_table_name,

Line 1999: ELSIF (l_datetrack_mode = dt_api.g_update_override) THEN

1995: p_enforce_foreign_locking => p_enforce_foreign_locking,
1996: p_validation_start_date => p_validation_start_date,
1997: p_validation_end_date => p_validation_end_date);
1998: --
1999: ELSIF (l_datetrack_mode = dt_api.g_update_override) THEN
2000: --
2001: Get_Update_Override_Dates
2002: (p_effective_date => p_effective_date,
2003: p_base_table_name => p_base_table_name,

Line 2009: ELSIF (l_datetrack_mode = dt_api.g_update_change_insert) THEN

2005: p_base_key_value => p_base_key_value,
2006: p_validation_start_date => p_validation_start_date,
2007: p_validation_end_date => p_validation_end_date);
2008: --
2009: ELSIF (l_datetrack_mode = dt_api.g_update_change_insert) THEN
2010: --
2011: Get_Update_Change_Insert_Dates
2012: (p_effective_date => p_effective_date,
2013: p_base_table_name => p_base_table_name,

Line 2019: ELSIF (l_datetrack_mode = dt_api.g_future_change) THEN

2015: p_base_key_value => p_base_key_value,
2016: p_validation_start_date => p_validation_start_date,
2017: p_validation_end_date => p_validation_end_date);
2018: --
2019: ELSIF (l_datetrack_mode = dt_api.g_future_change) THEN
2020: --
2021: Get_Future_Change_Dates
2022: (p_effective_date => p_effective_date,
2023: p_base_table_name => p_base_table_name,

Line 2059: ELSIF (l_datetrack_mode = dt_api.g_delete_next_change) THEN

2055: p_parent_key_value10 => p_parent_key_value10,
2056: p_validation_start_date => p_validation_start_date,
2057: p_validation_end_date => p_validation_end_date);
2058: --
2059: ELSIF (l_datetrack_mode = dt_api.g_delete_next_change) THEN
2060: --
2061: Get_Delete_Next_Change_Dates
2062: (p_effective_date => p_effective_date,
2063: p_base_table_name => p_base_table_name,

Line 2139: IF (p_datetrack_mode = dt_api.g_correction OR

2135: p_argument => 'datetrack_mode',
2136: p_argument_value => p_datetrack_mode);
2137: END IF;
2138: -- Check the mode is valid
2139: IF (p_datetrack_mode = dt_api.g_correction OR
2140: p_datetrack_mode = dt_api.g_update OR
2141: p_datetrack_mode = dt_api.g_update_override OR
2142: p_datetrack_mode = dt_api.g_update_change_insert) THEN
2143: IF g_debug THEN

Line 2140: p_datetrack_mode = dt_api.g_update OR

2136: p_argument_value => p_datetrack_mode);
2137: END IF;
2138: -- Check the mode is valid
2139: IF (p_datetrack_mode = dt_api.g_correction OR
2140: p_datetrack_mode = dt_api.g_update OR
2141: p_datetrack_mode = dt_api.g_update_override OR
2142: p_datetrack_mode = dt_api.g_update_change_insert) THEN
2143: IF g_debug THEN
2144: Hr_Utility.Set_Location(' Leaving:'||l_proc, 10);

Line 2141: p_datetrack_mode = dt_api.g_update_override OR

2137: END IF;
2138: -- Check the mode is valid
2139: IF (p_datetrack_mode = dt_api.g_correction OR
2140: p_datetrack_mode = dt_api.g_update OR
2141: p_datetrack_mode = dt_api.g_update_override OR
2142: p_datetrack_mode = dt_api.g_update_change_insert) THEN
2143: IF g_debug THEN
2144: Hr_Utility.Set_Location(' Leaving:'||l_proc, 10);
2145: END IF;

Line 2142: p_datetrack_mode = dt_api.g_update_change_insert) THEN

2138: -- Check the mode is valid
2139: IF (p_datetrack_mode = dt_api.g_correction OR
2140: p_datetrack_mode = dt_api.g_update OR
2141: p_datetrack_mode = dt_api.g_update_override OR
2142: p_datetrack_mode = dt_api.g_update_change_insert) THEN
2143: IF g_debug THEN
2144: Hr_Utility.Set_Location(' Leaving:'||l_proc, 10);
2145: END IF;
2146: RETURN(TRUE);

Line 2180: IF (p_datetrack_mode = dt_api.g_zap OR

2176: p_argument => 'datetrack_mode',
2177: p_argument_value => p_datetrack_mode);
2178: END IF;
2179: -- Check the mode is valid
2180: IF (p_datetrack_mode = dt_api.g_zap OR
2181: p_datetrack_mode = dt_api.g_delete OR
2182: p_datetrack_mode = dt_api.g_future_change OR
2183: p_datetrack_mode = dt_api.g_delete_next_change) THEN
2184: IF g_debug THEN

Line 2181: p_datetrack_mode = dt_api.g_delete OR

2177: p_argument_value => p_datetrack_mode);
2178: END IF;
2179: -- Check the mode is valid
2180: IF (p_datetrack_mode = dt_api.g_zap OR
2181: p_datetrack_mode = dt_api.g_delete OR
2182: p_datetrack_mode = dt_api.g_future_change OR
2183: p_datetrack_mode = dt_api.g_delete_next_change) THEN
2184: IF g_debug THEN
2185: Hr_Utility.Set_Location(' Leaving:'||l_proc, 10);

Line 2182: p_datetrack_mode = dt_api.g_future_change OR

2178: END IF;
2179: -- Check the mode is valid
2180: IF (p_datetrack_mode = dt_api.g_zap OR
2181: p_datetrack_mode = dt_api.g_delete OR
2182: p_datetrack_mode = dt_api.g_future_change OR
2183: p_datetrack_mode = dt_api.g_delete_next_change) THEN
2184: IF g_debug THEN
2185: Hr_Utility.Set_Location(' Leaving:'||l_proc, 10);
2186: END IF;

Line 2183: p_datetrack_mode = dt_api.g_delete_next_change) THEN

2179: -- Check the mode is valid
2180: IF (p_datetrack_mode = dt_api.g_zap OR
2181: p_datetrack_mode = dt_api.g_delete OR
2182: p_datetrack_mode = dt_api.g_future_change OR
2183: p_datetrack_mode = dt_api.g_delete_next_change) THEN
2184: IF g_debug THEN
2185: Hr_Utility.Set_Location(' Leaving:'||l_proc, 10);
2186: END IF;
2187: RETURN(TRUE);

Line 2306: dt_api.g_dynamic_sql :=

2302: 'SELECT NVL(MAX(t.object_version_number),0) + 1 '||
2303: 'FROM '||LOWER(p_base_table_name)||' t '||
2304: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
2305: -- set the dynamic SQL comment for identification
2306: dt_api.g_dynamic_sql :=
2307: dt_api.g_dynamic_sql||
2308: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_object_version_number');
2309: --
2310: EXECUTE IMMEDIATE g_dynamic_sql

Line 2307: dt_api.g_dynamic_sql||

2303: 'FROM '||LOWER(p_base_table_name)||' t '||
2304: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
2305: -- set the dynamic SQL comment for identification
2306: dt_api.g_dynamic_sql :=
2307: dt_api.g_dynamic_sql||
2308: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_object_version_number');
2309: --
2310: EXECUTE IMMEDIATE g_dynamic_sql
2311: INTO l_object_num

Line 2308: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_object_version_number');

2304: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
2305: -- set the dynamic SQL comment for identification
2306: dt_api.g_dynamic_sql :=
2307: dt_api.g_dynamic_sql||
2308: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','get_object_version_number');
2309: --
2310: EXECUTE IMMEDIATE g_dynamic_sql
2311: INTO l_object_num
2312: USING p_base_key_value;

Line 2382: dt_api.g_dynamic_sql :=

2378: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value '||
2379: 'AND t.effective_start_date <= :p_to_date '||
2380: 'AND t.effective_end_date >= :p_from_date';
2381: -- set the dynamic SQL comment for identification
2382: dt_api.g_dynamic_sql :=
2383: dt_api.g_dynamic_sql||
2384: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','rows_exist');
2385: --
2386: EXECUTE IMMEDIATE g_dynamic_sql

Line 2383: dt_api.g_dynamic_sql||

2379: 'AND t.effective_start_date <= :p_to_date '||
2380: 'AND t.effective_end_date >= :p_from_date';
2381: -- set the dynamic SQL comment for identification
2382: dt_api.g_dynamic_sql :=
2383: dt_api.g_dynamic_sql||
2384: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','rows_exist');
2385: --
2386: EXECUTE IMMEDIATE g_dynamic_sql
2387: INTO l_ret_column

Line 2384: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','rows_exist');

2380: 'AND t.effective_end_date >= :p_from_date';
2381: -- set the dynamic SQL comment for identification
2382: dt_api.g_dynamic_sql :=
2383: dt_api.g_dynamic_sql||
2384: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','rows_exist');
2385: --
2386: EXECUTE IMMEDIATE g_dynamic_sql
2387: INTO l_ret_column
2388: USING p_base_key_value, p_to_date, p_from_date;

Line 2473: dt_api.g_dynamic_sql :=

2469: 'SELECT MIN(t.effective_start_date),MAX(t.effective_end_date) '||
2470: 'FROM '||LOWER(p_base_table_name)||' t ' ||
2471: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
2472: -- set the dynamic SQL comment for identification
2473: dt_api.g_dynamic_sql :=
2474: dt_api.g_dynamic_sql||
2475: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','check_min_max_dates');
2476: --
2477: EXECUTE IMMEDIATE g_dynamic_sql

Line 2474: dt_api.g_dynamic_sql||

2470: 'FROM '||LOWER(p_base_table_name)||' t ' ||
2471: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
2472: -- set the dynamic SQL comment for identification
2473: dt_api.g_dynamic_sql :=
2474: dt_api.g_dynamic_sql||
2475: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','check_min_max_dates');
2476: --
2477: EXECUTE IMMEDIATE g_dynamic_sql
2478: INTO l_min_date, l_max_date

Line 2475: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','check_min_max_dates');

2471: 'WHERE t.'||LOWER(p_base_key_column)||' = :p_base_key_value';
2472: -- set the dynamic SQL comment for identification
2473: dt_api.g_dynamic_sql :=
2474: dt_api.g_dynamic_sql||
2475: REPLACE(dt_api.g_dynamic_sql_comment,'{proc}','check_min_max_dates');
2476: --
2477: EXECUTE IMMEDIATE g_dynamic_sql
2478: INTO l_min_date, l_max_date
2479: USING p_base_key_value;

Line 2764: (p_date_from => dt_api.g_sot,

2760: p_zap := TRUE;
2761: -- get the effective rows
2762: l_date_from_row_idx := 0;
2763: get_effective_rows
2764: (p_date_from => dt_api.g_sot,
2765: p_base_table_name => p_base_table_name,
2766: p_base_key_column => p_base_key_column,
2767: p_base_key_value => p_base_key_value,
2768: p_lock_rows => FALSE,

Line 2809: (p_effective_date <> dt_api.g_eot)) THEN

2805: -- same as the effective date and the effective date if not the
2806: -- end of time
2807: IF ((p_effective_date <>
2808: l_effective_rows(l_effective_rows.LAST).effective_end_date) AND
2809: (p_effective_date <> dt_api.g_eot)) THEN
2810: p_delete := TRUE;
2811: ELSE
2812: p_delete := FALSE;
2813: p_delete_start_date := NULL;

Line 2822: dt_api.g_eot) THEN

2818: -- is the end of time or the minimum parental effective
2819: -- end date is less than or equal to the effective end
2820: -- date
2821: IF (l_effective_rows(l_date_from_row_idx).effective_end_date <>
2822: dt_api.g_eot) THEN
2823: l_parent_min_date := return_parent_min_date
2824: (p_effective_date => p_effective_date,
2825: p_lock_rows => FALSE,
2826: p_table_name1 => p_parent_table_name1,

Line 2900: dt_api.g_eot) THEN

2896: IF p_future_change = TRUE THEN
2897: -- Providing the current effective end date is not the end of time
2898: -- then we must set the validation dates
2899: IF (l_effective_rows(l_date_from_row_idx).effective_end_date <>
2900: dt_api.g_eot) THEN
2901:
2902: -- If the validation end date is set to the current effective end date
2903: -- then we must error as we cannot extend the end date of the current
2904: -- row

Line 2929: dt_api.g_eot) THEN

2925: IF p_delete_next_change = TRUE THEN
2926: -- Providing the current effective end date is not the end of time
2927: -- then we must set the validation dates
2928: IF (l_effective_rows(l_date_from_row_idx).effective_end_date <>
2929: dt_api.g_eot) THEN
2930: -- check to see if future rows exist
2931: IF l_effective_rows.COUNT > l_date_from_row_idx THEN
2932: -- future rows exist so set the future effective end date
2933: -- to the end date of the next datetrack row after the row for the

Line 2949: (l_parent_min_date,NVL(l_future_effective_end_date,dt_api.g_eot));

2945: -- 2: If future rows exist then the effective end date of the next row
2946: -- 3: If no future rows exist then the end of time
2947: l_validation_end_date :=
2948: LEAST
2949: (l_parent_min_date,NVL(l_future_effective_end_date,dt_api.g_eot));
2950: -- if the validation end date is set to the current effective end date
2951: -- then we must error as we cannot extend the end date of the current
2952: -- row
2953: IF (l_validation_end_date <=

Line 2995: END dt_api;

2991: p_del_next_start_date := null;
2992: p_del_next_end_date := null;
2993: RAISE;
2994: end find_dt_del_modes_and_dates;
2995: END dt_api;