Summing items based on dates

Hi
I'm having som problems figuring out the following.
I have a table, let's call it Mytable. It contains two columns. Column one is a date, and column two is a number. I would like another table, Displaytable, to show sums for certain timeperiods, i.e for monthly, quarterly etc. So, as far a si can guess I need a "If" or perhaps "Sumif", but I cant quite get it to work. I try to make a cell in Displaytable show the sum of all amounts in column two of Mytable that belong to a certain date (january) in column one of Mytable.
I would really appreciate any help here.

Thomas,
Would this do it?
Since your English is good and my Swedish is non-existant, I'll leave the translation to you.
One more edit. The column references can be simplified as: =SUMIF(Table 4 :: C, 1, Table 4 :: B) and =SUMIF(Table 4 :: C, 1, Table 4 :: B)
Regards,
Jerry
Message was edited by: Jerrold Green1
Message was edited by: Jerrold Green1

Similar Messages

  • List item - Population - Based on Data setup

    Dear All,
    I need to populate the list item based on data defined at the database level.
    Tables Used:
    Table 1 : JBCAI_JOB_COM_ADD_INFO
    Column Name     Pk     Null?     Data Type     Default     
    JBEDC_UID          1     N     NUMBER (22)          
    JBCAI_ADD_INFO_CODE     2     N     VARCHAR2 (2 Char)          
    JBCAI_INFO_CODE_SEQUENCE      3     N     NUMBER (3,1)     1     
    JBCAI_ADD_INFO_TEXT     Y     VARCHAR2 (35 Char)          
    SHIPCOMP_CODE     N     VARCHAR2 (4 Char)     
    Table 2 :CODES
    CODE_TYPE CODE_VALUE DESCRIPTION NEXT_VALUE CODE_FLAG
    MCAR 01 Customs References 01 NULL N
    MCAR 02 Customs References 02 NULL N
    MCAR 03 Value of Commodities NULL N
    MCAR 04 Currency of commodities NULL N
    MCAR 05 Purchase Order Number NULL N
    MCAR 06 Other NULL N
    MCAR 07 Consignee Name NULL N
    MCAR 08 VIN NULL N
    FORMS Section
    =========
    JBCAI_ADD_INFO_CODE are the list items which needs to be populated; JBCAI_ADD_INFO_TEXT(free text) which user can enter any descriptions.
    References - Label of the Block
    JBCAI_ADD_INFO_CODE JBCAI_ADD_INFO_TEXT
    Customs References 01 - Free Text()
    Customs References 02 - Free Text()
    Value of Commodities - Free Text()
    Currency of commodities - Free Text()
    Purchase Order Number - Free Text()
    Other - Free Text()
    Consignee Name - Free Text()
    VIN - Free Text()
    VIN - Free Text()
    Business Rules:
    If JBCAI_ADD_INFO_CODE has the flag as 'N' in CODES table then user can select only one time from the list item.
    If JBCAI_ADD_INFO_CODE has the flag as 'Y' in CODES table then user can do multi-selection from the list item e.g; VIN
    How the records are fetched:
    Value for the list item are been populated from CODES table ; which am doing through the below query.
    In WHEN-NEW-FORM-INSTANCE am using the below code:
    PROCEDURE p_fetch_code_value
    IS
              l_query VARCHAR2(200) ;
              l_rg_name VARCHAR2(40) := 'CODES';
              l_errcode NUMBER;
              l_rg RECORDGROUP;
         BEGIN
              l_query := 'SELECT adcod.description description,adcod.code_flag code_flag FROM codes adcod WHERE adcod.code_type = ''MCAR''                    AND adcod.code_value IN (''01''''02'',''03'',''04'',''05'',''06'',''07'',''08'') ORDER BY code_value';
              l_rg := FIND_GROUP( l_rg_name );
              IF ID_NULL(l_rg) THEN
              l_rg := CREATE_GROUP_FROM_QUERY(l_rg_name, l_query);
              END IF;
              l_errcode := POPULATE_GROUP( l_rg );
              POPULATE_LIST('BLK_CONTROL.JBCAI_ADD_INFO_CODE',l_rg);
    EXCEPTION
    Handled WHEN OTHERS exception
    END p_fetch_code_value;
    Saving of Record:
    List value selection are saved to JBCAI_JOB_COM_ADD_INFO.JBCAI_ADD_INFO_CODE column.
    Free Text is saved to JBCAI_JOB_COM_ADD_INFO.JBCAI_ADD_INFO_TEXT column.
    Doubt:
    When i select the first list item value i.e Customs References 01 and then enter some description i.e free text and moved to the next list item; the value Custom reference 01 should not be visible wheras the other values should have to be visible e.g; Customs Reference 02,Value of Commodities.....
    Please help and let me know how can i acccomplish this task?
    Thanks....
    Regards,
    Sunil.G

    Hi Sarah,
    Thanks for your reply.
    There is no issue in the population of the list item; it is working fine with the query which i have pasted.
    My doubt is:
    There are few places where i have set the code_flag as 'Y' / 'N'.
    For the first time when user selects the list item; all the values should be shown.....
    If user has selected the first list item i.e Customs Reference 01 for which the code_flag is 'N' from a multi-record block; then when he moves to the further lines the previous selection for which the flag is set as 'N' should not be shown(if user has already selected once) e.g; 'Customs Reference 01' should not be shown again if user has made the selection before.
    Plz revert incase more explanations required.
    Thanks...
    Regards,
    Sunil.G
    Edited by: Sunil G on Nov 29, 2009 12:16 AM

  • A/R report u0096 Customer open items based on due date

    Hi all,
    Can anyone tell me if there is a standard report on AR side that gives me invoices due between certain dates, meaning I should be able to select due dates between 11/15/2006 and 11/30/2006 in the selection and the report should get me the customers with invoices that are due between the above dates for a company code.
    Thanks in advance
    Kumar

    Hi Kumar,
    there is no standard report which give you selection citeria to select range of due date. Since due date is calculated based on function module where it calculate Bline date+ terms of payment days.
    other std reports are:
    S_ALR_87012175 Open Items - Customer Due Date Forecast
    S_ALR_87012178 Customer Open Item Analysis by Balance of Overdue Items
    S_ALR_87012168 Due Date Analysis for Open Items
    Hope this helps.
    Please assign points as way to say thanks

  • CAML Query to Sort SharePoint list items based on Modified date

    hi ,
    can we sort sharePoint list items based on 'Modified' column, the sorting should be done up to milliseconds level.
    currently i am using CAML query as below
    <OrderBy><FieldRef Name='Modified' Type='DateTime' IncludeTimeValue='TRUE' Ascending='False'/></OrderBy>but its not considering milliseconds while sorting.
    Thanks and Regards,
    venkatesh.

    Veda, thanks but I'm not really a hardcore C# coder.
    We found more elegant solution was to create a List View which returns all records that should be deleted, based on our own custom deletion criteria, and then create an very simple SSIS Package in Visual Studio using the
    Sharepoint Connectors for SSIS to delete all Sharepoint List Items returned from that List View. The Sharepoint Destination Connector has a delete operation.
    This worked for us and didn't require any coding.

  • Selected page item has no data

    1) After I create the new data model, and start the EP_LOAD_MAIN how can I see the sales history table in the colaborator workbench? I only see the hierarchy of levels ,and in the right of the page, I have the message "Selected page item has no data" and an empty graphic background. Is there something with the Analytical Engine?
    2) There are several errors in the Engine Administrator after i start it:
    08:59:51:234 ERROR INSERT INTO SQL_DEF (COMMENTT, LINE_NO, SQL_ID, SQL_TEXT) VALUES ('Aggri Level 201',1,201,'SELECT min(sales_date) datett, round(NVL (sum(#quantity#),sum(#fore#))')
    08:59:51:234 ERROR - ErrorDescription: ORA-00001: unique constraint (DEMANTRA.SQLD_PK) violated
    In the PL/SQL developer the SQLD_PK doesn't exist

    Hi DCRO,
    1) After I create the new data model, and start the EP_LOAD_MAIN how can I see the sales history table in the colaborator workbench? I only see the hierarchy of levels ,and in the right of the page, I have the message "Selected page item has no data" and an empty graphic background. Is there something with the Analytical Engine?
    I am assuming that before starting EP_LOAD_MAIN, data is present in the staging tables (T_SRC_XXX). So once EP LoAD MAIN completes data should be available in Items, Location and Sales_data tables. Then whenever you try viewing data on the worksheet through the collaborator Workbench (Contains links of the worksheets) based on the aggregation levels(item,location and time) selected in the worksheet definition, the data is displayed on the right side of the worksheet.So in your case, check for the levels and the members under the levels that have been selected in the worksheet. Analytical engine is for generation of forecast (either by Batch / Simulation / Other profiles) and has got nothing to do with the empty graphical background of the worksheet.
    2) There are several errors in the Engine Administrator after i start it:
    08:59:51:234 ERROR INSERT INTO SQL_DEF (COMMENTT, LINE_NO, SQL_ID, SQL_TEXT) VALUES ('Aggri Level 201',1,201,'SELECT min(sales_date) datett, round(NVL (sum(#quantity#),sum(#fore#))')
    08:59:51:234 ERROR - ErrorDescription: ORA-00001: unique constraint (DEMANTRA.SQLD_PK) violated
    In the PL/SQL developer the SQLD_PK doesn't exist
    The error message itself points to some Constraint violation in the procedure. Check the procedures that have errors after the rebuilding of Data model. Recompile them and then try running the Engine Administrator.
    Also, I would suggest you to go through the Oracle Discussion Forums FAQ so that your queries are answered effectively and efficiently.
    Thanks and regards,
    Shekhar

  • FAGLL03 report not filtering G/L line items based on vendor entered in free selection

    Hello SAPians,
    I have a requirement to add Vendor field in the free(dynamic) selection of the standard report FAGLL03 so that G/L line items are displayed(filtered) based on the vendor values given.
    I followed the SAP note 945932 to create the vendor field by adding the ZZLIFNR in the custom include  of the table FLAGFLEXA followed by the configuration of custom fields in SPRO tcode. Post that I tested the report by giving one particular vendor number and came to know that no line items were displayed.
    Upon debugging the program I came to know that , while selecting the data from the Inner join of BSIS and FLAGFLEXA tables, vendor number on FLAGFLEXA forms the part of WHERE clause and eventually no records are selected since all the existing records wont be having vendor number maintained in FLAGFLEXA table.
    However I asked the functional guy to post the new line items under the assumption that it might update ZZLIFNR field in FLAGFLEXA. But our assumption turned out to be wrong. At this point I seek advice from your experience on the following points.
    1) My understanding that failing of inner join condition is the root cause for data being not fetched in the output. Is it correct?
    2) When we add new custom field in FLAGFLEXA(ZZLIFNR in my case), how the data needs to be populated for that particular field from       functional/technical perspective? Does the custom scenarios in SPRO are related to this in anyway?
    3) How do we need to handle the old records existing in the system with respect to the updation of new field(column) added?
    Any inputs in this regard is very much appreciated.
    Thanks & Regards,
    Yaseen

    Hello Dennis,
    thanks for the tip, your assumption is right, it's regarding 0FIGL_V40 in BI 7.0. Could you please be more detailed, which BW 3.x InfoSource do you mean? Or what exactly has to be done?
    The "objects" under this InfoCube are - transformation, datasource (0FI_GL_40) and InfoPackage, that's it. When I check InfoCube Type/Namespace - it is based on Data Transfer Process for DirectAccess, but the checkbox With InfoSource 3.x is not checked..
    Thank you in advance for your answer.
    Regards,
    Peter

  • Sum Fields based on change in another field

    I have data that looks like this
    <Records>
    <VBLEN>123</VBLEN>
    <MATNR>012356</MATNR>
    <ZSPR>1.02</VBLEN>
    </Records>
    <Records>
    <VBLEN>123</VBLEN>
    <MATNR>568954</MATNR>
    <ZSPR>2.05</ZSPR>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>259865</MATNR>
    <ZSPR>5.98</ZSPR>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>359874</MATNR>
    <ZSPR>4.12</ZPSR>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>985698</MATNR>
    <ZSPR>1.06</ZSPR>
    </Records>
    In my output, I have a field on every line that is a total. So My output needs to look like this.
    <Records>
    <VBLEN>123</VBLEN>
    <MATNR>012356<MATNR>
    <ZSPR_TOTAL>3.07</ZSPR_TOTAL>
    </Records>
    <Records>
    <VBELN>123</VBLEN>
    <MATNR>568954</MATNR>
    <ZSPR_TOTAL>3.07<ZSPR_TOTAL>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>259865</MATNR>
    <ZSPR_TOTAL>11.16</ZPSR_TOTAL>
    </Records>
    <VBLEN>856</VBLEN>
    <MATNR>359874</MATNR>
    <ZSPR_TOTAL>11.16</ZSPR_TOTAL>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR985698</MATNR>
    <ZSPR_TOTAL>11.16</ZSPR_TOTAL>
    So I need the sum of ZSPR on each line, but it has to be the sum of ZSPR for each instance of VBLEN.

    Hi Dave,
    If you are using below graphical mapping logic , you have to apply some logic (shown below ) for remaining fields of output.
    For getting Total sum  value based on VBLEN :
    For arranging remaining fields of output xml :
    Note : ZSPR_TOTAL is mentioned as Total.
    Thanks
    Hari.

  • How to show limited items based on a custom field

    Is there a way to show only web app items based on the custom date field? For example, i want the module to only show web app item(s) whose "event date" is "today"....  ?? Help please!

    There has to be a jQuery plugin that can help you do that... just search on Google, Stackoverflow, etc...
    There's one that SimpleFlame wrote via Kiyuko but it's a premium offering:
    http://kiyuco.com/tutorials/create-a-web-app-driven-event-calendar

  • To select from database table based on date range

    hi
    i have a selection screen in which date range is being given
    say eg 23/06/07  to 23/12/08
    based on this date i want to select data from a ztable
    eg i want to select a field amount from table
    and three is a field date range on the table
    for this particular field i want to select all records for amount field  and factual field falling wiithing this date range and sum it
    eg
    based on date range as in selcetion screen
    select amount( field1)  factual ( field2) from ztable into it_ztable where date = ?....
    please give me code for it  and how to sum all values as i will get from the ztable into internal table the two values as fetched from the ztable
    please suggest asap
    regards
    arora

    hi
    i am using
    sELECT field1 field2 FROM Ztable  INto it_matu
                       where DATE GE sl_dat-low    
                        AND  DATE LE sl_dat-high.   
    i am getting data in internal table but
    say i have twelve records now i want to sum it the both the columns into and use that sum final amount to display
    let me know how to use sume in the intrranal tabl do i need to use control statement
    how to use the sum for two columns and take into a serperate variable to display
    regards
    aRora

  • [svn:fx-trunk] 4982: Moving DataGroup from item based lookup to an index based lookup.

    Revision: 4982
    Author: [email protected]
    Date: 2009-02-16 23:31:05 -0800 (Mon, 16 Feb 2009)
    Log Message:
    Moving DataGroup from item based lookup to an index based lookup. Also, we now cleanup old item renderers when the dataProvider changes. This solves some memory leak problems.
    Because of this, we should now be able to deal with duplicate items again.
    We still need to work on data collection changes in the virtual layout case.
    QE Notes: Please add the tests for dup items back in
    Doc Notes: -
    Bugs: SDK-19245, SDK-18043
    Reviewer: Hans
    tests: checkintests, DataGroup and FxList mustella tests (some new ones failed, but are really due to SDK-19287, and these tests should be excluded to that bug now)
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19245
    http://bugs.adobe.com/jira/browse/SDK-18043
    http://bugs.adobe.com/jira/browse/SDK-19287
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as

    GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
    cancel).  I only found this out when recreating your workflow on a similar, but much more complex list set.  
    To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace.  I configured it as "Copy from
    Variable: Countries, starting at
    1 (Output to Variable: Countries), which takes care of this issue in those few cases.
    Otherwise, WOW!  AWESOME JOB!  Thanks!  :)

  • Calculation based on date key figures in BEx

    Hi Friends,
    Hi Friends,
    I need to creat report for sales order data, which involved the calculation based on dates.
    In my cune iam having the data at the granual level with the dates as key figures. the calculation that i need to do is VTW = Actual PGI date - Customer want date.
    1) whn i run the report at the granual level my VTW is working correctly. No issues.
    2) when i run the report at higher levels the date fields are updated with X, as the system is unable to aggrigate the dates. The dates are at the material level in  a sales order. I need to show the VTW at the sales order level (each one of the two dates are same for all the materials). So, when i run the report with out mataril at the sales order level...i wanto sea the bothe date fields in a single line and also the VTW calculated as the different between throse two dates.
    3) Once we get the VTW correctly at the sales orde level. if i drill down the report for material, i want to sea both the dates in every record againest the matarial, but the VTW only aginest the first record...that is againest the sales order. I dont waht the VTW value repeated/duplicated for all the records againest the sales order,as VTW makes sence only at the Sales Order level.
    Please suggest me hwo i can achive the resulsts by meeting both Point 2 and 3.
    Thanks for ur help...in advance.
    Thanks,
    Renu

    Hi..
    I have the data from the extractore and in the cube as below.
    SALES ORDER    ITEM                MATERIAL            DATE1                         DATE2
    101                        Item1               Mat1              01/01/2010                15/01/2010
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                       Item3                Mat3             01/01/2010                15/01/2010
    I need the reports as below...
    Report1:
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                        01/01/2010                15/01/2010                14
    currently iam getting this Report1 output as below...
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                             X                                   X                           42
    Report2: Out put required as below
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                   I     tem3                Mat3             01/01/2010                15/01/2010
    currently iam getting this Report2 output as below...
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010               14
    101                   I     tem3                Mat3             01/01/2010                15/01/2010               14
    As VTW is need to be measued at the sales order level and we always have the DATE1 & DATE2 as same for all the itesm, it should be shon as only 14 in the first record. It mean once iget the required output from Report one in a single line with VTW as 14, it should not repeat with every line , when i dril down the report for Items or materials.
    Even if i can generate oly report2 as required in a single sheet ...that will be enough.
    Plas kindly provide some solution as how we can achieve this,
    Thanks,
    Renu

  • Selecting material based on date

    Hello Experts,
    I have requirement where i want to give material and date.
    i have to select materia, condition record number based on date.
    In database table field is stored like material , validity from date and validity to date.
    Same material number is there but validity date and condtion record number is different.
    Matno        from date                 to date                      Condition record no
    1234       01.01.2009                31.12.2009                       23456
    1234       01.01.2008                31.12.2008                       12367
    if user enter date 12.09.2009 it should fetch me first record. ( because date is between 01.01.2009 to 31.12.2009)
    if user enter date 20.08.2008 it should fetch me first record. ( because date is between 01.01.2008 to 31.12.2008)
    field for input date is fkdate.
    So how i have to query in select statement to get this requirement.
    Thanks in advance.
    Best regards,
    Sai

    select * "or the fields you need
           from abcd
            into table itab
            where matnr in s_matnr "if you have it in sel screen or remove it..
                 and dat_fr GE p_fkdat
                 and dat_to LE p_fkdat.
    but if the dates are not keys...
    better not use them in select...
    delete the unnecessary items after the select using DELETE ITAB where...

  • Sub-tempalte based on data source

    I've followed this blog;
    http://www.adivaconsulting.com/adiva-blog/item/36-working-with-rtf-sub-templates.html
    The AC_Heard or AC_Footer is not based on any data source, sub-template can be based on a data source?
    I want to pull data from database and show it on subtempalte based on parameters?
    ex: My subtemplate data query like select first_name, sal from emp where dept_no=:deptno
    the parameter deptno I will pass from main template to subtemplate.
    Can we do like this? plase share steps

    plz close thread Re: How to call a rtf template from another rtf template by passing a value
    you have answer by support communities
    Sub-tempalte based on data source also was answered by support communities
    so no more ideas you can't get here
    you must understand architecture of bip before all

  • COPA Realignments for line item based reports

    Hi Guru
    I built two CO-PA  line item based reports in our environment. Now , there are some organizational changes in our environment and Now I have re-derive a characteristic from customer master data. Does those changes reflect in my line item based reports, If i run Re-Alignments (KEND)?
    Thanks in advance

    Line item reports (defined w/KE91) will reflect the realignment.  Line item display (KE24/KE25) will give you the choice of reading the original posting or the realigned data.

  • Essbase Studio 11.1.2.1 - restrict/filter based on date

    Hi - I am trying to filter hierarchies/data based on date. For example, I am trying to use a user defined table below which runs in TOAD but not in Studio due to the TO_DATE and TO_CHAR functions. Can anyone help so this query runs in Essbase Studio?
    SELECT a.business_unit, a.operating_unit, a.fund_code, SUM (a.COST),
    c.descr, TO_CHAR (c.acquisition_dt, 'YYYY-MM-DD'), b.begin_depr_fy,
    a.CATEGORY, d.ACCOUNT, c.profile_id, e.descr, a.asset_id,
    a.project_id, f.project_type, e.setid, a.business_unit || '-' || a.project_id as DrillProjectID
    FROM ps_cost a, ps_book b, ps_asset c, ps_dist_tmplln_tbl d, (ps_profile_tbl e LEFT OUTER JOIN ps_project_fs f
    ON e.setid = f.setid AND e.profile_id = f.profile_id)
    WHERE a.business_unit = b.business_unit
    AND a.asset_id = b.asset_id
    AND a.book = b.book
    AND b.business_unit = c.business_unit
    AND b.asset_id = c.asset_id
    AND a.book = 'GAAP'
    AND d.CATEGORY = a.CATEGORY
    AND d.setid = 'TWC01'
    AND d.trans_type = 'ADD'
    AND d.distribution_type = 'FA'
    AND a.accounting_dt <= TO_DATE ('2011-12-31', 'YYYY-MM-DD')
    AND e.profile_id = c.profile_id
    AND d.ACCOUNT BETWEEN '16000' AND '16999'
    AND a.fund_code = '19'
    AND d.ACCOUNT = '16320'
    AND a.CATEGORY = 'PLANT'
    AND a.business_unit = '19510'
    AND a.fund_code = '19'
    AND c.acquisition_dt <= TO_DATE ('2011-11-30', 'YYYY-MM-DD')
    GROUP BY a.business_unit,
    a.operating_unit,
    a.fund_code,
    c.descr,
    TO_CHAR (c.acquisition_dt, 'YYYY-MM-DD'),
    b.begin_depr_fy,
    a.CATEGORY,
    d.ACCOUNT,
    c.profile_id,
    e.descr,
    a.asset_id,
    a.project_id,
    f.project_type,
    c.business_unit,
    c.asset_id,
    e.setid,
    e.profile_id
    HAVING SUM (a.COST) <> 0 AND SUM (a.COST) <> 0
    ORDER BY 1, 2;

    Hi - I am trying to filter hierarchies/data based on date. For example, I am trying to use a user defined table below which runs in TOAD but not in Studio due to the TO_DATE and TO_CHAR functions. Can anyone help so this query runs in Essbase Studio?
    SELECT a.business_unit, a.operating_unit, a.fund_code, SUM (a.COST),
    c.descr, TO_CHAR (c.acquisition_dt, 'YYYY-MM-DD'), b.begin_depr_fy,
    a.CATEGORY, d.ACCOUNT, c.profile_id, e.descr, a.asset_id,
    a.project_id, f.project_type, e.setid, a.business_unit || '-' || a.project_id as DrillProjectID
    FROM ps_cost a, ps_book b, ps_asset c, ps_dist_tmplln_tbl d, (ps_profile_tbl e LEFT OUTER JOIN ps_project_fs f
    ON e.setid = f.setid AND e.profile_id = f.profile_id)
    WHERE a.business_unit = b.business_unit
    AND a.asset_id = b.asset_id
    AND a.book = b.book
    AND b.business_unit = c.business_unit
    AND b.asset_id = c.asset_id
    AND a.book = 'GAAP'
    AND d.CATEGORY = a.CATEGORY
    AND d.setid = 'TWC01'
    AND d.trans_type = 'ADD'
    AND d.distribution_type = 'FA'
    AND a.accounting_dt <= TO_DATE ('2011-12-31', 'YYYY-MM-DD')
    AND e.profile_id = c.profile_id
    AND d.ACCOUNT BETWEEN '16000' AND '16999'
    AND a.fund_code = '19'
    AND d.ACCOUNT = '16320'
    AND a.CATEGORY = 'PLANT'
    AND a.business_unit = '19510'
    AND a.fund_code = '19'
    AND c.acquisition_dt <= TO_DATE ('2011-11-30', 'YYYY-MM-DD')
    GROUP BY a.business_unit,
    a.operating_unit,
    a.fund_code,
    c.descr,
    TO_CHAR (c.acquisition_dt, 'YYYY-MM-DD'),
    b.begin_depr_fy,
    a.CATEGORY,
    d.ACCOUNT,
    c.profile_id,
    e.descr,
    a.asset_id,
    a.project_id,
    f.project_type,
    c.business_unit,
    c.asset_id,
    e.setid,
    e.profile_id
    HAVING SUM (a.COST) <> 0 AND SUM (a.COST) <> 0
    ORDER BY 1, 2;

Maybe you are looking for

  • PAR Example from SAP site is not working

    Hi Experts, I downloaded a par file com.sap.netweaver.bc.rf.explorer.par from the following URL: <a href="https://media.sdn.sap.com/html/submitted_docs/nw_kmc/examples/com.sap.netweaver.bc.rf.explorer.par">https://media.sdn.sap.com/html/submitted_doc

  • New iPad device not recognised

    Bought new iPad for son's birthday. Device not showing in iTunes and not charging. Tried several computers and another cable. Tried troubleshooting and deed dive in iPad troubleshooting manual. What is going on? I think this is faulty and just came o

  • Redo Log Buffer sizing problem

    My pc has 512mb RAM and i was trying to increase the redo log buffer size. Initially the log_buffer size was 2899456 bytes. So i tried to increase it to 3099456 by issuing the command: ALTER SYSTEM SET LOG_BUFFER=3099456 SCOPE=SPFILE; And i issued SH

  • CMS (Content Management System)

    Hi, Firstly and quickly some background. I have a web design and development company and am currently bringing my company into the 21st century by revamping my site and my method of developing sites from a fixed width layout to a responsive layout us

  • Video format issue

    I'm shooting video on my dslr camera and I'm trying to import the video to my iPad but it's the wrong format I guess... How do I convert the video to an iPad friendly format?