A method of grouping a total count of errors by date

Dear SQL Gurus,
Can anyone guide me (with the script below) as to how I'm can group a total count of error by DISTINCT(CREATION_DATE)?
11g Enterprise Edition Release 11.2.0.2.0
SCRIPT:
select
CREATION_DATE, request_id, rpad (regexp_substr(summary,'[^\.|^:]+'), 60, '_') as "iCash Dep Error Summary",count(*)
from BKS_OM.bks_icash_dep_errors
group by CREATION_DATE, request_id, regexp_substr(summary,'[^\.|^:]+');
RESULTS:
CREATION_DATE REQUEST_ID iCash Dep Error Summary COUNT(*)
02-JUL-12 415967 Validation Failure__________________________________________ 1
02-JUL-12 415967 Validation Failure__________________________________________ 1
02-JUL-12 415967 Validation Failure__________________________________________ 1
02-JUL-12 415967 Validation Failure__________________________________________ 1
02-JUL-12 415967 Validation Failure__________________________________________ 2
06-JUL-12 417699 Validation Failure__________________________________________ 1
06-JUL-12 417699 Validation Failure__________________________________________ 1
06-JUL-12 417773 Validation Failure__________________________________________ 16
02-JUL-12 415967 Validation Failure__________________________________________ 1
06-JUL-12 417773 Validation Failure__________________________________________ 1
Regards,
DIBS812
Edited by: DIBS812 on Aug 3, 2012 10:51 AM

That did the trick John. Thank you for providing me the solution.
Thanks everyone for your response!
select trunc(creation_date), request_id,
rpad(regexp_substr(summary,'[^\.|^:]+'), 60, '_') as "iCash Dep Error Summary",
count(*)
from bks_om.bks_icash_dep_errors
group by trunc(creation_date), request_id, regexp_substr(summary,'[^\.|^:]+');
TRUNC(CREATION_DATE) REQUEST_ID iCash Dep Error Summary COUNT(*)
19-JUL-12 422601 Validation Failure__________________________________________ 326
19-JUL-12 423343 Validation Failure__________________________________________ 383
20-JUL-12 423650 Validation Failure__________________________________________ 439
02-JUL-12 415967 Validation Failure__________________________________________ 53
16-JUL-12 421687 Validation Failure__________________________________________ 277
06-JUL-12 417699 Validation Failure__________________________________________ 21
10-JUL-12 419189 Validation Failure__________________________________________ 124
06-JUL-12 417773 Validation Failure__________________________________________ 124
18-JUL-12 422529 Validation Failure__________________________________________ 269
19-JUL-12 422894 Validation Failure__________________________________________ 326
19-JUL-12 422901 Validation Failure__________________________________________ 326
18-JUL-12 422357 Validation Failure__________________________________________ 277
19-JUL-12 422865 Validation Failure__________________________________________ 326

