Query for Total Items

Hi Experts..
I need a query to find the total  items  sold in a particular period for an particular item.
Pls help me in finding the query.
Regards,
Vamsi.
Edited by: Parimis on Jan 20, 2010 5:10 AM

Hi Vamsi,
Check the thread,
Help With Monthly Sales Query
Regards,
Madhan.

Similar Messages

  • Re: Statistics Query for Total runtimes for Process Chain incorrect

    Hi Guys,
    I am building a Query for Total runtimes for Process Chain Statistics. I used the Cube 0TCT_MC21 for Query - 0TCT_MC21_Q0101.
    I dragged in Keyfigure section - startdate, end date, Start time are all correct and fine but the End time (0TCTENDTIM) is coming incorrect. Is something else i should use to get the End time?
    Please let me know if any suggestions?
    Regards

    Just check if the end times are in GMT ?? usually happens with timestamps....

  • Query For Open Items

    Hi,
    We are trying to create a query for the open items (purchase orders ) in order to add some fields useful for users.
    Would you be able to advise with the query needed to show us only the open items?
    Best regards,
    MB

    Hi,
    Try this one:
    Select distinct t1.cardcode as Vendor, t1.CardName as Name, t1.docnum as PO#, t0.itemcode, t0.Dscription, t0.OpenQty as 'Open Qty', t0.linenum Row#, t1.DocCur as Currency, t0.price as 'Purchase Price', t0.whscode, t1.taxdate as "PO Date"
    from dbo.por1 t0
    inner join dbo.opor t1 on t1.docentry = t0.docentry
    where t1.DocType = 'I' and t0.linestatus = 'O'
    order by t1.docnum Desc, t0.linenum
    Thanks,
    Gordon

  • Query for Totals on a Sales Order

    Does someone have a query for sales order that sums the total # of orders for each user and sums total quantity and Amts?
    Thanks

    That would not be a hard query to write.  If you have started on the query, you may paste it if you are having difficulties getting the desired result.
    Suda

  • Query for Total sales by customer

    Hi,
    I want to create a query for getting a total of all sales for all Customers for the date range entered by the user.
    How can I do it?
    Jyoti

    If I can add my thoughts.  The query from Jyoti fails for me due to the Where statement.  Try the following:
    SELECT T0.CardName, T0.Address, T1.CreditLine, T2.PymntGroup as 'Payment Terms', T1.Balance, T0.DocTotal
    FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum
    WHERE T0.DocDate BETWEEN '[%0]' AND '[%1]'
    Having said that I use the built in Sales Analysis report to get the sales by customer by date.
    regards,
    Ralph

  • Using SQL Query for page item source does not insert populated value

    Hi All,
    Following are the attribute details of a certain page item on an edit form:
    Display As: Text Field
    Page Item Source Type: SQL Query
    Source value Expression: SELECT a from tab where id = 'ABC'
    Although the field appears populated on the screen, but the value is not inserted in the table.
    Can anyone help on this?
    Thanks in advance,
    Annie

    Annie:
    One solution is to define a pl/sql function that given a date will return the 'run-date'. Something like create or replace function get_prod_date(p_date in date) return date is
    retval date;
    begin
    select run_date into retval from tab_x where run_date=p_date;
    return retval;
    end;Change the Source Type for the page-item back to 'Database Column'
    Set Source value or expression to the 'database column name'
    Set 'Post calculation computation' to be
    get_prod_date(:pxx_date)
    Varad

  • Query for Billable item form MTL_SYSTEM_ITEMS_B for BOM billing item

    Hi All,
    I want to write query to get billing item from mtl_system_items_b for BOM ...Can anyone give me the idea for accessing the billing item..
    In BOM
    Routings - Resources(form) - Billing Item (Field) and Outside Processing Item (Field)LOV...i Want to know query to access these items..
    Thanks
    Raman Sharma
    Edited by: 929841 on Apr 24, 2012 6:06 AM

    Obtain FRD log file to find out why the trigger is fired twice.
    R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications (Doc ID 438652.1)
    Steps To Take FRD Trace in 11.5.10 & R12 (Doc ID 867943.1)
    R12: How To Create An FRD (Forms Runtime Diagnostic) Log Using Forms 10g (Doc ID 445166.1)
    How To Collect And Use Forms Trace (FRD) in Oracle Applications Release 12 (Doc ID 373548.1)
    Thanks,
    Hussein

  • Warranty related query for sales item

    hi I need a report for checking an sales item is under warranty or not & also I want to know the status of the products which comes under warranty is in open state or closed state Regards, K.Ramasamy

    Hi,
    Try this query:
    SELECT T0.[ItemCode], T0.[ItemName], T1.[TmpltName], T1.[Deleted] FROM OITM T0  inner join OCTT T1 on  T0.[WarrntTmpl]  =  T1.[TmpltName] WHERE T0.[SellItem]  = 'y'
    Thanks.

  • Query for total size of the spatial data

    Hi,
    I found some posts to determine the size of the spatial table but is there a query I can use to determine the exact size of my spatial column. I have about 2 mil. geometry points and I would like to know exactly how many bytes it is.
    Thanks in advance.
    Aarthi

    Hi,
    I have an old analysis I did several years ago. I couldn't get size for the SDO_GEOMETRY column per se, but I could calculate the approximate size required (not including extra space required for block boundaries, etc.). Note this info is quite old, so your milage may vary...
    This is the summary:
    SDO_GTYPE 3 bytes plus 1 byte for every two numeric places  (four digit gtype=5 bytes)
    SDO_SRID 1 byte if NULL; or 3 bytes plus 1 byte for every two numeric places 
    SDO_POINT 1 byte if NULL; or for each of the three numeric values, 1 byte if
                 NULL, or 3 bytes plus 1 byte for every two numeric places 
    SDO_ELEM_INFO 1 byte if NULL; or for each numeric value, 3 bytes plus
                 1 byte for every two numeric places, plus 40 bytes overhead for the VARRAY. 
    SDO_ORDINATES 1 byte if NULL; or for each numeric value, 3 bytes plus
                 1 byte for every two numeric places, plus 40 bytes overhead for the VARRAY. 

  • Query for exact item name for CAL required

    Hi,
    We are e-businessoft, reseller for Microsoft softwares.
    One of the customer has recently purchased windows server and now wants to purchase some user CALs. Few users will do mstsc of WinServer from within the
    premises and few customers will do the mstsc from remote location, a different city. Remote user will login via internet connection into the LAN and then do mstsc
    of WinServer.
    Please tell me exactly what products has to be purchased to facilitate this. I have suggested the below:
    1. WinSvrCAL 2012 SNGL OLP NL UsrCAL
    2. WinRmtDsktpSrvcsCAL 2012 SNGL OLP NL UsrCAL
    If this is correct, then please guide on how exactly this works? For example, The user doing mstsc from within premises requires item 1 only and users doing mstsc
    from different city requires item 2 only, or both 1 and 2 is required in both case.
    The terminal server services gives a countdown of 120 days from date of installation and ultimately expires and all connections thru mstsc stops. And then the
    server is reinstalled. So one major concern is whether purchase of these CALs will stop this inconvinience for ever?
    Please reply asap. CAL requirement is very urgent but can not proceed unless this clarity comes from you.

    Hi,
    Resellers should contact MSFT Partner Support for assistance.
    In general, the scenario you describe requires both Windows Server CAL and also RDS CAL for each user/device.
    This is because an RDS/TS CAL is required for correctly licensed use of RDS/TS, and in addition, because RDS/TS is used to gain access to Windows Server services/features, a Windows Server CAL is also required.
    (there are different scenarios which may apply, depending upon the edition of Windows Server being used, and also, it may be less expensive, depending on the size/scale of the scenario, to instead consider CAL Suite options)
    (also, note that if the Windows Server is offering MS Office, that requires Office licensing to be addressed. Also consider if the RDS/TS will allow the users/devices to consume MS Exchange or MS SharePoint or MS SQL, additional CALs for those products may
    be required)
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Performance of query for getting item revisions

    Hi All,
    The following query took several minutes in an environment with about 7,500,000 item revisions :
    SELECT
    MIR.INVENTORY_ITEM_ID
    , MSI.CONCATENATED_SEGMENTS ITEM_NUMBER
    , MIR.ORGANIZATION_ID
    , MP.ORGANIZATION_CODE
    FROM
    MTL_ITEM_REVISIONS_VL MIR
    , MTL_PARAMETERS MP
    , MTL_SYSTEM_ITEMS_VL MSI
    WHERE
    (MIR.INVENTORY_ITEM_ID = p_Item_ID OR MSI.CONCATENATED_SEGMENTS = p_Item_Number)
    AND (MIR.ORGANIZATION_ID = p_Org_ID OR MP.ORGANIZATION_CODE = p_Org_Code)
    AND MP.ORGANIZATION_ID = MIR.ORGANIZATION_ID
    AND MIR.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
    AND MIR.ORGANIZATION_ID = MSI.ORGANIZATION_ID ORDER BY EFFECTIVITY_DATE, REVISION DESC;
    If changing this query to the following, it takes less than a second:
    SELECT
    MIR.INVENTORY_ITEM_ID
    , MSI.CONCATENATED_SEGMENTS ITEM_NUMBER
    , MIR.ORGANIZATION_ID
    , MP.ORGANIZATION_CODE
    FROM
    MTL_ITEM_REVISIONS_VL MIR
    , MTL_PARAMETERS MP
    , MTL_SYSTEM_ITEMS_VL MSI
    WHERE
    MSI.CONCATENATED_SEGMENTS = p_Item_Number
    AND MP.ORGANIZATION_CODE = p_Org_Code
    AND MP.ORGANIZATION_ID = MIR.ORGANIZATION_ID
    AND MIR.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
    AND MIR.ORGANIZATION_ID = MSI.ORGANIZATION_ID ORDER BY EFFECTIVITY_DATE, REVISION DESC;
    Can anyone explain the extreme difference in performance between these two queries?
    Thanks & Regards
    Carolin

    They don't look logically equivalent to me.
    Here are the differences:
    WHERE  (MIR.INVENTORY_ITEM_ID = p_Item_ID
            OR MSI.CONCATENATED_SEGMENTS = p_Item_Number)
    AND    (MIR.ORGANIZATION_ID = p_Org_ID
            OR MP.ORGANIZATION_CODE = p_Org_Code)
    vs
    WHERE  MSI.CONCATENATED_SEGMENTS = p_Item_Number
    AND    MP.ORGANIZATION_CODE = p_Org_CodeIf they aren't logically equivalent there's no point in comparing the performance.

  • Query for Tracking Item

    Hi There,
    We have a table in Database with Columns ( Installed, Removed, Transaction Date ) , that table tracks the Parts when it is installed in store and when that part was removed from store with Transaction Dates
    So from below example how to get the "Part A" install and Removal Dates ?
    Please Help !!
    Thanks,
    Learning Bee !!
    Dotnet.Explorer

    Please try this code:
    IF OBJECT_ID('dbo.Track') IS NOT NULL
    DROP TABLE dbo.Track;
    GO
    CREATE TABLE dbo.Track
    Installed NVARCHAR(10) ,
    Removed NVARCHAR(10) ,
    TransactionDate INT
    GO
    INSERT INTO dbo.Track
    ( Installed, Removed, TransactionDate )
    VALUES ( N'Part A', NULL, '2007' ) ,
    ( N'Part X', N'Part A', '2008' ) ,
    ( N'Part A', N'Part X', '2009' ) ,
    ( N'Part Y', N'Part A', '2010' ) ,
    ( N'Part A', N'Part Y', '2011' );
    GO
    WITH NewTrack
    AS ( SELECT * ,
    ROW_NUMBER() OVER ( ORDER BY TransactionDate ) AS Rn
    FROM dbo.Track
    SELECT T1.Installed AS Part ,
    T1.TransactionDate AS [Installed Date] ,
    T2.TransactionDate AS [Removerd Date]
    FROM NewTrack AS T1
    LEFT JOIN NewTrack AS T2 ON T1.Installed = T2.Removed
    AND T2.Rn = T1.Rn + 1
    ORDER BY Part ;
    T-SQL Articles
    T-SQL e-book by TechNet Wiki Community
    T-SQL blog

  • Formatted search query for displaying invoice items details

    hi all,
    i need to display all the items in AP invoice.kindly suggest me a query for that.
    in AP invoice
    Ex. row items
    code--descqtyprice--
    total
    I0001--XXXXXXX5--
    100 -
    500
    query should display this row as
    code--desc--
    price
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    =================================
    the query should display as the qty is 5 so it will display the same item 5 times
    kindly suggest me some query for formatted search
    its very urgent
    regards
    sandip

    Hi Sandip,
    DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
    Hope its help for you
    Give me reward points,
    Regards,
    G.Suresh.

  • Re:Query for Stock Statement for a particular item..!!!!

    Dear SAP Experts,
    I need a stock statement query  for a particular item which contains:
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    1.Warehouse code
    2.Item Name
    3.Posting Date
    Plz give me a good solution for this issue.
    With Regards,
    Revathy

    Check this
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    set @FromDate =
        (Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
    set @ToDate =
        (Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
    select * from
        SELECT T0.itemcode,
        min(T0.Dscription) as 'Item Description',
        min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
        (isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate ),0)-
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate),0)
        ) as [Opening Stock],
        isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.inqty>0
            and O1.transtype in (20,18)),0
        ) as [Purchase Quantity],
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate
            and O1.outqty>0 and O1.transtype in (21,19)),0
        ) as [Purchase Return Quantity],
       isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
            and O1.transtype in (13,15)),0
        ) as [sale Quatity],
        (isnull
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate<=@ToDate),0
            isnull((
                Select sum(isnull(outqty,0))
                from OINM O1
                where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
                and O1.docdate<=@ToDate),0)
        ) as [Closing Stock]
        FROM OINM T0
        INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
        INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
        INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
        INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
        INNER JOIN OLCT C1 ON W1.Location=C1.Code
        Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
    ) a
    where (a.[Opening Stock]
            +a.[Purchase Quantity]
            + a.[Purchase Return Quantity]
            +a.[sale Quatity]+a.[Closing Stock]
           ) !=0
    Regards,
    Bala

  • Total Delivery Cost for partial Item delivery

    Hi Guru,
    I have a requirement wherein I have to apply the total delivery cost for partial Item delivery.
    For example: Even if there is partial GR, delievery cost must be paid in full.
    Say PO is for 100 PC and delivery cost is 100 EUR. Now at MIGO if the delivered quantity is 60, the freight vendor must still be paid 100 EUR.
    Is this possible by configuration or do we need to make any changes at code level? If yes, Please guide me on how to do that....

    Create a PO without tick GR-Bsd IV, suppose I have created PO with qty 20 and rate 1 INR and give freight 50 INR (Fixed Amount)..
    Then I have done partial GR for qty 5. My freight amount booked as 12.5 INR (for partial GR)
    Then I have gone for MIRO..
    Here select Goos/Service item + Planned delivery cost.
    Enter the PO, you can see two line items appear..
    One for goods and one for freight...
    Goods will come as qty 5 and amount 5 INR and Freight will come as qty 5 and amount 12.5 INR.
    Just change the freight qty and amount as 20 and 50 INR.
    Then post the MIRO, you can see your total freight will be booked to vendor..
    Now again do GR for qty 2, at that time your freight amount will booked as 5 INR.
    Then when you will go for MIRO, you can see only the GR item, Freight qty and amount will not come at the time MIRO..
    (Note : I have told the scenario as per my previous screen shot)

Maybe you are looking for

  • To get monday dates in a given date range

    Hi, when a give a date range from Apr 1 to Apr 30 , the query should return all the monday dates from Apr 1 to Apr 30 I.e Apr 4 Apr 11 Apr 18 Apr 25 Please suggest me how to achieve this.

  • I have a new Imac and connected a VGA projector

    We have a new imac and have connected it to a VGA projector and have purchased a mini VGA convertor cable from the apple store, but now it changes the resolution once you change monitor in the system folder to mirrow. This is the only way we can get

  • How to detect HP GPIB card by MAX?

    I have an Agilent GPIB-PCI interface board 82350A, but it is not recognize by MAX. I followed the instruction from the knowledge Base: Uninstalled HP-VISA, installed HP-SICL and NI-VISA 3.0. It seems that it still doesn't work.

  • Flash Layers Hidden

    I have a problem with layers being hidden by previous layers in Flash and Flash player. I created 14 images that are the same except that each one has a incremental number, that is 1 through 14, on the image. They were created in Photoshop as PNG ima

  • Generate Unique Hash Key in PL/SQL

    I have a document that i want to send to certain customers. What I've decided to do is send the customer a link to the document that will be stored locally on our server. Obviously for security reasons i don't want to simply send the sequential doc I