*This post is locked for comments
*This post is locked for comments
DO you happen to have the query to update multiple records?
Thanks this fixed it for us. Inserted the VENDORID, DOCNUMBR, TRXSORCE into the record on PM00400 from the PM30200 and the users are no longer seeing the error.
I had the same problem and took care of the problem with RogerMD solution
update table PM00400 with the VENDORID, DOCNUMBR, TRXSORCE based on the corresponding records in PM30200.
I just had this exact incident in one of our clients and what I noted was that there were records in PM00400 with DCSTATUS = 3 but missing VENDORID, DOCNUMBR, TRXSORCE.
I then ran a query to check if these records have corresponding history records in PM30200 based on the CNTRLNUM (VCHRNMBR) and DOCTYPE. I then update table PM00400 with the VENDORID, DOCNUMBR, TRXSORCE based on the corresponding records in PM30200.
I think checklinks on Payable History Logical Files should also be able to resolve this issue.
Found a script to rebuild pm00400 table.
--**/ REBUILD PM00400 PM KEY MASTER
truncate table PM00400
if exists (select * from dbo.sysobjects t1, dbo.sysindexes t2
where t2.name = 'AK2PM00400'
and t2.id = t1.id
and t1.id = Object_id('PM00400') and t1.type = 'U')
begin drop index PM00400.AK2PM00400 end
go
if exists (select * from dbo.sysobjects t1, dbo.sysindexes t2
where t2.name = 'AK3PM00400'
and t2.id = t1.id
and t1.id = Object_id('PM00400') and t1.type = 'U')
begin drop index PM00400.AK3PM00400 end
go
if exists (select * from dbo.sysobjects t1, dbo.sysindexes t2
where t2.name = 'AK4PM00400'
and t2.id = t1.id
and t1.id = Object_id('PM00400') and t1.type = 'U')
begin drop index PM00400.AK4PM00400 end
go
if exists (select * from dbo.sysobjects t1, dbo.sysindexes t2
where t2.name = 'AK5PM00400'
and t2.id = t1.id
and t1.id = Object_id('PM00400') and t1.type = 'U')
begin drop index PM00400.AK5PM00400 end
go
if exists (select * from dbo.sysobjects t1, dbo.sysindexes t2
where t2.name = 'AK7PM00400'
and t2.id = t1.id
and t1.id = Object_id('PM00400') and t1.type = 'U')
begin drop index PM00400.AK7PM00400 end
go
if exists (select * from dbo.sysobjects t1, dbo.sysindexes t2
where t2.name = 'AK6PM00400'
and t2.id = t1.id
and t1.id = Object_id('PM00400') and t1.type = 'U')
begin drop index PM00400.AK6PM00400 end
go
/*End_Indexes PM00400 */
insert into
PM00400
(DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
DUEDATE,
DISCDATE,
BCHSOURC,
CHEKBKID,
TRXSORCE,
CNTRLTYP,
CNTRLNUM)
select
DOCNUMBR,
3,
DOCTYPE,
VENDORID,
DOCDATE,
DUEDATE,
DISCDATE,
BCHSOURC,
CHEKBKID,
TRXSORCE,
CNTRLTYP,
VCHRNMBR
from
PM30200
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
CNTRLNUM )
select
DOCNUMBR,
1,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
PMNTNMBR
from
PM10400
where
PM10400.BCHSOURC = 'PM_Payment'
and
NOT EXISTS
(select
CNTRLNUM
from
PM00400
where
PM10400.PMNTNMBR = PM00400.CNTRLNUM
and PM10400.CNTRLTYP = PM00400.CNTRLTYP )
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
CNTRLNUM )
select
DOCNUMBR,
1,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
PMNTNMBR
from
PM10300
where
NOT EXISTS
(select
CNTRLNUM
from
PM00400
where
PM10300.PMNTNMBR = PM00400.CNTRLNUM
and
PM10300.CNTRLTYP = PM00400.CNTRLTYP )
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
DUEDATE,
DISCDATE,
BCHSOURC,
CHEKBKID,
TRXSORCE,
CNTRLTYP,
CNTRLNUM )
select
DOCNUMBR,
2,
DOCTYPE,
VENDORID,
DOCDATE,
DUEDATE,
DISCDATE,
BCHSOURC,
CHEKBKID,
TRXSORCE,
CNTRLTYP,
VCHRNMBR
from
PM20000
where
NOT EXISTS
(select
CNTRLNUM
from
PM00400
where
PM20000.VCHRNMBR = PM00400.CNTRLNUM
and
PM20000.CNTRLTYP = PM00400.CNTRLTYP )
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
DUEDATE,
DISCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
CNTRLNUM )
select
DOCNUMBR,
1,
DOCTYPE,
VENDORID,
DOCDATE,
DUEDATE,
DISCDATE,
BCHSOURC,
CHEKBKID,
0,
VCHNUMWK
from
PM10000
where
PM10000.BCHSOURC = 'PM_Trxent'
and
NOT EXISTS
(select
CNTRLNUM
from
PM00400
where
PM10000.VCHNUMWK = PM00400.CNTRLNUM
and PM10000.DOCTYPE = PM00400.DOCTYPE )
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
CNTRLNUM )
select
CDOCNMBR,
1,
6,
VENDORID,
CAMTDATE,
BCHSOURC,
CAMCBKID,
1,
CAMPMTNM
from
PM10000
where
PM10000.BCHSOURC = 'PM_Trxent'
and PM10000.CASHAMNT > 0.00
and
NOT EXISTS
(select
CNTRLNUM
from
PM00400
where
PM10000.CAMPMTNM = PM00400.CNTRLNUM
and PM00400.CNTRLTYP = 1 )
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
CNTRLNUM )
select
CHEKNMBR,
1,
6,
VENDORID,
CHEKDATE,
BCHSOURC,
CHAMCBID,
1,
CAMPYNBR
from
PM10000
where
PM10000.BCHSOURC = 'PM_Trxent'
and PM10000.CHEKAMNT > 0.00
and
NOT EXISTS
(select
CNTRLNUM
from
PM00400
where
PM10000.CAMPYNBR = PM00400.CNTRLNUM
and PM00400.CNTRLTYP = 1 )
go
insert into
PM00400(
DOCNUMBR,
DCSTATUS,
DOCTYPE,
VENDORID,
DOCDATE,
BCHSOURC,
CHEKBKID,
CNTRLTYP,
CNTRLNUM )
select
CCRCTNUM,
1,
6,
VENDORID,
CRCARDDT,
BCHSOURC,
'',
CNTRLTYP,
CCAMPYNM
from
PM10000
where
PM10000.BCHSOURC = 'PM_Trxent'
and PM10000.CRCRDAMT > 0
and
NOT EXISTS
(select
CNTRLNUM
from
SY03100,
PM00400
where
DCSTATUS = 1
and SY03100.PYBLGRBX = PM00400.CNTRLTYP
and PM00400.CNTRLNUM = PM10000.VCHNUMWK
and PM10000.CARDNAME = SY03100.CARDNAME)
go
CREATE unique nonclustered index AK2PM00400
on dbo.PM00400(DOCTYPE, VENDORID, DOCNUMBR, DEX_ROW_ID)
go
CREATE unique nonclustered index AK3PM00400
on dbo.PM00400(DOCNUMBR, CHEKBKID, DEX_ROW_ID)
go
CREATE unique nonclustered index AK4PM00400
on dbo.PM00400(VENDORID, DCSTATUS, DOCNUMBR, DEX_ROW_ID)
go
CREATE unique nonclustered index AK5PM00400
on dbo.PM00400(VENDORID, DCSTATUS, DOCDATE, DEX_ROW_ID)
go
CREATE unique nonclustered index AK6PM00400
on dbo.PM00400(TRXSORCE, CNTRLNUM, DEX_ROW_ID)
go
CREATE unique nonclustered index AK7PM00400
on dbo.PM00400(VENDORID, DCSTATUS, DOCTYPE, DEX_ROW_ID)
go
Hi,
The PM Transaction Abbreviation array field is in table PM40100. It's a 3 character string field named PMTRXABR_1 through PMTRXABR_8. Normally when I get this error message it means that I have a value of 0 in a field that requires a value of 1 or above. The field lives on the Payables Setup Options window. It's the Code field on the window.
Look at your setup table and make sure you have a value in each field. Also, you might want to glance at the transaction table to make sure none of the transaction type codes is missing.
Kind regards,
Leslie
Most probably your PM KEYS TABLE has a invalid record.
Try this ---
1)Backup up your company database
2)Truncate table PM00400
3)Do a check links on all logical table for AP (PM00400 will get rebuild)
4)Check if this has resolved your issue
5)If not sort the PM00400 by CNTRLNUM and check if there any blank records at PM00400
6)If there is blank record delete it - issue is solved - but figure why check links create a blank key record ....
7)If not restore the database and use debug tools of Dave musgrave to generate DEXSQL Log - It will have the info you are looking for.
I agree, Richard, that from my original description of the problem, that would sound like the problem. Unfortunately, once I investigated the PM Keys Master table, I noticed that the Vendor ID and Name were both present. The original explanation came from our end user, who I confirmed can now see the Vendor ID and Name, but still receives this error message when clicking on the Source Document link within the Journal Entry Inquiry window. Still looking for a resolution.
I think you have mentioned the problem yourself....it posted without a Vendor ID or Vendor Name. Browse the table (Payables Open Items) and look for the item. Complete the Vendor ID field manually.
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,432
Most Valuable Professional
nmaenpaa
101,156