web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Returned Quantity

(0) ShareShare
ReportReport
Posted on by

Does GP has a field other than the Returned Quantity field on the Item Inquiry window to accumulate returned?

This field happen to be a quantity type field, so if I transfer to On Hand then I won't be able to see how many units for an item have been returned, I still can run a report or smartlist against SOP tables but I'm wondering if there is a field somewhere that accumulate returned, just as the Qty Sold field.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    Hello Angel

    You are definitely right, this field records the quantity returned as a "Returned Quantity Type". Here is an SQL view which will give you the detailed returned quantity and value per quantity type (On hand, in use, in service, returned and Damaged) per item per location.

    Here is the data set result

    Here is the SQL view:

    SELECT  ITEMNMBR AS ItemNumber ,
            QuantiyType ,
            SUM(TRXQTYInBase) AS ReturnedQuantity ,
            SUM(EXTDCOST) AS ReturnedValue ,
            LOCNCODE AS Location
    FROM    ( SELECT    ITEMNMBR ,
                        CASE QTYTYPE
                          WHEN 1 THEN 'On_Hand'
                          WHEN 2 THEN 'Returned'
                          WHEN 3 THEN 'In_Use'
                          WHEN 4 THEN 'In_Service'
                          WHEN 5 THEN 'Damaged'
                          ELSE ''
                        END AS QuantiyType ,
                        TRXQTYInBase ,
                        EXTDCOST,
                        LOCNCODE
              FROM      dbo.SEE30303
              WHERE     DOCTYPE = 5
            ) AS A
    GROUP BY A.ITEMNMBR ,
            A.LOCNCODE ,
            QuantiyType

    Your feedback is highly appreciated,

  • Angel Nuñez Profile Picture
    on at

    Thanks Mahmoud, I was hoping to see that info on any GP window, but this script will do it. Does it make any difference if I use SOP30300 to get all returns instead of using the HITB (SEE30300)?

  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    Same result with different approach, here is the data set result

    SELECT  ITEMNMBR AS ItemNumber ,
            LOCNCODE AS Location ,
            SUM(OnHand_QTY) AS OnHand_QTY ,
            SUM(In_User_Qty) AS In_User_Qty ,
            SUM(IN_Service_QTY) AS IN_Service_QTY ,
            SUM(Damaged_Qty) AS Damaged_Qty ,
            SUM(Returned_Qty) AS Returned_Qty ,
            SUM(EXTDCOST) AS ExtendedCost
    FROM    ( SELECT    ITEMNMBR ,
                        LOCNCODE ,
                        QTYONHND AS OnHand_QTY ,
                        QTYINUSE AS In_User_Qty ,
                        QTYINSVC AS IN_Service_QTY ,
                        QTYDMGED AS Damaged_Qty ,
                        QTYRTRND AS Returned_Qty ,
                        EXTDCOST
              FROM      dbo.SOP30300
              WHERE     SOPTYPE = 4
            ) AS A
    GROUP BY A.ITEMNMBR ,
            A.LOCNCODE

    Let me know if you have any further inquiries,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans