Thursday, March 26, 2009

Upgrade Issue with Project Accounting and Purchase Order

This week I had an interesting issue pop up after an upgrade from GP9 to GP10. We have done many upgrades at this point, including ones involving project accounting, so this issue was a surprise and makes me wonder what caused it.

There were no errors during the upgrade, but post upgrade a user noticed that there were no longer any account numbers on purchase order line items. When she went to receive the purchase orders, the receipts did not default a Cost of Goods Sold account since there was no account on the line item on the purchase order. All of their purchase orders are project purchase orders, with projects and cost categories on the line items.

I looked in the database, and sure enough, in the POP10110 there were no values for the INVINDX field which stores the account index for PO lines. None. Zero. Zilch. Nada. For 7500 lines. To make sure I was not going crazy, I manually entered a purchase order and sure enough, the INVINDX populated fine. So then, to make sure it was an upgrade issue, I restored a backup from GP9 (when I knew POs and receipts were functioning, and accounts were defaulting). And in GP9, the INVINDX was blank as well.

So...I started to wonder if perhaps this was somehow related to the feature pack and changes made to the line item functionality with regards to accounts in purchase order. I still do not know for sure, but it seems like a likely reason (feel free to share if you know, or can disqualify this theory).

But I still needed to fix the issue, so I looked in the PA10601, the PA Purchase Order Line table. And the PACogs_Idx field was still populated. I checked my test purchase order that I had entered, to make sure that it populated both POP10110.INVINDX and PA10601.PACogs_Idx with the same values to make sure I was not making a bad assumption. Then it was easy enough to do a join on the PO number and ORD fields in order to update the POP10110 with the correct account index.

All is well now, and the user is able to enter and post (with accounts defaulting). Anyone else come across this?

2 comments:

Unknown said...

Hi,

I have also checked this while upgrading from GP8 to GP10. This is starnge..

To resolved this I have done update statement to fix this.

update POP10110 set INVINDX=j.pacgbwipidx

from POP10110 p join PA10601 j

on p.PONUMBER=j.PApurordnum and p.ORD=j.ORD

where p.INVINDX=(select actindx from SY01100 where series=5 and seqnumbr=300)
and j.pacgbwipidx <>(select actindx from SY01100 where series=5and seqnumbr=300)

Regards,
Santosh

Christina Phillips said...

Thanks, Santosh. I am glad I am not the only one who encountered this weird little issue. And thanks for sharing your script :) Weird problem, but I am grateful it was relatively easy to fix.