Hello Beat,
I know this is an old post and I hope you will still receive this message.
I just recently got a similar issue with an invoice.
The sales invoice batch was interrupted while posting and I was able to unmark the batch from posting with SQL query
update sy00500 set MKDTOPST = 0, BCHSTTUS = 0 where BACHNUMB = 'xxx'
Then I was able to repost all other invoices in that batch but one.
This invoice is still open, but the products on it have been removed from inventory. I was able to find the invoice number under Item Transaction Inquiry, but when trying to zoom in by clicking on the "Number", it shows the error message "
This document has been removed from Sales Order Processing history". The same error message appears when I look up the invoice number under the Receivable Transaction Inquiry and Sales Documents Inquiry window in the "Unposted" option.
I have tried "Reconcile-Remove Sales Documents" and Check Links for Sales (Sales work/Sales history/Receivable open transaction files/Receivable transaction history), it did not work.
As Aaron suggested, the PSTGSTUS value in my SOP10100 table is 252. But since the fulfilled products on this invoice don't "exist" anymore, I was not able to post this invoice again after updating the value to 0 zero.
The invoice record exists in open sales transaction tables SOP10100, SOP10200, SOP10201/ receivable tables RM00401, RM20101,
The invoice record does NOT exist in history tables SOP30200, SOP30300/ RM0301, RM30301.
It seems that the inventory was updated, and records have been created in receivable tables, but it was interrupted when moving records to sales history tables and deleting them from open tables.
Do you have a way/SQL script to fix this issue?
Any help or suggestion is appreciated!
------------------------------
HAITAO YU
IT Manager
Gold Coast Ingredients, Inc
Commerce CA
------------------------------
Original Message:
Sent: Jul 24, 2014 09:50 AM
From: Beat Bucher
Subject: Posted Invoice won't move to history
Funny,
now that you're mentioning this I recall having run into that issue a few years back... doesn't happen very often, so I didn't recalled that one :-)
I probably have a SQL script somewhere to fix this...
Here is an older post from David Musgrave regarding stuck batches :
https://community.dynamics.com/gp/b/developingforgp/archive/2008/12/02/releasing-stuck-batches-and-transactions-without-exiting-all-users.aspx
-------------------------------------------
Beat Bucher
Business Analyst, GP Administrator
Forensic Technology Inc.
Cote St-Luc QC/Canada
514-489-4267
Original Message:
Sent: 07-23-2014 10:27 PM
From: Aaron Back
Subject: Posted Invoice won't move to history
Found out the answer, so I wanted to pass along the fix.
What I discovered was that the Sales Transaction invoice was interrupted while posting. So, in the SQL table of SOP10100 the BCHSTTUS had a value of 508. Once I updated the value to 0 (zero), I was able to post the invoice.
Thanks,
-------------------------------------------
Aaron Back
IT Systems Administrator
Gorilla Glue
Cincinnati OH
Email: aaronback@gorillaglue.com
Original Message:
Sent: 07-23-2014 12:30 PM
From: Aaron Back
Subject: Posted Invoice won't move to history
I have an invoice that has been posted but won't move to history. I have tried the "Reconcile-Remove Sales Documents" (both options: Reconcile and Remove), but that doesn't work. The invoice number doesn't even appear in the lookup window.
The invoice does appear in the Sales Documents Inquiry window in the "Unposted" option.
The invoice does appear in the Receivable Transaction Inquiry by Customer window in the History portion. However, if I select the document number and click on the "Document Number" link, I get the message "This document has been removed from Sales Order Processing history".
The SOP record is still in the SOP10100 SQL table.
Any help is appreciated.
Thanks,
-------------------------------------------
Aaron Back
IT Systems Administrator
Gorilla Glue
Cincinnati OH
Email: aaronback@gorillaglue.com
-------------------------------------------