The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT COUNT(*)
INTO invoice_count
--bug 7606664 changed ap_invoices to ap_invoices_all
FROM ap_invoices_all
WHERE batch_id = l_batch_id;
SELECT SUM(nvl(invoice_amount,0))
INTO invoice_amount
--bug 7606664 changed ap_invoices to ap_invoices_all
FROM ap_invoices_all
WHERE batch_id = l_batch_id;
select count(1)
into dummy
from ap_batches_all
where batch_name = X_BATCH_NAME
and ((X_ROWID is null) or (rowid <> X_ROWID));
PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
X_Batch_Id NUMBER,
X_Batch_Name VARCHAR2,
X_Batch_Date DATE,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Control_Invoice_Count NUMBER,
X_Control_Invoice_Total NUMBER,
X_Invoice_Currency_Code VARCHAR2,
X_Payment_Currency_Code VARCHAR2,
X_Last_Update_Login NUMBER,
X_Creation_Date DATE,
X_Created_By NUMBER,
X_Pay_Group_Lookup_Code VARCHAR2,
X_Payment_Priority NUMBER,
X_Batch_Code_Combination_Id NUMBER,
X_Terms_Id NUMBER,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute_Category VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Attribute11 VARCHAR2,
X_Attribute12 VARCHAR2,
X_Attribute13 VARCHAR2,
X_Attribute14 VARCHAR2,
X_Attribute15 VARCHAR2,
X_Invoice_Type_Lookup_Code VARCHAR2,
X_Hold_Lookup_Code VARCHAR2,
X_Hold_Reason VARCHAR2,
X_Doc_Category_Code VARCHAR2,
X_Org_Id NUMBER,
X_calling_sequence IN VARCHAR2,
X_gl_date DATE -- **1
) IS
CURSOR C IS SELECT rowid FROM AP_BATCHES_ALL
WHERE batch_id = X_Batch_Id;
current_calling_sequence := 'AP_BATCHES_PKG.INSERT_ROW<-' ||
X_calling_sequence;
debug_info := 'Insert into AP_BATCHES';
INSERT INTO AP_BATCHES_ALL(
batch_id,
batch_name,
batch_date,
last_update_date,
last_updated_by,
control_invoice_count,
control_invoice_total,
invoice_currency_code,
payment_currency_code,
last_update_login,
creation_date,
created_by,
pay_group_lookup_code,
payment_priority,
batch_code_combination_id,
terms_id,
attribute1,
attribute2,
attribute3,
attribute4,
attribute_category,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
invoice_type_lookup_code,
hold_lookup_code,
hold_reason,
doc_category_code,
gl_date, -- **1
org_id
) VALUES (
X_Batch_Id,
X_Batch_Name,
X_Batch_Date,
X_Last_Update_Date,
X_Last_Updated_By,
X_Control_Invoice_Count,
X_Control_Invoice_Total,
X_Invoice_Currency_Code,
X_Payment_Currency_Code,
X_Last_Update_Login,
X_Creation_Date,
X_Created_By,
X_Pay_Group_Lookup_Code,
X_Payment_Priority,
X_Batch_Code_Combination_Id,
X_Terms_Id,
X_Attribute1,
X_Attribute2,
X_Attribute3,
X_Attribute4,
X_Attribute_Category,
X_Attribute5,
X_Attribute6,
X_Attribute7,
X_Attribute8,
X_Attribute9,
X_Attribute10,
X_Attribute11,
X_Attribute12,
X_Attribute13,
X_Attribute14,
X_Attribute15,
X_Invoice_Type_Lookup_Code,
X_Hold_Lookup_Code,
X_Hold_Reason,
X_Doc_Category_Code,
X_gl_date, -- **1
X_org_id
);
END Insert_Row;
SELECT *
FROM AP_BATCHES_ALL
WHERE rowid = X_Rowid
FOR UPDATE of Batch_Id NOWAIT;
FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
PROCEDURE Update_Row(X_Rowid VARCHAR2,
X_Batch_Id NUMBER,
X_Batch_Name VARCHAR2,
X_Batch_Date DATE,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Control_Invoice_Count NUMBER,
X_Control_Invoice_Total NUMBER,
X_Invoice_Currency_Code VARCHAR2,
X_Payment_Currency_Code VARCHAR2,
X_Last_Update_Login NUMBER,
X_Pay_Group_Lookup_Code VARCHAR2,
X_Payment_Priority NUMBER,
X_Batch_Code_Combination_Id NUMBER,
X_Terms_Id NUMBER,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute_Category VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Attribute11 VARCHAR2,
X_Attribute12 VARCHAR2,
X_Attribute13 VARCHAR2,
X_Attribute14 VARCHAR2,
X_Attribute15 VARCHAR2,
X_Invoice_Type_Lookup_Code VARCHAR2,
X_Hold_Lookup_Code VARCHAR2,
X_Hold_Reason VARCHAR2,
X_Doc_Category_Code VARCHAR2,
X_Org_Id NUMBER,
X_calling_sequence IN VARCHAR2,
X_gl_date DATE -- **1
) IS
current_calling_sequence VARCHAR2(2000);
current_calling_sequence := 'AP_BATCHES_PKG.UPDATE_ROW<-' ||
X_calling_sequence;
debug_info := 'Update AP_BATCHES_ALL';
UPDATE AP_BATCHES_ALL
SET
batch_id = X_Batch_Id,
batch_name = X_Batch_Name,
batch_date = X_Batch_Date,
last_update_date = X_Last_Update_Date,
last_updated_by = X_Last_Updated_By,
control_invoice_count = X_Control_Invoice_Count,
control_invoice_total = X_Control_Invoice_Total,
invoice_currency_code = X_Invoice_Currency_Code,
payment_currency_code = X_Payment_Currency_Code,
last_update_login = X_Last_Update_Login,
pay_group_lookup_code = X_Pay_Group_Lookup_Code,
payment_priority = X_Payment_Priority,
batch_code_combination_id = X_Batch_Code_Combination_Id,
terms_id = X_Terms_Id,
attribute1 = X_Attribute1,
attribute2 = X_Attribute2,
attribute3 = X_Attribute3,
attribute4 = X_Attribute4,
attribute_category = X_Attribute_Category,
attribute5 = X_Attribute5,
attribute6 = X_Attribute6,
attribute7 = X_Attribute7,
attribute8 = X_Attribute8,
attribute9 = X_Attribute9,
attribute10 = X_Attribute10,
attribute11 = X_Attribute11,
attribute12 = X_Attribute12,
attribute13 = X_Attribute13,
attribute14 = X_Attribute14,
attribute15 = X_Attribute15,
invoice_type_lookup_code = X_Invoice_Type_Lookup_Code,
hold_lookup_code = X_Hold_Lookup_Code,
hold_reason = X_Hold_Reason,
doc_category_code = X_Doc_Category_Code,
gl_date = X_gl_date, -- **1
org_id = X_org_id
WHERE rowid = X_Rowid;
END Update_Row;
PROCEDURE Delete_Row(X_Rowid VARCHAR2,
X_calling_sequence IN VARCHAR2) IS
current_calling_sequence VARCHAR2(2000);
current_calling_sequence := 'AP_BATCHES_PKG.DELETE_ROW<-' ||
X_calling_sequence;
debug_info := 'Delete from AP_BATCHES';
DELETE FROM AP_BATCHES_ALL
WHERE rowid = X_Rowid;
END Delete_Row;