My Oracle Support Banner

R12:GSP:JAI:AP: Errors APP-SQLAP-10000 ORA-20007 Applying Prepayment (Doc ID 2286766.1)

Last updated on AUGUST 18, 2020

Applies to:

Oracle Financials for India - Version 12.1.3 and later
Information in this document applies to any platform.


On : 12.1.3 version, GST

When attempting to apply a prepayment on an invoice,
the following error occurs.

APP-SQLAP-10000: occurred in
Apply_Prepay_Linewith parameters (&PARAMETERS)
while performing the following operation:
Distribute tax

The issue can be reproduced at will with the following steps:

1. Responsibility: Oracle Payables - India GST
2. Path: Invoices -> Entry -> Invoices
3. Query an invoice
4. Apply a prepayment on the invoice

Note: Both invoices are having the same TDS applied.

The prepayment is created after GST patches.

5. FND log file

JAI_AP_DTC_GENERATION_PKG: status_update_chk_validate()()+
p_invoice_id: 19976488 p_invoice_line_number: p_invoice_distribution_id: p_match_status_flag:
sid:327947999: Value of total cnt 1
sid:327947999: Value of validated A cnt 1
sid:327947999: Value of validated T cnt 0
Value of validated A cnt 1 Value of validated T cnt 0
Status_update_chk_validate - Status of parent invoice Y
JAI_AP_DTC_GENERATION_PKG: status_update_chk_validate()()-
Input parameters: p_event = INSERT,p_invoice_id = 19976488,p_invoice_distribution_id = 24048616,p_prepay_distribution_id = 24048563,p_parent_reversal_id = ,p_prepay_amount = -1180,p_vendor_id = 3,p_vendor_site_id = 656359,p_accounting_date = 20170714,p_invoice_currency_code = INR,p_exchange_rate = ,p_set_of_books_id = 2024,p_org_id = 83,p_creation_date = 14-JUL-17
Input parameters: p_invoice_id = 19976488,p_invoice_distribution_id = 24048616,p_prepay_distribution_id = 24048563,p_prepay_amount = -1180
lv_ppay_tds_section_code Sec. 194(J) lv_application_basis STANDARD ln_ppay_tds_regime_id 10002
lv_ppay_rgm2_applicable N lv_ppay_rgm3_applicable N
ln_application_amount1000 ln_effective_available_amount 1000 cur_si_distributions_rec.amount1000
Loop1 ln_application_amount:1000
Loop2 ln_application_amount:0
jai_ap_dtc_prepayments_pkg: allocate_prepay_section()()-

Encountered an error in JAI_AP_IDA_TRIGGER_DTC_PKG.BRIUD_DTC_T1 Error on ap_invoice_distributions_all : ORA-20007: Error - trigger ja_in_ap_aida_before_trg on ap_invoice_distributions_all : Cannot Apply Prepayment across TDS Section Codes


Expected Error raised for Trx_id19976488
Return Status after Recovery Determination : E
0 Error Message(s) dumped into Zx_Errors_GT.
Start Time :14-07-2017 18:50:48
End Time :14-07-2017 18:50:50
Total Time :0:0:2
Number of records in ZX_TRX_HEADERS_GT :1
Number of records in ZX_TRANSACTION_LINES_GT :4
Handle errors returned by API
Get error message from eTax API
Get error message from stack


"APP-SQLAP-10000: occurred in
Apply_Prepay_Linewith parameters (&PARAMETERS)
while performing the following operation:
Distribute tax"

The issue has the following business impact:
Due to this issue, users cannot apply the prepayment on the invoice


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.