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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

SOP error: This document number already exists...

(0) ShareShare
ReportReport
Posted on by 285

Hi,

This is in reference to Article ID: 865449 in knowledge base.

We receive this error on an order number that exists in Unposted and History.  This can be corrected via Removing Sales History, however all users need to be out of the system to do this.

How do I check in SQL to see if the transaction has been posted to the GL?  By the way, I am of the understanding that orders do not in fact get posted to the GL as such??

What are the tables that need to be updated to simulate the Removing Sales History process so I can do this from SQL Server Management Studio?  I am aware of the SOP history tables: SOP30100, SOP30200 and SOP30300, in which the offending transaction is present in these three tables.

Your assistance is most appreciated.

Regards, Steve

*This post is locked for comments

I have the same question (0)
  • veeyeskay Profile Picture
    on at
    Re: SOP error: This document number already exists...

     Hi Steve

    If the issue is with an order, there should not be anything to worry about, since there would not be any GL impact. 

    SOP30100 is not a valid SOP table. Here are the tables which you can look for possible references to the order.

    History Tables
    SOP30200

    SOP30300

     SOP30201

     Work Tables

    SOP10100

    SOP10200

    Common Tables Between Work and Hist

     SOP10101

    SOP10103

    SOP10104

    SOP10105

    SOP10106

    SOP10107

    Let us know if you have any questions.

  • Richard Whaley Profile Picture
    25,195 on at
    Re: SOP error: This document number already exists...

    The posting of Invoice type SOP documents (and Returns) create GL transactions.  Order type documents do not affect GL.  The issue is why are you getting these messages?  Have you used ALL of the available numbers in your SOP sequence?  Can you increase the size of the document number to stop the issue?

  • CP-Steve Profile Picture
    285 on at
    Re: SOP error: This document number already exists...

    Hi Sivakumar,

    Thanks for your response, much appreciated.  SOP30100 is a valid SOP table, SALES BATCH HISTORY.

    Hi Richard,

    Thanks for your response also.

    It is not that we have exhausted our SOP numbers, rather GP has the same transaction number in Work and History. I can see in the backend that it is the same transaction in the Work and History tables, ie, same customer, document dates, line items, totals etc.  I basically want a way to fix the error without disrupting the users, ie in the backend, thus if I select the following:

    SELECT * FROM SOP30100 WHERE BACHNUMB = 'AB020910'

    2 Rows returned

    SELECT * FROM SOP30200 WHERE SOPNUMBE = 'VOR009762'

    1 Row returned

    SELECT * FROM SOP30300 WHERE SOPNUMBE = 'VOR009762'

    125 Rows returned

    I can see all relevant data in history to the order that I want deleted from history so the original order in work can be processed into an invoice. (SOP30201 table is empty).  Thus can I just delete the entries to free up the order in work, or is there somewhere else that tells GP that the order number exists in history?

    To delete I would run:

    DELETE SOP30100 WHERE BACHNUMB = 'AB020910'

    DELETE SOP30200 WHERE SOPNUMBE = 'VOR009762'

    DELETE SOP30300 WHERE SOPNUMBE = 'VOR009762'

    Thanks for your help if you can, if not, then thanks for looking.

    Cheers, Steve

  • Community Member Profile Picture
    on at
    Re: SOP error: This document number already exists...

    Hi,

    I know this issue has been way overdue. I encountered the same issue. Not sure if it is simillar to your case. Instead of deleting the History Tables, i deleted the open tables. To decide which is in fact correct you will need to check whether the Sales Order (SO) has in fact moved to history. You can go to Inquiry>>Sales>>Sales Document. You should be able to view both SO appearing in both Unposted and History. Select the History radio button and drill back to the document. In the SO Document, view the Sales Document Detail Inquiry Zoom (Arrow button from the Document No arrow button) to see if this Sales Order has in fact been transferred to Invoice. If this is confirmed, then the SO one sitting in Unposted should be deleted.

    Thanks

    Suet

  • Community Member Profile Picture
    on at
    Re: SOP error: This document number already exists...

    Sorry, left this out, I deleted the following SOP tables. Replace XXX with Sales Order Document Number

    DELETE SOP10100 WHERE SOPNUMBE = 'XXX'

    DELETE SOP10200 WHERE SOPNUMBE = 'XXX'

  • Community Member Profile Picture
    on at
    Re: SOP error: This document number already exists...

    Does anyone know the root cause of this problem?  We have this happen fairly frequently, where an order is transfered to an invoice, the order record is created in SOP30200, but the order record also remain in SOP10100 (with a $0 document amount, and no master #).

  • Community Member Profile Picture
    on at
    RE: SOP error: This document number already exists...

    Hi! take a look into TX30000 table (COMPANY..Tax History)

    I made a script debugger with the same error:

    stmt(53318992):*/
    {CALL GP.dbo.zDP_TX30000F_1('xxxxxxxxxxx',3,1,0.00000,-2147483648,'xxxxxxxxxxx',3,1,0.00000,2147483647)}

    Thanks 

  • Suggested answer
    Mick Egan Profile Picture
    3,561 on at
    RE: SOP error: This document number already exists...

    Winner, delete the record from TX30000, good pick up.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans