The following lines contain the word 'select', 'insert', 'update' or 'delete':
| Procedure insert_row |
| |
+======================================================================*/
PROCEDURE insert_row
(x_rowid IN OUT NOCOPY VARCHAR2
,x_application_id IN NUMBER
,x_event_class_code IN VARCHAR2
,x_accounting_attribute_code IN VARCHAR2
,x_source_application_id IN NUMBER
,x_source_type_code IN VARCHAR2
,x_source_code IN VARCHAR2
,x_assignment_owner_code IN VARCHAR2
,x_default_flag 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_evt_class_acct_attrs
WHERE application_id = x_application_id
AND event_class_code = x_event_class_code
AND accounting_attribute_code = x_accounting_attribute_code
AND source_application_id = x_source_application_id
AND source_type_code = x_source_type_code
AND source_code = x_source_code
;
l_log_module := C_DEFAULT_MODULE||'.insert_row';
trace(p_msg => 'BEGIN of procedure insert_row',
p_module => l_log_module,
p_level => C_LEVEL_PROCEDURE);
INSERT INTO xla_evt_class_acct_attrs
(creation_date
,created_by
,application_id
,event_class_code
,accounting_attribute_code
,source_application_id
,source_type_code
,source_code
,assignment_owner_code
,default_flag
,last_update_date
,last_updated_by
,last_update_login)
VALUES
(x_creation_date
,x_created_by
,x_application_id
,x_event_class_code
,x_accounting_attribute_code
,x_source_application_id
,x_source_type_code
,x_source_code
,x_assignment_owner_code
,x_default_flag
,x_last_update_date
,x_last_updated_by
,x_last_update_login)
;
trace(p_msg => 'END of procedure insert_row',
p_module => l_log_module,
p_level => C_LEVEL_PROCEDURE);
END insert_row;
SELECT application_id
,event_class_code
,source_application_id
,source_type_code
,source_code
,assignment_owner_code
,default_flag
,accounting_attribute_code
FROM xla_evt_class_acct_attrs
WHERE application_id = x_application_id
AND event_class_code = x_event_class_code
AND accounting_attribute_code = x_accounting_attribute_code
AND source_application_id = x_source_application_id
AND source_type_code = x_source_type_code
AND source_code = x_source_code
FOR UPDATE OF application_id NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
| Procedure update_row |
| |
+======================================================================*/
PROCEDURE update_row
(x_rowid IN OUT NOCOPY VARCHAR2
,x_application_id IN NUMBER
,x_event_class_code IN VARCHAR2
,x_accounting_attribute_code IN VARCHAR2
,x_source_application_id IN NUMBER
,x_source_type_code IN VARCHAR2
,x_source_code IN VARCHAR2
,x_assignment_owner_code IN VARCHAR2
,x_default_flag IN VARCHAR2
,x_last_update_date IN DATE
,x_last_updated_by IN NUMBER
,x_last_update_login IN NUMBER)
IS
l_log_module VARCHAR2(240);
l_log_module := C_DEFAULT_MODULE||'.update_row';
trace(p_msg => 'BEGIN of procedure update_row',
p_module => l_log_module,
p_level => C_LEVEL_PROCEDURE);
UPDATE xla_evt_class_acct_attrs
SET
last_update_date = x_last_update_date
,default_flag = x_default_flag
,last_updated_by = x_last_updated_by
,last_update_login = x_last_update_login
WHERE application_id = X_application_id
AND event_class_code = x_event_class_code
AND accounting_attribute_code = x_accounting_attribute_code
AND source_application_id = x_source_application_id
AND source_type_code = X_source_type_code
AND source_code = X_source_code;
trace(p_msg => 'END of procedure update_row',
p_module => l_log_module,
p_level => C_LEVEL_PROCEDURE);
END update_row;
| Procedure delete_row |
| |
+======================================================================*/
PROCEDURE delete_row
(x_application_id IN NUMBER
,x_event_class_code IN VARCHAR2
,x_accounting_attribute_code IN VARCHAR2
,x_source_application_id IN NUMBER
,x_source_type_code IN VARCHAR2
,x_source_code IN VARCHAR2)
IS
l_log_module VARCHAR2(240);
l_log_module := C_DEFAULT_MODULE||'.delete_row';
trace(p_msg => 'BEGIN of procedure delete_row',
p_module => l_log_module,
p_level => C_LEVEL_PROCEDURE);
DELETE FROM xla_evt_class_acct_attrs
WHERE application_id = x_application_id
AND event_class_code = x_event_class_code
AND accounting_attribute_code = x_accounting_attribute_code
AND source_application_id = x_source_application_id
AND source_type_code = x_source_type_code
AND source_code = x_source_code;
trace(p_msg => 'END of procedure delete_row',
p_module => l_log_module,
p_level => C_LEVEL_PROCEDURE);
END delete_row;
,p_last_update_date IN VARCHAR2)
IS
CURSOR c_app_id (l_app_id VARCHAR2) IS
SELECT application_id
FROM fnd_application
WHERE application_short_name = l_app_id;
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 assignment_level_code
INTO l_assign_level_code
FROM xla_acct_attributes_b
WHERE accounting_attribute_code = p_accounting_attribute_code;
DELETE FROM xla_evt_class_acct_attrs
WHERE application_id = l_application_id
AND event_class_code = p_event_class_code
AND accounting_attribute_code = p_accounting_attribute_code
AND source_application_id = l_source_app_id
AND source_type_code = p_source_type_code
AND source_code <> p_source_code;
SELECT last_updated_by, last_update_date
INTO db_luby, db_ludate
FROM xla_evt_class_acct_attrs
WHERE application_id = l_application_id
AND event_class_code = p_event_class_code
AND accounting_attribute_code = p_accounting_attribute_code
AND source_application_id = l_source_app_id
AND source_type_code = p_source_type_code
AND source_code = p_source_code;
xla_evt_class_acct_attrs_f_pkg.update_row
(x_rowid => l_rowid
,x_application_id => l_application_id
,x_event_class_code => p_event_class_code
,x_accounting_attribute_code => p_accounting_attribute_code
,x_source_application_id => l_source_app_id
,x_source_type_code => p_source_type_code
,x_source_code => p_source_code
,x_assignment_owner_code => p_assignment_owner_code
,x_default_flag => p_default_flag
,x_last_update_date => f_ludate
,x_last_updated_by => f_luby
,x_last_update_login => 0);
xla_evt_class_acct_attrs_f_pkg.insert_row
(x_rowid => l_rowid
,x_application_id => l_application_id
,x_event_class_code => p_event_class_code
,x_accounting_attribute_code => p_accounting_attribute_code
,x_source_application_id => l_source_app_id
,x_source_type_code => p_source_type_code
,x_source_code => p_source_code
,x_assignment_owner_code => p_assignment_owner_code
,x_default_flag => p_default_flag
,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);