The following lines contain the word 'select', 'insert', 'update' or 'delete':
| Procedure insert_row |
| |
+======================================================================*/
PROCEDURE insert_row
(x_rowid IN OUT NOCOPY VARCHAR2
,x_accounting_attribute_code IN VARCHAR2
,x_assignment_required_code IN VARCHAR2
,x_assignment_group_code IN VARCHAR2
,x_datatype_code IN VARCHAR2
,x_journal_entry_level_code IN VARCHAR2
,x_assignment_extensible_flag IN VARCHAR2
,x_assignment_level_code IN VARCHAR2
,x_inherited_flag IN VARCHAR2
,x_name IN VARCHAR2
,x_creation_date IN DATE
,x_created_by IN NUMBER
,x_last_update_date IN DATE
,x_last_updated_by IN NUMBER
,x_last_update_login IN NUMBER)
IS
CURSOR c IS
SELECT rowid
FROM xla_acct_attributes_b
WHERE accounting_attribute_code = x_accounting_attribute_code
;
xla_utility_pkg.trace('> xla_acct_attributes_f_pkg.insert_row' ,20);
INSERT INTO xla_acct_attributes_b
(creation_date
,created_by
,accounting_attribute_code
,assignment_required_code
,assignment_group_code
,datatype_code
,journal_entry_level_code
,assignment_extensible_flag
,assignment_level_code
,inherited_flag
,last_update_date
,last_updated_by
,last_update_login)
VALUES
(x_creation_date
,x_created_by
,x_accounting_attribute_code
,x_assignment_required_code
,x_assignment_group_code
,x_datatype_code
,x_journal_entry_level_code
,x_assignment_extensible_flag
,x_assignment_level_code
,x_inherited_flag
,x_last_update_date
,x_last_updated_by
,x_last_update_login)
;
INSERT INTO xla_acct_attributes_tl
(name
,creation_date
,created_by
,last_update_date
,last_updated_by
,accounting_attribute_code
,last_update_login
,language
,source_lang)
SELECT
x_name
,x_creation_date
,x_created_by
,x_last_update_date
,x_last_updated_by
,x_accounting_attribute_code
,x_last_update_login
,l.language_code
,USERENV('LANG')
FROM fnd_languages l
WHERE l.installed_flag IN ('I', 'B')
AND NOT EXISTS
(SELECT NULL
FROM xla_acct_attributes_tl t
WHERE t.accounting_attribute_code = x_accounting_attribute_code
AND t.language = l.language_code);
xla_utility_pkg.trace('< xla_acct_attributes_f_pkg.insert_row' ,20);
END insert_row;
SELECT accounting_attribute_code
,assignment_required_code
,assignment_group_code
,datatype_code
,journal_entry_level_code
,assignment_extensible_flag
,assignment_level_code
,inherited_flag
FROM xla_acct_attributes_b
WHERE accounting_attribute_code = x_accounting_attribute_code
FOR UPDATE OF accounting_attribute_code NOWAIT;
SELECT language
,name
,DECODE(language , USERENV('LANG'), 'Y', 'N') baselang
FROM xla_acct_attributes_tl
WHERE accounting_attribute_code = X_accounting_attribute_code
AND USERENV('LANG') IN (language ,source_lang)
FOR UPDATE OF accounting_attribute_code NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
| Procedure update_row |
| |
+======================================================================*/
PROCEDURE update_row
(x_accounting_attribute_code IN VARCHAR2
,x_assignment_required_code IN VARCHAR2
,x_assignment_group_code IN VARCHAR2
,x_datatype_code IN VARCHAR2
,x_journal_entry_level_code IN VARCHAR2
,x_assignment_extensible_flag IN VARCHAR2
,x_assignment_level_code IN VARCHAR2
,x_inherited_flag IN VARCHAR2
,x_name IN VARCHAR2
,x_last_update_date IN DATE
,x_last_updated_by IN NUMBER
,x_last_update_login IN NUMBER)
IS
BEGIN
xla_utility_pkg.trace('> xla_acct_attributes_f_pkg.update_row' ,20);
UPDATE xla_acct_attributes_b
SET
last_update_date = x_last_update_date
,assignment_required_code = x_assignment_required_code
,assignment_group_code = x_assignment_group_code
,datatype_code = x_datatype_code
,journal_entry_level_code = x_journal_entry_level_code
,assignment_extensible_flag = x_assignment_extensible_flag
,assignment_level_code = x_assignment_level_code
,inherited_flag = x_inherited_flag
,last_updated_by = x_last_updated_by
,last_update_login = x_last_update_login
WHERE accounting_attribute_code = X_accounting_attribute_code;
UPDATE xla_acct_attributes_tl
SET
last_update_date = x_last_update_date
,name = X_name
,last_updated_by = x_last_updated_by
,last_update_login = x_last_update_login
,source_lang = USERENV('LANG')
WHERE accounting_attribute_code = X_accounting_attribute_code
AND USERENV('LANG') IN (language, source_lang);
xla_utility_pkg.trace('< xla_acct_attributes_f_pkg.update_row' ,20);
END update_row;
| Procedure delete_row |
| |
+======================================================================*/
PROCEDURE delete_row
(x_accounting_attribute_code IN VARCHAR2)
IS
BEGIN
xla_utility_pkg.trace('> xla_acct_attributes_f_pkg.delete_row' ,20);
DELETE FROM xla_acct_attributes_tl
WHERE accounting_attribute_code = x_accounting_attribute_code;
DELETE FROM xla_acct_attributes_b
WHERE accounting_attribute_code = x_accounting_attribute_code;
xla_utility_pkg.trace('< xla_acct_attributes_f_pkg.delete_row' ,20);
END delete_row;
DELETE FROM xla_acct_attributes_tl T
WHERE NOT EXISTS
(SELECT NULL
FROM xla_acct_attributes_b b
WHERE b.accounting_attribute_code = t.accounting_attribute_code);
UPDATE xla_acct_attributes_tl t
SET (name)
= (SELECT b.name
FROM xla_acct_attributes_tl b
WHERE b.accounting_attribute_code = t.accounting_attribute_code
AND b.language = t.source_lang)
WHERE (t.accounting_attribute_code
,t.language)
IN (SELECT subt.accounting_attribute_code
,subt.language
FROM xla_acct_attributes_tl subb
,xla_acct_attributes_tl subt
WHERE subb.accounting_attribute_code = subt.accounting_attribute_code
AND subb.language = subt.source_lang
AND (SUBB.name <> SUBT.name
))
;
INSERT INTO xla_acct_attributes_tl
(name
,creation_date
,created_by
,last_update_date
,last_updated_by
,accounting_attribute_code
,last_update_login
,language
,source_lang)
SELECT /*+ ORDERED */
b.name
,b.creation_date
,b.created_by
,b.last_update_date
,b.last_updated_by
,b.accounting_attribute_code
,b.last_update_login
,l.language_code
,b.source_lang
FROM xla_acct_attributes_tl b
,fnd_languages l
WHERE l.installed_flag IN ('I', 'B')
AND b.language = userenv('LANG')
AND NOT EXISTS
(SELECT NULL
FROM xla_acct_attributes_tl t
WHERE t.accounting_attribute_code = b.accounting_attribute_code
AND t.language = l.language_code);
,p_last_update_date IN VARCHAR2
,p_custom_mode IN VARCHAR2)
IS
l_view_application_id number(38);
f_ludate date; -- entity update date in file
db_ludate date; -- entity update date in db
f_ludate := nvl(to_date(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT last_updated_by, last_update_date
INTO db_luby, db_ludate
FROM xla_acct_attributes_vl
WHERE accounting_attribute_code = p_accounting_attribute_code;
xla_acct_attributes_f_pkg.update_row
(x_accounting_attribute_code => p_accounting_attribute_code
,x_journal_entry_level_code => p_journal_entry_level_code
,x_datatype_code => p_datatype_code
,x_assignment_required_code => p_assignment_required_code
,x_assignment_group_code => p_assignment_group_code
,x_assignment_extensible_flag => p_assignment_extensible_flag
,x_assignment_level_code => p_assignment_level_code
,x_inherited_flag => p_inherited_flag
,x_name => p_name
,x_last_update_date => f_ludate
,x_last_updated_by => f_luby
,x_last_update_login => 0);
xla_acct_attributes_f_pkg.insert_row
(x_rowid => l_rowid
,x_accounting_attribute_code => p_accounting_attribute_code
,x_journal_entry_level_code => p_journal_entry_level_code
,x_datatype_code => p_datatype_code
,x_assignment_required_code => p_assignment_required_code
,x_assignment_group_code => p_assignment_group_code
,x_assignment_extensible_flag => p_assignment_extensible_flag
,x_assignment_level_code => p_assignment_level_code
,x_inherited_flag => p_inherited_flag
,x_name => p_name
,x_creation_date => f_ludate
,x_created_by => f_luby
,x_last_update_date => f_ludate
,x_last_updated_by => f_luby
,x_last_update_login => 0);
,p_last_update_date IN VARCHAR2
,p_custom_mode IN VARCHAR2)
IS
l_view_application_id number(38);
f_ludate date; -- entity update date in file
db_ludate date; -- entity update date in db
f_ludate := nvl(to_date(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT last_updated_by, last_update_date
INTO db_luby, db_ludate
FROM xla_acct_attributes_tl
WHERE accounting_attribute_code = p_accounting_attribute_code
AND language = userenv('LANG');
UPDATE xla_acct_attributes_tl
SET name = p_name
,last_update_date = f_ludate
,last_updated_by = f_luby
,last_update_login = 0
,source_lang = userenv('LANG')
WHERE userenv('LANG') IN (language, source_lang)
AND accounting_attribute_code = p_accounting_attribute_code;