"Qty Sales Result not Same"

hai all Expert..,
I have a problem with my Query .., may have that can help me.
I create a Query for Qty sales, after I was working Excecute
but after I check the results one by one with the sales results
of the analysis appeared to have all that is not the same as the results of the analysis in sales
SELECT T0.ItemCode, T0.Dscription,T1.OnHand,T0.DocDate,T0.ActDelDate, SUM(T0.BaseQty * T1.NumInSale) AS 'Qty Sales' ,DAY(GetDate()) as 'Days',
Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
FROM DBO.INV1 T0 INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
WHERE
T0.ItemCode  ='01000006' and
(Month(T0.DocDate) = Month(GetDate())-1)  AND Year(T0.DocDate) = Year(GetDate()) and
(T0.BaseQty * T1.NumInSale)>0
GROUP BY T0.ItemCode,T0.Dscription,T1.OnHand,T0.DocDate,T0.ActDelDate
ORDER BY T0.ItemCode,T0.DocDate
Thanks...

Try This
SELECT T0.ItemCode, T0.Dscription,T1.OnHand,T0.DocDate,T0.ActDelDate, SUM((T0.Quantity * T1.NumInSale)-T1.OPENQTY) AS 'Qty Sales'
,DAY(GetDate()) as 'Days',
Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
FROM DBO.INV1 T0 INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
WHERE
T0.ItemCode ='01000006' and
(Month(T0.DocDate) = Month(GetDate())-1) AND Year(T0.DocDate) = Year(GetDate()) and
(T0.BaseQty * T1.NumInSale)>0
GROUP BY T0.ItemCode,T0.Dscription,T1.OnHand,T0.DocDate,T0.ActDelDate
ORDER BY T0.ItemCode,T0.DocDate

