The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT batch_id
INTO g_batch_id
FROM Ap_Batches_All
WHERE batch_name = g_batch_name;
SELECT invoice_id,invoice_num,invoice_date
FROM Ap_Invoices
WHERE set_of_books_id = g_sob_id
AND source = 'IPAC'
AND batch_id = g_batch_id
ORDER BY invoice_num;
SELECT fv.invoice_id, ap.invoice_num,
fv.accomplish_date, ap.payment_method_lookup_code
FROM Fv_Ipac_Recurring_Inv fv, Ap_Invoices ap
WHERE fv.invoice_id = ap.invoice_id
AND fv.batch_name = g_batch_name
AND fv.invoice_action = inv_action
ORDER BY ap.invoice_num;
UPDATE Fv_Ipac_Recurring_Inv
SET invoice_action = 'P'
WHERE invoice_id = p_invoice_id;
Update_WfStatus(p_invoice_id);
FV_UTILITY.DEBUG_MESG(FND_LOG.LEVEL_STATEMENT, l_module_name,' Inserting the transaction into the '||
'Fv_Interagency_Funds Table.');
Insert_IA_Txns(p_invoice_id,p_invoice_num,x_paygroup);
PROCEDURE Insert_IA_Txns(p_invoice_id NUMBER,
p_invoice_num VARCHAR2,
x_paygroup OUT NOCOPY VARCHAR2) IS
l_module_name VARCHAR2(200) := g_module_name || 'Insert_IA_Txns';
SELECT COUNT(*)
INTO l_count
FROM Fv_Operating_Units fo,Ap_Invoices ai
WHERE ai.invoice_id = p_invoice_id
AND fo.set_of_books_id = g_sob_id
AND fo.payables_ia_paygroup = ai.pay_group_lookup_code;
' -- Error in Insert_IA_Txns Procedure'||
' while checking for the paygroup for the invoice '||p_invoice_num;
SELECT ai.vendor_id, pv.vendor_name, ai.creation_date
INTO l_vendor_id, l_vendor_name, l_date
FROM Ap_Invoices ai, Po_Vendors pv
WHERE ai.invoice_id = p_invoice_id
AND ai.vendor_id = pv.vendor_id
AND NOT EXISTS (SELECT 'X'
FROM Fv_Interagency_Funds
WHERE set_of_books_id = g_sob_id
AND invoice_id IS NOT NULL
AND invoice_id = ai.invoice_id);
' -- Error in Insert_IA_Txns Procedure (no data found)'||
' while getting the vendor information for the invoice '||
p_invoice_num;
' -- Error in Insert_IA_Txns Procedure'||
' while getting the vendor information for the invoice '
||p_invoice_num;
FV_UTILITY.DEBUG_MESG(FND_LOG.LEVEL_STATEMENT, l_module_name,' The invoice '||p_invoice_num||' has been inserted '||
'into the interagency table.');
' has not been inserted '|| 'into the interagency table.');
SELECT pay_group_lookup_code
INTO x_paygroup
FROM Ap_Invoices
WHERE invoice_id = p_invoice_id;
' -- Error in Insert_IA_Txns Procedure'||
' while deriving the paygroup for the invoice '||p_invoice_num;
INSERT INTO Fv_Interagency_Funds
(interagency_fund_id,
set_of_books_id,
processed_flag,
chargeback_flag,
last_update_date,
last_updated_by,
created_by,
creation_date,
vendor_id,
vendor_name,
invoice_id,
invoice_number,
org_id)
VALUES
(Fv_Interagency_Funds_S.NEXTVAL,
g_sob_id,
'N',
'N',
SYSDATE,
Fnd_Global.user_id,
Fnd_Global.user_id,
SYSDATE,
l_vendor_id,
l_vendor_name,
p_invoice_id,
p_invoice_num,
g_org_id
);
g_errbuf := SQLERRM || ' -- Error in Insert_IA_Txns Procedure.';
END Insert_IA_Txns;
PROCEDURE Update_WfStatus(p_invoice_id NUMBER) IS
l_module_name VARCHAR2(200) := g_module_name || 'Update_WfStatus';
UPDATE Ap_Invoices
SET wfapproval_status = 'NOT REQUIRED'
WHERE invoice_id = p_invoice_id;
g_errbuf := SQLERRM || ' -- Error in Update_WfStatus Procedure.';
END Update_WfStatus;