Equipment Total Count

Hi,
We are using SAP BI 7.0
The requirement is to count the "TOTAL number of EQUIPMENTS" in a plant with reference to "EQUIPMENT TYPE" to report the MTBF against each equipment type.
I have created a CKF, created a formula variable and using the replacement path concept to count the number of equipments in my BEX Query.
The system is calculating the count of equipments which are part of the report.
Example:
Equipment type No. of equipment
Control Valve 06
Pump 12
But my requirement is to count all the equipments from the master data .
Example:
Equipment type No. of equipment
Control Valve 600
Pump 1200
What is the way forward to achieve this.
Please help me.
Thanks & Regards,
Raj

Hi AL and BIll,
Thanks for the help. I tried the soultion proposed by you.
It counts the number of equipments which is in the report result.
But what I am looking is the entire count of Equipments from master data and not the count from the report result.
Thanks,
Raj

Similar Messages

  • Total count of open invoices

    Hi,
    I want to get the total count of open invoices and paid invoices and total amount for a give list of vendors between a date range. Could anyone tell me what tables I should use to get the data?
    Thanks

    Hi,
    two vendor tables BSIK (for open items) and BSAK (for vendor cleared items) will serve the purpose for using them in you program.
    regards,
    chaitanya

  • How to find total count of records in a cursor

    Aassume below is the cursor i defined
    cursor c1 is select * from emp;
    now, i want to find the total count of records in this cursor using an existing function etc., using one line statement.
    FYI: c1%rowcount is always giving 0, so i cant rely on this.
    Any thoughts, please share.
    Thanks in advance.

    I am just showing this to show how to get the rowcount along with the cursor, if the program has so much gap of between verifying the count(*) and opening the cursor.
    Justin actually covered this, he said, oracle has to spend some resources to build this functionality. As it is not most often required, it does not makes much sence to see it as a built-in feature. However, if we must see the rowcount when we open the cursor, here is a way, but it is little bit expensive.
    SQL> create table emp_crap as select * from emp where 1 = 2;
    Table created.
    SQL> declare
      2   v_cnt     number := 0;
      3   zero_rows         exception;
      4  begin
      5    for rec in (select * from (select rownum rn, e.ename from emp_crap e) order by 1 desc)
      6     loop
      7        if v_cnt = 0 then
      8           v_cnt := rec.rn;
      9        end if;
    10     end loop;
    11     if v_cnt = 0 then
    12        raise zero_rows;
    13     end if;
    14   exception
    15    when zero_rows then
    16      dbms_output.put_line('No rows');
    17   end;
    18  /
    No rows
    PL/SQL procedure successfully completed.
    -- Now, let us use the table, which has the data
    SQL> declare
      2   v_cnt     number := 0;
      3   zero_rows         exception;
      4  begin
      5    for rec in (select * from
      6          (select rownum rn, e.ename from emp e)
      7          order by 1 desc)
      8     loop
      9        if v_cnt = 0 then
    10           v_cnt := rec.rn;
    11           dbms_output.put_line(v_cnt);
    12        end if;
    13     end loop;
    14     if v_cnt = 0 then
    15        raise zero_rows;
    16     end if;
    17   exception
    18    when zero_rows then
    19      dbms_output.put_line('No rows');
    20   end;
    21  /
    14
    PL/SQL procedure successfully completed.Thx,
    Sri

  • Total count to be displayed in subtotal ALV(GRID Display)

    Hello ,
    I want to display total count in subtotal.
                                 720 Mr JORGE 522,06
                                 720 Mr JORGE 566,23
                                 720 Mr JORGE 100,33
                                 720 Mr JORGE 123,33
                                 720 Mr JORGE 332,22     
    subtotal ->            720                  1644.2  Count 5
                                 888 Ms Mariam 100,00
    subtotal ->            888                    100,00 Count 1
    Is this possible?  Plz dont post same answers how to display subtotal. I am able to display subtotal , only  issue is to display  with count.
    Edited by: Vimalnair on Aug 19, 2009 9:37 AM

    Hi,
    You cannot have subtotal for particular number of rows of ALV,
    but if you want to get the total number of rows of the ALV data display
    you can describe your final internal table from which the data is
    getting displayed in ALV output and get it displayed in the header
    or footer area of the ALV output.
    For Eg:
    DATA V_LINES TYPE I.
    DESCRIBE TABLE IT_FINAL LINES V_LINES.
    DATA: it_header TYPE slis_t_listheader,
          wa_header TYPE slis_listheader.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *    I_INTERFACE_CHECK                 = ' '
    *    I_BYPASSING_BUFFER                = ' '
    *    I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = sy-repid
          i_callback_pf_status_set          = 'PF_STATUS'
          i_callback_user_command           = 'COMM'
          i_callback_top_of_page            = 'TOP'   "This top will call the subroutine namely TOP
    FORM top.
      REFRESH it_header.
      wa_header-typ = 'S'.
      wa_header-key = text-001.
      wa_header-info = sy-repid.
      APPEND wa_header TO it_header.
      CLEAR wa_header.
      wa_header-typ = 'S'.
      wa_header-key = text-002.
      wa_header-info = sy-uname.
      APPEND wa_header TO it_header.
      CLEAR wa_header.
      wa_header-typ = 'S'.
      wa_header-key = text-003.
      wa_header-info = V_LINES.    "This will print the total number of lines in the header
      APPEND wa_header TO it_header.
      CLEAR wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_header
    *   I_LOGO                   =
    *   I_END_OF_LIST_GRID       =
    *   I_ALV_FORM               =
    ENDFORM.                    "TOP
    Hope it helps
    Regards
    Mansi

  • [Forum FAQ] How to calculate the total count of insert rows within a Foreach Loop Container in SSIS?

    Introduction
    We need to loop through all the flat files that have the same structure in a folder and import all the data to a single SQL Server table. How can we obtain the total count of the rows inserted to the destination SQL Server table?
    Solution
    We can use Execute SQL Task or Script Task to aggregate the row count increment for each iteration of the Foreach Loop Container. The following steps are the preparations before we add the Execute SQL Task or Script Task:
    Create a String type variable FilePath, two Int32 type variables InsertRowCnt and TotalRowCnt.
    Drag a Foreach Loop Container to the Control Flow design surface, set the Enumerator to “Foreach File Enumerator”, specify the source folder and the files extension, and set the “Retrieve file name” option to “Fully qualified”.
    On the “Variable Mappings” tab of the container, map the variable FilePath to the collection value.
    Drag a Data Flow Task to the container, in the Data Flow Task, add a Flat File Source, a Row Count Transformation, and an OLE DB Destination, and join them. Create a Flat File Connection Manager to connect to one of the flat files, and then configure the
    Flat File Source as well as the OLE DB Destination adapter. Set the variable for the Row Count Transformation to “User::InsertRowCnt”.
    Open the Property Expressions Editor for the Flat File Connection Manager, and set the expression of “ConnectionString” property to
    “@[User::FilePath]”.
    (I) Execute SQL Task Method:
    In the Control Flow, drag an Execute SQL Task under the Data Flow Task and join them.
    Create one or using any one existing OLE DB Connection Manager for the Execute SQL Task, set the “ResultSet” option to “Single row”, and then set the “SQLStatement” property to:
    DECLARE @InsertRowCnt INT,
                   @TotalRowCnt INT
    SET @InsertRowCnt=?
    SET @TotalRowCnt=?
    SET @TotalRowCnt=@InsertRowCnt+@TotalRowCnt
    SELECT TotalRowCnt=@TotalRowCnt
    On to parameter 1. 
    On the “Result Set” tab of the Execute SQL Task, map result 0 to variable “User::TotalRowCnt”.
    (II) Script Task Method:
    In the Control Flow, drag a Script Task under the Data Flow Task and join them.
    In the Script Task, select variable InsertRowCnt for “ReadOnlyVariables” option, and select variable TotalRowCnt for “ReadWriteVariables”.
    Edit the Main method as follows (C#):
    public void Main()
    // TODO: Add your code here
    int InsertRowCnt = Convert.ToInt32(Dts.Variables["User::InsertRowCnt"].Value.ToString()
    int TotalRowCnt = Convert.ToInt32(Dts.Variables["User::TotalRowCnt"].Value.ToString());
    TotalRowCnt = TotalRowCnt + InsertRowCnt;
    Dts.Variables["User::InsertRowCnt"].Value = TotalRowCnt;
    Dts.TaskResult = (int)ScriptResults.Success;
              Or (VB)
              Public Sub Main()
            ' Add your code here
            Dim InsertRowCnt As Integer =        
            Convert.ToInt32(Dts.Variables("User::InsertRowCnt").Value.ToString())
            Dim TotalRowCnt As Integer =
            Convert.ToInt32(Dts.Variables("User::TotalRowCnt").Value.ToString())
            TotalRowCnt = TotalRowCnt + InsertRowCnt
            Dts.Variables("User::TotalRowCnt").Value = TotalRowCnt
            Dts.TaskResult = ScriptResults.Success
           End Sub
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Microsoft SQL Server 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi ITBobbyP,
    If I understand correctly, you want to load data from multiple sheets in an .xlsx file into a SQL Server table.
    If in this scenario, please refer to the following tips:
    The Foreach Loop container should be configured as shown below:
    Enumerator: Foreach ADO.NET Schema Rowset Enumerator
    Connection String: The OLE DB Connection String for the excel file.
    Schema: Tables.
    In the Variable Mapping, map the variable to Sheet_Name, and change the Index from 0 to 2.
    The connection string for Excel Connection Manager is the original one, we needn’t make any change.
    Change Table Name or View name to the variable Sheet_Name.
    If you want to load data from multiple sheets in multiple .xlsx files into a SQL Server table, please refer to following thread:
    http://stackoverflow.com/questions/7411741/how-to-loop-through-excel-files-and-load-them-into-a-database-using-ssis-package
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Need to get total count of a column in the given query

    Hi,
    I have the following query for which i need a total count of distinct concatenated_address. I am trying to use count(distinct adv.concatenated_address) in the below query but because of the group by it does not give me the expected result.
    I am not reusing the same query, in my program again, to get the count as it would affect the performance. This query takes really long to execute and so is there a way to incorporate the count in this single query itself without having to use it twice.
    SELECT DISTINCT (acv.customer_name||','||
    acv.customer_number||','||
    REPLACE(adv.concatenated_address, ',', ' ')||','||
    adv.postal_code||','||
    rct.interface_header_attribute1||','||
    rct.interface_header_attribute6||','||
    rct.creation_date||','||
    rct.trx_date||','||
    aps.due_date ||','||
    SUM(aps.amount_due_original)||','||
    SUM(aps.amount_due_remaining) ||','||
    rct.printing_count ||','||
    TO_DATE(rct.printing_last_printed)||','||
    TO_DATE(rct.printing_original_date)||',') str
    ,acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ') address
    FROM ar_customers_v acv
    ,ar_addresses_v adv
    ,hz_cust_site_uses hcsu
    ,ra_customer_trx rct
    ,ar_payment_schedules aps
    WHERE adv.customer_id = acv.customer_id
    AND hcsu.cust_acct_site_id = adv.address_id
    AND hcsu.site_use_code = 'BILL_TO'
    AND rct.bill_to_customer_id = acv.customer_id
    AND rct.bill_to_site_use_id = hcsu.site_use_id
    AND aps.customer_trx_id = rct.customer_trx_id
    GROUP BY acv.customer_name
    ,acv.customer_number
    ,adv.concatenated_address
    ,adv.postal_code
    ,rct.interface_header_attribute1
    ,rct.interface_header_attribute6
    ,rct.creation_date
    ,rct.trx_date
    ,aps.due_date
    ,rct.printing_count
    ,TO_DATE(rct.printing_last_printed)
    ,TO_DATE(rct.printing_original_date)
         ,acv.customer_id
    ORDER BY acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ')
    Thank you

    try this please
    SELECT COUNT(str),customer_id
    FROM
    (SELECT DISTINCT (acv.customer_name||','||
    acv.customer_number||','||
    REPLACE(adv.concatenated_address, ',', ' ')||','||
    adv.postal_code||','||
    rct.interface_header_attribute1||','||
    rct.interface_header_attribute6||','||
    rct.creation_date||','||
    RCT.TRX_DATE||','||
    aps.due_date ||','|| 
    SUM(aps.amount_due_original)||','||
    SUM(aps.amount_due_remaining) ||','||
    rct.printing_count ||','||
    TO_DATE(rct.printing_last_printed)||','||
    TO_DATE(rct.printing_original_date)||',') str
    ,acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ') address
    FROM ar_customers_v acv
    ,ar_addresses_v adv
    ,hz_cust_site_uses hcsu
    ,ra_customer_trx rct
    ,ar_payment_schedules aps
    WHERE adv.customer_id = acv.customer_id
    AND hcsu.cust_acct_site_id = adv.address_id
    AND hcsu.site_use_code = 'BILL_TO'
    AND rct.bill_to_customer_id = acv.customer_id
    AND rct.bill_to_site_use_id = hcsu.site_use_id
    AND aps.customer_trx_id = rct.customer_trx_id
    GROUP BY acv.customer_name
    ,acv.customer_number
    ,adv.concatenated_address
    ,adv.postal_code
    ,rct.interface_header_attribute1
    ,rct.interface_header_attribute6
    ,rct.creation_date
    ,rct.trx_date
    ,aps.due_date
    ,rct.printing_count
    ,TO_DATE(rct.printing_last_printed)
    ,TO_DATE(RCT.PRINTING_ORIGINAL_DATE)
    ,ACV.CUSTOMER_ID)

  • I want to display total count on the top of a Column in  business graphics

    Hi All ,
        How can I display total count of the column say for example no. of employees in a series of column chart type in business graphics.
    Any type of help would be much appreciated.
    Thanks
    Uday

    Hi Vishweshwara,
    following is the code i wrote. please check the correctness of the code.
    int seriescount = 0;
    for(int i=0;i<nodesize;i++){
    IGraphDataElement catele = gdNode.createGraphDataElement();
    switch(i){
    case 0:   
       if(wdContext.currentContextElement().getQ().equals("Q1")){
         catele.setCategory("Q1");
           catele.setKRA_Series1(Q1_KRA);
           catele.setApp_Pln_Series2(Q1_AP);
           catele.setRev_App_Series3(Q1_RA);
           catele.setEnd_Rev_Series4(Q1_ERP);
           catele.setApp_Procss_Series5(Q1_AIP);
           catele.setApp_overall_Series6(Q1_AOP);
           seriescount = seriescount+1; break;}
            break;
    case 1:       
       if(wdContext.currentContextElement().getQ().equals("Q2")){
           catele.setCategory("Q2");
           catele.setKRA_Series1(Q2_KRA);
           catele.setApp_Pln_Series2(Q2_AP);
           catele.setRev_App_Series3(Q2_RA);
           catele.setEnd_Rev_Series4(Q2_ERP);
         catele.setApp_Procss_Series5(Q2_AIP);
         catele.setApp_overall_Series6(Q2_AOP);
            seriescount = seriescount+1; break; }
                 break;
    case 2:       
    if(wdContext.currentContextElement().getQ().equals("Q3")){
         catele.setCategory("Q3");
         catele.setKRA_Series1(Q3_KRA);
         catele.setApp_Pln_Series2(Q3_AP);
         catele.setRev_App_Series3(Q3_RA);
         catele.setEnd_Rev_Series4(Q3_ERP);
         catele.setApp_Procss_Series5(Q3_AIP);
         catele.setApp_overall_Series6(Q3_AOP);
         seriescount = seriescount+1; break;}
                 break;
    case 3:   
    if(wdContext.currentContextElement().getQ().equals("Q4")){
         catele.setCategory("Q4");
            catele.setKRA_Series1(Q4_KRA);
         catele.setApp_Pln_Series2(Q4_AP);
         catele.setRev_App_Series3(Q4_RA);
         catele.setEnd_Rev_Series4(Q4_ERP);
         catele.setApp_Procss_Series5(Q4_AIP);
         catele.setApp_overall_Series6(Q4_AOP);
            seriescount = seriescount+1; break;}
                 break;
    case 4: if(wdContext.currentContextElement().getQ().equals("All")){
           wdContext.nodeGraphData().invalidate();
         wdContext.currentContextElement().setGraphVisibility(WDVisibility.NONE);
         wdThis.onActiondropdownaction(wdEvent);
    }default:
    wdContext.nodeGraphData().addElement(catele);
    Thanks
    Uday

  • Total count and count based on column value

    Primaryid  Id     Status
    1            50          1
    2            50          1
    3          50          1
    4            50          3
    5           50          2
    6            50          1
    7            51         1
    8            51         2Im looking for a query which returns total count of rows for id 50 and count of rows with status 1
    something like
    Id    count_total   count_total_status1
    50        6              4
    51        2              1Any suggestion ?

    SQL> select * from t4;
    PID ID STATUS
    1 50 1
    2 50 1
    3 50 1
    4 50 3
    5 50 2
    6 50 1
    7 51 1
    8 51 2
    已选择8行。
    SQL> select distinct id,count(id),sum(decode(status,1,1,0)) from t4 group by id;
    ID COUNT(ID) SUM(DECODE(STATUS,1,1,0))
    51 2 1
    50 6 4

  • Present a total count of rows

    I'd like to present a total count of rows in the bottom of a report.
    how would you recommand me to do it???
    the point is that it must be presented in each report so i thought to add some HTML code to "After Rows" section in the report template. but i need a variable (or some substitution string) which will contain the total count. but how do i define a substitution string?

    as i mentioned i need to present a total count in the buttom of each report in my application. therefore I think it's reasonable to add a code in the report template, which present some variable which count all rows in a report.
    #TOTAL_ROWS# doesn't work if i place it on the template html code, though it works fine if i place it in the report region definition:
    <br><b>Total Number of Results:</b> #TOTAL_ROWS#.</br>
    why can't i use #TOTAL_ROWS# as a template variable? and how can i do that?

  • Help for total count in a month

    Hello everyone,I am reposting this message with the hope that I will get some help. Please help me I have a deadline to meet and maybe getting late in meeting the deadline.
    Sometime back I had posted about the date function. I have that problem solved now my problem is that after finding all records which against each record I need to find the total count for that month if no records than I have to set it to a 0.
    Here is how my program has been written.
    PROCEDURE extract_materials
    IS
    CURSOR xyz
    BEGIN
    FOR xyz1 IN xyz LOOP
    -- once inside the loop for each of the record from
    the cursor I need to find a total count for that record for everymonth in the year.
    All these records will be instered in to a staging table
    Can you please help me out with this. I really appreciate this.
    Thanks in advance

    Take a look at analytic functions-- they should be just what the doctor ordered.
    Justin

  • Mail error message in console log - "deleted count greater than total count

    since installing Gmail IMAP instead of POP I get the following error message in the console log. Any ideas or solutions?
    28/10/2009 14:19:04 Mail[1629] * Assertion failure in -[MessageViewer _countStringForType:isDrafts:omitUnread:totalCount:], /SourceCache/Mail/Mail-1076/MessageViewer.subproj/MessageViewer.m:5078
    deleted count greater than total count
    0 Message 0x00007fff84daf828 -[MFAssertionHandler _handleFailureWithPreamble:description:arguments:] + 137
    1 Message 0x00007fff84daf78d -[MFAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 220
    2 Mail 0x00000001000356da 0x0 + 4295186138
    3 Mail 0x00000001000316ba 0x0 + 4295169722
    4 Foundation 0x00007fff8736f926 nsnotecallback + 167
    5 CoreFoundation 0x00007fff8831fe4a __CFXNotificationPost + 954
    6 CoreFoundation 0x00007fff8830c7f8 _CFXNotificationPostNotification + 200
    7 Mail 0x000000010001dbe1 0x0 + 4295089121
    8 Mail 0x000000010001dc52 0x0 + 4295089234
    9 Foundation 0x00007fff8739b874 postQueueNotifications + 398
    10 CoreFoundation 0x00007fff88337437 __CFRunLoopDoObservers + 519
    11 CoreFoundation 0x00007fff8831305f CFRunLoopRunSpecific + 607
    12 HIToolbox 0x00007fff82f0ec4e RunCurrentEventLoopInMode + 333
    13 HIToolbox 0x00007fff82f0ea53 ReceiveNextEventCommon + 310
    14 HIToolbox 0x00007fff82f0e90c BlockUntilNextEventMatchingListInMode + 59
    15 AppKit 0x00007fff815bd520 _DPSNextEvent + 718
    16 AppKit 0x00007fff815bce89 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155
    17 AppKit 0x00007fff81582a7d -[NSApplication run] + 395
    18 AppKit 0x00007fff8157b798 NSApplicationMain + 364
    19 Mail 0x000000010000167c 0x0 + 4294973052
    20 ??? 0x0000000000000002 0x0 + 2
    )

    Welcome to the forums Oliver... good work at narrowing the problem down so far!
    Try dragging this file to the Desktop and reboot...
    /Users/nnnn/Library/Preferences/com.apple.mail.plist
    Might also pay to clean caches, I use Applejack, but there are many. The log makes me think cache especially.

  • Total Counter in IK11

    Hi,
    I'm trying to get the total data counter in terms of getting this value and compare it with the new one;
    I know that imrg-recdv hold this value, with certain logic that involves fields totex, exchg, but I'm not 100% sure about how to get this value, because a point with just one document entered in the table, has a total different value in recdv, that the one displayed, not in the total data counter, but in the counter value when you enter zero in the difference (when you do this, de counter values fill the counter value with the main total counter value).
    greets.
    Felipe.
    ps: I'm writing the logic in IMRC0004 (user exit)

    Dear Makarand,
    As you said, the field CNTRR in the table IMRG is same as CNTRC.
    In this table IMRG output value for the CNTRR is displaying as 1.8000000000000000E+05 which I check the same in IK13 is 50.
    Is there any conversion routine for this.. i checked in the data element level, but no Routine is mention over there.
    I found one Function Module for this, but not able to get the proper output... FM which may convert this is: FLTP_CHAR_CONVERSION_FROM_SI
    do you know the input parameters of this FM.
    Regards,
    Anil.

  • Find total count for Address Book?

    In Snow Leopard it was easy to find the "Total Count" for ALL CONTACTS. As soon as you clicked on ALL CONTACTS or even a GROUP in all contacts the amount showed at the bottom of the screen. LION appears to be different. I know you can click on ALL CONTACTS, scroll all the way down to find the total number of contacts (a lot of trouble). However, if you click on a GROUP the total does not show "at the bottom"??? You can go to Address Book > Edit > Edit Dirtribution List and see the totals of individual groups but ALL CONTACTS is not shown because it is a "distribution" of all contacts. Question is: Is there an easy way to find the total count not only for ALL CONTACTS but including GROUPS with out having to go to so much trouble?

    I find that if you have a critical number of cards in a group it will show the total number at the bottom of the list when you scroll down (I agree, a real nuisance!). I'm not sure what the critical number is, but I have lists with 20 cards and it doesn't show, while a list of 40 does show the total.
    I am not able to choose Edit > Edit Distribution List, since it is always greyed out. Is there are trick?
    I really find that Address Book in Lion has lost functionality – don't understand the change to a "book" format where you have to flip back and forth – would much prefer a 3 column format.

  • Total Counter Reading

    Hello Experts,
                We have a situation wherein the total counter reading for a measuring point has changed.
    On June 27, the user entered the measurement document for a measuring point and we had the following record:
    Counter Reading: 144879.00
    Difference: 129 and
    Total Ctr Reading: 144879.00
    On July 03, he entered another measurement document for the same measuring point.
    On this day he just entered the difference of 3. However the measurement document reads as follows:
    Counter Reading: 5581.00
    Difference: 3 and
    Total Ctr Reading: 5581.00
    We have not been able to simulate this situation. The user did not replace the counter and did not set the total counter reading externally, stiil the total counter reading shows an incorrect value. Also we do not have any counter overflow set.
    Please advise how to replicate the isuue.
    Thanks in advance for your help.
    Sandeep

    HI
    I am not sure how this is useful
    Check this note
    [585979|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=585979]
    [801967|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=801967]
    Meanwhile, check the change documents, if any one has changed.
    Check the last measurement document
    When you are entering the measurement reading.. did u see the total counter reading as old one...
    Have u entered the measurement document in collective method or IK11
    - Pithan

  • Help in finding the total count for each month

    Hello everyone,
    Sometime back I had posted about the date function. I have that problem solved now my problem is that after finding all records which against each record I need to find the total count for that month if no records than I have to set it to a 0.
    Here is how my program has been written.
    PROCEDURE extract_materials
    IS
    CURSOR xyz
    BEGIN
    FOR xyz1 IN xyz LOOP
    -- once inside the loop for each of the record from
    the cursor I need to find a total count for that record for everymonth in the year.
    All these records will be instered in to a staging table
    Can you please help me out with this. I really appreciate this.
    Thanks in advance.
    -Vani

    Andrew - you missed the tricky bit of the spec - include missing months with a zero.
    You need to do an outer join to a select from any big table with a function involving rownum and add_months to generate all the possible months. However, its time to go home and I can't be bothered to work out the finer details.

Maybe you are looking for