web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP2013 R2 service pack fails

(0) ShareShare
ReportReport
Posted on by 75,850 Moderator
We are trying to do an application of GP 2013 R2 to GP 2013(12.00.1482). On two of the companies it fails at the very end with the message "Failed to create stored procedure uprCreateTrxDataFromTimesheets" and then "Invalid column name PAYRCORD" Now it only fails on the two older companies that had been created using GP 10 and then were upgraded. They do not use Project Accounting or PDK Timesheets. Does anyone have an idea of how to get past this? I have checked the DU000010, 20 and 30 tables and cleared away a bogus PRODID of 2. Any other tables I can clear?

*This post is locked for comments

I have the same question (0)
  • Richard Wheeler Profile Picture
    75,850 Moderator on at

    I have tracked the error down this this SQL statement. It errors on 2 of the 5 companies on this statement. The error thrown is:

    Msg 207, Level 16, State 1, Procedure uprCreateTrxDatafromTimecards, Line 2

    Invalid column name 'PAYRCORD'.

    Msg 8101, Level 16, State 1, Procedure uprCreateTrxDatafromTimecards, Line 2

    An explicit value for the identity column in table 'TATX1030' can only be specified when a column list is used and IDENTITY_INSERT is ON.

    CREATE PROCEDURE uprCreateTrxDatafromTimecards @EmpID char(15),@PaySched char(15),@YEAR1 smallint, @PERIODID smallint, @O_iErrorState INT OUTPUT AS  declare  @cDBName char(5),  @Note_Index numeric(19,5),  @CompID int,  @BatchID char(15),  @cGETMSG12424   char(255),  @iStatus int,  @CompTrxNum int,  @curEmpID char(15),  @curJobTitle char(7),  @curDept char(7),  @curDivisionCode char(15),  @curTimeCode char(15),  @curTrxDate datetime,  @curUnitsToPay numeric (19,5),  @curHrlyPayRate numeric (19,5),  @curDaysWorked int,  @curWeeksWorked int,  @curAccureTimeBenefits tinyint,  @curCompTrxNum int,  @curPayCode char(7),  @NextAttendanceTrx int,  @curSTATECD char(3),  @curLOCALTAX char(7),  @curSUTASTAT char(3),  @curWRKRCOMP char(7),  @curSHFTCODE char(7),  @curSHFTPREM numeric (19,5),  @curUNIONCD char(7),  @O_SQL_Error_State int  select @BatchID = dbo.uprGetEmpBatchPrefix(@EmpID) select @BatchID = RTRIM(@BatchID) + '-' + CONVERT(varchar,@PERIODID)  select @cDBName = db_name()  exec @iStatus = DYNAMICS..smGetMsgString   12424,   @cDBName,  @cGETMSG12424 output,   @O_SQL_Error_State output  select @CompID = CMPANYID from DYNAMICS..SY01500 where INTERID = @cDBName  if not exists(select * from UPR10301 where BACHNUMB=@BatchID and UPRBCHOR = 1) begin  exec @iStatus = DYNAMICS..smGetNextNoteIndex  @CompID,  0,  @Note_Index output,  @O_SQL_Error_State output   insert into UPR10301   (BACHNUMB,  UPRBCHOR,  BCHCOMNT,  UPRBCHFR,  POSTEDDT,  UPRBCHMK,  MKDBYUSR,  MSCBDINC,  RECPSTGS,  NOFPSTGS,  CNTRLTRX,  CTRLEMPCT,  APPROVL,  APPRVLDT,  APRVLUSERID,  NOTEINDX)  values(  @BatchID,  1,   @cGETMSG12424,  1,   '',   0,   '',   0,  0,  0,  0,   1,  0,  '',  '',   @Note_Index) end else  update UPR10301   set CTRLEMPCT=CTRLEMPCT+1  from UPR10301 where BACHNUMB=@BatchID and UPRBCHOR = 1  DECLARE PayrollTrx CURSOR   FOR select TimeCardDtl.EMPLOYID, TimeCardDtl.JOBTITLE, TimeCardDtl.DEPRTMNT, EmpMstr.DIVISIONCODE_I,TimeCardDtl.TRXDATE,  TimeCardDtl.UNTSTOPY, PAYRTAMT, TimeCardDtl.DAYSWRDK, TimeCardDtl.WKSWRKD, TimeCardDtl.PayCode,  TimeCardDtl.STATECD,TimeCardDtl.LOCALTAX, EmpPayCode.SUTASTAT, EmpPayCode.WRKRCOMP, EmpPayCode.SHFTCODE,  SHFTPREM = case SHFTTYPE  when 0 then SHFTAMT  when 1 then EmpPayCode.PAYRTAMT * (ShiftCode.SHFTPCT / 100)  else  0.0  end,  EmpMstr.UNIONCD  from UPR10501 TimeCardDtl, UPR00100 EmpMstr, UPR00400 EmpPayCode left outer join UPR41500 ShiftCode ON (EmpPayCode.SHFTCODE = ShiftCode.SHFTCODE) where TimeCardDtl.EMPLOYID = @EmpID and EmpMstr.EMPLOYID = @EmpID and EmpPayCode.EMPLOYID = @EmpID and TimeCardDtl.Pay_Schedule = @PaySched and  TimeCardDtl.YEAR1 = @YEAR1 and TimeCardDtl.PERIODID = @PERIODID and TimeCardDtl.UNTSTOPY <> 0.0 and EmpPayCode.PAYRCORD = TimeCardDtl.PayCode    OPEN PayrollTrx;  FETCH NEXT FROM PayrollTrx  INTO @curEmpID, @curJobTitle, @curDept, @curDivisionCode, @curTrxDate, @curUnitsToPay,@curHrlyPayRate, @curDaysWorked, @curWeeksWorked,   @curPayCode, @curSTATECD,@curLOCALTAX, @curSUTASTAT, @curWRKRCOMP, @curSHFTCODE, @curSHFTPREM, @curUNIONCD;   WHILE @@FETCH_STATUS = 0  Begin  exec uprGetNextCompTrx   @CompTrxNum output,  @O_SQL_Error_State output  exec @iStatus = DYNAMICS..smGetNextNoteIndex  @CompID,  0,  @Note_Index output,  @O_SQL_Error_State output  insert into UPR10302  values(  @CompTrxNum,  @BatchID,  @curEmpID,  1,  0,  @curPayCode,   @curTrxDate,  @curTrxDate,  @curUnitsToPay*100,  @curHrlyPayRate,  0.0,  0.0,  0.0,  0.0,   @curDaysWorked,  @curWeeksWorked,   @curDept,   @curJobTitle,   @curSTATECD,   @curLOCALTAX,   @curSUTASTAT,   @curWRKRCOMP,   'WFUSER',   CONVERT(DATE,GETDATE()),   '',   0,   0,   @Note_Index,   0.0,   @curSHFTCODE,  @curSHFTPREM,  '',  @curUNIONCD)   FETCH NEXT FROM PayrollTrx  INTO @curEmpID, @curJobTitle, @curDept, @curDivisionCode, @curTrxDate, @curUnitsToPay,@curHrlyPayRate, @curDaysWorked, @curWeeksWorked,   @curPayCode, @curSTATECD,@curLOCALTAX, @curSUTASTAT, @curWRKRCOMP, @curSHFTCODE, @curSHFTPREM, @curUNIONCD;  end  CLOSE PayrollTrx;  DEALLOCATE PayrollTrx;  if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TAST0130]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) and (1 = (select TAACCRUE from TAST0130 where COMPANYCODE_I = @cDBName)) begin   DECLARE TimeCodesTrx CURSOR   FOR select TimeCardDtl.EMPLOYID, TimeCardDtl.JOBTITLE, TimeCardDtl.DEPRTMNT, EmpMstr.DIVISIONCODE_I, TimeCodes.TIMECODE_I,TimeCardDtl.TRXDATE,  TimeCardDtl.UNTSTOPY, TimeCardDtl.DAYSWRDK, TimeCardDtl.WKSWRKD, TimeCodes.ACCRUETIMEBENEFITS_I, PayTrxDtl.COMPTRNM, TimeCardDtl.PayCode  from UPR10501 TimeCardDtl, UPR10302 PayTrxDtl, UPR00100 EmpMstr, TATM0130 TimeCodes   where TimeCardDtl.EMPLOYID = @EmpID and TimeCardDtl.Pay_Schedule = @PaySched and TimeCardDtl.YEAR1 = @YEAR1 and   TimeCardDtl.PERIODID = @PERIODID and TimeCardDtl.UNTSTOPY <> 0.0 and PayTrxDtl.EMPLOYID = @EmpID and TimeCardDtl.PayCode = PayTrxDtl.UPRTRXCD and   PayTrxDtl.BACHNUMB = @BatchID and TimeCardDtl.TRXDATE = PayTrxDtl.TRXBEGDT and TimeCardDtl.DEPRTMNT = PayTrxDtl.DEPRTMNT and   TimeCardDtl.JOBTITLE = PayTrxDtl.JOBTITLE and TimeCardDtl.STATECD = PayTrxDtl.STATECD and TimeCardDtl.LOCALTAX = PayTrxDtl.LOCALTAX and   TimeCardDtl.SHFTCODE = PayTrxDtl.SHFTCODE and EmpMstr.EMPLOYID = @EmpID and TimeCardDtl.PayCode = TimeCodes.PAYRCORD    OPEN TimeCodesTrx;  FETCH NEXT FROM TimeCodesTrx  INTO @curEmpID, @curJobTitle, @curDept, @curDivisionCode, @curTimeCode, @curTrxDate, @curUnitsToPay, @curDaysWorked, @curWeeksWorked,   @curAccureTimeBenefits, @curCompTrxNum, @curPayCode;   WHILE @@FETCH_STATUS = 0  Begin  exec @iStatus = dbo.hrGetNextAttendanceTrx   @NextAttendanceTrx OUTPUT,  @O_SQL_Error_State OUTPUT;  exec @iStatus = DYNAMICS..smGetNextNoteIndex  @CompID,  0,  @Note_Index output,  @O_SQL_Error_State output  insert into TATX1030  values(  @NextAttendanceTrx,  @curEmpID,  @curJobTitle,   @curDept,  @curDivisionCode,  @curTimeCode,  @curTrxDate,  @curTrxDate,   @curUnitsToPay * 100,   0,  @curDaysWorked,  @curWeeksWorked,  0,  @curAccureTimeBenefits,  0,  '',   '',   1,   @BatchID,  @curCompTrxNum,  0,  @curPayCode,  'WFUSER',   CONVERT(DATE,GETDATE()),  CONVERT(TIME,DateAdd(ms, -DatePart(ms,getdate()), getdate())),  @Note_Index);   update TATM2030   set  HOURSAVAILABLE_I = @curUnitsToPay * 100  from TATM2030 TaMstrYrMax, TATX1030 TaTrxDtl  where TaMstrYrMax.EMPID_I = @EmpID and TaMstrYrMax.TIMECODE_I = @curTimeCode and TaMstrYrMax.YEAR1 = @YEAR1  and   TaTrxDtl.EMPID_I = @EmpID and @curTimeCode = TaTrxDtl.TIMECODE_I and TaTrxDtl.ACCFLG = 1  update TATM1030   set  HOURS_I = TaMstrTypes.HOURS_I + @curUnitsToPay * 100,  HOURSAVAILABLE_I = TaMstrTypes.HOURSAVAILABLE_I - @curUnitsToPay * 100,  DAYSWRDK = @curDaysWorked - TaMstrTypes.DAYSWRDK,  WKSWRKD = @curWeeksWorked - TaMstrTypes.WKSWRKD  from TATM1030 TaMstrTypes, TATX1030 TaTrxDtl  where TaMstrTypes.EMPID_I = @EmpID and TaMstrTypes.TIMECODE_I = @curTimeCode and TaTrxDtl.ACCFLG = 0   FETCH NEXT FROM TimeCodesTrx  INTO @curEmpID, @curJobTitle, @curDept, @curDivisionCode, @curTimeCode, @curTrxDate, @curUnitsToPay, @curDaysWorked, @curWeeksWorked,   @curAccureTimeBenefits, @curCompTrxNum, @curPayCode;  end  CLOSE TimeCodesTrx;  DEALLOCATE TimeCodesTrx;  end  insert into UPR30500 select EMPLOYID, Pay_Schedule, YEAR1, PERIODID, Workflow_Status from UPR10500 where  EMPLOYID = @EmpID and Pay_Schedule = @PaySched and YEAR1 = @YEAR1 and PERIODID = @PERIODID and (Workflow_Status = 3 or Workflow_Status = 6)  insert into UPR30501 select EMPLOYID, Pay_Schedule, YEAR1, PERIODID, TRXNUMBER, TRXDATE, PayCode, UNTSTOPY, DEPRTMNT, JOBTITLE, STATECD, LOCALTAX, SHFTCODE, DAYSWRDK, WKSWRKD,  SEQNUMBR, CMMTTEXT  from UPR10501  where EMPLOYID = @EmpID and Pay_Schedule = @PaySched and YEAR1 = @YEAR1 and PERIODID = @PERIODID and UNTSTOPY <> 0.0 insert into UPR30502 select EMPLOYID, Pay_Schedule, YEAR1, PERIODID, TRXNUMBER, LNSEQNBR, STRTTIME, ENDTIME, UNTSTOPY from UPR10502 where EMPLOYID = @EmpID and Pay_Schedule = @PaySched and YEAR1 = @YEAR1 and PERIODID = @PERIODID   delete  UPR10500 where EMPLOYID = @EmpID and Pay_Schedule = @PaySched and YEAR1 = @YEAR1 and PERIODID = @PERIODID  delete UPR10501 where EMPLOYID = @EmpID and Pay_Schedule = @PaySched and YEAR1 = @YEAR1 and PERIODID = @PERIODID  delete UPR10502 where EMPLOYID = @EmpID and Pay_Schedule = @PaySched and YEAR1 = @YEAR1 and PERIODID = @PERIODID  return(@@ERROR)  

    I am checking the definition of the TATX1030 table to see if someone changed the structure. If anyone has ever seen this please let me know.

  • Jonathan Fear Profile Picture
    on at

    There are a large number of tables that use this column Richard:

    AHPSLH01

    AHRTA330

    APR_APR50100

    APR_APR70501

    APR_APR70510

    APR_APR70511

    APR00400

    APR00401

    APR00402

    APR00403

    APR40600

    APR41100

    APR41101

    gpUPRCPR

    HRPppc01

    HRPRED01

    HRPSLH01

    ORM_UPR_SETP_OT_DTL

    ORM_UPR00400

    ORM_UPR10203

    ORM_UPR40600

    SF010115

    SF010200

    SF010501

    SF010502

    SVC00930

    SVC06001

    TATM0130

    TATX1030

    UPR00400

    UPR00400_OT

    UPR00402

    UPR10203

    UPR19900

    UPR40600

    UPR40600_OT

    UPR41901

    Now with that being said one of them is the TATX1030 table which you are referencing as well so let's start there. I would first check and see if there is data in this table and if there is not drop the table, recreate it using another company that has successfully upgraded and then update the failed record in the DU000030 table to a status of 0.

    If there is data in the table them you can fix the table scripting the data into a backup table, recreate the table at that prior version and then delete the failed record in the DU000030 table and have GP Utilities try the conversion again or you can recreate before you start the upgrade.

    Just a side note it doesn't look like this table has ever been changed since GP 9 so my guess is this issue has been actually around on this environment for quite some time.

  • Richard Wheeler Profile Picture
    75,850 Moderator on at

    Thanks Jonathan. After reading this I found that the issue was fixed by installing HR and running GP Utilities on just these two companies. Once it recreated all the HR tables with the correct structures the upgrade completed successfully. Now I would like to remove all HR tables from these two companies so future upgrades will proceed normally.  Do you happen to have script that will drop all HR tables and Views?

  • Jonathan Fear Profile Picture
    on at

    Delete DYNAMICS..DB_Upgrade where PRODID = 414 and db_name = 'xxxx'

    Delete DYNAMICS..DU000020 where PRODID = 414 and companyID = xx

    Delete DYNAMICS..DU000030 where PRODID = 414 and companyID = xx

    If you are reinstalling for Dynamics you have to drop the following tables:

    SUSPREF

    HR2APP06

    AAX10130

    You can find the Companyid by running the following script (you need to use this same script for Dynamics if you are reinstall this module for Dynamics as well):

    select CMPANYID,CMPNYNAM,INTERID from Dynamics..SY01500

    Last you need to run the following drop scripts against each company you need to reinstall the module for:

    Drop Table HR2NJ01

    Drop Table EX010130

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi Richard,

    Where you able to resolve the issue ? the status of the questions is still 'unanswered' ... so it would be good to mark it as resolved :-) if it's the case.

    Have a great time.

  • Suggested answer
    Brian P Connell Profile Picture
    864 on at

    i don't see a response that this actually resolved the issue...so I'll put my 2 cents in....

    -- Upgrading 4 company DB's from  11.0.2351 to 14.0.0804. 3 of them used payroll.

    -- the first 3 failed and the non-payroll company  succeeded. It should also be noted the 3 companies have been around since 7.5, the 4th company was added in GP2010.

    -- the failures were the same as this long error in dex_log

    --Read through a bunch of tech pages including this one and decided to add HR to the install.

    --Upon launching the utils after the HR mod dyn.set addition.... I received the Product 414 does not support upgrading from version 7.5.  Problem for me was there were no 414 entries in db_upgrade, du table, or anywhere that I could find.

    -- I ran the drop scripts that Jon Fear suggested after a successful install here ( before attempting upgrade again).

    drop table DYNAMICS..SUSPREF

    drop table DYNAMICS..HR2APP06

    drop table DYNAMICS..AAX10130

    (for each company)

    Drop Table INTERIDx..HR2NJ01

    Drop Table INTERIDx..EX010130

    (if you don't know what interid is, you shouldn't be doing the upgrade. call someone who knows. )

    After that the utilities successfully got past the "product 414 does not support upgrading..... message and the companies successfully updated.

    Now....do I leave the HR module installed?...hmmm.......

    /Brian

  • Community Member Profile Picture
    on at

    I have the exact same issue with a customer who had HR from GP 8 in their databases. I followed the removal method as given above and I was able to then install HR in GP 2010 SP4 and now on the 2015 jump that has HR enabled gives errors on all the HR tables and won't convert. What steps after the above scripts? Remove HR again somehow after the reinstall.

    Vince Stefanetti

    Exact MAX Consultant

  • Suggested answer
    Elizabeth Hodge Profile Picture
    162 on at

    Thank you.  Running a 2010 to 2018 upgrade for a client and ran into this problem at 1 am during the first phase of upgrading from 2010 to 2015.  Allowed me to get through that step.  Thanks to Jonathan for the original drop table info too.

  • Rob Klaproth Profile Picture
    1,730 on at

    Getting same error when going from 2010SP4 to 2015R2.  It's only happening in 2 of the companies that appear to have an orphaned project accounting installed.  Their 2 companies with PA show PA being on version 9.0.259 for PRODID 258 (Project Accounting), but all the other products are on 11.0.x.   I am wondering if I strip out the PA tables if that will help, but maybe installing HR is easier.   The question no one seemed to answer here is do I have to roll back the upgrade and install HR in 2010, or can I install HR in 2015 and re-run utilities on the failed companies?

  • Derek Albaugh Profile Picture
    on at

    For the two company databases failing on Project Accounting because that module is still showing at GP 9.0 even though you're currently upgrading to GP 2015 R2, you could use these scripts to reset the system tables so that, when you launch GP 2015 R2 Utilities to upgrade these two databases, it won't attempt to upgrade Project Accounting but instead install it anew at the GP 2015 R2, while upgrading all other modules as normal, so that PA will be available in the new version if needed.

    The scripts I'm referring to are here:

    >For Project Accounting, use these scripts:

    Against the DYNAMICS system database:

    1. Delete DYNAMICS..DB_Upgrade where PRODID = 258 and db_name = 'CompanyA'

    2. Delete DYNAMICS..DU000020 where PRODID = 258 and companyID = #

    3. Delete DYNAMICS..DU000030 where PRODID = 258 and companyID = #

    Against these two company databases, run this script:

    4. Drop Table PA10702

    You'll need to replace CompanyA in script #1 with the actual db_name value for the company database(s) as well as replace # in scripts #2 and #3 with the actual CMPANYID value for the database from the DYNAMICS..SY01500 table.

    If you're getting the error about "Invalid column name PAYRCORD", this error is usually seen with the uprCreateTrxDataFromTimecards procedure being created and this column should be in the following tables: UPR00400, TATM0130 and TATX1030, but usually is found to not be in either TATM0130 and/or TATX1030, both of which are tables from the HR (414) module, because HR was once installed in the past, but is no longer and these tables exist but don't have this newer column.

    Normally, I can get past this error just by dropping and re-creating these two HR tables with the PAYRCORD column, without needing to actually install HR if it isn't being used by the customer.

    Let me know if you have any questions or further issues...….

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans