The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT invoice_id
INTO l_key_value1
FROM ap_invoice_distributions
WHERE invoice_distribution_id =
p_key_value_list(uniq_values);
l_debug_info := 'inserting record from list';
INSERT INTO AP_DBI_LOG(Table_Name,
Operation_Flag,
Key_Value1,
Key_Value2,
Exp_Processed_Flag,
PS_Processed_Flag,
Created_By,
Creation_Date,
Last_Updated_By,
Last_Update_Date,
Partition_ID)
VALUES
(p_table_name,
p_operation,
nvl(p_key_value1,l_key_value1),
p_key_value_list(uniq_values),
'N',
'N',
-1,
sysdate,
-1,
sysdate,
mod(to_number(to_char(trunc(sysdate), 'J')), 32)
);
l_debug_info := 'inserting record from list';
INSERT INTO AP_DBI_LOG(Table_Name,
Operation_Flag,
Key_Value1,
Key_Value2,
Exp_Processed_Flag,
PS_Processed_Flag,
Created_By,
Creation_Date,
Last_Updated_By,
Last_Update_Date,
Partition_ID)
VALUES
(p_table_name,
p_operation,
p_key_value_list(uniq_values),
p_key_value2,
'N',
'N',
-1,
sysdate,
-1,
sysdate,
mod(to_number(to_char(trunc(sysdate), 'J')), 32)
);
INSERT INTO AP_DBI_LOG(Table_Name,
Operation_Flag,
Key_Value1,
Key_Value2,
Exp_Processed_Flag,
PS_Processed_Flag,
Created_By,
Creation_Date,
Last_Updated_By,
Last_Update_Date,
Partition_ID)
SELECT
p_table_name,
p_operation,
p_key_value_list(uniq_values),
payment_num,
'N',
'N',
-1,
sysdate,
-1,
sysdate,
mod(to_number(to_char(trunc(sysdate), 'J')), 32)
FROM AP_PAYMENT_SCHEDULES
WHERE invoice_id =p_key_value_list(uniq_values);
INSERT INTO AP_DBI_LOG(Table_Name,
Operation_Flag,
Key_Value1,
Key_Value2,
Exp_Processed_Flag,
PS_Processed_Flag,
Created_By,
Creation_Date,
Last_Updated_By,
Last_Update_Date,
Partition_ID)
SELECT
p_table_name,
p_operation,
p_key_value2,
p_key_value_list(uniq_values),
'N',
'N',
-1,
sysdate,
-1,
sysdate,
mod(to_number(to_char(trunc(sysdate), 'J')), 32)
FROM AP_PAYMENT_SCHEDULES
WHERE invoice_id =p_key_value_list(uniq_values);
INSERT INTO AP_DBI_LOG(Table_Name,
Operation_Flag,
Key_Value1,
Key_Value2,
Exp_Processed_Flag,
PS_Processed_Flag,
Created_By,
Creation_Date,
Last_Updated_By,
Last_Update_Date,
Partition_ID)
SELECT
p_table_name,
p_operation,
p_key_value1,
payment_num,
'N',
'N',
-1,
sysdate,
-1,
sysdate,
mod(to_number(to_char(trunc(sysdate), 'J')), 32)
FROM AP_PAYMENT_SCHEDULES
WHERE invoice_id = p_key_value1;
SELECT invoice_id
INTO l_key_value1
FROM ap_invoice_distributions
WHERE invoice_distribution_id =
p_key_value2;
l_debug_info := 'inserting normal record';
INSERT INTO AP_DBI_LOG(Table_Name,
Operation_Flag,
Key_Value1,
Key_Value2,
Exp_Processed_Flag,
PS_Processed_Flag,
Created_By,
Creation_Date,
Last_Updated_By,
Last_Update_Date,
Partition_ID)
VALUES
(p_table_name,
p_operation,
nvl(p_key_value1,l_key_value1),
p_key_value2,
'N',
'N',
-1,
sysdate,
-1,
sysdate,
mod(to_number(to_char(trunc(sysdate), 'J')), 32)
);
| PUBLIC PROCEDURE Insert_Payment_Confirm_DBI
|
| DESCRIPTION:
| This is a special procedure for inserting invoice related
| data during the payment confirmation c program.
|
| This procedure will call the Maintain_DBI_Summary with the
| information required.
|
| PARAMETERS
| p_checkrun_name IN Name of the checkrun for the payment batch
| p_base_currency_code IN Base currency code for the payment batch
| p_key_table IN Name of the table
| p_calling_sequence IN
| p_debug_mode IN
|
| KNOWN ISSUES:
|
| NOTES:
|
| MODIFICATION HISTORY
| Date Author Description of Change
| 04/00/03 Amy McGuire Created -- copied from Biplob Ghose's
| Insert_Payment_Confirm_MRC.
| 19-Nov-09 ssdeshpa Bug#8964576 DBI information is not getting loaded
| for Invoice Payments entity when creating the check
| through the PPR
*===========================================================================*/
PROCEDURE Insert_Payment_Confirm_DBI(
p_checkrun_name IN VARCHAR2,
p_base_currency_code IN VARCHAR2,
p_key_table IN VARCHAR2,
p_calling_sequence IN VARCHAR2,
p_debug_mode IN VARCHAR2 default 'N') IS
l_curr_calling_sequence VARCHAR2(2000);
SELECT interest.invoice_id
FROM ap_selected_invoices interest
WHERE interest.original_invoice_id is NOT NULL --Bug3293887
AND interest.checkrun_name = p_checkrun_name;
SELECT aid.invoice_distribution_id, aid.invoice_id
FROM ap_selected_invoices interest,
ap_invoice_distributions aid
WHERE interest.original_invoice_id is NOT NULL --Bug3293887
AND interest.checkrun_name = p_checkrun_name
AND aid.invoice_id = interest.invoice_id;
SELECT aps.invoice_id, aps.payment_num
FROM ap_selected_invoices interest,
ap_payment_schedules aps
WHERE interest.original_invoice_id is NOT NULL --Bug3293887
AND interest.checkrun_name = p_checkrun_name
AND aps.invoice_id = interest.invoice_id;
SELECT aip.invoice_payment_id
FROM ap_invoice_payments aip,
ap_checks ac
WHERE aip.check_id = ac.check_id
AND ac.checkrun_name = p_checkrun_name;
l_curr_calling_sequence := 'AP_DBI_PKG.Insert_Payment_Confirm_DBI<-'||
P_calling_sequence;
END Insert_Payment_Confirm_DBI;