The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE select_row( recinfo IN OUT NOCOPY gl_budget_entities%ROWTYPE) IS
BEGIN
SELECT *
INTO recinfo
FROM gl_budget_entities
WHERE budget_entity_id = recinfo.budget_entity_id;
END SELECT_ROW;
SELECT status_code
FROM GL_BUDGET_ENTITIES be
WHERE be.ledger_id = lgr_id
AND be.name = org_name
AND ( row_id is null
OR be.rowid <> row_id);
SELECT 'Exists'
FROM GL_BUDGET_ENTITIES be, gl_lookups l
WHERE l.lookup_type = 'LITERAL'
AND l.lookup_code = 'ALL'
AND upper(be.name) = upper(l.meaning)
AND be.ledger_id = lgr_id
AND ( row_id is null
OR be.rowid <> row_id);
SELECT 'Has ranges'
FROM GL_BUDGET_ASSIGNMENT_RANGES bar
WHERE bar.budget_entity_id = org_id;
SELECT gl_budget_entities_s.NEXTVAL
FROM dual;
SELECT 'Locked organization'
FROM GL_BUDGET_ENTITIES be
WHERE be.budget_entity_id = org_id
AND not be.status_code = 'D'
FOR UPDATE OF status_code;
fnd_message.set_name('SQLGL', 'GL_BUDORG_DELETED');
PROCEDURE select_columns( entity_id NUMBER,
entity_name IN OUT NOCOPY VARCHAR2,
password_required_flag IN OUT NOCOPY VARCHAR2,
encrypted_password IN OUT NOCOPY VARCHAR2,
status_code IN OUT NOCOPY VARCHAR2
) IS
recinfo gl_budget_entities%ROWTYPE;
select_row(recinfo);
END select_columns;
PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
X_Budget_Entity_Id IN OUT NOCOPY NUMBER,
X_Name VARCHAR2,
X_Ledger_Id NUMBER,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Budget_Password_Required VARCHAR2,
X_Status_Code VARCHAR2,
X_Creation_Date DATE,
X_Created_By NUMBER,
X_Last_Update_Login NUMBER,
X_Encrypted_Budget_Password VARCHAR2,
X_Description VARCHAR2,
X_Start_Date DATE,
X_End_Date DATE,
X_Segment1_Type NUMBER,
X_Segment2_Type NUMBER,
X_Segment3_Type NUMBER,
X_Segment4_Type NUMBER,
X_Segment5_Type NUMBER,
X_Segment6_Type NUMBER,
X_Segment7_Type NUMBER,
X_Segment8_Type NUMBER,
X_Segment9_Type NUMBER,
X_Segment10_Type NUMBER,
X_Segment11_Type NUMBER,
X_Segment12_Type NUMBER,
X_Segment13_Type NUMBER,
X_Segment14_Type NUMBER,
X_Segment15_Type NUMBER,
X_Segment16_Type NUMBER,
X_Segment17_Type NUMBER,
X_Segment18_Type NUMBER,
X_Segment19_Type NUMBER,
X_Segment20_Type NUMBER,
X_Segment21_Type NUMBER,
X_Segment22_Type NUMBER,
X_Segment23_Type NUMBER,
X_Segment24_Type NUMBER,
X_Segment25_Type NUMBER,
X_Segment26_Type NUMBER,
X_Segment27_Type NUMBER,
X_Segment28_Type NUMBER,
X_Segment29_Type NUMBER,
X_Segment30_Type NUMBER,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Context VARCHAR2,
X_All_Name BOOLEAN,
X_Chart_Of_Accounts_Id NUMBER,
X_Security_Flag VARCHAR2
) IS
CURSOR C IS SELECT rowid FROM gl_budget_entities
WHERE budget_entity_id = X_Budget_Entity_Id;
gl_entity_budgets_pkg.insert_entity(
X_Budget_Entity_Id,
X_Ledger_Id,
X_Last_Updated_By,
X_Last_Update_Login);
gl_bc_event_tstamps_pkg.insert_event_timestamp(
X_Chart_Of_Accounts_Id,
'B',
X_Last_Updated_By,
X_Last_Update_Login);
INSERT INTO gl_budget_entities(
budget_entity_id,
name,
ledger_id,
last_update_date,
last_updated_by,
budget_password_required_flag,
status_code,
creation_date,
created_by,
last_update_login,
encrypted_budget_password,
description,
start_date,
end_date,
segment1_type,
segment2_type,
segment3_type,
segment4_type,
segment5_type,
segment6_type,
segment7_type,
segment8_type,
segment9_type,
segment10_type,
segment11_type,
segment12_type,
segment13_type,
segment14_type,
segment15_type,
segment16_type,
segment17_type,
segment18_type,
segment19_type,
segment20_type,
segment21_type,
segment22_type,
segment23_type,
segment24_type,
segment25_type,
segment26_type,
segment27_type,
segment28_type,
segment29_type,
segment30_type,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
context,
security_flag)
VALUES (
X_Budget_Entity_Id,
X_Name,
X_Ledger_Id,
X_Last_Update_Date,
X_Last_Updated_By,
X_Budget_Password_Required,
L_Status_Code,
X_Creation_Date,
X_Created_By,
X_Last_Update_Login,
X_Encrypted_Budget_Password,
X_Description,
X_Start_Date,
X_End_Date,
X_Segment1_Type,
X_Segment2_Type,
X_Segment3_Type,
X_Segment4_Type,
X_Segment5_Type,
X_Segment6_Type,
X_Segment7_Type,
X_Segment8_Type,
X_Segment9_Type,
X_Segment10_Type,
X_Segment11_Type,
X_Segment12_Type,
X_Segment13_Type,
X_Segment14_Type,
X_Segment15_Type,
X_Segment16_Type,
X_Segment17_Type,
X_Segment18_Type,
X_Segment19_Type,
X_Segment20_Type,
X_Segment21_Type,
X_Segment22_Type,
X_Segment23_Type,
X_Segment24_Type,
X_Segment25_Type,
X_Segment26_Type,
X_Segment27_Type,
X_Segment28_Type,
X_Segment29_Type,
X_Segment30_Type,
X_Attribute1,
X_Attribute2,
X_Attribute3,
X_Attribute4,
X_Attribute5,
X_Attribute6,
X_Attribute7,
X_Attribute8,
X_Attribute9,
X_Attribute10,
X_Context,
X_Security_Flag);
'gl_budget_entities_pkg.insert_row');
END Insert_Row;
PROCEDURE Update_Row(X_Rowid VARCHAR2,
X_Budget_Entity_Id NUMBER,
X_Name VARCHAR2,
X_Ledger_Id NUMBER,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Budget_Password_Required VARCHAR2,
X_Status_Code VARCHAR2,
X_Last_Update_Login NUMBER,
X_Encrypted_Budget_Password VARCHAR2,
X_Description VARCHAR2,
X_Start_Date DATE,
X_End_Date DATE,
X_Segment1_Type NUMBER,
X_Segment2_Type NUMBER,
X_Segment3_Type NUMBER,
X_Segment4_Type NUMBER,
X_Segment5_Type NUMBER,
X_Segment6_Type NUMBER,
X_Segment7_Type NUMBER,
X_Segment8_Type NUMBER,
X_Segment9_Type NUMBER,
X_Segment10_Type NUMBER,
X_Segment11_Type NUMBER,
X_Segment12_Type NUMBER,
X_Segment13_Type NUMBER,
X_Segment14_Type NUMBER,
X_Segment15_Type NUMBER,
X_Segment16_Type NUMBER,
X_Segment17_Type NUMBER,
X_Segment18_Type NUMBER,
X_Segment19_Type NUMBER,
X_Segment20_Type NUMBER,
X_Segment21_Type NUMBER,
X_Segment22_Type NUMBER,
X_Segment23_Type NUMBER,
X_Segment24_Type NUMBER,
X_Segment25_Type NUMBER,
X_Segment26_Type NUMBER,
X_Segment27_Type NUMBER,
X_Segment28_Type NUMBER,
X_Segment29_Type NUMBER,
X_Segment30_Type NUMBER,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Context VARCHAR2,
X_All_Name BOOLEAN,
X_Security_Flag VARCHAR2
) IS
BEGIN
-- Make sure only one ALL organization
IF (X_All_Name AND
gl_budget_entities_pkg.check_for_all(
X_Ledger_Id,
X_Rowid)) THEN
fnd_message.set_name('SQLGL', 'GL_BUDGET_ONLY_ONE_ALL');
UPDATE gl_budget_entities
SET
budget_entity_id = X_Budget_Entity_Id,
name = X_Name,
ledger_id = X_Ledger_Id,
last_update_date = X_Last_Update_Date,
last_updated_by = X_Last_Updated_By,
budget_password_required_flag = X_Budget_Password_Required,
status_code = X_Status_Code,
last_update_login = X_Last_Update_Login,
encrypted_budget_password = X_Encrypted_Budget_Password,
description = X_Description,
start_date = X_Start_Date,
end_date = X_End_Date,
segment1_type = X_Segment1_Type,
segment2_type = X_Segment2_Type,
segment3_type = X_Segment3_Type,
segment4_type = X_Segment4_Type,
segment5_type = X_Segment5_Type,
segment6_type = X_Segment6_Type,
segment7_type = X_Segment7_Type,
segment8_type = X_Segment8_Type,
segment9_type = X_Segment9_Type,
segment10_type = X_Segment10_Type,
segment11_type = X_Segment11_Type,
segment12_type = X_Segment12_Type,
segment13_type = X_Segment13_Type,
segment14_type = X_Segment14_Type,
segment15_type = X_Segment15_Type,
segment16_type = X_Segment16_Type,
segment17_type = X_Segment17_Type,
segment18_type = X_Segment18_Type,
segment19_type = X_Segment19_Type,
segment20_type = X_Segment20_Type,
segment21_type = X_Segment21_Type,
segment22_type = X_Segment22_Type,
segment23_type = X_Segment23_Type,
segment24_type = X_Segment24_Type,
segment25_type = X_Segment25_Type,
segment26_type = X_Segment26_Type,
segment27_type = X_Segment27_Type,
segment28_type = X_Segment28_Type,
segment29_type = X_Segment29_Type,
segment30_type = X_Segment30_Type,
attribute1 = X_Attribute1,
attribute2 = X_Attribute2,
attribute3 = X_Attribute3,
attribute4 = X_Attribute4,
attribute5 = X_Attribute5,
attribute6 = X_Attribute6,
attribute7 = X_Attribute7,
attribute8 = X_Attribute8,
attribute9 = X_Attribute9,
attribute10 = X_Attribute10,
context = X_Context,
security_flag = X_Security_Flag
WHERE rowid = X_Rowid;
'gl_budget_entities_pkg.update_row');
END Update_Row;
CURSOR C IS SELECT
Budget_Entity_Id ,
Name,
Ledger_Id,
Budget_Password_Required_Flag,
Status_Code,
Encrypted_Budget_Password,
Description,
Start_Date,
End_Date,
Segment1_Type,
Segment2_Type,
Segment3_Type,
Segment4_Type,
Segment5_Type,
Segment6_Type,
Segment7_Type,
Segment8_Type,
Segment9_Type,
Segment10_Type,
Segment11_Type,
Segment12_Type,
Segment13_Type,
Segment14_Type,
Segment15_Type,
Segment16_Type,
Segment17_Type,
Segment18_Type,
Segment19_Type,
Segment20_Type,
Segment21_Type,
Segment22_Type,
Segment23_Type,
Segment24_Type,
Segment25_Type,
Segment26_Type,
Segment27_Type,
Segment28_Type,
Segment29_Type,
Segment30_Type,
Attribute1,
Attribute2,
Attribute3,
Attribute4,
Attribute5,
Attribute6,
Attribute7,
Attribute8,
Attribute9,
Attribute10,
Context,
Security_Flag
FROM Gl_Budget_Entities
WHERE ROWID = X_Rowid
FOR UPDATE OF Budget_Entity_Id NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE Insert_Org(X_Rowid IN OUT NOCOPY VARCHAR2,
X_Budget_Entity_Id IN OUT NOCOPY NUMBER,
X_Name VARCHAR2,
X_Ledger_Id NUMBER,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Budget_Password_Required VARCHAR2,
X_Status_Code VARCHAR2,
X_Creation_Date DATE,
X_Created_By NUMBER,
X_Last_Update_Login NUMBER,
X_Encrypted_Budget_Password VARCHAR2,
X_Description VARCHAR2,
X_Start_Date DATE,
X_End_Date DATE,
X_Segment1_Type NUMBER,
X_Segment2_Type NUMBER,
X_Segment3_Type NUMBER,
X_Segment4_Type NUMBER,
X_Segment5_Type NUMBER,
X_Segment6_Type NUMBER,
X_Segment7_Type NUMBER,
X_Segment8_Type NUMBER,
X_Segment9_Type NUMBER,
X_Segment10_Type NUMBER,
X_Segment11_Type NUMBER,
X_Segment12_Type NUMBER,
X_Segment13_Type NUMBER,
X_Segment14_Type NUMBER,
X_Segment15_Type NUMBER,
X_Segment16_Type NUMBER,
X_Segment17_Type NUMBER,
X_Segment18_Type NUMBER,
X_Segment19_Type NUMBER,
X_Segment20_Type NUMBER,
X_Segment21_Type NUMBER,
X_Segment22_Type NUMBER,
X_Segment23_Type NUMBER,
X_Segment24_Type NUMBER,
X_Segment25_Type NUMBER,
X_Segment26_Type NUMBER,
X_Segment27_Type NUMBER,
X_Segment28_Type NUMBER,
X_Segment29_Type NUMBER,
X_Segment30_Type NUMBER,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Context VARCHAR2
) IS
L_All_Org BOOLEAN;
SELECT chart_of_accounts_id
INTO L_Coa_Id
FROM GL_LEDGERS
WHERE ledger_id = X_Ledger_Id;
SELECT meaning
INTO L_Translated_All
FROM GL_LOOKUPS
WHERE lookup_type = 'LITERAL'
AND lookup_code = 'ALL';
GL_BUDGET_ENTITIES_PKG.Insert_Row(
X_Rowid,
X_Budget_Entity_Id,
X_Name,
X_Ledger_Id,
X_Last_Update_Date,
X_Last_Updated_By,
X_Budget_Password_Required,
X_Status_Code,
X_Creation_Date,
X_Created_By,
X_Last_Update_Login,
X_Encrypted_Budget_Password,
X_Description,
X_Start_Date,
X_End_Date,
X_Segment1_Type,
X_Segment2_Type,
X_Segment3_Type,
X_Segment4_Type,
X_Segment5_Type,
X_Segment6_Type,
X_Segment7_Type,
X_Segment8_Type,
X_Segment9_Type,
X_Segment10_Type,
X_Segment11_Type,
X_Segment12_Type,
X_Segment13_Type,
X_Segment14_Type,
X_Segment15_Type,
X_Segment16_Type,
X_Segment17_Type,
X_Segment18_Type,
X_Segment19_Type,
X_Segment20_Type,
X_Segment21_Type,
X_Segment22_Type,
X_Segment23_Type,
X_Segment24_Type,
X_Segment25_Type,
X_Segment26_Type,
X_Segment27_Type,
X_Segment28_Type,
X_Segment29_Type,
X_Segment30_Type,
X_Attribute1,
X_Attribute2,
X_Attribute3,
X_Attribute4,
X_Attribute5,
X_Attribute6,
X_Attribute7,
X_Attribute8,
X_Attribute9,
X_Attribute10,
X_Context,
L_All_Org,
L_Coa_Id,
'N');
'GL_BUDGET_ENTITIES_PKG.Insert_Org');
END Insert_Org;
'GL_BUDGET_ENTITIES_PKG.Insert_Org');
SELECT chart_of_accounts_id
INTO L_Coa_Id
FROM gl_ledgers
WHERE ledger_id = X_Ledger_Id;