Similar Messages

  • Resultant calculation but result not same

    I found one issue when I calculate the Resulatnt from head x, y, z acceleration data when I process the crash test data.
    one computer XP system the result channel name  is : ResultantXYZ,
    one conputer Win7 system the result channel name is : Res_from_XYZ  
    Who know why I have the different result channel name?

    Hi woshiyun,
    That looks like a difference based on the DIAdem version.  We harmonized the standard resultant channel names many years back so that they would be the same regardless of whether they were created with an English operating system or a German operating system.  You can branch your code based on the ProgramRevision variable.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • MDR-ZX100 sound results not same as bundles headset sound quality

    Hi guys, could you help me, how can MDR-ZX100 headset produce the same quality of sound as the bundled headset of xperia z1? The sound quality of MDR-ZX100 produces low sound quality including the bass... Could an adapter solve the problem?

    its because the z1 3.5 aux port does not give high voltage that is the reason for low noise xda dev have found the solution but dont know why sony isint giving us a proper software in the firmware 
    this is the link but for this u have to root the phone 
    http://www.xda-developers.com/android/increase-the-volume-on-the-sony-xperia-z1/

  • "Why Qty sales Not Same"

    Hi expert...
    I have a problem ..,
    I have to report sales to the Quanty Query ..,
    but why after I check in the amount of System Analys Qty Salesnya different with my report.
    I find based on all WHERE (MONTH(DocDate) not match as well as based on WHERE (MONTH(ActDelDate),
    how do I make the same Querynya to
    Thank you for helping me ...

    Hi  Expert M. Jenkins 
    I not, to reduce the credit service / item documents in my Query.
    in making this report a lot of my problems ... This one's my problem,
    you can help me in this case .. because I have tried repeatedly check the results in sales but not the
    same analysis with the results of my queries,
    why this can happen?
    thanks a lot...
    rachelhel

  • After installing iOS6, my Maps are not working at all, anything i search it says "result not found" even after placing a pin and selecting "Direction to here" i get the same result not found. Very disappointed with the new iOS

    After installing iOS6, my Maps are not working at all, anything i search it says "result not found" even after placing a pin and selecting "Direction to here" i get the same result not found. Very disappointed with the new iOS.

    Have you run it in a debugger? That will show you exactly what is happening and why.

  • Status are "open" in CRM but not same shown in replicated sales Doc.

    Dear Experts,
    Status are "open" in CRM but not same shown in replicated sales Doc ( R/3 ). please suggest with optimal solution.
    Regards,
    Sany

    Hi Sai,
    Thanks for your response, I am using PFAL transaction to transfer the employees from ECC to CRM. and I am using only one emplyee for execution, is there any other transactions to replicate employees.
    In ECC, after executing the PFAL transaction, getting successful transfer of IDoc message with green light.
    In CRM in WE02, it is showing yellow light for the same IDocs.
    but even with yellow light (Warning) some employees are successfully converting into BPs, but some employees are not converting.
    I could not trace the problem that, why it is happening. IDocs are reaching to CRM system, but some idocs are not converting into BP where as some IDocs are converting into BPs successfully.
    Please help me to resolve this issue.
    Your suggestions will be highly appreciated.
    Best regard
    Raghu ram

  • I am using ipad mini ... I was unable to access facebook since long time... Its shows error could not communicate with the server.... I had install it but result was same. Can anyone help me???

    I am using ipad mini ... I was unable to access facebook since long time... Its shows error could not communicate with the server.... I had install it but result was same. Can anyone help me???

    first off , from the wired computer access the router using http://192.168.1.1 .. check the firmware version .. go to www.linksys.com/download and check the latest firmware available...if the router does not have the latest firmware , upgrade it first. .. after the firmware upgrade , reset and reconfigure the router
    if the router has the latest firmware , then reset the router for 30 seconds .. do a power cycle...access the router ui ..default password is admin..click on the "mac add clone" subtab , enable it and click clone....save the settings and do a power cycle..ensure that the wired computer is online
    on the router web ui , click on the wireless tab ..change the ssid - any non-linksys name , channel - 11 , security mode - wpa , beacon interval - 50 , fragmentation threshold - 2306 , RTS threshold - 2307 ..
    let me know if this helps you..

  • Hi there. I have a problem with sound on my 4s. When you move the volume slider up, it sounds well. But when I move the volume slider down I will hear barely and unclear sound in my headphone.I tried different headphones but result is same as old one.Help

    Hi there. I have a problem with sound on my 4s. When you move the volume slider up, it sounds well. But when I move the volume slider down I will hear barely and unclear sound in my headphone.I tried different headphones but result is same as old one.Help

    Try A and B
    (A) Restart iPad
    1. Hold down the Sleep/Wake button until the red slider appears.
    2. Drag the slider to turn off iPad.
    3. Turn iPad back on, hold down the Sleep/Wake until the Apple logo appears
    (B) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Display Several Sales Orders from Same Business Customer TOGETHER   in MD04

    Hello
    In MD04 is it possible to display several sales orders from same business customer together?
    For instance one business customer order bikes for two times.
    The Order-No are 12912(50st by 07/08/09) and 12913(100st by 10/08/09).
    Normally after runnning of MRP(MD02), the planned orders are displayed seperately in MD04.
    I want to display  two orders together.
    The reason is if some trouble happens in Production(for Ord-no 12912) and it cannot be deliveried on schedule, however Production  (for Ord-no 12913) is going without trouble, the final-products for order 12913 should move for 12912.
    If you have some good solutions, please share it.
    Thank you for your advice.
    Regards,

    Hi Riyolshibashi,
    Lets look at the two main scenarios, MTS and MTO.
    In MTS, the general display filters are available in MD04.  Standard SAP filters do not filter on 'customer'.  I suspect this is because the concept would normally be illogical in a MTS environment.  Planned orders do not exist to serve a customer, but to serve 'stock'.  But let us not think about SAP and their logic.
    SAP allows you to create customized filters, in IMG>Production>MRP>Evaluation>Filter>Define Display filter.  Within this definition, under the  "Addnl Selections' tab, you can tick 'Define addl selections in the transaction'.  When you use this filter in MD04 display, then, one of the options available to you is to enter a specific Customer number, and then the display will only show the requirements from this customer.  Since you have excluded all other customer's orders, all orders of a single customer will be displayed consecutively.  Next to each other.
    In the case of MTO, the 'filter-by-customer' concept makes more sense (although, not for the reason you have stated.  You would have to find some manual method to convert a production order from supporting one sales order item, to supporting another sales order item.  Possible but difficult).  Anyway, the above mentioned customized filter would also work in an MTO environment.
    Regards,
    DB49

  • Sales deal not getting populated in Sales order.

    Hi,
    A new custom Agreement type is created for VISTEX agreement in our company. This has condition records table with primary keys as application, condition type, Sales orgs, materia, agreement and valididty date.
    When I create a sales order for same Sales orgs, Sold to and material - it is not pulling sales deal in communication structure.What could be the reason for this. I debugged standard SAP and found that order  is not finding access sequence. Access sequence does not get any data in agreement field  which is VBAP-KNUMA_AG or KONP-KNUMA_AG. Fields is access sequence are VKORG MATNR and KNUMA_AG (table t682z).
    Can anyone please help me to know if something missing in configuartion? Ot it is because order does not have enough data to find agreement or DO I need to manualy ipopulate value of agreement in field KONP-KNUMA_AG in any of sales order user exit.
    Thanks
    Swat
    Edited by: Swati Swati on Mar 5, 2012 10:34 PM

    Let me put more information on my question. We already have an agreement type ZBAB for which a sales order is populating sales deal. But that has condtion tables with fields VKORG KUNAG (sold to) and KONDM Material Pricing Gr). When I create an order , it finds condition record number (within standard SAP logic), using above three fields ( which is VKORG KUNAG and  KONDM) from condition table A700. A700 is conditon table creted for ZBAB.
    But for this new agreement type which has condition table A777  has fields as VKORG MATNR and KNUMA_AG, it is not working.
    I suspect that it is because for the first one, we can get all field values like VKORG KUNAG and KONDM in sales order. But for 2nd one we have KNUMA_AG maintained in access sequence for which we dont have data in sales order.. so we dont have condition record number to get corresponditing agreement. But I dont know where to link this in sales order config or user exit.

  • Sales order not created using BAPI_SALESORDER_CREATEFROMDAT2

    HI,
    I have used the bapi BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. I have passed the parameters, doc_type, sales_org, distr_chan, division, partn_role, part_numb and material.
    It displays back the message as
    sales_header_in createds,
    sales_item_in created,
    sales document not yet complete : Edit data.
    Standard Order 135428 has been saved.
    But when i check the same standard order in VA03 ( or vbak ), its not present.
    I have also run BAPI_TRANSACTION_COMMIT, to commit work. But still cant figure out.
    Any suggestions plzz...
    regards,
    Taj

    I am able to create the sales order when i am entering these details in VA01. I mean the sales document type and othr details.
    But when i pass the same parameters in bapi. This doesnt happen. Is there any thing more that needs to be passed.

  • UDF works in Sales but not in Purchase?

    Hi experts,
    I have a udf created in the invoice sales (header), and a formatted search to retrieve the Federal Tax ID
    Ej:
    Select T0.[LicTradNum] FROM OCRD T0 WHERE T0.CardCode = $[$4.0.0]
    The thing is its working fine in the invoice sales document but not purchase invoice when it should be the same, in has the little formatted search icon in sales but not purchase, what might be causing this?
    Edited by: Leonardo E. Martinez on Sep 2, 2011 4:48 PM

    Hi,
    An FMS will not be available for other form automatically. You need to assign the the same FMS to purchase invoice UDF as well.
    Thanks,
    Gordon

  • Wireless keyboard mapping is not same as printed on Leopard and MacMini

    Hi ...
    I bought MacMini and Wireless Keyboard.
    when I type, the character that shows are not same like it`s printed
    This is what I type+
    Keyboard Mapping
    ~!”#$%&’()0=~
    `1234567890-^
    QWERTYUIOP`{}
    qwertyuiop@[]
    ASDFGHJKL+*
    Asdfghjkl;:
    ZXCVBNM<>?
    zxcvbnm,./
    If you have a Mac Keyboard, what ever it is, it will show different character as I type above, mostly on the special character.
    Can someone help me on this?
    Thank you and regads,
    Faizal A.-

    Hi Tom,
    Thanks for identifying the issue.
    I am trying to follow that article, here is the result:
    /System/Library/CoreServices/KeyboardSetupAssistant.app/Contents/MacOS/KeyboardS etupAssistant ; exit;
    2012-02-07 07:22:42.702 KeyboardSetupAssistant[491:507] No unknown keyboard connected - terminating
    logout
    [Process completed]

  • Compressor 4 crashes on opening keep getting this warning: The application "Compressor" unexpectedly quit while trying to restore its windows.  Do you want to try to restore its windows again? Tried Restoring windows. It crashes again.  Tried not = Same r

    Compressor 4 crashes on opening keep getting this warning: The application “Compressor” unexpectedly quit while trying to restore its windows.  Do you want to try to restore its windows again? Tried Restoring windows. It crashes again.  Tried not = Same result.  This is the first time I've actually used the app although I purchased it back in April (I think).  I had my first longform project completed in FCPX and tried sending it to Compressor 4 and got this result over and over again. 

    Steve,
    Sorry to say I've not had any success in getting Compressor 4 to work.  I've tried every suggestion mentioned earlier on this topic to no avail.  Compressor 4 is dead in the water.  On the last two projects I had to go back to Compressor 3.x.xx to complete the projects.  The only hint that I have of wha may have happened concerns something I did early on.  When I bought this computer I decided to replace the hard drive with a larger one.  Since I already had my software up and working on the drive that came with the computer I decided to clone everything to the new larger drive.  As I recall, Compressor 4 worked on the original drive but it doesn't work on this cloned version.  So maybe there is a relationship there.  I haven't had a chance yet to reinstall my old drive and see if C 4 works on it.  If it does work then I know the source of the problem but not how to fix it on the new drive.  Did you do anything like cloning your drive recently too?  It's just a thought and may not lead anywhere but later this week when I catch a break I'll give the old drive a try and will post my results.
    Thanks,
    Peter

  • Qty sales & month

    Dear Forums,
    If i want to get this report for This month so far ;
    item code, item description, DocDate,stock on hand, Qty sales, Turn over, Turn over days
    eg . April 20,
    542514 / MILK/ 11-05-09 / 40 / 10 / 2.66666 / 80 / 20 / 30
    542518/ SOAP/ 11-05-09 / 40/ 10 / 2.66666 / 80 / 20 / 30
    can any one show me the query? thanks
    Edited by: rachelhel on Apr 22, 2009 7:48 AM
    Edited by: rachelhel on Apr 22, 2009 10:38 AM

    Hi ,
    Please try this .....
    SET ARITHABORT OFF SET ANSI_WARNINGS OFF
    SELECT T0.ItemCode, T0.Dscription,T1.OnHand, convert(varchar,SUM(T0.BaseQty*T1.NumInSale)) AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,convert (varchar,(t1.onhand/(SUM(T0.BaseQty*T1.NumInSale)/DAY(GetDate())* Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END)))AS 'TURN OVER IN MONTH'
    FROM DBO.INV1 T0 INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
    WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
    GROUP BY T0.ItemCode,T0.Dscription,T1.OnHand
    union
    SELECT T1.ItemCode, T1.itemname,T1.OnHand, '' AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,'No Sales' AS 'TURN OVER IN MONTH'
    FROM DBO.OITM T1
    WHERE T1.ITEMCODE NOT IN (SELECT ISNULL(ITEMCODE,0) FROM INV1)
    GROUP BY T1.ItemCode,T1.itemname,T1.OnHand
    ORDER BY 1

Maybe you are looking for