- Find the duplicated records. To do this, run the following SQL statement:Note <XXXXXX> is a placeholder for the suspended batch number.
select refnbr, doctype, batnbr, * from ardoc tablea
where doctype='IN' and refnbr IN
(select refnbr from ardoc tableb where doctype='IN' and tablea.refnbr=tableb.refnbr
and tablea.tstamp<>tableb.tstamp and (tablea.batnbr='<XXXXXX>' OR tableb.batnbr='<XXXXXX>'))
order by refnbr, batnbr
This script will return the ardoc record of the two (or more) invoices with the same reference number.
- Update the invoice in the suspended batch to something slightly different, such as by adding an "A" to the end. Here is an example of the necessary update statements:
update ardoc set refnbr='01013A' where refnbr='010130' and batnbr='<XXXXXX>'
update artran set refnbr='01013A' where refnbr='010130' and batnbr='<XXXXXX>'
Article ID: 891323 - Last Review: 21 Jun 2017 - Revision: 4