Pages

Wednesday, July 13, 2011

AR Batch PR Processing: Database Error - Row changed between retrieve and update...

Issue:
User encountered error upon performing AR Batch PR Processing.


Cause:
Suspending a batch while it is still in use by other user. This error can be replicated given scenario below:
  1. User 1, create invoice. Enter user calculated batch and entry no. Close the window then open it again.
  2. User 2, suspend transactions made by user 1, create another invoice. Click ok. Enter calculated batch and entry no.
  3. User 1, open the first invoice, then ok. Update the batch. The error message will
    prompt.
Fix:
1. Check the following tables to verify if transaction is successfully saved.
  • a_open_payment
  • a_open_pymt_hist
  • a_open_payment_check
  • a_open_pymt_check_hist
  • a_doc_reg
  • a_open_acr_appl_to
  • a_open_acr_appl_hist
  • a_open_item
  • a_open_itm_hist
Use script below in checking the above tables.
declare @doc_no1 as char(8),
@doc_no2 as char(8),
@doc_no3 as char(8),
@trans_pr as char(3),
@trans_unp as char(3)
– Continue adding @doc_no if more than 3. Hence, if less then remove excess declaration of @doc_no.
set @doc_no1 = ’428154′
set @doc_no2 = ’427739′
set @doc_no3 = ’426030′
set @trans_pr = ‘PR’
set @trans_unp = ‘UNP’
– a_open_payment
select *
from a_open_payment with (nolock)
where payment_doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and payment_trans_code = @trans_pr
– a_open_pymt_hist
select *
from a_open_pymt_hist with (nolock)
where payment_doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and payment_trans_code = @trans_pr
– a_open_payment_check
select *
from a_open_payment_check with (nolock)
where payment_doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and payment_trans_code = @trans_pr
– a_open_pymt_chk_hist
select *
from a_open_pymt_chk_hist with (nolock)
where payment_doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and payment_trans_code = @trans_pr
– a_doc_reg
select *
from a_doc_reg with (nolock)
where doc_no_fr in
(@doc_no1, @doc_no2, @doc_no3)
and trans_code = @trans_pr
– a_open_acr_appl_to
select *
from a_open_acr_appl_to with (nolock)
where payment_doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and payment_trans_code = @trans_pr
– a_open_acr_appl_hst
select *
from a_opn_acr_appl_hst with (nolock)
where payment_doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and payment_trans_code = @trans_pr
– a_open_item
select *
from a_open_item with (nolock)
where doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and trans_code = @trans_unp
– a_open_itm_hist
select *
from a_open_itm_hist with (nolock)
where doc_no in
(@doc_no1, @doc_no2, @doc_no3)
and trans_code = @trans_unp

No comments:

Post a Comment