Paid Transaction Removal Error – violation of Primary Key constraint ‘PKRM30301’ The duplicate key value is ….

  • Paid Transaction Removal Error – violation of Primary Key constraint ‘PKRM30301’ The duplicate key value is ….

    Posted by Unknown Member on July 26, 2021 at 8:14 pm
    • Mangala S

      Member

      July 26, 2021 at 8:14 PM

      Hi All,

      Kindly help me to resolve a Paid Transaction Removal error. I get the violation of Primary Key constraint ‘PKRM30301’ error as below.Ā Ā 

      Paid Transaction Removal window;

      Error:

      I ran the below query and I see that there are 3 documents with the same SEQNUMBR in the table RM10101.

      All the sequence numbers above looks correctly incremented by 16384.

      Ā 

      ——————————
      Mangala Shetty
      Sr. Business Analyst
      Saint Elizabeth
      Markham ON
      ——————————

    • Samantha Higdon

      Member

      July 26, 2021 at 8:44 PM

      Hi ,

      Your scripts seem to be pulling from the RM10101, but the error message indicates table RM30301.Ā  I would recommend checking that table and seeing how things shake out.

      Additionally, below is a post by where he walks through resolving the issue in the RM30301.

      http://dynamicsgpblogster.blogspot.com/2008/06/resolving-sql-duplicate-key-error.html?

      There is also a Microsoft article (linked below) that walks through in detail some correction steps to try.

      https://support.microsoft.com/en-us/topic/error-violation-of-primary-key-constraint-pkrm30301-cannot-insert-duplicate-key-when-running-paid-transaction-removal-in-receivables-management-a2b232ba-d7b6-b726-1d65-b7b68743962f

      I would recommend at least taking a back up of the company before attempting this, attempting it when users aren’t in the system, and possibly even attempting in a test company first depending on your comfort level with SQL.

      Please let me know if you have any questions.

      Best,

      Samantha

      ?

      ——————————
      Samantha Higdon ,CPA,CGMA
      Consultant
      Lagom, LLC
      Carmel IN
      ——————————
      ——————————————-

    • Mangala S

      Member

      July 27, 2021 at 11:41 PM

      Thank you!

      I have the below results. Kindly help.Ā 

      Mariano’s query did not generate any results.

      I have the duplicate document numbers as the document is voided. The other sequence numbers appear twice, but the error is caused only by seq# 38731776.


      Should I update the sequence number under RM10101 ?

      Thanks,
      Mangala

      ——————————
      Mangala Shetty
      Sr. Business Analyst
      Saint Elizabeth
      Markham ON
      ——————————
      ——————————————-

    • Jo deRuiter

      Member

      July 28, 2021 at 8:11 AM

      Hi

      is right, the issue is not just in the RM10101, but the RM30301, likely it is due to a duplicate Document Number between the two.

      See if you can find it this way:

      –RM Duplicates
      select RMDTYPAL, DOCNUMBR, COUNT(*) as [COUNT] from
      (
      select RMDTYPAL, RMDNUMWK as DOCNUMBR from RM10301 W
      UNION ALL
      select RMDTYPAL, DOCNUMBR from RM10201 W
      UNION ALL
      select RMDTYPAL, DOCNUMBR from RM20101 O
      UNION ALL
      select RMDTYPAL, DOCNUMBR from RM30101 H
      ) C
      group by RMDTYPAL, DOCNUMBR
      having COUNT(*) > 1
      ??

      ——————————
      Jo deRuiter
      ?? GPUG ALL STAR
      ??Granite Award Winner
      Atlanta Chapter Leader
      Aisling Dynamics Business Solutions
      Business Applications Practice Manager
      jo.deruiter@aislingdynamics.com
      9518674366
      aislingdynamics.com
      ——————————
      ——————————————-

    • Mangala S

      Member

      July 28, 2021 at 6:30 PM

      Thank you Jo,

      I ran the query but with no results.

      ??

      Thanks,
      Mangala

      ——————————
      Mangala Shetty
      Sr. Business Analyst
      Saint Elizabeth
      Markham ON
      ——————————
      ——————————————-

    • Ken Roy

      Member

      July 29, 2021 at 10:07 AM

      I get this error a few times a year when an RMA is applied to multiple invoices.Ā  I use the method in the Microsoft article to update RM10101.Ā  Here’s one I saved:

      ——————————
      Ken Roy
      Premier Manufacturing
      Tualatin OR
      ——————————
      ——————————————-

    • Mangala S

      Member

      July 29, 2021 at 6:43 PM

      Thank you Ken,

      Can I update the SEQ number to 45367296 ( 45350912+16384) and 45383680Ā  as the last seq number for this document number in RM10101 is 45350912?


      Thanks,
      Mangala

      ——————————
      Mangala Shetty
      Sr. Business Analyst
      Saint Elizabeth
      Markham ON
      ——————————
      ——————————————-

    • Ken Roy

      Member

      July 29, 2021 at 9:19 PM

      Mangala,

      I can not speak on your data as that’s for you to decide.Ā  I can say that is the increment GP uses and I used to fix the problem as the article stated.Ā 

      ——————————
      Ken Roy
      Premier Manufacturing
      Tualatin OR
      ——————————
      ——————————————-

    • Mangala S

      Member

      July 29, 2021 at 11:37 PM

      Thanks Ken!

      My worry is I have multiple records that appear twice on different lines, but I get error only on this document. That’s why I am confused.
      I will backup DB and try this approach and will update here. Thank you very much for all the responses.

      Regards,
      Mangala

      ——————————
      Mangala Shetty
      Sr. Business Analyst
      Saint Elizabeth
      Markham ON
      ——————————
      ——————————————-

    Unknown Member replied 4 years, 8 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Paid Transaction Removal Error – violation of Primary Key constraint ‘PKRM30301’ The duplicate key value is ….’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!