Sub totals and Sort Text issue in ALV report

Hi,
I have requirement for list of Purchase orders.
1st. sort the list by vendor (This i did by using sort)
2nd. Vendor name should be display after sorting the lines.
3rd  should count the no lines which has mark 'X' in field ELIKZ and sum the total counts and display it for every vendor after the sorted line.
I could sort the list by vendors. but don't know how to display the vendor name after those lines. then sub total also.
Please help
Moderator Message: spec-dumping is not allowed. Please use the availble resources and put some effort from your end.
Edited by: kishan P on Oct 27, 2010 3:02 PM

Hi,
I have requirement for list of Purchase orders.
1st. sort the list by vendor (This i did by using sort)
2nd. Vendor name should be display after sorting the lines.
3rd  should count the no lines which has mark 'X' in field ELIKZ and sum the total counts and display it for every vendor after the sorted line.
I could sort the list by vendors. but don't know how to display the vendor name after those lines. then sub total also.
Please help
Moderator Message: spec-dumping is not allowed. Please use the availble resources and put some effort from your end.
Edited by: kishan P on Oct 27, 2010 3:02 PM

Similar Messages

  • Sub total icon is not displaying in alv report output

    Hi friends ,
    In alv report display on menu bar the icon : subtotals is not displaying at the output , I should not give subtotal in each field catalog .
    Plz give me solution, points will be rewarded.
    with regards,
    prasad.

    Hi,
    I think u r using PF-STATUS parameter in function module,
    if u use this parameter, you sholud give the icon name etc..
    otherwise by default it will appear.
    Check your code again.
    Give me exact requirement, if possible paste the code.
    Regards,
    Chandu

  • Sub-total and Total for a column having checkboxes in WD ABAP ALV

    Hello Experts,
    I have used ALV in We bdynpro ABAP to display my output. There are 2 columns that are checkboxes in Output. I want a sub-total and total for those two columns. I know tht total and sub-total functionality is available only for numeric fields .
    Is there any other indirect way by which i can achieve the same ?

    Hi Ragini,
    Please refer this thread: [alv total and subtotal|How to display graphs;.
    I hope it helps.
    Regards
    Arjun

  • Sub-totals and Totals calculations....?

    How to Calculate the Sub-totals and Grand totals in ABAP Programs.

    Hi Bhaskar,
    In my opinion this can be acheived in two ways:
    1. Using ALV GRID DISPLAY
    2. Using AT NEW  , ON CHANGE OF  , etc events.
    1. In the ALV field catalogue u create entries for all the fileds to b
    displayed in the output list.
    Here, we need to put DO_SUM = 'X' .
    eg
      ****************fieldcatalog*********************
    data:anytab type slis_t_fieldcat_alv with header line.
    **************pgm name**********************
    data:anypgnm type sy-repid.
    **************events*************************
    anytab-fieldname   = 'MATNR'.
      anytab-seltext_m   = 'Material Number'.
      anytab-col_pos     = 0.
      anytab-outputlen   = 20.
      anytab-emphasize   = 'X'.
      anytab-do_sum = 'X' .                  <----
    here it is.
      append anytab to anytab .
      clear  anytab .
    Now wen u call the fm REUSE_ALV_GRID_DISPLAY , plz pass anytab ie fieldcatalog  and  the tabel with records to  b displayed .
    this would  sum the fields at the end.
    2.  Alternately ....for SUb-totals ;
       Sort itab in an ascending manner.
    Data : wa_itab    like line of itab,
              wa_subtotal type i.
    " fieldname1 in itab is the key field
    " fieldname2 is the value field
    LOOP at itab into wa_itab .
      wa_subtotal = wa-subtotal  + itab-<fieldname2>.
      AT END OF <fieldname1> .
          " your programming logic for subtotal
           Write :/ wa_itab-fieldname1 , wa_subtotal.
           Clear  wa_subtotal.
       ENDAT.
       " write :/  ....if u need to write any lofgic values ....
    ENDLOOP .
    Note : plz sc if a field in itab that is left of fieldname1 changes
              the AT END OF event is triggered.
             Therefoe , see that  pur key fields towards left in itab.
    FYI : u can try ON CHANGE OF....ENDON....
                          AT NEW .....ENDAT
                           AT LAST....ENDAT
                           AT FIRST ......ENDAT  events for ur own understanding
    i hope this helps u.
    Regards
    panakj

  • Interactive Report Sub-total and total

    Hi friends,
    I have an employee interactive report with group by job name and also showing the salary sub-total for each and every job(group by).
    I have an requirement like to highlight the sub-total for each and every job with a background color so that the user can identify the sub-total with the color, and also whether it is possible to display an overall total @ last in the report with a label named "Total Salary" in which it calculates the overall salary is also to be highlightened with the background color.
    Also is it possible to display a text "Sub-total" besides each and every salary sub-total  of job(group by). Currently if we display a sum for the salary then im getting the total's but with out a text named total.
    Since i can see the highlighted feature in interactive report but im not sure how to apply it for the sub-total and total column.
    I have reproduced the example in apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    In the application 9494 named "test" in page1.
    Thanks in advance.
    Brgds,
    Mini

    Hi, Mini,
    style=background-color:red;
    But that Total region color dint change.The code for style should be in "Form HTML Element Attributes". However, this changes the background color only for the Total value not for the whole row.
    If you want to change for the whole row, you need to change the template that is selected for the region.
    I changed the region template in your application to "Borderless Region" and made the changes to the "Borderless Region" template, it now shows the background color for Total Value.
    <table class="t20Region t20Borderless #REGION_CSS_CLASSES#" id="#REGION_STATIC_ID#" border="0" cellpadding="0" cellspacing="0" summary="" #REGION_ATTRIBUTES#>
    <thead><tr><th class="t20RegionHeader" id="#REGION_STATIC_ID#_header">#TITLE#</th></tr></thead>
    <tbody id="#REGION_STATIC_ID#_body">
    <tr><td class="t20ButtonHolder">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>
    </tbody>
    </table>The below does the trick. :)
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>Note: I made the changes to "Borderless Template", but you can copy the template to your own and apply this change.
    Regards,
    Natarajan

  • How to subtotal and sort in ABAL webdynrp ALV?

    Hi Experts,
       In my ALV table I have CARRID and PRICE.
       I want to sort the data by CARRID and then group the data based on CARRID and get price subtotal of it.
       I also want a grand total of the price.
       How to programatically subtotal and sort in ABAL webdynrp ALV?
       Please provide sample code snippet if possible.
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Oct 26, 2010 1:30 PM

    Hi Gopal,
    Didn't you get solution with your earlier post?
    How to show Subtotal in webdynpro ALV(ABAP)? Kindly help!
    Regards,
    Vikram

  • Sub totals and Totals

    I am developing a query using SQVI.
    How do I insert subtotals and totals for certain fields at the end of the query report.
    Thanks
    Sandeep

    hI SANDEEP  .....
    if you  go with  layou mode   then    there will be   3  pops  like   delete  ,  TOOL BAR  , SORT FIELDS ....etc ..
    there is  TOOL BAR   with the following  options   ...
    Background
    Heading
    Normal
    <b>Subtotals</b>
    Key Columns
    Positive
    Negative
    Control Levels
    Background (intensified
    Header (intensified)
    Normal (intensified)
    Sum totals (intensified
    Keys (intensified)
    Positive (intensified)
    Negative (intensified)
    Control lev.(intensifie
    so  that  by selecting the  fields   .....  liek sub total   acrros the  Fiscal  year  can be done  ....  Document wise   sub total  ..... vendor wise   , customer wise  ... like  based  on the fields   selection for sub total  and   total can  be  done ...
    Girish

  • Urgent : how to calculate sub total and grand total in smart forms

    Hi Friens..how to calculate sub total and grand total in smart forms..How to print them in smart forms...Also kindly explain how to handle events in smart forms..Thanks in advance

    Re: Subtotal with Table Node in smartforms

  • Hide sort(ascending and descending) buttons in an alv report.

    Hi,
    I want to hide the  sort(ascending and descending) buttons in an alv report.
    can any one help me with the code?
    I am not able to use the parameter IT_TOOLBAR_EXCLUDING
    of SET_TABLE_FOR_FIRST_DISPLAY of class  CL_GUI_ALV_GRID.
    Regards,
    Himanshu.

    Hi,
    data it_exclude type ui_functions.
    Exclude Standard Functions
        PERFORM f_excludetoolbar USING obj_cust_grid
                              CHANGING it_exclude.
    FORM f_excludetoolbar  USING  u_obj_cust_grid  TYPE REF TO cl_gui_alv_grid
                        CHANGING  c_it_exclude     TYPE ui_functions.
    Exclude Standard Functions
      CLEAR: c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_check              TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_refresh            TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_copy           TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_copy_row       TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_cut            TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_delete_row     TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_append_row     TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_insert_row     TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_move_row       TO  c_it_exclude.
    APPEND u_obj_cust_grid->MC_FC_SORT_DSC          TO  c_it_exclude.
      APPEND u_obj_cust_grid->MC_FC_SORT_ASC  TO  c_it_exclude.
      APPEND u_obj_cust_grid->MC_FC_SORT           TO  c_it_exclude.*
    ENDFORM.                    " f_excludetoolbar
    Hope it will helpful for you.
    Reward if found helpful.
    Regards,
    SB

  • Issue in ALV Report

    Hi,
    I have a issue in ALV Report for displaying one field's data into output.
    I am getting data into all other fields in ALV Report except for this field.
    This field & related fields are declared as below: in final internal table.
    sta_no     TYPE z3status,
    status(10) TYPE c,
    Here z3status is of type Char(1).
    In Report
    I have put a condition :
    IF i_tab-sta_no EQ 1.
       i_tab-status = 'Created'.
    ELSE.
       i_tab-status = 'Closed'.
    ENDIF.
    and to field catalog also i am passing right information as for every other field in ALV Report.
    Till the point use of REUSE_ALV_LIST_DISPLAY F.M also final internal table is having status field filled.
    But in output nothing gets displayed for Status field.
    Can anybody tell me what can be the issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    I have no problem in data fetching into final internal table.
    Everything is coming well to REUSE_ALV_DISPLAY F.M.
    But still Status field data is not getting displayed.
    I have posted some code for reference:
            LOOP AT t_z3manboxid INTO wa_z3manboxid.
              wa_result-manifest_no     = wa_z3manboxid-zmanno.
              wa_result-item_no         = wa_z3manboxid-item_no.
              IF l_item_no NE wa_z3manboxid-item_no.
                wa_result-piece_quantity  = wa_z3manboxid-vemng.
                wa_result-unit            = wa_z3manboxid-vemeh.
                wa_result-manifester      = wa_z3manboxid-usnam.
                wa_result-manifest_sta_no = wa_z3manboxid-z3status.
                IF wa_result-manifest_sta_no EQ 1.
                  wa_result-manifest_status = c_created.
                ELSEIF wa_result-manifest_sta_no EQ 2.
                  wa_result-manifest_status = c_in_transit.
                ELSEIF wa_result-manifest_sta_no EQ 3.
                  wa_result-manifest_status = c_arrived.
                ELSEIF wa_result-manifest_sta_no EQ 4.
                  wa_result-manifest_status = c_closed.
                ENDIF.
              ENDIF.
              l_item_no  = wa_z3manboxid-item_no.
              APPEND wa_result TO t_result.
              CLEAR: wa_result, wa_z3manboxid.
            ENDLOOP.
    Building field catalog following code is added:
    For status call is as below:
      PERFORM f_build_fieldcat  USING c_tab
                                      c_manifest_status
                                      c_space
                                      c_space
                                      c_mannf_status
                                      c_space1
                                      15.
    FORM f_build_fieldcat USING p_tabname p_fldname
                                p_rtabname p_rfldname
                                p_fldhdg p_check
                                p_length.
      CLEAR t_fieldcat_ln1.
      ADD 1 TO g_col_pos.
      t_fieldcat_ln1-tabname       = p_tabname.
      t_fieldcat_ln1-fieldname     = p_fldname.
      t_fieldcat_ln1-ref_tabname   = p_rtabname.
      t_fieldcat_ln1-ref_fieldname = p_rfldname.
      t_fieldcat_ln1-ddictxt       = c_l.
      t_fieldcat_ln1-seltext_l     = p_fldhdg.
      t_fieldcat_ln1-no_zero       = space.
      t_fieldcat_ln1-do_sum        = space.
      t_fieldcat_ln1-col_pos       = g_col_pos.
      t_fieldcat_ln1-no_out        = space.
      t_fieldcat_ln1-just          = c_c.
      t_fieldcat_ln1-qfieldname    = space.
      t_fieldcat_ln1-checkbox      = p_check.
      t_fieldcat_ln1-input         = p_check.
      t_fieldcat_ln1-reptext_ddic  = p_fldhdg.
      IF p_fldname EQ c_manno.
        t_fieldcat_ln1-key     = c_x.
        t_fieldcat_ln1-hotspot = c_x.
      ELSE.
        t_fieldcat_ln1-key     = space.
        t_fieldcat_ln1-hotspot = p_check.
      ENDIF.
      t_fieldcat_ln1-outputlen      = p_length.
      t_fieldcat_ln1-intlen         = p_length.
      t_fieldcat_ln1-ddic_outputlen = p_length.
      APPEND t_fieldcat_ln1 TO t_fieldcat1.
    ENDFORM.                    " f_build_fieldcat
    FORM f_build_sortcat USING p_fldname.
      CLEAR t_sortcat_ln1.
      ADD 1 TO g_col_pos.
      t_sortcat_ln1-spos      = g_col_pos.
      t_sortcat_ln1-fieldname = p_fldname.
      t_sortcat_ln1-up        = c_x.
      t_sortcat_ln1-down      = space.
      t_sortcat_ln1-subtot    = c_x.
      APPEND t_sortcat_ln1 TO t_sortcat1.
    ENDFORM.                    " f_build_sortcat
    FORM f_build_layout.
      t_layout1-zebra           = c_x.
      t_layout1-no_vline        = c_space1.
      t_layout1-reprep          = c_x.
      t_layout1-detail_popup    = c_x.
      t_layout1-window_titlebar = text-005.
      t_layout1-no_scrolling    = c_space1.
      t_layout1-detail_titlebar = text-005.
      t_layout1-numc_sum        = c_x.
      t_layout1-get_selinfos    = c_x.
      t_layout1-min_linesize    = 132.
    ENDFORM.                    " f_build_layout
      DATA: l_pgm TYPE syrepid,
            l_exit(1) TYPE c.
      CLEAR: l_pgm,
             l_exit.
      l_pgm = sy-repid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program      = l_pgm
                i_callback_user_command = c_user_command
                is_layout               = t_layout1
                it_fieldcat             = t_fieldcat1
                i_save                  = c_a
                it_events               = t_eventcat1
           IMPORTING
                e_exit_caused_by_caller = l_exit
           TABLES
                t_outtab                = t_result
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc NE 0.
        l_exit = l_exit.
      ENDIF.
    To ALV F.M t_result table is updated with correct data.
    But it is not getting displayed.
    What can be the reason!
    Can anybody give the solution!
    Thanks for your replies.
    Thanks,
    Deep.

  • Field Length issue in ALV Report

    Hi,
    I am using FM REUSE_ALV_GRID_DISPLAY to display few fields. Among them I have a field with length 200 characters text.
    During ALV report display I am able to see only 128 characters, But when I download it and see the field, the it is showing complete text.
    Can anybody help me out?
    Thanks,
    Ramakrishna

    Check out the last answer of this post.
    Re: ALV Grid Display - 255 characters
    <i>I found a SAP document called "Using ALV for list display.pdf" that says the following:
    "Size of data fields: While the list-based ALVList can display only tables of up to 90 columns, the control-based ALVGrid and ALVFullscreen have the limitation of 128 characters per data cell."</i>
    Please make sure to award point for helpful answers and mark the post as solved.  Thanks.
    Regards,
    Rich HEilman

  • Issue in ALV reporting

    Dear All,
    I have an issue in ALV reporting. Pls look at the follow table.
    <u>Duty Post</u>      <u>Date</u>          <u>Time</u>
    jurong                   12/06                3.45
    jurong                   13/06                3.50
    jurong                   14/06                4.50
    In the above table jurong is repeated. I do not want jurong to be repeated but other fields should be present.
    Kindly help me solve it.
    Regards,
    Karthikeyan
    <u></u><u></u>

    Hi Karthik,
    Another way of handling this without doing if else comparision is using the SORT functionality.
    I am giving an example here:
    Sort data in the output based on Duty_Post
      CLEAR itab_sort.
      itab_sort-fieldname = 'DUTY_POST' . (Replace DUTY_POST with the actual field name used in ur report)
      itab_sort-up = c_x.
      APPEND itab_sort.
      CLEAR itab_sort.
    Then while calling the ALV FM: include the ITAB_SORT table also.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
                  i_callback_program      = w_call_back_pgm
                  i_grid_title            = w_text
                  it_fieldcat             = itab_fldcat
                  it_sort                 = itab_sort[]
                  is_layout               = w_layout
                  it_events               = itab_events[]
                  i_default               = 'X'
                  i_save                  = 'A'
             IMPORTING
                  e_exit_caused_by_caller = w_exit_by_caller
                  es_exit_caused_by_user  = w_exit_by_user
             TABLES
                  t_outtab                = itab_output_gr
             EXCEPTIONS
                  program_error           = 1
                  OTHERS                  = 2.
    This way data would not repeat.
    Hope this helps.
    Rgds,
    HR

  • How we can   drill-down, sorting, traffic lights,  in ALV report

    hi gurus ,
    how we can   drill-down, sorting, traffic lights,  in ALV report .
    please any one suggest that...
    regards,
    praveen

    Check the sample code for drill-down, sorting, traffic lights,  in ALV report.
    REPORT YMS_COLOURALV NO STANDARD PAGE HEADING.
    TYPE-POOLS: SLIS, ICON.
    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF IMARA OCCURS 0,
    LIGHT(4) TYPE C,
    MATNR TYPE MARA-MATNR,
    MTART TYPE MARA-MTART,
    MAKTX TYPE MAKT-MAKTX,
    COLOR_LINE(4) TYPE C,
    TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell
    END OF IMARA.
    DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.
    START-OF-SELECTION.
    PERFORM GET_DATA.
    PERFORM WRITE_REPORT.
    FORM GET_DATA.
    WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
    IMARA-MATNR = 'ABC'.
    IMARA-MTART = 'ZCFG'.
    IMARA-MAKTX = 'This is description for ABC'.
    APPEND IMARA.
    WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.
    IMARA-MATNR = 'DEF'.
    IMARA-MTART = 'ZCFG'.
    IMARA-MAKTX = 'This is description for DEF'.
    APPEND IMARA.
    WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.
    IMARA-MATNR = 'GHI'.
    IMARA-MTART = 'ZCFG'.
    IMARA-MAKTX = 'This is description for GHI'.
    APPEND IMARA.
    LOOP AT IMARA.
    IF SY-TABIX = 1.
    IMARA-COLOR_LINE = 'C410'. " color line
    ENDIF.
    IF SY-TABIX = 2. " color CELL
    CLEAR XCOLOR.
    XCOLOR-FIELDNAME = 'MTART'.
    XCOLOR-COLOR-COL = '3'.
    XCOLOR-COLOR-INT = '1'. " Intensified on/off
    XCOLOR-COLOR-INV = '0'.
    APPEND XCOLOR TO IMARA-TCOLOR.
    ENDIF.
    MODIFY IMARA.
    ENDLOOP.
    ENDFORM. "get_data
    FORM WRITE_REPORT.
    DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
    LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.
    LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.
    PERFORM BUILD_FIELD_CATALOG.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FIELDCAT
    TABLES
    T_OUTTAB = IMARA.
    ENDFORM. "write_report
    FORM BUILD_FIELD_CATALOG.
    DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    CLEAR: FIELDCAT. REFRESH: FIELDCAT.
    CLEAR: FC_TMP.
    FC_TMP-REPTEXT_DDIC = 'Status'.
    FC_TMP-FIELDNAME = 'LIGHT'.
    FC_TMP-TABNAME = 'IMARA'.
    FC_TMP-OUTPUTLEN = '4'.
    FC_TMP-ICON = 'X'.
    APPEND FC_TMP TO FIELDCAT.
    CLEAR: FC_TMP.
    FC_TMP-REPTEXT_DDIC = 'Material Number'.
    FC_TMP-FIELDNAME = 'MATNR'.
    FC_TMP-TABNAME = 'IMARA'.
    FC_TMP-OUTPUTLEN = '18'.
    APPEND FC_TMP TO FIELDCAT.
    CLEAR: FC_TMP.
    FC_TMP-REPTEXT_DDIC = 'Material Type'.
    FC_TMP-FIELDNAME = 'MTART'.
    FC_TMP-TABNAME = 'IMARA'.
    FC_TMP-OUTPUTLEN = '10'.
    APPEND FC_TMP TO FIELDCAT.
    CLEAR: FC_TMP.
    FC_TMP-REPTEXT_DDIC = 'Material'.
    FC_TMP-FIELDNAME = 'MAKTX'.
    FC_TMP-TABNAME = 'IMARA'.
    FC_TMP-OUTPUTLEN = '40'.
    APPEND FC_TMP TO FIELDCAT.
    ENDFORM. "build_field_catalog

  • Can we control Font and Font size in Non-alv report list ?

    Hi Experts,
    Can we control Font and Font size in Non-alv report list ?
    Regards
    vishnu

    Hi,
    see if this is useful to you,
    PRINT-CONTROL SIZE 2 COLOR BLACK FONT 5.
    you can go through this link,
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba62335c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Abhijit G. Borkar

  • Alv - sub  totals and avg

    Hi gurus,
    I have a problem, please help me out.
    Iam doing an report program with alv display. In that iam calculating the AVG for the workcenter wise for the field TAT.
    please observe my below o/p in general ALv  format.
    work center-- TAT- Tat(Yes/no)
    qm0010------ 1 --  yes
    qm0010-------2 --  yes
    qm0010------ 4 -- yes
    qm0010------ 7 -- No (because >5)
    Subtotal(qm0010)--3  (avg caluculated)
    qm0020--  4 --- yes
    qm0020-7-- No (because >5)
    qm0020--10 - No (because >5)
    qm002010- No (because >5)
    Subtotal(qm0020)-- 7 (avg caluculated).
    this is the rough o/p iam getting . this is acheived by programming the Field catalog for TAT field i.e... do_sum  = 'C'.
    then giving the sort table to REUSE_ALV_GRID_DISPLAY.
    Now my problem is:
    I want the avg to be calcuted by the business formula which is:
    avg  =  sum of(TAT within 5 days) / total no of the entries .
    Ex:
    work center-- TAT- Tat(Yes/no)
    qm0010------ 1 --  yes
    qm0010-------2 --  yes
    qm0010------ 4 -- yes
    qm0010------ 7 -- No (because >5)
    Subtotal(qm0010)---*7/4=2 (avg caluculated for tat<5)*
    qm0020--  4 --- yes
    qm0020-7-- No (because >5)
    qm0020--10 - No (because >5)
    qm002010- No (because >5)
    Subtotal(qm0020)--4/4=1 (avg caluculated for tat<5).
    How can i acheive the above, since in field catalog and alv, i think we cannot pass any conditions(like for TAT which is less than 5). So is there any other way to acheive the above.
    Please understand the problem and give me(please directly dont suggest any programs , since iam not a expert to understand)..
    Please explain me in detail.  Points will be duly rewarded.
    Thanks in advance........Chaitu
    Edited by: chaitanya on May 30, 2008 12:33 PM
    Edited by: chaitanya on May 30, 2008 12:38 PM
    Edited by: chaitanya on May 30, 2008 12:39 PM

    Hi Chaitanya,
       You can display in your report with totals and sub-totals using alv, but not average. That functionality has not provided by sap. Do one thing add one more extra column Average in your output, do the calculation for average and pass the value in the coding itself. Then last display your report with Average field.
    Rgds,
    Bujji

Maybe you are looking for

  • JTable & objects

    Is there a way of adding an object to a table but displyaing text not related to that object. Wat is he on about ur probably thinking??? More Desc: I hava a Jtable displaying appointments for a dentist, the jtable is filled with appointment objects[

  • Three issues regarding photos on my iPad1.

    1.   Somehow I ended up with two different photo folders on my iPad 1; one titled iPad Photo Folder (4,111 photos) and one titled Saved Photos (1,841 photos).  How can I get all photos into one folder?  I don't care if I move photos from one folder t

  • Link Color Problem in Internet Explorer

    I am completely new to Dreamweaver and I only know how to make a very basic page using the design view. I have added some images to my site that are links, and they should have black borders both before and after being visited. However, these links o

  • Code for internal project

    Dear All, I have been given a project in which we have to enter  the Co Code, period, posting date & Posting year at the selection screen. Upon entering these values the report should get displayed showing the Co Code(which is being entered), bus are

  • Serial Communication delay

    I am experiencing a delay when I run my commands through LV7. The following is my pc settings: Baud rate:57600 bits: 8 Parity: 1 stop: 1 no flow control However when I run the exact same command on hyperterminal I get no delay. I am writing 15 bytes