web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Posting issue

(5) ShareShare
ReportReport
Posted on by 12
Hi 
 
when i post the SOP invoice some of the transaction got deleted and posted, batch total is not matching with posted total. How to trace the deleted transaction 
 
Regards
Srinivasan
Categories:
I have the same question (0)
  • BJ-09051414-0 Profile Picture
    376 on at
    Hello,
     
    With the description provided, it sounds like you might have had a Posting Interruption. I assume this because you state that the Batch was posted, some transactions got deleted but the batch still exists but has the incorrect total.
     
    My guess why some are missing from the batch might have been posted and removed from the batch and why the transaction count and total is no longer correct in the batch.
     
    To trace the transactions, if you printed the Edit List of the batch before posting, you can use this to get the Document Numbers of the SOP Invoices and use the Documents window to see if they exist by using a restriction of the Document Number.
     
    Another option is to Item Transaction Inquiry in Inventory for the item and filter by date or document number to see if you can find the Transaction.
     
    You could look at using the Sales Transaction Smartlist and add the Batch ID column and user a restriction of the Batch ID to see if the Smartlist will show you the missing transactions.
     
    If you have access to SQL, you can query the tables for the document number and see if they exist.
     
    SOP10100 - Sales Transaction Work.
    SOP10200 - Sales Transaction Amounts Work.
    SOP30200 - Sales Transaction History.
     
    I hope this helps!
     
    Brandon - Enavate
  • Suggested answer
    Olufemi 7 Profile Picture
    28 on at

    Hello,

    When posting SOP (Sales Order Processing) invoices in Microsoft Dynamics GP, if some transactions appear deleted and your batch total doesn’t match the posted total, it usually means the posting was interrupted or certain invoices failed to move from Work tables to History tables.

    You can trace the deleted or missing transactions using these steps:

     

    🔎 Steps to Trace Deleted SOP Transactions

    1. Batch Recovery Window

      • Go to Microsoft Dynamics GP > Tools > Routines > Batch Recovery.

      • Look for interrupted SOP batches. If your batch is listed, mark it and recover. This often restores invoices stuck mid‑posting.

    2. Check SOP Work vs. History Tables

      • SOP invoices move from Work to History during posting:

        • SOP10100 = Header Work

        • SOP10200 = Line Work

        • SOP30200 = Header History

        • SOP30300 = Line History

      • Run SQL queries to find invoices that exist in Work but not in History. Example:

        sql
         
        SELECT W.SOPNUMBE, W.BACHNUMB, W.CUSTNMBR, W.DOCAMNT
        FROM SOP10100 W
        LEFT JOIN SOP30200 H ON W.SOPNUMBE = H.SOPNUMBE AND W.SOPTYPE = H.SOPTYPE
        WHERE H.SOPNUMBE IS NULL AND W.SOPTYPE = 3;
        

        This lists invoices missing from History after posting.

    3. Item Transaction Inquiry

      • Navigate to Inquiry > Inventory > Item Transaction Inquiry.

      • Search by invoice number. If you see “This document has been removed from Sales Order Processing history,” it confirms deletion.

    4. Distribution Tables

      • Check SOP10102 (Distribution Work) and SOP10500 (Distribution History).

      • Missing rows here often explain mismatched batch totals.

    5. Batch Totals Reconciliation

      • To compare totals between Work and History:

        sql
         
        SELECT W.BACHNUMB,
               SUM(W.DOCAMNT) AS WorkTotal,
               SUM(H.DOCAMNT) AS HistoryTotal,
               (SUM(W.DOCAMNT) - SUM(H.DOCAMNT)) AS Difference
        FROM SOP10100 W
        LEFT JOIN SOP30200 H ON W.SOPNUMBE = H.SOPNUMBE AND W.SOPTYPE = H.SOPTYPE
        WHERE W.SOPTYPE = 3
        GROUP BY W.BACHNUMB;
        

        Any batch with a non‑zero Difference has invoices missing.

     

    📘 Microsoft Documentation

    ⚠️ Key Takeaways

    • Saved invoices can be deleted, but posted invoices must be voided.

    • If posting is interrupted, invoices may not move correctly, causing mismatched totals.

    • Use Batch Recovery and SQL queries to trace missing invoices.

    • Always reconcile SOP tables after posting errors to ensure financial accuracy.

     

    Final Summary: To trace deleted SOP invoices, recover interrupted batches, query SOP Work vs. History tables, and reconcile batch totals. Microsoft’s documentation confirms that saved invoices can be deleted, posted invoices must be voided, and posting moves invoices between tables — which explains your batch mismatch.

  • CU25111343-0 Profile Picture
    12 on at
    None of the table data exist only the batch total is showing right value
  • BJ-09051414-0 Profile Picture
    376 on at
     
    What tables are you referring to?
     
    When you checked these tables, what restriction did you use?
     
    Do you know any of the Document Numbers that were in the batch that you can use to search through the tables?
     
    If you do not see any records in the Worktables for the transactions in the batch, then the batch totals are wrong. You would need to recreate the transactions if they need to be posted.
     
    If you do not see any records in the History Table for the Transactions, then it means that the transactions that were in the batch have not been posted.  But if none in work as well, then the transaction do not exist.
     
    If nothing exists in work or history, then you can recreate the transactions. I suggest using a new batch, with a different name as the batch could have become corrupt. It should likely be deleted (Assuming there are no transactions in the batch).
     
    If this is something that you can recreate where transactions saved to batch are being deleted, it would be best to reach out to your partner and ask for assistance with reviewing the issue to troubleshoot this in occurring in real time.
     
    Based on your response, no data exists for this batch other than the batch record. That means that the transactions do not exist and if you need them to exist, you will need to recreate them. 
     
    Below are sample scripts you can use to modify with the Document Number of a transaction that is to be in the batch. If no results are found, it does not exist. Change yyy to a document number of a transaction in the batch
     
    select * from SOP10200 where SOPNUMBE = 'yyy'  --Trx Amounts
    select * from SOP10100 where SOPNUMBE = 'yyy' --TRX Work
    select * from SOP30200 where SOPNUMBE = 'yyy' -- TRX History
     
    Sample scripts below for if a batch exists that says it has transactions in it, then the transaction records should exist in the SOP101011. Change yyyy to Batch ID.
     
    select * from SOP10100 where BACHNUMB = 'yyy'  -- If there is a batch with transactions save, there would be a record in this table for the Transaction
    select * from SY00500 where BACHNUMB = 'yyy' and series = '3'-- Batch Header 
     
    NOTE : Batch Totals can be wrong if there was an interruption. 
     
    I hope that helps!

    Thank you!
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans