Pages

Thursday, July 21, 2011

AR-DM Interface: Not balanced

Issue:
Debit and Credit is not balanced in AR-DM Interface.


Cause:
The trans amount of debit entry DM No. 00000321 for GL Account Code 1230-0011000 is zero.

Solution:
1. Below are the select queries sent by JSI:
declare @doc_no as char(8)
set @doc_no = ’00000321′
– a_open_item
select *
from a_open_item
where doc_no = @doc_no
– a_open_itm_hist
select *
from a_open_itm_hist
where doc_no = @doc_no
– a_doc_reg
select *
from a_doc_reg
where doc_no_fr = @doc_no
– a_ar_gl_trans
select *
from a_ar_gl_trans
where doc_no = @doc_no
2. Below is the 2nd set of query sent:
declare @trans_amt as decimal (12, 2),
@trans_dm as char(3),
@reverse_flg as varchar(1),
@cust_code as char(8),
@doc_no as char(8)
set @trans_amt = 38.83
set @trans_dm = ‘DM’
set @reverse_flg = ‘Y’
set @cust_code = ’10GM1360′
set @doc_no = ’00003092′
– a_open_item
select *
from a_open_item
where trans_amt = @trans_amt
and trans_code = @trans_dm
– a_open_itm_hist
select *
from a_open_itm_hist
where trans_amt = @trans_amt
and trans_code = @trans_dm
– a_tax_schedule
select *
from a_tax_schedule
where tax_amt = @trans_amt
and reverse_flg = @reverse_flg
and cust_code = @cust_code
– a_tax_schedule
select *
from a_tax_schedule
where doc_no = @doc_no
3. See below for the data fix script:
declare @doc_no as char(8),
@trans_dm as char(3),
@cust_code as char(8)
set @doc_no = ’00000321′
set @trans_dm = ‘DM’
set @cust_code = ’10GM1360′
– a_ar_gl_trans
delete
from a_ar_gl_trans
where doc_no = @doc_no
and trans_code = @trans_dm
and cust_code = @cust_code

No comments:

Post a Comment