Similar Messages

  • [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)

  • 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

  • Problem in finding the total count

    my table as below:
    ID code group cand
    A 001 01 1
    A 001 02 1
    A 001 02 2
    A 002 01 1
    A 003 01 1
    B 001 01 1
    B 001 01 2
    B 001 02 1
    B 002 01 1
    C 002 01 1
    C 002 01 2
    C 003 01 1
    Here is what I want
    ID Code tot_grp num_cand
    A 001 4 3
    A 002 4 1
    A 003 4 1
    B 001 3 3
    B 002 3 1
    C 002 2 2
    C 003 2 1
    where tot_grp is the total number of groups for each ID
    and num_cand is the total number of candidates for each ID with that specific
    code
    Can I do it in one sql statement ?
    Thank you

    you said
    where tot_grp is the total number of groups for each ID
    and num_cand is the total number of candidates for each ID with that specific
    code
    Can u be more specific what should be present in tot_grp column.
    Is it contains
    a)sum of group for a given ID & code combination.
    If yes then sql would be
    select id,code,sum(group) tot_grp,count(cand) num_cand
    from <table_name>
    group by id,code
    having the output ID Code tot_grp num_cand
    A 001 5 3
    A 002 1 1
    A 003 1 1
    B 001 4 3
    B 002 1 1
    C 002 2 2
    C 003 1 1
    2) Total No of groups(only the count) for a given Id & code
    If yes then sql would be
    select id,code,count(group) tot_grp,count(cand) num_cand
    from <table_name>
    group by id,code
    having the output ID Code tot_grp num_cand
    A 001 3 3
    A 002 1 1
    A 003 1 1
    B 001 3 3
    B 002 1 1
    C 002 2 2
    C 003 1 1
    If none of the above condition is correct can u please be more clear .

  • 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

  • Sql query to bind data from grid and print total count and amount total when date changes

    SELECT SLHD.VOUCH_CODE,SLHD.VOUCH_DATE,SLHD.VOUCH_NUM,SUM(SLTXN.CALC_NET_AMT) AS AMT,ACT.ACT_NAME,SUM(SLTXN.TOT_QTY) AS QTY
    FROM SL_HEAD20132014 AS SLHD,ACCOUNTS AS ACT,SL_TXN20132014 AS SLTXN
    WHERE SLHD.ACT_CODE=ACT.ACT_CODE AND SLTXN.VOUCH_CODE=SLHD.VOUCH_CODE
    GROUP BY SLHD.VOUCH_CODE,SLHD.VOUCH_DATE,SLHD.VOUCH_NUM,ACT.ACT_NAME
    ORDER BY SLHD.VOUCH_DATE 
    i want to print total quatity and total sale in grid when data changes
    like
    date amount quantity
    01/02/2013 1200 1
    01/02/2013  200 1
    01/02/2013  1400 2 // date changes here 
    02/03/2013 100 1 
    02/03/2013 50 4
    02/03/2013 150 5 // date changes and so on

    this query only print all the data from table i want total quantity and total amount of daily sale in same grid when ever date changes
    You may add the date filter to Visakh's query:
    SELECT SLHD.VOUCH_DATE,SUM(SLTXN.CALC_NET_AMT) AS AMT,SUM(SLTXN.TOT_QTY) AS QTY
    FROM SL_HEAD20132014 AS SLHD,ACCOUNTS AS ACT,SL_TXN20132014 AS SLTXN
    WHERE SLHD.ACT_CODE=ACT.ACT_CODE AND SLTXN.VOUCH_CODE=SLHD.VOUCH_CODEand SLHD.VOUCH_DATE = @yourdate --passed from the front end application
    GROUP BY SLHD.VOUCH_DATE
    WITH CUBE
    ORDER BY SLHD.VOUCH_DATE
    Having said, each time when you select the date, you query the table would be expensive method. May be you can filter the date within your dataset already populated if you have entire data in the dataset.

  • 0 "Transactions Committed Total Count"

    Hi,
    I have a stateless session bean which has <transaction-type>Container</transaction-type>.
    and <stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idempotent>.
    But when I monitoring it, there is always 0 in "Transactions Committed Total Count"
    column, also 0 for "Rolled Back" and "Timed out" column. I knew the bean was used
    a lot, but why it has 0 transactions showed?
    Thanks

    Hello Jen,
    Mostly, WebLogic will default entity beans to the "Supports" transaction attribute.
    This means that if the method is invoked within a transaction context, the transaction
    context will be propogated to the underlying EJB with the Supports transaction
    attribute. However, if the Supports EJB was not invoked within a transaction context,
    it will execute and perform without problems. If you want to explicity initiate
    transactions for each method call that you specify, then it's best to use a transaction
    attribute of Required, RequiresNew, or Mandatory. Hope this helps.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Jen" <[email protected]> wrote:
    >
    If not define, is there any default behavior?
    The bean itself just do database lookup, doesn't need to be in transaction,
    but
    I don't know how to time out it, so thought using transaction to prevent
    long
    time query.
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Jen,
    Try specifying the actual transaction attributes in your ejb-jar.xml
    file. If
    you need examples, refer to the following link:
    http://www.vipan.com/htdocs/ejb-jar.xml.html
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Jen" <[email protected]> wrote:
    I didn't specify any transaction attribute, leaving it blank,
    <assembly-descriptor></assembly-descriptor>
    Thanks
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Jen,
    What transaction attribute are you using? (eg: Required, Mandatory,etc.).
    The transaction attribute that you choose for your EJBs will determine
    if transactions
    are actually initiated and propogated across calls to other EJBs.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Jen" <[email protected]> wrote:
    Hi,
    I have a stateless session bean which has <transaction-type>Container</transaction-type>.
    and <stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idempotent>.
    But when I monitoring it, there is always 0 in "Transactions Committed
    Total Count"
    column, also 0 for "Rolled Back" and "Timed out" column. I knew thebean
    was used
    a lot, but why it has 0 transactions showed?
    Thanks

  • 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

  • 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

  • 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

Maybe you are looking for

  • How to configure alerts in SAP R/3 System.

    Hi,    We have R/3 system installed in our system.Now i want configure alerts to display for users.How can i configure alerts in that R/3 System.Send me the realted information and links. Regards, Kiran.

  • Mac Mail Mac *****

    I have absolutely had it with this stupid Mail program that came with my Mac. No matter what I do I cannot get it to recognize my password. In the 4 years I've had this computer I have been unable to send a single e-mail. It drives me nuts because I

  • Cannot get my download of LR6 (upgrade) to open. None of the solutions offered here work (re-install, exit CC, etc.)

    I have been trying for about 24 hours now to get my download of LR6 to open after install. I have tried all the solutions found here including the sign-out - sign-in solution, as well as uninstalling and re-installing, turning off firewall, etc., etc

  • Transient analysis frequency estimate

    Hi, I have a simple analog tone generator that produces a sine wave after some short startup delay.  Is there a function in Multisim that would allow me to take my transient analysis data and estimate the frequency of oscillation?  What I'm looking f

  • Automatic update search

    Since updating my virus/firewall program (Trend PC-cillin 14), Flex shows Automatic Update Search (6%) in lower right corner and in Progress Window shows - Contacting Eclipse .org update site. This never changes. My firewall is obviously preventing a