The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT GL_ACCESS_SET_NORM_ASSIGN_S.NEXTVAL
FROM dual;
SELECT object_type_code
INTO type_code
FROM GL_LEDGERS
WHERE ledger_id = X_Ledger_Id;
PROCEDURE Insert_Row(
X_Rowid IN OUT NOCOPY VARCHAR2,
X_Access_Set_Id NUMBER,
X_Ledger_Id NUMBER,
X_All_Segment_Value_Flag VARCHAR2,
X_Segment_Value_Type_Code VARCHAR2,
X_Access_Privilege_Code VARCHAR2,
X_Record_Id NUMBER,
X_User_Id NUMBER,
X_Login_Id NUMBER,
X_Date DATE,
X_Segment_Value VARCHAR2 DEFAULT NULL,
X_Start_Date DATE DEFAULT NULL,
X_End_Date DATE DEFAULT NULL,
X_Status_Code VARCHAR2 DEFAULT NULL,
X_Link_Id NUMBER DEFAULT NULL,
X_Request_Id NUMBER DEFAULT NULL,
X_Context VARCHAR2 DEFAULT NULL,
X_Attribute1 VARCHAR2 DEFAULT NULL,
X_Attribute2 VARCHAR2 DEFAULT NULL,
X_Attribute3 VARCHAR2 DEFAULT NULL,
X_Attribute4 VARCHAR2 DEFAULT NULL,
X_Attribute5 VARCHAR2 DEFAULT NULL,
X_Attribute6 VARCHAR2 DEFAULT NULL,
X_Attribute7 VARCHAR2 DEFAULT NULL,
X_Attribute8 VARCHAR2 DEFAULT NULL,
X_Attribute9 VARCHAR2 DEFAULT NULL,
X_Attribute10 VARCHAR2 DEFAULT NULL,
X_Attribute11 VARCHAR2 DEFAULT NULL,
X_Attribute12 VARCHAR2 DEFAULT NULL,
X_Attribute13 VARCHAR2 DEFAULT NULL,
X_Attribute14 VARCHAR2 DEFAULT NULL,
X_Attribute15 VARCHAR2 DEFAULT NULL
) IS
CURSOR C IS
SELECT rowid
FROM GL_ACCESS_SET_NORM_ASSIGN
WHERE access_set_id = X_Access_Set_Id
AND ledger_id = X_Ledger_Id
AND all_segment_value_flag = X_All_Segment_Value_Flag
AND segment_value_type_code = X_Segment_Value_Type_Code
AND access_privilege_code = X_Access_Privilege_Code
AND (segment_value = X_Segment_Value OR segment_value IS NULL)
AND (start_date = X_Start_Date OR start_date IS NULL)
AND (end_date = X_End_Date OR end_date IS NULL);
INSERT INTO GL_ACCESS_SET_NORM_ASSIGN (
access_set_id,
ledger_id,
all_segment_value_flag,
segment_value_type_code,
access_privilege_code,
record_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
segment_value,
start_date,
end_date,
status_code,
link_id,
request_id,
context,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15
) VALUES (
X_Access_Set_Id,
X_Ledger_Id,
X_All_Segment_Value_Flag,
X_Segment_Value_Type_Code,
X_Access_Privilege_Code,
X_Record_Id,
X_Date,
X_User_Id,
X_Date,
X_User_Id,
X_Login_Id,
X_Segment_Value,
X_Start_Date,
X_End_Date,
X_Status_Code,
X_Link_Id,
X_Request_Id,
X_Context,
X_Attribute1,
X_Attribute2,
X_Attribute3,
X_Attribute4,
X_Attribute5,
X_Attribute6,
X_Attribute7,
X_Attribute8,
X_Attribute9,
X_Attribute10,
X_Attribute11,
X_Attribute12,
X_Attribute13,
X_Attribute14,
X_Attribute15
);
END Insert_Row;
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Creation_Date DATE,
X_Created_By NUMBER,
X_Last_Update_Login NUMBER,
X_Segment_Value VARCHAR2 DEFAULT NULL,
X_Start_Date DATE DEFAULT NULL,
X_End_Date DATE DEFAULT NULL,
X_Status_Code VARCHAR2 DEFAULT NULL,
X_Link_Id NUMBER DEFAULT NULL,
X_Request_Id NUMBER DEFAULT NULL,
X_Context VARCHAR2 DEFAULT NULL,
X_Attribute1 VARCHAR2 DEFAULT NULL,
X_Attribute2 VARCHAR2 DEFAULT NULL,
X_Attribute3 VARCHAR2 DEFAULT NULL,
X_Attribute4 VARCHAR2 DEFAULT NULL,
X_Attribute5 VARCHAR2 DEFAULT NULL,
X_Attribute6 VARCHAR2 DEFAULT NULL,
X_Attribute7 VARCHAR2 DEFAULT NULL,
X_Attribute8 VARCHAR2 DEFAULT NULL,
X_Attribute9 VARCHAR2 DEFAULT NULL,
X_Attribute10 VARCHAR2 DEFAULT NULL,
X_Attribute11 VARCHAR2 DEFAULT NULL,
X_Attribute12 VARCHAR2 DEFAULT NULL,
X_Attribute13 VARCHAR2 DEFAULT NULL,
X_Attribute14 VARCHAR2 DEFAULT NULL,
X_Attribute15 VARCHAR2 DEFAULT NULL
) IS
CURSOR C IS
SELECT *
FROM GL_ACCESS_SET_NORM_ASSIGN
WHERE rowid = X_Rowid
FOR UPDATE of Access_Set_Id NOWAIT;
FND_MESSAGE.SET_NAME('FND', 'FORM_RECORD_DELETED');
AND ( (Recinfo.last_update_date = X_Last_Update_Date)
OR ( (Recinfo.last_update_date IS NULL)
AND (X_Last_Update_Date IS NULL)))
AND ( (Recinfo.last_updated_by = X_Last_Updated_By)
OR ( (Recinfo.last_updated_by IS NULL)
AND (X_Last_Updated_By IS NULL)))
AND ( (Recinfo.creation_date = X_Creation_Date)
OR ( (Recinfo.creation_date IS NULL)
AND (X_Creation_Date IS NULL)))
AND ( (Recinfo.created_by = X_Created_By)
OR ( (Recinfo.created_by IS NULL)
AND (X_Created_By IS NULL)))
AND ( (Recinfo.last_update_login = X_Last_Update_Login)
OR ( (Recinfo.last_update_login IS NULL)
AND (X_Last_Update_Login IS NULL)))
AND ( (Recinfo.segment_value = X_Segment_Value)
OR ( (Recinfo.segment_value IS NULL)
AND (X_Segment_Value IS NULL)))
AND ( (Recinfo.start_date = X_Start_Date)
OR ( (Recinfo.start_date IS NULL)
AND (X_Start_Date IS NULL)))
AND ( (Recinfo.end_date = X_End_Date)
OR ( (Recinfo.end_date IS NULL)
AND (X_End_Date IS NULL)))
AND ( (Recinfo.status_code = X_Status_Code)
OR ( (Recinfo.status_code IS NULL)
AND (X_Status_Code IS NULL)))
AND ( (Recinfo.link_id = X_Link_Id)
OR ( (Recinfo.link_id IS NULL)
AND (X_Link_Id IS NULL)))
AND ( (Recinfo.request_id = X_Request_Id)
OR ( (Recinfo.request_id IS NULL)
AND (X_Request_Id IS NULL)))
AND ( (Recinfo.context = X_Context)
OR ( (Recinfo.context IS NULL)
AND (X_Context IS NULL)))
AND ( (Recinfo.attribute1 = X_Attribute1)
OR ( (Recinfo.attribute1 IS NULL)
AND (X_Attribute1 IS NULL)))
AND ( (Recinfo.attribute2 = X_Attribute2)
OR ( (Recinfo.attribute2 IS NULL)
AND (X_Attribute2 IS NULL)))
AND ( (Recinfo.attribute3 = X_Attribute3)
OR ( (Recinfo.attribute3 IS NULL)
AND (X_Attribute3 IS NULL)))
AND ( (Recinfo.attribute4 = X_Attribute4)
OR ( (Recinfo.attribute4 IS NULL)
AND (X_Attribute4 IS NULL)))
AND ( (Recinfo.attribute5 = X_Attribute5)
OR ( (Recinfo.attribute5 IS NULL)
AND (X_Attribute5 IS NULL)))
AND ( (Recinfo.attribute6 = X_Attribute6)
OR ( (Recinfo.attribute6 IS NULL)
AND (X_Attribute6 IS NULL)))
AND ( (Recinfo.attribute7 = X_Attribute7)
OR ( (Recinfo.attribute7 IS NULL)
AND (X_Attribute7 IS NULL)))
AND ( (Recinfo.attribute8 = X_Attribute8)
OR ( (Recinfo.attribute8 IS NULL)
AND (X_Attribute8 IS NULL)))
AND ( (Recinfo.attribute9 = X_Attribute9)
OR ( (Recinfo.attribute9 IS NULL)
AND (X_Attribute9 IS NULL)))
AND ( (Recinfo.attribute10 = X_Attribute10)
OR ( (Recinfo.attribute10 IS NULL)
AND (X_Attribute10 IS NULL)))
AND ( (Recinfo.attribute11 = X_Attribute11)
OR ( (Recinfo.attribute11 IS NULL)
AND (X_Attribute11 IS NULL)))
AND ( (Recinfo.attribute12 = X_Attribute12)
OR ( (Recinfo.attribute12 IS NULL)
AND (X_Attribute12 IS NULL)))
AND ( (Recinfo.attribute13 = X_Attribute13)
OR ( (Recinfo.attribute13 IS NULL)
AND (X_Attribute13 IS NULL)))
AND ( (Recinfo.attribute14 = X_Attribute14)
OR ( (Recinfo.attribute14 IS NULL)
AND (X_Attribute14 IS NULL)))
AND ( (Recinfo.attribute15 = X_Attribute15)
OR ( (Recinfo.attribute15 IS NULL)
AND (X_Attribute15 IS NULL)))
) then
return;
PROCEDURE Delete_Row(X_Rowid VARCHAR2) IS
BEGIN
UPDATE GL_ACCESS_SET_NORM_ASSIGN
SET status_code = 'D'
WHERE rowid = X_Rowid;
END Delete_Row;
SELECT 'duplicate'
FROM gl_access_set_norm_assign
WHERE access_set_id = X_Access_Set_Id
AND ledger_id = X_Ledger_Id
AND all_segment_value_flag = X_All_Segment_Value_Flag
AND segment_value_type_code = X_Segment_Value_Type_Code
AND access_privilege_code = X_Access_Privilege_Code
AND nvl(segment_value,'X') = nvl(X_Segment_Value, 'X')
AND (status_code <> 'D' or status_code is NULL);
SELECT chart_of_accounts_id, period_set_name, accounted_period_type
INTO l_ledger_coa_id, l_ledger_period_set_name, l_ledger_period_type
FROM GL_LEDGERS
WHERE ledger_id = X_Ledger_Id;