Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Why does quantity query using Purchase Receipts differ from Transactions Amount History

Posted on by 75,730

Why would these two script come up with different numbers? They differ by exactly 2,000.

SELECT SUM(TRXQTY) FROM dbo.[IV30300] WHERE ITEMNMBR='PARTNUMBER' AND TRXLOCTN = 'MAIN'

SELECT SUM(QTYRECVD-QTYSOLD) FROM dbo.[IV10200] WHERE ITEMNMBR='PARTNUMBER' AND TRXLOCTN = 'MAIN'

The GP Purchase Receipts report agrees with the second script and the IV Stock Status Report comes up with a number that is close but not exact.

I need to add inventory valuation numbers to an SSRS report so I need to know which tables to use.

Categories:
  • Hokuminaria Profile Picture
    Hokuminaria 2,950 on at
    RE: Why does quantity query using Purchase Receipts differ from Transactions Amount History

    Hell Richard,

    My guess is that something is missing from the IV30300 table. that is in the IV10201. This could be caused by an Interruption or hjstory turned off for the item at some point.

    You would need to look at the data for these two table to determine why your scripts are giving you different results.

    If you can, i would look at using the SEE30303 table. This table should capture all activity whether history is on or not.

    One other thing to look at regarding the IV30303. You could have transfers. Be sure you are including sites that would have been transferred to/from. The transfer would have the original site listed and could be why your scripts are returning different results.

    I hope this helps!

    Thank you!

    Brandon Jarrett | Microsoft Support Engineer.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans