Sales total in a given time by account.

I wrote a query to show the invoices total amounts by customer and some accounts are consolidated by a head account. I get alot of nulls for names and also I'll like if I could combine the credit table as well.
SELECT CASE T0.[FatherCard]
  WHEN NULL THEN T1.[CardName]
WHEN '' THEN  T1.[CardName]
ELSE T0.[FatherCard]
  END AS 'Name', SUM(T1.[DocTotal]) AS 'INVOICE TOTAL', SUM( T1.[VatSum]) AS 'TAX TOTAL', SUM( T1.[DocTotal] - T1.[VatSum]) AS 'PRE TAX TOTAL'
FROM OCRD T0, OINV T1
WHERE T1.[DocDate] >=[%0] AND  T1.[DocDate] <=[%1] AND T0.CardCode = T1.CardCode
GROUP BY T0.[CardName], T0.[FatherCard], T1.[CardName])
GROUP BY 'NAME'

Hi,
First check what is the result of this:
SELECT CASE T0.FatherCard
WHEN NULL THEN T1.CardName
WHEN '' THEN T1.CardName
ELSE T0.FatherCard
END AS 'Name', SUM(T1.DocTotal) AS 'INVOICE TOTAL', SUM( T1.VatSum) AS 'TAX TOTAL', SUM( T1.DocTotal - T1.VatSum) AS 'PRE TAX TOTAL'
FROM OCRD T0
INNER JOIN OINV T1 ON T0.CardCode = T1.CardCode
WHERE T1.DocDate >=[%0\] AND T1.DocDate <=[%1\]
GROUP BY T0.FatherCard, T1.CardName
Thanks,
Gordon

Similar Messages

  • Total of the number of stock lines held in storage at any given time

    Hi Experts,
      Is there a transaction we could use that will quickly give us a total of the number of stock lines held in storage at any given time? can anyone please advise
      Many Thanks

    Solved.
    SE16 and table LQUA or LAGP. LAGP is more logical but takes longer to generate the result.
    Regards
    Simon

  • So I have been using my iPad for a few months now and I recently noticed that the time display next to the playlist name in the music  app that is supposed to display the total song count and time of a playlist is way off. I have a 25 song playlist that 2

    So I have been using my iPad for a few months now and I recently noticed that the time display next to the playlist name in the music  app that is supposed to display the total song count and time of a playlist is way off. I have a 25 song playlist that is around 2 hours on my computer appears as 2003 minutes on my iPad.  It's a smart playlist limited to 25 songs if that makes any difference. Is this happening to anyone else? Any help would be appreciated!

    Greetings,
    First make an iCal backup, File > Export > Archive.
    Remove the following to the trash and restart your computer:
    Home > Library > Caches
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    __NOTE: Removing these files will remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    Once the computer is back up and running open iCal and test.
    Hope that helps.

  • Time Machine Account Settings Question in Airport Utility V6

    Hi, I recently upgraded Airport Utility to V6 in which they now have a settings for the builtin Time Capsule to set Secure Shared Disks.  The settings are:
         1)  With Accounts,
         2)  With a disk password,
         3)  With a device password.
    When I setup my Time Capsule I used  "disk password".  When I upgraded the Airport Utility to Ver 6, I switched from "disk password" to "with Accounts" for the Time Capsule backup.  The trouble was after the switch, all prevous backup on the TC were no longer available.  So I changed the settings from "with Accounts" back to "disk password".  All previous backups were not visible anymore from within "Enter Time Machine" space.  Fortunately when I changed it back to "with Accounts", I can access the recent backups but not those prior to the switch.  Can anyone help me so I can have a better understanding of how this settings work and its effect on the backups.  I thought that was only a security issue which should not affect the backups.  Thanks in advance.

    Take a look at this: http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh21241.html
    For improved security when backing up to a Time Capsule, the Time Capsule administrator can enable account mode and create individual accounts on the Time Capsule. Each Time Capsule account has its own network volume and password. If you back up to an individual account volume on a Time Capsule, other users can’t access your backups unless they know the password for that account.                                  Note: A Time Capsule set up with individual accounts contains a shared volume. Be sure you select your ownindividual volume as your backup disk, using the account name and instructions given to you by the Time Capsule administrator. The shared volume is intended only for information that all users canaccess.
    With account access, each user gets his/her own volume, I assume, on which the Time Machine backups are stored.
    My Time Capsule isn't set up yet, but I was playing with those settings. I *suspect* what happened when you switched from disk to account access is that there was sometime of (virtual?) repartiting taking place; for you went from one large partition (disk) to separate partitions (for each user). If that is right, big *if*, the original backups *may* be gone -- although there may be a way to recover them.
    Were I you, and if those backups matter, I would stop using the Time Capsule for backups -- turn off Time Machine on all clients -- until you get it sorted out. You risk overwriting the original backups.

  • How to get all open sales orders of a customer and also account group

    I want to know the logic to find all open sales orders of a customer and also account group

    Hi,
    You can check the status weather a Sales order is Open or not by checking its billing status form the following:
    Check table VBUK and VBUP for delivery status "LFSTK" and billing status "FKSTK".
    Rward points if helpful answer.
    Ashven

  • Sales orders in TDMS company/time based reduction  are outside the scope

    Guys,
    I have had some issues with TDMS wheras it didn't handle company codes without plants very well. That was fixed by SAP. But I have another problem now. If I do a company code and time based reduction, It doesn't seem to affect my sales orders in VBAK/VBUK as I would have expected. I was hoping it would only copy sales orders across that have a plant which is assigned to a company code that was specified in the company code based reduction scenario. That doesn't seem to be the case.
    VBAK is now about one third of the size of the original table (number of records). But I see no logic behind the reduction. I can clearly see plenty of sales documents that have a time stamp way back from what I specified in my copy procedure and I can see others that have plant entries that should have been excluded from the copy as they do belong to different company codes than the ones I specified.
    I was under the impression that TDMS would sort out the correct sales orders for me but somehow that doesn't seem to be happening. I have to investigate further as to what exactly it did bring across but just by looking at what's in the target system I can see plenty of "wrong" entries in there either with a date outside the scope or with a plant outside the scope.
    I can also see that at least the first 10'000 entries in VBAK in the target system have a valid from and to date of 00.00.0000 which could explain why the time based reduction didn't work?
    Did you have similar experiences with your copies? Do I have to do a more detailed reduction such as specifying tables/fields and values?
    Thanks for any suggestions
    Stefan
    Edited by: Stefan Sinzig on Oct 3, 2011 4:57 AM

    The reduction itself is not based on the date when the order was created but the logic enhances it to invoices and offers, basically the complete update process.
    If you see data that definitely shouldn't be there I'd open an OSS call and let the support check what's wrong.
    Markus

  • Number of connections made to database at a given time

    Hello,
    I would like to know the number the history and current number of connections made to the database via oracle application server at a given time. I see Active Connection when I click on HTTP Server, but I am not sure what that means. Does that mean the number of users on the site or does it mean the number of connections made to the database?
    Also is there a way to find out the history of connections? Also is there a log file that all this information is recorded into?
    Thanks for your help in advance.

    Hi
    Active Connections in HTTP Server -> Number of users connected to your site (active + inactive)
    You can get information about database connections in v$session, or , in Enterprise manager -> OC4J container -> Home
    If you are using datasources at application level you can get information about pooling in
    Entreprise Manager -> 0C4J Container -> Application (select application ) -> DataSources
    If you have datasources at OC4J container level you can get info in Entreprise Manager -> OC4J container -> Administration -> datasources
    Best Regards
    Rui Madaleno

  • Query for Old Data that does not match New Data within a given time period

    Hello all,
    One of the reports I need to create is for all associates who went from one department to another within a given time period. The way I ran this report in Reportsmith (pulling from our old system) was to compare the dept field from the beginning date to the dept field at the end date and it would give me those associate's that had moved. I had to do it this way b/c dept changes can happen using several different types of actions (supv change, promotion, etc.), none of them exclusive to just dept changes. We are now using Oracle HRMS and I need to create this same report with this system using SQL.
    Does anyone know how to compare data between two different dates and pull the ones that don't match? Your help will be GREATLY appreciated!
    Warm Regards,
    Yasmin E. Alberto
    HRIS Analyst
    [email protected]

    Hi, Yasmin,
    In the sample data you posted, nobody changed departments between May 1 and May 11. In fact, there were no assignments of any kind between January 16 and May 17, so I wouldn't expect any output for that period.
    A person (or rather, a duck) did change deptartments on May 20, so if you change the upper limit of the date range to
    AND    ASG_LAST_UPDATE_DATE < TO_DATE ('05/21/09', 'MM/DD/RR')you should see her.
    You've probably noticed that this site likes to compress white-space.
    To post formatted text (such as table results or indented code) type these 6 characters:
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • BPM collects messages, and should terminate at a given time

    Hi,
    i'm trying to create a scenario where a business process collects messages. At a certain time each day this process must transform this messages into one message and terminate.
    (I used the BpmPatternCollectTime process as a template)
    My problem is:
    how to tell the deadline branch it should rais an exception every day at a given time, lets say 10pm?
    I already tried to configure this branch with "Reference Date/Time=Expression" and set date and time to 2008-10-04 14:30:00. But the process won't stop at this time.
    Any ideas?
    Thanks in advance,
    ms

    Hi,
    I am not sure if you could use this pattern for stopping at a given time?
    Maybe you could configure a report that sends a message every day at the given time to the PI and your process stops with receiving this message.
    Regards
    Patrick

  • Burning a backup dvd at a given time ?

    I'm a newbie with Automator and AppleScript. Here's what I'd like to be able to do:
    - I have a Burn Folder loaded with files;
    - I want to start the burning at a given time I can choose.
    Do I have to use Automator, or an AppleScript ?
    Where do I start ?
    Any help greatly appreciated because I need a working solution for monday !
    In advance, many thanks !
    Jean-Luc

    You can use Automator...
    2 actions:
    Get Specified Finder Items (select your Burn folder)
    Burn a Disc
    Save As Plugin for iCal Alarm
    In iCal, schedule the event that's created for the alarm to go off at your designated time and set it to repeat.

  • Searching for Sales Order for the given Customer PO Number Pattern in BAPI

    Hi,
         I have developed a BAPI which retrieves all the Sales Orders for a given Customer (Sold-To). The Following are the Input Parameters given in the Function Module (RFC).
    Customer Number (Mandatory)
    From Date (Optional)
    To Date (Optional)
    Sales Order Number(Optional)
    Customer PO Number(Optional)
    Now, when the Customer PO Number is populated, it will come as a Pattern, say 9ab* and I need to retrieve all the Sales Orders with PO Number starting with 9ab.
    When I am trying to retrieve, it is giving different set of output based on the Case specified in the Customer PO Number Pattern. Lets say, if I give 9ab, I get 200 Records but if I give 9AB, I get only 5 to 6 Records.
    As I have understood from the Standard Transaction VA03, it has a Search Help VMVAA which retrieves all the Sales Orders for the given PO Number pattern irrespective of the Case, that is Lower Case, Upper Case or Mix of Upper and Lower Case.
    I can see the Code in the Search Help Exit but couldn't find useful piece of code which I can implement in my BAPI to simulate the same.
    Can somebody help me on this?
    Thanks,
    Venkat.

    Hi Sudhir,
             I think you did not understand what my problem is. What I mean to say is, for Customer X, the PO Number could be 9abc and for Customer Y, the PO Number Could be 9ABC.
           So, according to your logic, if I translate it to Upper Case, it will give the Sales Order details of Customer Y to Customer X.
          And more over, SAP stores the PO Number as it is entered in the Sales Order Screen (VA01).
        What if the Customer PO Number for Customer X is 9aBcDeFgH? and the PO Number for Customer Y is 9AbCdEf?
       Hope you've understood my question.
    Thanks,
    Venkat.

  • Firefox has crashed for me about 5 times in a 20 min span. A total of about 10 times today. What's wrong with it? Is it my laptop

    Firefox has crashed for me about 5 times in a 20 min span. A total of about 10 times today. What's wrong with it? Is it my laptop? Sometimes as soon as I open it, it just crashes.

    I started my work in safe mode still facing the same problem.
    bp-f5ee8a8f-e696-4465-82ba-7f1ac2130313 3/13/20131:13 PM
    bp-2f8bb393-9de8-41c9-843c-a46c62130313 3/13/20131:09 PM
    bp-a930e700-04c1-4d6e-985a-5d7482130313 3/13/20131:02 PM

  • Is it possilbe to totally disable the use of Microsoft Accounts in Windows 8.x ?

    The existence and need of "Microsoft Accounts" in Windows 8.x causes many issues for corporate IT management.
    1) To access Windows 8.x Mail App, Calendar App, etc, OneDrive, Skype, to upgrade from Windows 8.0 to Windows 8.1, and the Windows Store requires a Microsoft Account.
    2) Not all users have or will want to have their own personal Microsoft Account
    3) It is possible for the corporate IT department to create Microsoft Accounts for each of the company Users, but it is an extra burden and difficult to manage these accounts.
    Potentially the simplest solution is to be able to totally disable the use of Microsoft Accounts in Windows 8.x, is this possible?

    Hello,
    You have the choice of uninstalling the metro apps ou use the GPO to block the use of Microsoft account.
    Please see the followings links:
    Uninstall metro apps:
    http://www.deploiementwindows.com/supprimer-les-applications-dans-windows-8-1/
    GPO: Block Microsoft accounts
    http://technet.microsoft.com/en-us/library/jj966262%28v=ws.10%29.aspx
    http://4sysops.com/archives/control-windows-store-access-with-group-policy/
    regards,
    - Yannick Plavonil

  • Playing a sound in a given frequency and it paly at given time

    Hi,
    Iam pradeep i had a problem to produce sound at given frequency and it play at given time.
    Please help me to do that program.
    i tried using sound api

    See your other thread, same topic, thanks.

  • Use of MS Project Management 2010 to Manage Multiple projects over a given time period

    Is there some information (article/s) I can research about using MS Project Management 2010 for managing multiple projects over a given time period? I'm being asked by a potential client to take a job as a Program Manager to manage five projects all
    at once. Each of the projects has it's own MS Project Management software, project leader, and project team. An overall project plan has to be put together to manage this large project. There are some dependencies with these projects inorder to complete
    on a specific date.
    Thanks

    SSCDML --
    In order to manage this program of five projects using Microsoft Project 2010, I would recommend you do the following:
    Create a shared resource pool file containing the resources in all five projects.
    Connect each of the five projects as sharing files with the shared resource pool file to share the resources.
    Create a master project for the program containing each of the five projects as subprojects.
    In the master project, set cross-project links as needed to show dependencies between projects.
    Hope this helps.
    Dale A. Howard [MVP]

Maybe you are looking for