Average of a column in Normal Report

Hi
I am using a simple report. I want to display average of a column on the bottom of the report. I am not able to
find any option for it. how to show average of a cloumn on simple report.
Please help me.
Thanks
PK

The same question has been asked in this thread:
Compute average of a report column
I have offered a solution but as I've said it's not great but it may meet your needs.
Or another forum user may review and be able to suggest a better solution.
Does the average need to be part of the report?
Could you calculate it and display it within a page item below the report instead?

Similar Messages

  • Average of the column in ALV report

    Hi,
      I am working on an ALV report and for one of the column, i am calculating the average with fieldcatalog property do_sum = 'C'.
    I am sorting the output table for 2 fields and whenever I am expanding/compressing the sorted fields the average of the column is changing. Please let me know how do I get this average calculated constant. It should not change when the user collapses/expands on the sorted field.
    Regards
    Rashmi

    The same question has been asked in this thread:
    Compute average of a report column
    I have offered a solution but as I've said it's not great but it may meet your needs.
    Or another forum user may review and be able to suggest a better solution.
    Does the average need to be part of the report?
    Could you calculate it and display it within a page item below the report instead?

  • Can i use classes or grid control (alv) in normal report

    Hai,
    Can i use Grid control or classes in normal report.If yes what are the steps that i have to go for.
    thanks
    kiran

    Sure... here is a sample of an ALV in a report.  All you need to do is call a screen.  I believe that there is also a way to do it without having to create a screen.
    REPORT ZRICH_0001.
    DATA: BEGIN OF I_ALV OCCURS 0,
          MATNR TYPE MARA-MATNR,
          MAKTX TYPE MAKT-MAKTX,
          END OF I_ALV.
    DATA: ALV_CONTAINER  TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: ALV_GRID       TYPE REF TO CL_GUI_ALV_GRID.
    DATA: LAYOUT    TYPE LVC_S_LAYO.
    DATA: FIELDCAT  TYPE LVC_T_FCAT.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
    SELECT-OPTIONS: S_MATNR FOR i_ALV-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      CALL SCREEN 100.
    *      Module  status_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '0100'.
      SET TITLEBAR '0100'.
      DATA: VARIANT TYPE  DISVARIANT.
      VARIANT-REPORT = SY-REPID.
      VARIANT-USERNAME = SY-UNAME.
    * Create Controls
      CREATE OBJECT ALV_CONTAINER
             EXPORTING
                   CONTAINER_NAME    = 'ALV_CONTAINER'.
      CREATE OBJECT ALV_GRID
             EXPORTING
                   I_PARENT          =  ALV_CONTAINER.
    *  ALV Specific. Data selection.
    *  Populate Field Catalog
      PERFORM GET_FIELDCATALOG.
      CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
               IS_LAYOUT              = LAYOUT
               IS_VARIANT             = VARIANT
               I_SAVE                 = 'U'
               I_STRUCTURE_NAME       = 'I_ALV'
          CHANGING
               IT_OUTTAB       = I_ALV[]
               IT_FIELDCATALOG = FIELDCAT[].
    ENDMODULE.
    *      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK' OR 'CANC'.
          IF NOT ALV_CONTAINER IS INITIAL.
            CALL METHOD ALV_CONTAINER->FREE.
            CLEAR: ALV_CONTAINER.
            FREE : ALV_CONTAINER.
          ENDIF.
          IF SY-SUBRC = 0.
            SET SCREEN 0.
            LEAVE SCREEN.
          ELSE.
            LEAVE PROGRAM.
          ENDIF.
        WHEN 'EXIT'.
          IF NOT ALV_CONTAINER IS INITIAL.
            CALL METHOD ALV_CONTAINER->FREE.
            CLEAR: ALV_CONTAINER.
            FREE : ALV_CONTAINER.
          ENDIF.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.
    * FORM GET_DATA
    FORM GET_DATA.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE I_ALV
            FROM MARA
              INNER JOIN MAKT
                ON MARA~MATNR = MAKT~MATNR
                   WHERE MARA~MATNR IN S_MATNR
                     AND MAKT~SPRAS = SY-LANGU.
      SORT I_ALV ASCENDING BY MATNR.
    ENDFORM.
    *      Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM GET_FIELDCATALOG.
      DATA: LS_FCAT TYPE LVC_S_FCAT.
      REFRESH: FIELDCAT.
      CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Material Number'.
      LS_FCAT-COLTEXT    = 'Material Number'.
      LS_FCAT-FIELDNAME  = 'MATNR'.
      LS_FCAT-REF_TABLE  = 'I_ALV'.
      LS_FCAT-OUTPUTLEN  = '18'.
      LS_FCAT-COL_POS    = 1.
      APPEND LS_FCAT TO FIELDCAT.
      CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Material Description'.
      LS_FCAT-COLTEXT    = 'Material Description'.
      LS_FCAT-FIELDNAME  = 'MAKTX'.
      LS_FCAT-REF_TABLE  = 'I_ALV'.
      LS_FCAT-OUTPUTLEN  = '40'.
      LS_FCAT-COL_POS    = 2.
      APPEND LS_FCAT TO FIELDCAT.
    ENDFORM.
    Regards,
    Rich Heilman

  • How to fix Width of column in classic report.

    Dear Friends
    i am using Apex 3.2.
    i have created Clasic Report and i have summary column in my report that column have description of issue so i want to fix width of that column nn Classic report .
    i have try some code in html expression
    <span>style="width: 480px; display: block; white-space: normal; font-size: 11px;">#ACTIVITY_SUMMARY#</span>
    {code
    after apply abovemention code that display me in my summary like this and not manage width of column.
    style="width: 480px; display: block; white-space: normal; font-size: 11px;">Dear Cherryl, Greetings !! Thank you very much for the new query and we are pleased to confirm the availability of one single cabin in all the three categories of cabin on M.V. Mahabaahu. We would like to inform you that both the departures 15th Oct 2013 & 29th Oct 2013 (Golden triangle with Cruise) are operational and attached are the prices for your kind consideration. As a special promotion for the 15th Oct 2013 departure only, we are offering USD 100 per person reduction on the Golden triangle portion combined with the cruise. Kindly review and advise us to block the accommodation accordingly. Regards...pankaj
    How to fix Width of column in classic report.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I'm working an example in APEX 4.2 so YMMV (your milage may vary!).
    For Classic Reports, where the Column Attributes "Display As" is set to Display as Text (escape special characters ...:
    1) I find that Column width and Element Width setting have no effect to make the column smaller or larger.
    2) Here is one way that works:
    - In the Region's Region Definition, under Attributes give the Static ID a name (no spaces), say, class-report.
    - In the columns you want to affect, place "&#60;div>#ENAME#</div&#62;" in the columns Column Formatting "HTML Expression". Where "ENAME" here is the actual column name.
    I'm using the EMP table as an example.
    - Finally, in the page's HTML Header put, for example
    <style>
    #classic-report td.data[headers="ENAME"] div {
      width: 200px;
      color: blue;
    #classic-report td.data[headers="JOB"] div {
      width: 50px;
      white-space: nowrap;
      word-wrap: break-word;
    </style>This makes the ENAME column wider and the JOB column smaller and wraps it.
    Much more could be said. If you tweak you will find you can also affect spacing above, below and right/left of the data.
    #classic-report .report-standard th.header {
      border-left: #9fa0a0 1px solid;
      padding: 2px 3px 4px 5px;   /* top right bottom left margins */
      font-size: 11px;
      font-weight: bold;
      vertical-align: bottom;
    #classic-report .report-standard td.data {
      border-left: #9fa0a0 1px solid;
      padding: 3px 4px 5px 6px;
      font-size: 9px;
    }Does this help?
    Howard

  • Generating dynamic columns for a report

    Hi all,
          Can anybody pls. tell me how to output dynamic columns in a report. my req. is that i've to generate so many columns as there are no. of unique(a particular field value) rows in my internal table. for e.g say suppose i've 5 rows in my internal table which has 2 fields, one short text & it's corresponding value. so now my report output shud have 5 columns with the short text as the column heading & the their corresponding values below each column heading. i heard it can be done thru field-symbols. can anyone pls. guide me.

    Hi Sushma,
    This piece of code might be useful.
    The following sections will help you to understand the steps required to define a Dynamic ALV.
    Following symbol signifies:
    Þ                    Important
    Main Steps Required
    The following are the main steps that are to be performed for defining a dynamic Alv
    1.       Defining a field catalog
    2.       Defining the dynamic table
    3.       Filling data into the table
    4.       Displaying ALV list
    Defining a field catalog
    The purpose of defining a field catalog first in case of Dynamic ALV is somewhat different than in case of normal ALV. In case of Dynamic ALV the field catalog is used to define the final internal table that will hold the data, and would be used to display the final output.
    Þ It is very important to remember that the field catalog table be refreshed first, else it might give an error.
    For example:
    DATA: T_FIELDCAT TYPE LVC_T_FCAT,
    L_FIELDCAT TYPE LVC_S_FCAT.
       Refresh T_FIELDCAT.
      CLEAR L_FIELDCAT.
      L_FIELDCAT-FIELDNAME = 'LIFNR'.
      L_FIELDCAT-INTTYPE = ''.
      L_FIELDCAT-OUTPUTLEN  = 10.
      L_FIELDCAT-COLTEXT  = TEXT-002.
      APPEND L_FIELDCAT TO T_FIELDCAT.
    Defining the dynamic table.
    This table will hold the final data that needs to be displayed. To declare the table the following things need to be done.
    Declare a field symbol
    Displaying Alv List
    This is done in the same way as we do for normal Alv. Call function “REUSE_ALV_GRID_DISPLAY” and pass the field catalog table in the export parameters and the dynamic table in Tables.
    Reward Points if it is helpful.
    Reagrds,
    Kiran I

  • Not able to see the result in particular column of BPC report

    Dear All,
    I have problem in one of the BPC report where I am not able to see the result into one column but rest of the users are able to see the result for same column in same report without any issues.
    Generally, I used this report frequently but having such problem from last few days. Excel has created any logs which I need to clear? Please advice.
    Request your help to resolve such problem please.
    If you need any information, please let me know.
    Thank You
    Kind Regards
    Anukul

    Hello Anukul,
    In the report what type of data you are trying to check in that column. can you please brief about report.
    And also please check the excel cell format (right click and check it is a numeric or character), which may help to resolve this issue.
    Regards,
    Rajesh.K

  • Need help in sorting a alphanumeric DB column in BO report.

    Hi All,
    We have a DB column (Data type = varchar2).. with values..
    1                               
    1
    1.1
    1.1.1
    1.1.1.1
    1.2
    1.2.1
    1.3
    1.3.1
    1.3.1.1.1
    Desired
    1
    1.1
    1.1.1
    1.1.1.1
    1.2
    1.2.1
    1.3
    1.3.1
    1.3.1.1.1
    2
    etc..
    We need to sort this column in BO report.. any idea..  we have sorted it in the Query which is giving right output in pl/sql developer but in BO sorting is not showing properly.
    Could you help please to achieve this?
    Thanks and Regards,
    Priyashree

    The Record Sort Expert appears when you choose the Record Sort Expert command from the Report menu.
    Use the Record Sort Expert to define how you want the records in your report to be sorted for printing. You can add and remove a sort field and define the sort direction (ascending or descending) for the data in your report.
    In my version Record Sort appears as a   A over a Z with Arrows pointing from A to Z, and Z to A.  It is next to group expert, which looks like a mountain with an arrow pointing up.  Both are on the "Expert" tool bar.

  • Navigate from ALV list to normal Report

    Hi ,
    I am working on a ALV report where it will display the list of materials and by selecting these materials from the list and process them using a custom button , it should take me to the normal report which give the log from that material processing.
    Any ideas navigating from AVL to normal report in the same program would be appriciated.
    Thank you.

    Hi,
    if you use drill down you have to define header print twice:
    TOP-OF-PAGE.
      perform 050print_header .
    END-OF-PAGE.
    TOP-OF-PAGE DURING LINE-SELECTION.
      perform 050print_header .
    END-OF-PAGE.

  • How to Change the position of Column in ALV report

    Hi Follks,
        Is is possible to change the position of column in ALV report?.If yes then how?
        Basically my requirement is, that user want afacility where , he should be able to change the position
        of column aftre he runs the report.
        Eg: After running the report , user felt that column 5 should be at position 2 , in that case he should   
               be able to drag column 5 at position 2 and vice versa.
        Please help me, how to solve this issue.
        Note : I am using NW 7.0 SP 9
        Regards
        PG
    Edited by: PG on Apr 13, 2009 11:10 AM

    HI PG,
    do below whie filling the filed catlog
    wa_fieldcat-fieldname        = 'Field1".
    wa_fieldcat-COL_POS = '1',
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname         = 'Field2".
    wa_fieldcat-COL_POS = '2',
    wa_fieldcat-fieldname         = 'Field3".
    wa_fieldcat-COL_POS = '3',
    Thanks!

  • Need to fix the width of a column in interactive report

    Hi,
    I have a column named 'Comment'. Its have a huge data due to which the lenght of that column in interactive report get increased. I need to fix the length to a desired value.
    I used following code in Region Footer:
    <style>
    table.apexir_WORKSHEET_DATA td[headers=COMMENTS] {
      _width: 300px;
      min-width: 50px;
      max-width: 300px }
    </style>
    Its solved the problem by fixing the width of the column but the column is not showing the full data now. It is hiding most of its part to fit it in that column.
    Please give some idea.
    Thanks,
    Chandru

    Hi,
    I believe you will want to add a height specification to allow for multiple lines.  And you may want/need to specifiy how you want lines to wrap.
    Add (for example):
      height: 60px; 
      white-space: nowrap; 
      word-wrap: break-word;
    There are defaults and several options for white-space and word-wrap.  You may want to look them up and give them a try for comparison.
    Howard

  • Adjust the width of a column in a report.

    Hi,
    How can we adjust the width of a column in a report.
    We have a report with around 10 columns.
    out of the 10 columns 1 column has a width of 500 char..
    we want to display only the first 150 chars of that column with 50 char on first line,next 50 on second line and last 50 on third line.
    i have tried using the the substr and <br> in the region source but it takes 3 lines by default even if it is not of 150 chars .I want to display it in 3 columns if it of 100+ chars.
    Thanks in advance.

    Hi,
    Using the col tag is the more proper way of fixing the width of a column.
    If you don't want to use the col tag, you should change your expression to:
    &lt;table style="width:500px"&gt;
    Firstly, you should use the unit of length (ie, "px") for any non-zero value and secondly because we are being encouraged to use the style attribute whenever possible as, as I understand it, this will become the standard.
    Regards
    Andy

  • How to display subtotals in separate column in alv report?

    hi,
    I am displayed the subtotals  for QUantity field BDMNG in Reuse_alv_grid_display  in the same column.
    but I want to display subtotal in separate column.
    How to display subtotals in separate column in alv report?
    thanks&regards.
    samba.k

    Hi
    As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
    Best Regards
    Yossi

  • Printing some fixed length of a column in a report output

    Dear All,
    In the output of my ALV report, I am having one column as "TEXT" which is of length 500 characters. But I want that while I am displaying that value in the system then I should be able to see the complete 500 characters but while printing that column only first 100 characters of the column should be printed.
    There are other columns in the report which should be displayed and printed as it is.
    Kindly guide me in how this can be done.
    Wam Regards,
    N.Jain

    hi,
    it is LVC fieldcat or SLIS.?
    better go for LVC.
    u try doing like this.
    data : reserve_lines type lvc_s_prnt.
    reserve_lines-RESERVELNS = 100.
    iam not sure but try doing like that

  • How to display ICONS in normal report without using icons table

    Hi Friends,
    I have to display icons(traffic lights) in a normal report.
    Can we do that without using icons table?
    If yes, please let me know how?
    Thanks,

    Hi Pagidala,
    Go to txcode - ABAPDOCU and in that expand BC-ABAP Programming->ABAP User Dialog->Screens->complex screen elements->status icons on Screens.
    In this you can see sample code which may help you.
    Cheers!!

  • How to create a dynamic action from link column in classic report

    I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event.
    I was thinking I could create a dynamic action with selection type=jquery selector. Not for sure if I need to do anything on link column and do not know the syntax
    for jquery selector. Would appreciate any help or direction???

    Thank you for your response. I am very new to Jquery so don't understand all that well.
    What I did:
    I created a dynamic action
    Event: Click
    Selection Type: jQuery Selector
    jQuery Selector: tdheaders
    Created True Actions
    I created an alert to see if this is being executed.
    Alert 'I made it here'
    What I have:
    I created a report region with the following query:
    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    I created 'SELECT' column as Link Column
    Report Attributes
    Link Text Select
    Target Page in this Application
    Page 2
    Region Header
    <div id="ModalForm2" title="Employee List" style="display:none">
    Region Footer
    </div>
    This report is displayed in a modal form when a button is clicked.
    Code for modal window in Page Header
    <script type="text/javascript">
    $( function() {
    $('#ModalForm2').dialog(
    { modal : true ,
    autoOpen : false ,
    buttons : {
    Cancel : function() {
    closeForm2();
    function openForm2()
    $('#ModalForm2').dialog('open');
    function closeForm2()
    $('#ModalForm2 input[type="text"]').val('');
    $('#ModalForm2').dialog('close');
    </script>
    I am trying to capture the click event on the link column of the report in the modal form. I want to pass a couple of column values
    back to the main form and close the modal window. I do not want to do the submit that happens if I click on the link column and link back to the main page(2)
    If I let the submit to happen, all other entered fields are cleared on my main form.
    Just don't understand the jQuery selector. I have no problem catching the button clicks on the modal form.

Maybe you are looking for

  • How do I find the summary page on ITunes. Have new Windows 8 and have to change to manually manage music

    I have downloaded audiobooks from the library using Overdrive for years. I have a new computer with Windows 8 and now it's been difficult. I have a book ready to transfer to ITunes to download to my Ipod but in order to transfer it a message came up

  • Mod_jk receiving blocked requests?

    Hello all, this might not be the correct forum (excuses for that) but maybe someone has an idea what might be my problem here: I just installed the mod_jk connector and switched logging to debug mode. When I open the log file I see the following: [Tu

  • BAPI or FM for changing Purchase Order

    Hi, Does anybody know a BAPI or FM to change Purchase Order item details. I looked for  a BAPI but only found for creating and listing. thanks.

  • GR value is higher the po value

    Dear SAP GURU We have a problem with GR value. PO Quantity Order for item 10 is: 100.800 KG Net Order Price for item 10: 3.287,30 USD (Price Unit 1 TO) Conversion order qty: 1000 KG to 1 TO The GR value, in Purchase order quantity, should be: u201CQu

  • Bug in quick-drop insert

    The recently introduced quick-drop features are simply great. Unfortunately, there is a small bug in the "insert" functionality: Select the wire to the right of the branch point as shown here: Now open the quick-drop dialog box, type "Increment" and