Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Duplicate records are created in INTran during Purchase Order release


Cause

This problem can occur when you press the Cancel button during the Purchase Order Batch Release (04.400.00) process for a batch that has receipts that use a Purchase For of Good for Sales Order, or Non-Inventory Goods if there is a Project ID included on the detail line.

↑ Back to the top


Resolution

Determine the duplicate record in the INTran table, and then delete the duplicate record. To do this, follow these steps:

1.  In Microsoft SQL Server Management Studio, access the appropriate application database. Then, run the following statement to determine whether duplicate records exist in the INTran table.

SELECT InvtID, TranAmt, LineRef, RecordID, * FROM INTran WHERE BatNbr = '<XXXXXX>'

Note: In the statement, replace the <XXXXXX> placeholder with the batch number. 

2. Review the results to determine whether duplicate records exist. If a duplicate record exists, run the following statement to delete it.

Note: The recordid to delete would be the HIGHER of the duplicate records.

Run this first:

Begin Transaction

Run this Next: DELETE FROM INTran WHERE BatNbr = '<XXXXXX>' and RecordID = <YYYYYY>

Note In the statement, replace the <XXXXXX> placeholder with the batch number. Replace the <YYYYYY> placeholder with the RecordID value of the record that you want to delete.

The delete should return 1 row

Run this last:

Commit transaction

If it does not delete just one row

Run this:

Rollback transaction

If you find more than one duplicate, you have to identify the recordid (unique) for the other duplicates and delete them by using the same procedure.

↑ Back to the top


Keywords: kbmbsmigrate, kbmbspartner, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2953073
Revision : 2
Created on : 2/3/2017
Published on : 2/3/2017
Exists online : False
Views : 73