I just completed a full upgrade of Microsoft Dynamics GP from version 9 to version 2010 R2 for a client and they were going through their first month-end closing in the upgraded system. 3 weeks ago, after the upgrade, they reported experiencing an issue running Fixed Assets depreciation from two laptop computers, where apparently, when running depreciation the system would hang. The only option to recover would be to terminate the Dynamics.exe process from Task Manager. Nonetheless, we did not pay much attention to this at the time since the process was completed successfully from another machine, just in time to close the month of August - more on this later.
More on :http://dynamicsgpblogster.blogspot.com/2011/09/running-fixed-assets-depreciation.html
Saturday, December 24, 2011
Thursday, December 22, 2011
Move SOP trs from one batch to other
-- Created by Mariano Gomez, MVP
-- Maximum Global Business, LLC
declare @bachnumb char(15), @strpostdate char(20), @interid char(5)
declare @postdate datetime
declare @numtrx int, @batchamount numeric(19,5)
declare @noteindex numeric(19,5)
declare @l_result integer, @error_state integer
set @bachnumb = 'XCPTNS' + convert(char(4), year(getdate())) + '_' + convert(char(4), month(getdate())) + '_' + convert(char(4), day(getdate()))
-- drop timestamp
set @strpostdate = convert(char(20), getdate(), 101)
set @postdate = convert(datetime, @strpostdate)
-- move the left behind order transactions to
-- the new exception batch
update sop10100 set bachnumb = @bachnumb where bachnumb = 'SHIPTODAY' and soptype = 2
-- adjust the 'Ship Today' batch amounts for the
-- documents that did get transferred
select @numtrx = IsNull(count(sopnumbe), 0), @batchamount = IsNull(sum(docamnt), 0) from sop10100 where bachnumb = 'SHIPTODAY'
update SY00500 set NUMOFTRX = @numtrx, BCHTOTAL = @batchamount where bachnumb = 'SHIPTODAY'
-- get next note index to assign to the new batch
SELECT @interid = DB_NAME()
EXEC @l_result = DYNAMICS..smGetNextNoteIndex @interid, @@SPID, @noteindex output, @error_state output
-- get the number of transactions and amounts for the new batch
select @numtrx = IsNull(count(sopnumbe), 0), @batchamount = IsNull(sum(docamnt), 0) from sop10100 where bachnumb = @bachnumb
-- create the new batch in batch headers based on the
-- majority of fields in the old batch
INSERT INTO SY00500
( GLPOSTDT
, BCHSOURC
, BACHNUMB
, SERIES
, MKDTOPST
, NUMOFTRX
, RECPSTGS
, DELBACH
, MSCBDINC
, BACHFREQ
, RCLPSTDT
, NOFPSTGS
, BCHCOMNT
, BRKDNALL
, CHKSPRTD
, RVRSBACH
, USERID
, CHEKBKID
, BCHTOTAL
, BCHEMSG1
, BCHEMSG2
, BACHDATE
, BCHSTRG1
, BCHSTRG2
, POSTTOGL
, MODIFDT
, CREATDDT
, NOTEINDX
, CURNCYID
, BCHSTTUS
, CNTRLTRX
, CNTRLTOT
, PETRXCNT
, APPROVL
, APPRVLDT
, APRVLUSERID
, ORIGIN
, ERRSTATE
, GLBCHVAL
, Computer_Check_Doc_Date
, Sort_Checks_By
, SEPRMTNC
, REPRNTED
, CHKFRMTS
, TRXSORCE
, PmtMethod
, EFTFileFormat
, Workflow_Approval_Status
, Workflow_Priority
, TIME1)
SELECT
glpostdt
,bchsourc
,@bachnumb
,series
,mkdtopst
,@numtrx
,recpstgs
,delbach
,mscbdinc
,bachfreq
,rclpstdt
,0
,bchcomnt
,brkdnall
,chksprtd
,rvrsbach
,userid
,chekbkid
,@batchamount
,BCHEMSG1
,BCHEMSG2
,BACHDATE
,BCHSTRG1
,BCHSTRG2
,POSTTOGL
,MODIFDT
,CREATDDT
,@noteindex
,CURNCYID
,0
,0
,0.00000
,PETRXCNT
,APPROVL
,APPRVLDT
,APRVLUSERID
,ORIGIN
,0
,GLBCHVAL
,Computer_Check_Doc_Date
,Sort_Checks_By
,SEPRMTNC
,REPRNTED
,CHKFRMTS
,TRXSORCE
,PmtMethod
,EFTFileFormat
,Workflow_Approval_Status
,Workflow_Priority
,TIME1
FROM SY00500
WHERE bachnumb = 'SHIPTODAY'
source - http://dynamicsgpblogster.blogspot.com/2008/04/moving-sop-transactions-from-one-batch.html
-- Maximum Global Business, LLC
declare @bachnumb char(15), @strpostdate char(20), @interid char(5)
declare @postdate datetime
declare @numtrx int, @batchamount numeric(19,5)
declare @noteindex numeric(19,5)
declare @l_result integer, @error_state integer
set @bachnumb = 'XCPTNS' + convert(char(4), year(getdate())) + '_' + convert(char(4), month(getdate())) + '_' + convert(char(4), day(getdate()))
-- drop timestamp
set @strpostdate = convert(char(20), getdate(), 101)
set @postdate = convert(datetime, @strpostdate)
-- move the left behind order transactions to
-- the new exception batch
update sop10100 set bachnumb = @bachnumb where bachnumb = 'SHIPTODAY' and soptype = 2
-- adjust the 'Ship Today' batch amounts for the
-- documents that did get transferred
select @numtrx = IsNull(count(sopnumbe), 0), @batchamount = IsNull(sum(docamnt), 0) from sop10100 where bachnumb = 'SHIPTODAY'
update SY00500 set NUMOFTRX = @numtrx, BCHTOTAL = @batchamount where bachnumb = 'SHIPTODAY'
-- get next note index to assign to the new batch
SELECT @interid = DB_NAME()
EXEC @l_result = DYNAMICS..smGetNextNoteIndex @interid, @@SPID, @noteindex output, @error_state output
-- get the number of transactions and amounts for the new batch
select @numtrx = IsNull(count(sopnumbe), 0), @batchamount = IsNull(sum(docamnt), 0) from sop10100 where bachnumb = @bachnumb
-- create the new batch in batch headers based on the
-- majority of fields in the old batch
INSERT INTO SY00500
( GLPOSTDT
, BCHSOURC
, BACHNUMB
, SERIES
, MKDTOPST
, NUMOFTRX
, RECPSTGS
, DELBACH
, MSCBDINC
, BACHFREQ
, RCLPSTDT
, NOFPSTGS
, BCHCOMNT
, BRKDNALL
, CHKSPRTD
, RVRSBACH
, USERID
, CHEKBKID
, BCHTOTAL
, BCHEMSG1
, BCHEMSG2
, BACHDATE
, BCHSTRG1
, BCHSTRG2
, POSTTOGL
, MODIFDT
, CREATDDT
, NOTEINDX
, CURNCYID
, BCHSTTUS
, CNTRLTRX
, CNTRLTOT
, PETRXCNT
, APPROVL
, APPRVLDT
, APRVLUSERID
, ORIGIN
, ERRSTATE
, GLBCHVAL
, Computer_Check_Doc_Date
, Sort_Checks_By
, SEPRMTNC
, REPRNTED
, CHKFRMTS
, TRXSORCE
, PmtMethod
, EFTFileFormat
, Workflow_Approval_Status
, Workflow_Priority
, TIME1)
SELECT
glpostdt
,bchsourc
,@bachnumb
,series
,mkdtopst
,@numtrx
,recpstgs
,delbach
,mscbdinc
,bachfreq
,rclpstdt
,0
,bchcomnt
,brkdnall
,chksprtd
,rvrsbach
,userid
,chekbkid
,@batchamount
,BCHEMSG1
,BCHEMSG2
,BACHDATE
,BCHSTRG1
,BCHSTRG2
,POSTTOGL
,MODIFDT
,CREATDDT
,@noteindex
,CURNCYID
,0
,0
,0.00000
,PETRXCNT
,APPROVL
,APPRVLDT
,APRVLUSERID
,ORIGIN
,0
,GLBCHVAL
,Computer_Check_Doc_Date
,Sort_Checks_By
,SEPRMTNC
,REPRNTED
,CHKFRMTS
,TRXSORCE
,PmtMethod
,EFTFileFormat
,Workflow_Approval_Status
,Workflow_Priority
,TIME1
FROM SY00500
WHERE bachnumb = 'SHIPTODAY'
source - http://dynamicsgpblogster.blogspot.com/2008/04/moving-sop-transactions-from-one-batch.html
auto generate customer id script
SELECT
-- evaluates the 9 first characters of the customer name and removes any blanks
-- other characters can be removed) in between those first 9 characters for a
-- total of 8, adds an extra zero if needed to complete 9 characters
CASE LEN(UPPER(REPLACE(SUBSTRING(CUSTNAME, 1, 9), ' ', '')))
WHEN 8 THEN UPPER(REPLACE(SUBSTRING(CUSTNAME, 1, 9), ' ', '')) + '0'
ELSE UPPER(REPLACE(SUBSTRING(CUSTNAME, 1, 9), ' ', '')) END +
-- accounts for the rest of the string, uses the rank function to do the numbering,
-- partitioning by customer name. Just in case there is more than one customer
-- with the same starting 9 characters, rank() will number them sequentially
SUBSTRING('000', 1, 3 - LEN(CONVERT(CHAR(3), RANK() OVER(PARTITION BY REPLACE
(SUBSTRING(CUSTNAME, 1, 9), ' ', '') ORDER BY CUSTNAME))))
+ CONVERT(CHAR(3), RANK() OVER(PARTITION BY REPLACE(SUBSTRING(CUSTNAME, 1,
9), ' ', '') ORDER BY CUSTNAME))
FROM RM00101
ORDER BY CUSTNAME
source- http://dynamicsgpblogster.blogspot.com/2010/02/sql-autogenarating-customer-ids.html
-- evaluates the 9 first characters of the customer name and removes any blanks
-- other characters can be removed) in between those first 9 characters for a
-- total of 8, adds an extra zero if needed to complete 9 characters
CASE LEN(UPPER(REPLACE(SUBSTRING(CUSTNAME, 1, 9), ' ', '')))
WHEN 8 THEN UPPER(REPLACE(SUBSTRING(CUSTNAME, 1, 9), ' ', '')) + '0'
ELSE UPPER(REPLACE(SUBSTRING(CUSTNAME, 1, 9), ' ', '')) END +
-- accounts for the rest of the string, uses the rank function to do the numbering,
-- partitioning by customer name. Just in case there is more than one customer
-- with the same starting 9 characters, rank() will number them sequentially
SUBSTRING('000', 1, 3 - LEN(CONVERT(CHAR(3), RANK() OVER(PARTITION BY REPLACE
(SUBSTRING(CUSTNAME, 1, 9), ' ', '') ORDER BY CUSTNAME))))
+ CONVERT(CHAR(3), RANK() OVER(PARTITION BY REPLACE(SUBSTRING(CUSTNAME, 1,
9), ' ', '') ORDER BY CUSTNAME))
FROM RM00101
ORDER BY CUSTNAME
source- http://dynamicsgpblogster.blogspot.com/2010/02/sql-autogenarating-customer-ids.html
Microsoft Dynamics GP displaying overlapping text on home page
http://dynamicsgpblogster.blogspot.com/2011/12/microsoft-dynamics-gp-displaying.html
Subscribe to:
Posts (Atom)
