Hello:
A GP 2015 client is getting the error message shown below, upon running the Historical Stock Status report as of 12/31/2017 and for only one G/L account in particular.
We have run through the steps in the article shown below but to no effect.
Has anyone found a remedy for this issue?
Thank you!
John
Unhandled Script exception:
SCRIPTS - data area
EXCEPTION_CLASS_SCRIPT_DIVIDE_BY_ZERO
SCRIPT_CMD_DIV
Note: Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.
Cause
This problem is typically caused by some type of data corruption in the IV30300 table. Most common are:
Cause 1
Specific document types in the IV30300 are missing a transaction source. Each document that is posted through Microsoft Dynamics GP should have a transaction source associated with it. Due to a posting interruptions or an integration/customization issues, this value may be missing. Use the script below to identify any documents that have a blank transaction source. All of these document types listed should have a transaction source. If they do not have a transaction source the records need to be fixed or removed.
1. Run the following statement against the company database in SQL Server Management Studio to identify transactions with this condition:
SELECT * FROM IV30300 WHERE TRXSORCE = '' and doctype in (1, 2, 3, 4, 5, 6, 7)
Example:
DELETE IV30300 WHERE DEX_ROW_ID = XXX
Cause 2
Specific document types with invalid values of 0 in the DECPLCUR and DECPLQTY fields.
Note The DECPLCUR field refers to the captured currency decimal place and the DECPLQTY field refers to the captured quantity decimal place for the item. On all valid transactions this should be populated with a value.
Select * from IV30300 where (DECPLQTY = 0 or DECPLCUR = 0) and doctype in (1, 2, 3, 4, 5, 6, 7)
If you find documents with 0 decimal places, these need to be investigated. Correct the corrupted transaction by using SQL Query Analyzer by updating the fields to the appropriate value.
Decimal place values in the IV30300 are as follows:
Value in table |
Value shows in GP (Actual value) |
1 |
0 |
2 |
1 |
3 |
2 |
4 |
3 |
5 |
4 |
6 |
5 |
Example update statement below:
UPDATE IV30300 set DECPLQTY = 3 WHERE DEX_ROW_ID = XXX
If the results are all old transactions and you prefer to Remove history for the corrupted transactions, you can remove history by pointing to Tools on the Microsoft Dynamics GP menu, point to Utilities, point to Inventory, and then click Remove Transaction History and removing the appropriate document number(s).
*This post is locked for comments
Good Morning:
The issue was that two records in the IV30300 table had the “Quantity in the Base Unit of Measure” field equal to 0, while all others has this field equal to 1.
Once the client QTYBSUOM equal to 1, the error went away.
John
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156