The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER
) AS
/*
|| Created By :
|| Created On : 04-FEB-2004
|| Purpose : Initialises the Old and New references for the columns of the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
CURSOR cur_old_ref_values IS
SELECT *
FROM IGP_VW_PORT_ACTIVITIES
WHERE rowid = x_rowid;
IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
CLOSE cur_old_ref_values;
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
IF (p_action = 'UPDATE') THEN
new_references.creation_date := old_references.creation_date;
new_references.last_update_date := x_last_update_date;
new_references.last_updated_by := x_last_updated_by;
new_references.last_update_login := x_last_update_login;
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER
) AS
/*
|| Created By :
|| Created On : 04-FEB-2004
|| Purpose : Initialises the columns, Checks Constraints, Calls the
|| Trigger Handlers for the table, before any DML operation.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_activity_id,
x_portfolio_id,
x_org_party_id,
x_access_date,
x_note,
x_object_version_number,
x_pincode,
x_party_id,
x_ACCESS_TYPE_CODE,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login
);
PROCEDURE Insert_Row_Pub(
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_rowid IN OUT NOCOPY VARCHAR2,
x_activity_id IN OUT NOCOPY NUMBER,
x_portfolio_id IN NUMBER,
x_access_date IN DATE,
x_note IN VARCHAR2,
x_object_version_number IN NUMBER,
x_pincode IN VARCHAR2,
x_party_id IN NUMBER,
x_ACCESS_TYPE_CODE IN VARCHAR2,
x_mode IN VARCHAR2
) AS
CURSOR c_org_party_id (cp_party_id NUMBER,cp_portfolio_id NUMBER) IS
SELECT org_party_id FROM IGP_US_REG_VIEWERS
WHERE party_id = cp_party_id AND portfolio_id = cp_portfolio_id;
l_api_name CONSTANT VARCHAR2(30) := 'Insert_Row_Pub';
SAVEPOINT Insert_comments_Main;
insert_row(
x_rowid => x_rowid,
x_activity_id => x_activity_id,
x_portfolio_id => x_portfolio_id,
x_org_party_id => NULL,
x_access_date => SYSDATE,
x_note => x_note,
x_object_version_number => x_object_version_number,
x_pincode => x_pincode,
x_party_id => x_party_id,
x_ACCESS_TYPE_CODE => x_ACCESS_TYPE_CODE,
x_mode => x_mode
);
SAVEPOINT Insert_comments;
insert_row(
x_rowid => x_rowid,
x_activity_id => x_activity_id,
x_portfolio_id => x_portfolio_id,
x_org_party_id => l_org_party_id,
x_access_date => SYSDATE,
x_note => x_note,
x_object_version_number => x_object_version_number,
x_pincode => x_pincode,
x_party_id => x_party_id,
x_ACCESS_TYPE_CODE => x_ACCESS_TYPE_CODE,
x_mode => x_mode
);
ROLLBACK TO Insert_comments;
insert_row(
x_rowid => x_rowid,
x_activity_id => x_activity_id,
x_portfolio_id => x_portfolio_id,
x_org_party_id => NULL,
x_access_date => SYSDATE,
x_note => x_note,
x_object_version_number => x_object_version_number,
x_pincode => x_pincode,
x_party_id => x_party_id,
x_ACCESS_TYPE_CODE => x_ACCESS_TYPE_CODE,
x_mode => x_mode
);
ROLLBACK TO Insert_comments_Main;
ROLLBACK TO Insert_comments_Main;
ROLLBACK TO Insert_comments_Main;
ROLLBACK TO Insert_comments_Main;
END Insert_Row_Pub;
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_activity_id IN OUT NOCOPY NUMBER,
x_portfolio_id IN NUMBER,
x_org_party_id IN NUMBER,
x_access_date IN DATE,
x_note IN VARCHAR2,
x_object_version_number IN NUMBER,
x_pincode IN VARCHAR2,
x_party_id IN NUMBER,
x_ACCESS_TYPE_CODE IN VARCHAR2,
x_mode IN VARCHAR2
) AS
/*
|| Created By :
|| Created On : 04-FEB-2004
|| Purpose : Handles the INSERT DML logic for the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
x_last_update_date DATE;
x_last_updated_by NUMBER;
x_last_update_login NUMBER;
x_last_update_date := SYSDATE;
x_last_updated_by := 1;
x_last_update_login := 0;
x_last_updated_by := fnd_global.user_id;
IF (x_last_updated_by IS NULL) THEN
x_last_updated_by := -1;
x_last_update_login := fnd_global.login_id;
IF (x_last_update_login IS NULL) THEN
x_last_update_login := -1;
fnd_message.set_token ('ROUTINE', 'IGP_VW_PORT_ACTIVITIES_PKG.INSERT_ROW');
p_action => 'INSERT',
x_rowid => x_rowid,
x_activity_id => x_activity_id,
x_portfolio_id => x_portfolio_id,
x_org_party_id => x_org_party_id,
x_access_date => x_access_date,
x_note => x_note,
x_object_version_number => x_object_version_number,
x_pincode => x_pincode,
x_party_id => x_party_id,
x_ACCESS_TYPE_CODE => x_ACCESS_TYPE_CODE,
x_creation_date => x_last_update_date,
x_created_by => x_last_updated_by,
x_last_update_date => x_last_update_date,
x_last_updated_by => x_last_updated_by,
x_last_update_login => x_last_update_login
);
INSERT INTO IGP_VW_PORT_ACTIVITIES (
activity_id,
portfolio_id,
org_party_id,
access_date,
note,
object_version_number,
pincode,
party_id,
ACCESS_TYPE_CODE,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
) VALUES (
IGP_VW_PORT_ACTIVITIES_S.NEXTVAL,
new_references.portfolio_id,
new_references.org_party_id,
new_references.access_date,
new_references.note,
new_references.object_version_number,
new_references.pincode,
new_references.party_id,
new_references.ACCESS_TYPE_CODE,
x_last_update_date,
x_last_updated_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login
) RETURNING ROWID, activity_id INTO x_rowid, x_activity_id;
END insert_row;