Tuesday, October 25, 2011

eConnect error 609

eConnect error 609 , SQL error occurred inserting into the RM Keys Master Table - RM00401, RMDTYPAL DOCNUMBR DOCDATE BACHNUMB CUSTNMBR.

You can get this error if you are calling the eConnect method taRMTransaction to create an invoice or debit memo in Microsoft Dynamics GP. This error could occur because one of the following reasons , so you can check which one of those reasons match with your case and you can resolve this error easily:

  1. Duplicate entry in RM00401, it mean you are trying to insert an existing document number / document type (1=Invoice,3=Debit Memo etc) into RM00401, in this case you need to check why your process try to use an exists document number / document type.
  2. Wrong format of document date, in the RM00401 table there is constraint (CK__RM00401__DOCDATE__47E69B3D) on Document Date field (DOCDATE) to force the system to accept only the date part in this column, so if you pass date with time it will give an error , so you need to pass only the date , you can use something like:


set @DocDate=convert (date,@DocDate,101)


 

insert RM00401

                                (

                                DOCNUMBR,

                                RMDTYPAL,

                                DCSTATUS,

                                BCHSOURC,

                                CUSTNMBR,

                                DOCDATE

                                )

                                select

                                                @I_vDOCNUMBR,

                                                @I_vRMDTYPAL,

                                                1,

                                                'RM_Sales',

                                                @I_vCUSTNMBR,

                                                @I_vDOCDATE

No comments:

Post a Comment

SSRS - How to Parameterizing the SQL Query

We need to create separated dataset to handle the pre defined list in that dataset we will use simple select statement to define the li...