Leah,
You may have to open an incident with Microsoft on this as the error message does not provide any clue as to the issue.
I see that you indicated the error occurs during "posting". Some users interchange "posting" with "releasing" so we should clarify if this error occurs during the releasing of the batch or the posting of the batch to GL.
I did run across an old SQL script that the support group created to assist with problems during the releasing of an AR batch. This script was called AR_6019_DEBUG.sql. I have included its content below. Not sure if this will help or not. It does mean that you have to have access to SQL Server Management Studio in order to run it and that you have to be able to interpret the results. Also, since the script is fairly old, some of its logic may not apply to the more current versions of SL but I would give it a try.
/*
+-----------------------------------------------+
|AR 6019 Debug Script v2.3 |
|Modified 5/15/06 |
| - Added SQL 2005 instructions |
| - Added sys msg 8058 debug |
| - added section or pre-pay applic batches |
| - 3 calculated field on related invoices |
| - gets related invoice and pmts on rlsed batch|
+-----------------------------------------------+
IF YOU ARE USING SQL 2000 DO THE FOLLOWING:
1 - Open the script in Query Analyzer
2 - On the toolbar select Tools -> Options -> Results
a - Set "Default results target" to "Results to Text"
b - Set "Results output format" to "Tab Delimited"
c - Click the OK Button.
3 - Replace the XXXXXX with your 6 digit batch number.
4 - Run the script (F5).
5 - After the script has run, click on the results part of the screen.
6 - Select File/Save As/IncidentAP.rpt.
7 - Zip this file and attach it to the incident.
----------------------------------------------------------------------------
IF YOU ARE USING SQL 2005 DO THE FOLLOWING:
1 - Open the script in SQL Server Management Studio
2 - On the toolbar select Tools -> Options -> Query Results -> SQL Server
a - Click on Results to Text
b - Set the Output Format to Tab Delimited
c - Click OK
3 - On the tollbar, select Query -> Results To -> Results to Text
4 - Replace the XXXXXX with your 6 digit batch number.
5 - Run the script (F5).
6 - After the script has run, click on the results part of the screen.
7 - Select File/Save As/IncidentAP.rpt.
8 - Zip this file and attach it to the incident.
*/
DECLARE @batchNumber varchar(6)
DECLARE @getPaymentDocs varchar(3)
DECLARE @getInvoiceDocs varchar(3)
DECLARE @getPaymentTrans varchar(3)
DECLARE @getInvoiceTrans varchar(3)
DECLARE @getCashManager varchar(3)
-- Change XXXXXX to the suspended batch number
SET @batchNumber = 'XXXXXX'
-- Set to YES to view related invoice docs. Set to NO to skip
SET @getInvoiceDocs = 'YES'
-- Set to YES to view related payment docs. Set to NO to skip
SET @getPaymentDocs = 'YES'
-- Set to YES to view related cash manager records. Set to NO to skip
SET @getCashManager = 'YES'
-- Quick error check to see if the application database was selected
if not exists (select * from sysobjects where id = object_id(N'[dbo].[Batch]'))
begin
print 'Error: BATCH table not found. Please select your Solomon Application'
print ' database from the drop-down menu in the Query Analyzer toolbar.'
return
end
-- Quick error check to see if the batch record was found
if ((select count(*) from batch where batnbr = @batchNumber AND module = 'AR')=0)
begin
print 'Error: BATCH record not found. Please double check the value set for'
print ' @batchNumber and make sure the correct application database is'
print ' selected. Current value for @batchNumber: ' + @batchNumber
return
end
Print '############################# VERSION INFO ####################'
Print 'GLSetup'
select s4future01, cpnyid, basecuryid , 'V2.3' as DebugScriptVersion from glsetup
select @@version as 'SQL Server'
Print '############################# BEGIN 6019 #####################'
Print 'BATCH'
SELECT Batnbr,Status,Rlsed,EditScrnnbr,Crtot,Drtot,Ctrltot,CuryCrtot,CuryDrtot,CuryCtrltot,*
FROM Batch
WHERE batnbr = @batchNumber AND module = 'AR'
Print 'ARDoc'
SELECT Batnbr,ApplBatNbr,Custid,Doctype,Refnbr,Rlsed,Docbal,origdocamt,curydocbal,curyorigdocamt,*
FROM ARDoc
WHERE batnbr = @batchNumber
ORDER BY refnbr
Print 'ARTran'
SELECT Batnbr,Custid,Trantype,Refnbr,siteid,DRCR,Rlsed,Tranamt,CuryTranamt,*
FROM ARTran
WHERE batnbr = @batchNumber
ORDER BY refnbr
Print 'Sum of ARTrans'
SELECT Batnbr,Custid,Trantype,Refnbr,SumTranAmt = Sum(Tranamt), SumCuryTranAmt = Sum(CuryTranamt),
sumCuryTaxamt00 = sum(curyTaxAmt00), sumCuryTaxamt01 = sum(CuryTaxAmt01),
sumCuryTaxamt02 = sum(curyTaxAmt02), sumCuryTaxamt03 = sum(CuryTaxAmt03)
FROM ARTran
WHERE batnbr = @batchNumber
GROUP By batnbr,custid,Trantype,refnbr
Print 'ArAdjust'
Select * from ArAdjust where adjbatnbr = @batchNumber
ORDER BY adjdrefnbr
Print 'GLTran'
Select * from GLTran where batnbr = @batchNumber and module = 'ar'
IF @getInvoiceDocs = 'YES' and ((select count(*) from ARTran WHERE batnbr = @batchNumber and siteid<>'')>0
or (select count(*) from aradjust where adjbatnbr=@batchNumber)>0)
BEGIN
Print '############################# RELATED INVOICE DOCS ####################'
Print 'ARDOC (invoices)'
Print ' xAmountApplied, xDiscApplied, and xMinCuryTxblAmt00 are calculated fields based on the artrans in batch ' + @batchNumber
Print ''
select
Batnbr,ApplBatNbr,Custid,Doctype,Refnbr,Rlsed,Docbal,origdocamt,curydocbal,curyorigdocamt,
(select sum(tranamt) from artran where artran.siteid=ardoc.refnbr and artran.batnbr=@batchNumber) as xAmountApplied,
(select sum(CnvFact) from artran where artran.siteid=ardoc.refnbr and artran.batnbr=@batchNumber) as xDiscApplied,
(select min(curytxblamt00) from artran where artran.siteid=ardoc.refnbr and artran.batnbr=@batchNumber) as xMinCuryTxblAmt00,
*
from ardoc
where refnbr IN (select distinct(siteid) from ARTran WHERE batnbr = @batchNumber)
and custid IN (select distinct(custid) from ARTran WHERE batnbr = @batchNumber)
and batnbr <> @batchNumber
union all
select
Batnbr,ApplBatNbr,Custid,Doctype,Refnbr,Rlsed,Docbal,origdocamt,curydocbal,curyorigdocamt,0,0,0,*
from ardoc
where refnbr IN (select adjdrefnbr from aradjust WHERE adjbatnbr = @batchNumber)
and custid IN (select distinct(custid) from aradjust WHERE adjbatnbr = @batchNumber)
order by refnbr, batnbr
END
IF @getPaymentDocs='YES' and ((select count(*) from ardoc where ApplBatNbr=@batchNumber and batnbr<>@batchNumber)>0
or (select count(*) from aradjust where adjbatnbr=@batchNumber)>0)
BEGIN
Print '############################# RELATED PAYMENT DOCS ####################'
Print 'ARDOC (payments)'
select Batnbr,ApplBatNbr,Custid,Doctype,Refnbr,Rlsed,Docbal,origdocamt,curydocbal,curyorigdocamt,*
from ardoc
where ApplBatNbr=@batchNumber and batnbr <> @batchNumber
union all
select Batnbr,ApplBatNbr,Custid,Doctype,Refnbr,Rlsed,Docbal,origdocamt,curydocbal,curyorigdocamt,*
from ardoc
where refnbr IN (select adjgrefnbr from aradjust WHERE adjbatnbr = @batchNumber)
and custid IN (select distinct(custid) from aradjust WHERE adjbatnbr = @batchNumber)
and batnbr <> @batchNumber
order by refnbr, batnbr
END
IF (@getCashManager = 'YES') and ((select Crtd_Prog from batch where batnbr = @batchNumber AND module = 'AR') = '20400')
BEGIN
Print '############################# RELATED CASH MANAGER RECORDS###############'
DECLARE @CABatNbr varchar(6)
SET @CABatNbr = (select origbatnbr from batch where batnbr = @batchNumber AND module = 'AR')
Print 'Originating Cash Manager BATCH'
SELECT Batnbr,Status,Rlsed,EditScrnnbr,Crtot,Drtot,Ctrltot,CuryCrtot,CuryDrtot,CuryCtrltot,*
FROM Batch
WHERE batnbr = @CABatNbr AND module = 'CA'
Print 'CATran'
SELECT Batnbr,Refnbr,DRCR,Rlsed,Tranamt,CuryTranamt,*
FROM CATran
WHERE batnbr = @CABatNbr
ORDER BY refnbr
END
IF (select count(*) from batch where batnbr=@batchNumber and curyid not in (select curyid from currncy))>0
BEGIN
Print '############# BATCHES WITH SAME NUMBER WITH BAD CURYID (Sys Msg 8058) ######'
print 'BATCH'
select batnbr, module, status, curyid, basecuryid, * from batch where batnbr=@batchNumber and curyid not in (select curyid from currncy)
END
if (SELECT count(*) FROM sysobjects WHERE id = object_id('AP_PPApplicBat'))>0 print 'TRUE' else print 'FALSE'
Print '############################# BEGIN ARDEBUG ####################'
EXECUTE ARDebug @batchNumber
Print '############################# END OF FILE #####################'