Calcualting Count for a particular column

Hi All,
         I have this internal table which has records from jcds table.Now i want to display two fields on o/p screen.The fields are 1.Delivered By
2.No of deliveries for this user.
No w can someone please tell me how to calculate count as there will be multiple users who would have delivered and there is no field mentioning the count for the user.
Thanks in advance,
Saket.

Hi,
check the code below
TYPES: BEGIN OF s_itab,
        usnam TYPE cdusername,
        total TYPE int4,
      END OF s_itab.
DATA: total TYPE int4,
      wa_itab TYPE s_itab,
      itab TYPE STANDARD TABLE OF s_itab WITH HEADER LINE.
SELECT DISTINCT usnam
   FROM jcds
INTO CORRESPONDING FIELDS OF TABLE itab.
LOOP AT itab INTO wa_itab.
  SELECT COUNT(*)
    FROM jcds
    INTO total
WHERE usnam = wa_itab-usnam.
  wa_itab-total = total.
  MODIFY itab FROM wa_itab.
ENDLOOP.
LOOP AT itab INTO wa_itab.
  WRITE : /1 wa_itab-usnam,
           30 wa_itab-total.
ENDLOOP.
Regards,
Amit

Similar Messages

  • How to implement tooltip for the list items for the particular column in sharepoint 2013

    Hi,
    I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
    Any help will be appreciated

    We can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
    http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
    http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
    http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/

  • Filter for a Particular column in obiee 11g

    Hi,
    I have created an report having 10 measure columns and filter by month i.e., less than (particular month ) which is working perfect.Actually my requirement is to one column to be filter by equal to particular month. if is it possible kindly tell me how to do. thanks in advance!

    Hi,
    Goto Edit formula for that particular column.
    and use FILTER(measure_column USING (condition)).
    eg:
    FILTER("XXXXX"."measure_column" USING ("OBIA"."D5.Times"."Month" =particular_month ))
    Try this... This will work fine.

  • Where do I find the global package array g_fnn for a particular column?

    Hi Everyone,
    I found out from one of the tutorials that when a page is submitted, the value of a column is stored in a global package array.
    Can you tell me where or how I can find out what nn in g_fnn would be for a particular column?
    I was thinking maybe it corresponds to the position of the columns in the Report Column Attributes of the Report Attrutes page.
    This information will help me refer to it in pl/sql code.
    Thanks.
    Emad

    Hi Scott.
    I think I may be able to answer my own question. Ooopps!
    I noticed in the tutorial they refered to the deptno column as g_f09. I noticed in the Region Source under the Region Definition tab that a total of 9 columns were defined in the select statement.
    Is this assumption correct by stating that if the Sal column is the 6th one defined in the select statement, it is g_f06 ?
    Thanks.
    Emad.

  • Hotspot click for only some rows in ALV grid for a particular column ?

    Hi there,
            In ALV grid, we can make Hotspot enable for all rows in a specified column
    by specifying in the fieldcatalog with Hotspot attribute set as true.
    But I want to enable Hotspot only for certain rows in the particular column. I tried with MC_STYLE4_LINK , but I didnt got the required result.
    So , how could I achieve that in ALV grid.
    Points would be rewarded for helpful answers.
    Regards,
    Anil .

    Hi,
    You can do it for a column. Please refer to the code snippet below,
      DATA : it_fcat TYPE lvc_t_fcat,
             wa_fcat LIKE LINE OF it_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
      I_BUFFER_ACTIVE              =
         i_structure_name             = 'SMMW_ALERTS_ICON_S'
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           =
      I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = it_fcat
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
    LOOP AT it_fcat INTO wa_fcat.
      IF wa_fcat-fieldname = 'STATUS'.
        wa_fcat-hotspot = 'X'.
        MODIFY it_fcat FROM wa_fcat.
        CLEAR wa_fcat.
      ENDIF.
    ENDLOOP.
    CALL METHOD l_obj_alv_grid->set_table_for_first_display
          EXPORTING
        i_structure_name              = 'SMMW_ALERTS_ICON_S'
       CHANGING
            it_outtab                     = lt_alerts_st
            it_fieldcatalog               = it_fcat.
    In the above replace the structure 'SMMW_ALERTS_ICON_S' with your structure and column 'STATUS' with your desired column.
    Hope this helps,
    Regards,
    Vinodh

  • Display one or more rows for a particular column in alv grid display

    Hi,
    My requirement in the report is to display users for a particular workitem id.If a workitem is in the inbox of one or more users(approvers) i have to display all the user names in one field in alv grid output (output-approver id).There are other fields which display details of the workitem also.
    Is there a way to populate multiple rows for a single column or creating one more internal table for users in the alv output table.
    Please suggest.
    regards,
    Sravanthi Chilal

    ALV only can show flat internal table data.
    you should set a sort on the field which you want to show only once.
    Then on the output of the ALV, the field with the same value will show only once.

  • How to set color for a particular column in advance table?

    How can we set the color of a particular column in advance table based on some parameter feteched from vo query in process request?

    i have tried the same way as mentioned in the post but ,its giving error
    java.lang.ArrayIndexOutOfBoundsException: 0
    processRequest code
    OAAdvancedTableBean table =
    (OAAdvancedTableBean)webBean.findIndexedChildRecursive("TimEntAdvtbl");
    if (table != null)
    System.out.println("table");
    OAColumnGroupBean daily =
    (OAColumnGroupBean)table.findIndexedChildRecursive("DailyColGrp");
    if (daily != null)
    System.out.println("daily col");
    OAColumnGroupBean ColGrp6 =
    (OAColumnGroupBean)table.findIndexedChildRecursive("ColGrp6");
    if (ColGrp6 != null)
    System.out.println("ColGrp6");
    OAColumnBean SatCol =
    (OAColumnBean)webBean.findIndexedChildRecursive("SatCol");
    if (SatCol != null)
    System.out.println("col");
    OAMessageTextInputBean sat1 =
    (OAMessageTextInputBean)SatCol.findIndexedChildRecursive("sat");
    if (sat1 != null)
    System.out.println("sat1");
    OADataBoundValueViewObject csssat= new OADataBoundValueViewObject(sat1,"Color");
    sat1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, csssat);
    Error Page
    ## Detail 0 ##
    java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3199)
         at oracle.sql.NUMBER.toString(NUMBER.java:761)
         at oracle.sql.NUMBER.stringValue(NUMBER.java:2090)
         at oracle.jbo.domain.Number.toString(Number.java:390)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.formatObject(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean.getAttributeValueImpl(Unknown Source)
         at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    Please help

  • Report Writer - '-ve' for a particular column - VERY URGENT

    Hi
    I have developed a report painter report which has 4 columns.  Out of 4 columns, I have 2 columns which are based on formulae.  Irrespective of the result, I need to display these 2 column values either "+ve" or "-ve". 
    Can anybody pls help me out in this regards.
    IT'S VERY URGENT.

    Murali,
    Thanks for your response.  I think i could not explain my problem clearly.  Let me explain now.
    Here is the sample output of my report painter report.
    PLAN (P)     ACTUAL (A)    VARIANCE (C = A - B)      VARIACE % ( C/A *100 )
    254              245                           9                              3.67
    245              254                          -9                             -3.54
    -245              254                       -499                          -196.45
    245             -254                        499                          -196.45
    If you see the output for 3rd and 4th columns, some values are +ve and some values are -ve.  But i want output as follows:
    PLAN (P)     ACTUAL (A)    VARIANCE (C = A - B)      VARIACE % ( C/A *100 )
    254              245                           9                              3.67
    245              254                           9                              3.54
    -245              254                        499                           196.45
    245             -254                        499                           196.45
    Pls help me out.

  • How to update all the record for a particular column in a table based on search criteria.

    Hi All,
    I am new to ADF. I have a requirement, where i have to perform mass update on a table.
    Scenario:
    Ex: I have a dept manual search region. where i search with deptId: 20. I get 20 records in my table. now i have  another region where i have a inputchoice list which contains all the columns names that exists in dept table. Beside that i have a input text box and an update button
    Now user, first searches with dept id:20 and clicks on search button, where it shows 20 record in the table. He then select a column from input choicelist(ex: ManagerId), then enters new value in the input box(ex: abc) then clicks on update button.
    Now i want, all the records in the ManagerId column with dept id:20 to be updated with the new value "abc"
    Can anyone help me with the code.
    Thanks in advance..

    Hi,
    If you go to your VO and generate the ViewObjectImpl, in there you can create a method which will contain two parameters, 1 the attribute name and 2 the value.
    Then you can follow something like explained in this post:
    ADF Tutorial: How to apply bulk actions to a view object rows
    The only difference is that you will need to create a method like this:
    public void updateAttribute(String attribute, Integer value){
            RowSetIterator iter = createRowSetIterator(null);
            while (iter.hasNext()){
                Row row = iter.next();
                row.setAttribute(attribute, value);
    Then you expose that as a client interface and then after you filter your table by your criteria you just need to execute this method passing the right parameters.
    Regards

  • Qry return same value for a particular column for each row but not all time

    hi,
    We recently migrated to Oracle Database 10.2.0.3.0 from 9i. We were using a sql to populate a table and it had been running fine. After migration the same sql is fetching / population incorrect values, but not everytime. If we run the same sql again it gives a correct result.
    Ex:
    insert into a1 ( col1, col2, col3 )
    select a.field1, b.field2, c.field
    from tab1 a, tab2 b, tab3 c
    where a.field = b.field
    and b.field (+) = c.field
    something like this. Let us assume it fetches 200 rows
    But sometimes the col1 has the same value for all the 200 rows and col2, col3 has correct values. If we run the same sql next time, the col1 fetches the correct value and everything is correct.
    Could someone help on the above issue.

    I know it's difficult but can you put together a small test case for us to reproduce this behaviour? Did you contact Oracle Support?
    Any special constructs used behind the scenes? Virtual private database? Views?Materialized Views? Anything else?

  • Column reordering for a particular column

    Is it possible to allow reordering of all but the first column? My table has the first column as checkbox to select the row. I do not want user to reorder this first column but let them reorder rest of the table columns. Is it possible?

    Did you try testing the frozen attribute? I would have guessed that if you freeze column 1 so that it doesn't scroll horizontally, it would make sense that it shouldn't be re-orderable either - otherwise, how does the scroll freezing work - at any rate, I didn't test.
    Other than that, I didn't see anything in the docs that would accomplish this. I do know that Frank just filed an ER to allow column reordering listeners (that would presumably allow you to cancel the re-order): {thread:id=2150514}
    John

  • Compare tables in two schemas for the table with particular column & value

    Hello All,
    I have a query to find out the list of table from a given schema to extract all the tables having a search column .
    ex :
    SELECT OWNER, TABLE_NAME, COLUMN_NAME FROM
    ALL_TAB_COLUMNS WHERE OWNER='<SCHEMA_NAME>'
    AND COLUMN_NAME='<COLUMN_NAME>'
    I want to compare two schemas for the same above query .
    Can we wirte a query on this - I am using SQL DEVELOPER , which has menu item - TOOL - database differneces to find the diffenence between two schemas but my requirement is to find the differences in two schemas for all the tables matching for a particular column ( as given in quer).
    Appreciate your help.
    thanks/Kumar
    Edited by: kumar73 on 29 Nov, 2012 1:50 PM

    Hi, Kumar,
    This is the SQL and PL/SQL forum. If you have a question about SQL Developer, then the SQL Developer is a better place to post it. Mark this thread as "Answered" before starting another thread for the same question.
    If SQL Developer has a tool for doing what you want, don't waste your time trying to devise a SQL solution. The SQL Developer way will probably be simpler, more efficient and more reliable.
    If you do need to try a SQL solution, then post some sample data (CREATE TABLE and INSERT statements for a table that resembles all_tab_columns; you can call it my_tab_columns) and the results you want from that data.

  • Set filter for only one column in tableview

    Hi
    i am using in MVC a htmlb:tableview with filter in only one column of 8.
    This is all working fine, except that the user can enter a searchsting in the filterfield for all columns, but in handle_event (of the controller) ; i only react to a text in the filterfield of column 4 and ignore all other filtertext , which were maybe entered in the other columns.
    My question:
    how can i  enter the filter only for one column, in a way that the user cannot enter any text in the filterfield of the other columns, only in column 4 ?
    my view:
    <htmlb:tableView id             = "requirements"
                     table          = "//model/pdst_reqs"
                     filter         = "APPLICATION"                
                     keyColumn       = "EXTID"
                     iterator        = "<%=model%>"
                     footerVisible   = "FALSE"
                     encode          = "TRUE"
                     visibleRowCount = "<%=model->rowcount%>"
                     width           = "100%"/>
    Best Regards
    Britta

    You can disbale the Filter for the particular column by setting the DISABLE_FILTER in the Iterator method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. Here is the sample code
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
      CLEAR p_column_definitions.
      CLEAR p_overwrites.
      data tv_column TYPE TABLEVIEWCONTROL.
      tv_column-COLUMNNAME          = 'FLDATE'.
      tv_column-SORT                = 'X'.
      tv_column-EDIT                = 'X'.
      tv_column-ONCELLCLICK         = 'MyCellClick1'.
      tv_column-title               = 'Date '.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-COLUMNNAME          = 'PRICE'.
      tv_column-horizontalAlignment = 'right'.
      tv_column-verticalAlignment   = 'middle'.
      tv_column-ONCELLCLICK         = 'MyCellClick2'.
      tv_column-title               = 'Currency'. 
      tv_column-EDIT                = 'X'.
      tv_column-DISABLE_FILTER      = 'X'.    " <-------Like this
      APPEND tv_column TO p_column_definitions.
    endmethod.
    Hope this will solve your problem.
    Raja

  • Wanting data from a table without a particular column

    I need the data from a table, except the data for a particular
    column. I don't want to write the select list, as it would be
    too clumsy for a large table. Can anybody suggest a solution. I
    can certainly create a view, but I don't want that.

    Hi,
    Try this select Statement.
    set haeding off
    set feedback off
    spool file.sql
    Select 'Select ' from dual;
    Select Column_name || ',' from all_tab_columns Where table_name = 'EMPLOYEE' and Column_Name != 'DEPARTMENT_ID';
    Select '1' from dual;
    select 'From Employee;' from dual;
    Spool off
    regards,
    Ganesh R

  • Display only positive values for a particular Keyfigure

    Hi..
    (Sorry, I accidentally posted this also in Datawarehousing forum, actually it related to BeX forum).
    For a particular column(keyfigure) in my report, the user wants to display only positive values.
    I used the formula from the one of the forums
    (Keyfig > 0)* Keyfig.
    This displays only positive values in the column as required. But, the result for this column is also affected. As the result is negative, it shows, zero in the result for this column.
    Is there a way in which the result will not be affected by the formula?
    I went into the properties of the particular keyfigure and chose Calculate Result as -> Summation.
    It throws out the following error message
    'Calculating result as...' was not executed
    Message no. BRAIN141
    Diagnosis
    The function 'Calculate Results as ...' could not be used in all
    instances.
    The recalculation of a result cell always occurs based on the set of
    detailed cells subordinated to this cell. This is the most detailed
    level of the drilldown. Therefore it is not posible to recalculate in
    hierarchical lists. The calculation of a results cell is not performed
    if a cell or column with an expand symbol is assigned beneath it.
    Otherwise the newly calculated result is changed every time one of its
    lower-level nodes is expanded. This is not supported for technical
    reasons and would also only confuse users.
    Note, however, that calculating with "Suppress Results" is always
    executed because the restriction described above does not apply in this
    case.
    NOTE:
    The query shows the keyfigure values for a selected title, for profit center and territory hierarchies.
    Any suggestions would be greatly appreciated.
    Thanks,
    Sai.

    Hi Deepu,
    Thanks for the reply. I tried with ur formula.
    LEAF(keyfig) gives all values "zero" for that particular column including the result.
    NOT LEAF(keyfig) gives all values "one" for that particular column including the result.
    So, ur formula gives the same values as of the present column values.
    I tried condition, but it's not working...it says the following errors...
    There is a condit. on Title, results row suppress. active on Profit Center    
    (conditional                                                                               
    Message no. BRAIN144                                                                               
    Diagnosis                                                                               
    Characteristic Title has an output condition and the 'Suppress Results    
        Cells' property is active for Profit Center. This generally leads to an   
        incomprehensible output list.                                                                               
    System response                                                                               
    As soon as an output condition is defined for a characteristic (here      
        Title), the system calculates the corresponding result cells and applies  
        the output condition. If a result cell of this type is later deleted by   
        the condition, all the lower-level detail and result cells in its         
        drilldown are suppressed. Because the result cell is suppressed the       
        Title rows are then omitted from Profit Center.                                                                               
    In extreme cases this can lead to an entirely empty list being            
         displayed, although the single rows or columns would be displayed if the  
         condition were deactivated.                                                                               
    Procedure                                                                               
    Check the query settings, especially results row suppression and the      
         output conditions.                                                                               
    Procedure for System Administration                                                                               
    You can deactivate this message Brain 144 with transaction RSRT1.                                                                               
    There is a condit. on Profit Center, results row suppress. active on        
    Territory as in SPL (conditional                                                                               
    Message no. BRAIN144                                                                               
    Diagnosis                                                                               
    Characteristic Profit Center has an output condition and the 'Suppress  
        Results Cells' property is active for Territory as in SPL. This         
        generally leads to an incomprehensible output list.                                                                               
    System response                                                                               
    As soon as an output condition is defined for a characteristic (here    
        Profit Center), the system calculates the corresponding result cells and
        applies the output condition. If a result cell of this type is later    
        deleted by the condition, all the lower-level detail and result cells in
        its drilldown are suppressed. Because the result cell is suppressed the 
        Profit Center rows are then omitted from Territory as in SPL.                                                                               
    In extreme cases this can lead to an entirely empty list being            
         displayed, although the single rows or columns would be displayed if the  
         condition were deactivated.                                                                               
    Procedure                                                                               
    Check the query settings, especially results row suppression and the      
         output conditions.                                                                               
    Procedure for System Administration                                                                               
    You can deactivate this message Brain 144 with transaction RSRT1.
    Thank you very much.
    Regards,
    Sai.

Maybe you are looking for

  • Basics of Downloading a Video-Videora Steps Simplified

    Okay, I've noticed many an iPod fan come up here with such topics as "PLEASE HELP ME1!!!!!!" and found this: I don't know how to download a video to my iPod Video. No matter if you have a Mac or Windows computer, you need not waste your money on QT P

  • Concatenating multiple fields dilemma.

    Just started to work with Javascript (2 days) as a result of using Acrobat for generating on-line ordering of membership business cards in PDF format.  That said, here's my dilemma... On the right side of my form the respondent enters all the informa

  • Icon flickering while dragging a tree node

    I am working on a DND on a tree to a list. While dragging the Icon is set as the cursor. Everything is working fine but when I am dragging the Icon is flickering. the Icon is not clear till I drop it. Is there a way to avoid this flickerring of Icon

  • Battery Showed 54% - Closed lid, Opened Showed 3% in 1 second

    This has been happening a lot lately. My battery will drop from 50% to nearly zero in a couple seconds - what's the deal...

  • Crossfade crossfading fade fading doesn't work

    crossfade crossfading fade fading doesn't work properly. 12 sec results in about 45 sec. around 2 sec is like 12 sec. but still it's no true crossfade. just the first song fading and the second starting abruptly afterwards. Any idea?