Skip to content
+1-888-319-3663

COMMUNITY FORUM

GP rolling column error

DougS asked 10 years ago
We are working on a migration and have a smart connect map that works in our test database but not in the live database.  The following is the error we get:

Error in MsGpDestination. Line taSopLineIvcInsert for update of Global Rolling Column. Could not retrieve the next number in the sequence.

There is an article in the knowledge base which seems to address the issue we are having but the link to the file with the solution is broken.
Any help is appreciated!
bushman4 replied 10 years ago

Does your produciton database have the stored procedure mentioned?  If not, you can create it with this:


/****** Object:  StoredProcedure [dbo].[E1_SC_GetNextNumber]    Script Date: 02/21/2013 15:22:58 ******/
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
Create Procedure [dbo].[E1_SC_GetNextNumber]
@TYPE smallint,
@DOC_TYPE smallint,
@DOC_ID char(15),
@INC_DEC  tinyint = 1 
as
 
DECLARE @I_tInc_Dec tinyint
DECLARE @O_iErrorState int
 
SET @I_tInc_Dec = @INC_DEC
 
–Inventory
IF @TYPE = 0
BEGIN
 
DECLARE @I_tIVDOCTYP tinyint
DECLARE @O_vIvNumber varchar(21)
 
SET @I_tIVDOCTYP = @DOC_TYPE
 
EXECUTE taGetIvNumber
  @I_tIVDOCTYP
 ,@I_tInc_Dec
 ,@O_vIvNumber OUTPUT
 ,@O_iErrorState OUTPUT
 
IF @O_iErrorState <> 0
BEGIN
SELECT 'err' as Number
END
ELSE
BEGIN
SELECT @O_vIvNumber as Number
END
END
 
–Payables
IF @TYPE = 1
BEGIN
 
DECLARE @O_iNTVCHNUM varchar(21)
SET @O_iNTVCHNUM = ''
EXECUTE taGetPMNextVoucherNumber
  @O_iNTVCHNUM OUTPUT
 ,0
 ,@O_iErrorState OUTPUT
 
IF @O_iErrorState <> 0
BEGIN
SELECT 'err' as Number
END
ELSE
BEGIN
SELECT @O_iNTVCHNUM as Number
END
END
 
–Receivables
IF @TYPE = 2
BEGIN
DECLARE @O_vDOCNumber varchar(21)
DECLARE @I_vDOCTYPE tinyint
 
SET @I_vDOCTYPE = @DOC_TYPE
 
EXECUTE taGetPaymentNumber
  @I_vDOCTYPE
 ,@I_tInc_Dec
 ,@O_vDOCNumber OUTPUT
 ,@O_iErrorState OUTPUT
 
IF @O_iErrorState <> 0
BEGIN
SELECT 'err' as Number
END
ELSE
BEGIN
SELECT @O_vDOCNumber as Number
END
END
 
–SOP
IF @TYPE = 3
BEGIN
 
DECLARE @I_tSOPTYPE tinyint
DECLARE @I_cDOCID char(15)
DECLARE @O_vSopNumber varchar(21)
 
SET @I_tSOPTYPE = @DOC_TYPE
SET @I_cDOCID = @DOC_ID
 
EXECUTE taGetSopNumber
  @I_tSOPTYPE
 ,@I_cDOCID
 ,@I_tInc_Dec
 ,@O_vSopNumber OUTPUT
 ,@O_iErrorState OUTPUT
 
IF @O_iErrorState <> 0
BEGIN
SELECT 'err' as Number
END
ELSE
BEGIN
SELECT @O_vSopNumber as Number
END
END
 
–POP
IF @TYPE = 4
BEGIN
 
IF @DOC_TYPE = 1
BEGIN
 
DECLARE @O_vPONUMBER varchar(17)
 
EXECUTE taGetPONextNumber
  @I_tInc_Dec
 ,@O_vPONUMBER OUTPUT
 ,@O_iErrorState OUTPUT
 
IF @O_iErrorState <> 0
BEGIN
SELECT 'err' as Number
END
ELSE
BEGIN
SELECT @O_vPONUMBER as Number
END
END
ELSE
BEGIN
 
DECLARE @O_vPOPRCTNM varchar(17)
 
EXECUTE taGetPurchReceiptNextNumber
  @I_tInc_Dec
 ,@O_vPOPRCTNM OUTPUT
 ,@O_iErrorState OUTPUT
 
IF @O_iErrorState <> 0
BEGIN
SELECT 'err' as Number
END
ELSE
BEGIN
SELECT @O_vPOPRCTNM as Number
END
 
END
 
 
 
END
 
–GL
IF @TYPE = 5
BEGIN
 
DECLARE @stored_proc_name char(30), 
@retstat int ,
@param3 int,
@param4 tinyint,
@param5 int 
 
SELECT @param3 = 0 
SELECT @param4 = 0 
SELECT @param5 = 0 
SELECT @stored_proc_name = 'glGetNextJournalEntry' 
 
EXEC @retstat = @stored_proc_name 1, 
0, 
@param3 OUT, 
@param4 OUT, 
@param5 OUT 
 
SELECT @param3 as Number
END
 
 
 
GO
 
 
Answers
Best Answer
Chris Hanson answered 10 years ago
First you will want to make sure the next number is actually setup in GP setup for the module you are importing into.

Second make sure that system maintenance runs in SmartConnect and afterwords you have an e1_get_next_number procedure in you company databases. If it is there then make sure that DYNGRP has enough rights to run it.

If you still get an error running maps after that take a look at the event viewer. There should be entries in either the Application or SmartConnect logs that have additional info (multiple entries might be created at the same time and SC is only showing one of them).

H

If you would like to submit an answer or comment, please sign in to the eOne portal.