Oracle APPS Account Payables Create Payment API
Hello, In this tutorial, I am going to share an unknown method for creating paymanets on Oracle EBS Account Payables. Since there isn’t any public API provided by Oracle, as developers we are investing into new methods. There is a…
Oracle Apps How to Cancel AP Invoice
Hello, In order to cancel AP invoices in Oracle EBS, you can use following script. You do not need to call ap_cancel_pkg.Is_Invoice_Cancellable API since cancel api is already doing the same validation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
DECLARE l_invoice_id NUMBER; l_last_updated_by NUMBER; l_last_update_login NUMBER; l_gl_date DATE; l_ret_message VARCHAR2 (4000); l_cancel_api_result BOOLEAN; l_invoice_num VARCHAR2 (100); --out params l_message_name_out VARCHAR2 (1000); l_invoice_amount_out NUMBER; l_base_amount_out NUMBER; l_tax_amount_out NUMBER; l_temp_cancelled_amount_out NUMBER; l_cancelled_by_out VARCHAR2 (1000); l_cancelled_amount_out NUMBER; l_cancelled_date_out DATE; l_last_update_date_out DATE; l_original_prepayment_amount_o NUMBER; l_pay_curr_invoice_amount_out NUMBER; l_token_out VARCHAR2 (100); BEGIN BEGIN SELECT last_updated_by, last_update_login, gl_date, invoice_num INTO l_last_updated_by, l_last_update_login, l_gl_date, l_invoice_num FROM ap_invoices_all WHERE invoice_id = l_invoice_id; EXCEPTION WHEN NO_DATA_FOUND THEN l_last_updated_by := NULL; l_last_update_login := NULL; l_gl_date := NULL; l_invoice_num := NULL; END; BEGIN l_cancel_api_result := ap_cancel_pkg. ap_cancel_single_invoice ( p_invoice_id => l_invoice_id, p_last_updated_by => l_last_updated_by, p_last_update_login => l_last_update_login, p_accounting_date => l_gl_date, p_message_name => l_message_name_out, p_invoice_amount => l_invoice_amount_out, p_base_amount => l_base_amount_out, p_temp_cancelled_amount => l_temp_cancelled_amount_out, p_cancelled_by => l_cancelled_by_out, p_cancelled_amount => l_cancelled_amount_out, p_cancelled_date => l_cancelled_date_out, p_last_update_date => l_last_update_date_out, p_original_prepayment_amount => l_original_prepayment_amount_o, p_pay_curr_invoice_amount => l_pay_curr_invoice_amount_out, p_token => l_token_out, p_calling_sequence => NULL); IF l_cancel_api_result THEN l_ret_message := l_invoice_num || ' is cancelled.'; x_status := 'S'; ELSE l_ret_message := l_invoice_num || ' : error'; l_ret_message := l_ret_message || '. l_message_name_out: ' || l_message_name_out; l_ret_message := l_ret_message || '. sqlerrm: ' || SQLERRM; x_status := 'E'; END IF; DBMS_OUTPUT.put_line ('l_ret_messsage:' || l_ret_message); END; END; |