eConnect GetPMNextPaymentNumber
-
eConnect GetPMNextPaymentNumber
Posted by Vicki Hillary on March 9, 2021 at 11:03 am-
Help!Ā We have a new 3rd party product and the vendor built us an integration to GP.Ā Unfortunately, the integration is failing.Ā After doing some research with my partner, we determined that the GetPMNextPaymentNumber is needed in order to resolve the issue.Ā They are currently passing a Voucher Number instead of a Payment Number which is causing duplicates and failed integrations.Ā The 3rd party vendor said that they can not use this stored procedure GetPMNextPaymentNumber because they show that it was removed with GP 2013.Ā I can’t find any documentation to indicate that this is true.Ā Does anyone know if this stored procedure was removed with GP 2013?Ā If so, how are you passing a payment number to GP if this is no longer an option?
——————————
Vicki Hillary
RDV Corporation
Grand Rapids MI
—————————— -
Thaddeus Suter
MemberMarch 10, 2021 at 9:01 AM
Those ta stored procedures still exist thru GP18.3.1200——————————
Thaddeus Suter
Retus, Inc
HELOTES TX
——————————
——————————————- -
Thaddeus,
Thank you for your response.Ā Where did you get that information?Ā I would like to share it with my 3rd party vendor.
——————————
Vicki Hillary
RDV Corporation
Grand Rapids MI
——————————
——————————————- -
Thaddeus Suter
MemberMarch 11, 2021 at 10:55 AM
First you look in SQL and see if the taGetPMNextPaymentNumber exists and it does. That is the screenshot I attached above.
Then you execute the procedureĀ to see if it works or is buggy. See that it returns the next payment value of PMT00675
Next screenshot:
Lastly compare that value to the value in your Payables Setup Options for next Payment Number and verify that the value increments by the input value ofĀ vInc_Dec such as 1 that you provided.
Maybe time for a new VAR? š——————————
Thaddeus Suter
Retus, Inc
HELOTES TX
——————————
——————————————- -
Thaddeus Suter
MemberMarch 11, 2021 at 1:36 PM
To complete the thought process here, what may be confusing for some developers is that when using taGetPMNextPaymentNumber, you must provide the value to increment the counter else the stored procedure will error and return error code 3393.To get around this modify the taGetPMNextPaymentNumber as follows by setting the value of vInc_Dec = 1 instead of NULL.
Now you do not need to provide the input for vInc_Dec as I did above.
Here is the modified ta stored procedure see BOLD.USE [TWO]
GO
Ā
/****** Object:Ā StoredProcedure [dbo].[taGetPMNextPaymentNumber]Ā Ā Ā Script Date: 3/11/2021 12:20:54 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[taGetPMNextPaymentNumber]Ā @I_vInc_Dec tinyint = 1, @O_iPMNPYNBR varchar(21) = NULL output, @O_iErrorState int = NULL outputĀ Ā Ā Ā Ā asĀ set transaction isolation level read uncommitted set nocount onĀ declare @Loop int,Ā @iError int,Ā @iStatus int,Ā @PMNPYNBR varchar(21)Ā select @O_iPMNPYNBRĀ = ”,Ā @O_iErrorStateĀ = 0,Ā @iStatus = 0,Ā @Loop = 0Ā ifĀ @I_vInc_Dec is NULL beginĀ select @O_iErrorState = 3393Ā Ā Ā return (@O_iErrorState) endĀ select @Loop = @Loop + 1 while @Loop <> 0 and @Loop < 1000 beginĀ select @Loop = @Loop + 1Ā Ā select @O_iPMNPYNBR = PMNPYNBR from PM40100 WITH (TABLOCKX HOLDLOCK)Ā where UNIQKEY = 1Ā if ( @@rowcount <> 1)Ā beginĀ select @O_iErrorState = 3383Ā Ā Ā endĀ Ā if @O_iErrorState = 0Ā beginĀ select @PMNPYNBR = @O_iPMNPYNBRĀ Ā exec @iStatus = ivNumber_Inc_DecĀ @I_vInc_Dec,Ā @PMNPYNBR output,Ā @O_iErrorState outputĀ select @iError = @@errorĀ if @iStatus = 0 and @iError <> 0Ā select @iStatus = @iErrorĀ Ā update PM40100 set PMNPYNBR= @PMNPYNBRĀ where UNIQKEY = 1Ā if @@error = 0Ā select @Loop = 0Ā end endĀ if @O_iErrorState <> 0 or @iStatus <> 0 or @Loop <> 0 beginĀ select @O_iPMNPYNBR = ”Ā select @O_iErrorState = 3384Ā Ā Ā return (@O_iErrorState) endĀ return (@O_iErrorState)Ā Ā
GO
——————————
Thaddeus Suter
Retus, Inc
HELOTES TX
——————————
——————————————- -
Lutavia Clemens
MemberMarch 11, 2021 at 10:50 AM
Vicki,
This link may be helpful.
How to retrieve the next payment number for Payables Management payments when you use the Miscellaneous Routines Assembly in eConnect——————————
Lutavia Clemens
DLD Business Solutions, Inc.
Birmingham AL
——————————
——————————————-
Vicki Hillary replied 5 years, 5 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘eConnect GetPMNextPaymentNumber’ is closed to new replies.
