Display the totals only at Material level in ALV

Hi........,
I am calculating the subtotals and totals. I am having the columns Company Code , Plant and Material etc.
First I did sort on table as :
gr_sorts = gr_table->get_sorts( ).
  gr_sorts->add_sort( columnname = 'C_CODE' subtotal = abap_true ).
  gr_sorts->add_sort( columnname = 'WERKS-WERKS' subtotal = abap_true ).
  gr_sorts->add_sort( columnname = 'MATNR' subtotal = abap_true ).
After that I am doing the aggregation like this :
gr_agg = gr_table->get_aggregations( ).
  gr_agg->add_aggregation( 'QUANTITY' ).
  gr_agg->add_aggregation( 'QUANTITY1' ).
  gr_agg->add_aggregation( 'DELTA' ).
It is displaying the totals and subtotals at each Company code , Plant and Material level.
But I want to display the totals only at Material level.
Guide me on the same.
Reply me as early as possible.
Thanx,
Jay
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 11:08 AM

Replace your code for sorting
gr_sorts = gr_table->get_sorts( ).
gr_sorts->add_sort( columnname = 'C_CODE' subtotal = abap_true ).
gr_sorts->add_sort( columnname = 'WERKS-WERKS' subtotal = abap_true ).
gr_sorts->add_sort( columnname = 'MATNR' subtotal = abap_true ).
with the code given below.
gr_sorts = gr_table->get_sorts( ).
gr_sorts->add_sort( columnname = 'C_CODE' subtotal = abap_false ).
gr_sorts->add_sort( columnname = 'WERKS-WERKS' subtotal = abap_false ).
gr_sorts->add_sort( columnname = 'MATNR' subtotal = abap_true ).
Hope this helps. Reward points if helpful.
Thanks,
Balaji

Similar Messages

  • Display the total number of rows for the report in OBIEE 11g

    Hi, In obiee 11g, the pagination will be 1-25. Is there any possiblity in obiee to show the total rows count next to pagination. Ex: if the result contains 120 rows. it should display after the pagination
    Records 1-25. Total of Records : 120
    Is there any way we can display the total number of rows for the report.
    Kindly help me.. Its very urgent requirement.
    MAny Thank in advacne

    Check this http://obiee100.blogspot.com/2011/07/display-total-number-of-records-in.html
    and
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10544/appsql.htm#CHDCDIDA
    You have to go something like as suggested in previous link.
    Mark as correct/helpful

  • How to display the total at the end of the column in the report.

    Hi all,
    Could any one please intimate, how to display the total at the end of the column. For example, i have a column, "sales" as the Key figure, and it has the data for all the transactions. Now, i would like to display the total at the end of the report, below the same column.
    Similarly, for all the other columns in the report, i need to display the total for all the columns in the report.
    Thanks & Regards,
    A.V.N.Rao

    Hi All,
    Thanks for many suggestions. I tried by providing the "Total" under "Calculate Results as" and also "Counter for all detailed values" under "Calcuate Single Values as", in the  "Calculations" tab of the key figure, but i am unable to get the information. Again, i am providing the requirement below:
    CHAR - A   CHAR - B   TIME CH. - 1 KF -1  KF- 2 KF - 3
    1                     RAM        2012           1         50      50
    2                     SAM         2012          2         100    200
    Result                                               3           150   250
    Assume KF -1 as  "Qty." KF-2  as "Price" KF-3 as "Sales".
    Please intimate the solution.
    Thanks & Regards,
    A.V.N.Rao.

  • I have a question about the new version of itunes. in the old version at the bottom of the sceen it display the total number of media and the size of the files. how can i get the new version to diplay this?

    in the old version at the bottom of the sceen it displayed the total number of media and the size of the files. how can i get the new version to diplay this?

    You're welcome. It was frustrating for me as well until I stumbled across "the fix"

  • Displaying the total no of records in ALV ouput.

    Hi everybody,
    I am displaying the output in ALV.
    I want display the total number of records at the top of page.( before the columns).
    Can any one throw light on this plz.
    Karunakar reddy

    To get the number of entries in your displayed table use:
    <i>DESCRIBE TABLE tab LINES wg_lines.</i>
    To display the value in a ALV Grid Control, use something like this:
    <i>DATA: sl_layout   TYPE lvc_s_layo.
    sl_layout-grid_title = wl_lines.
    CALL METHOD og_alv->set_table_for_first_display
          EXPORTING
            is_layout                     = sl_layout
            ....</i>
    Regards,
    Martin

  • So I have been using my iPad for a few months now and I recently noticed that the time display next to the playlist name in the music  app that is supposed to display the total song count and time of a playlist is way off. I have a 25 song playlist that 2

    So I have been using my iPad for a few months now and I recently noticed that the time display next to the playlist name in the music  app that is supposed to display the total song count and time of a playlist is way off. I have a 25 song playlist that is around 2 hours on my computer appears as 2003 minutes on my iPad.  It's a smart playlist limited to 25 songs if that makes any difference. Is this happening to anyone else? Any help would be appreciated!

    Greetings,
    First make an iCal backup, File > Export > Archive.
    Remove the following to the trash and restart your computer:
    Home > Library > Caches
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    __NOTE: Removing these files will remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    Once the computer is back up and running open iCal and test.
    Hope that helps.

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

  • How to display grand total only on the last page of my report

    Hello
    I need to display the grand total amount of the invoice only on the last page of every report. If the report has 1 page then the grand total will be displayed on the 1st page. If the report has 2 pages then a subtotal will be displayed on the 1st page adding up all the amounts on page 1 only, and the grand total will be displayed on the 2nd page, adding up all the amounts of page 1 and 2. If the report has 3 pages then the a subtotal will be displayed on page 1 adding up all the amounts of page 1, and another subtotal on page 2 adding up all the amounts of page 2, and the grand total are displayed on page 3 adding up the amounts of every page.
    supplier amount
    xx 100
    yy 100
    subtotal 200
    page 1 of 2 --here i need to display only the total amounts of page 1
    supplier amount
    subtotal brought forward 200 --then i need to bring total of page 1 over to page 2
    qq 300
    zz 300
    total 800 --here i have reached the end of the report and  
    need to display the grand total
    page 2 of 2
    --Currently i am displaying this on my report
    supplier amount
    xx 100
    yy 100
    total 800 --this one gives the problem cause it displays the grand total
    ---------- on page 1 of 2 even before you can see the amounts on the
    next pages
    page 1 of 2
    supplier amount
    qq 300
    zz 300
    total 800

    put the grand total in a frame and set it to print on the last page of the enclosing object.

  • Calculating and Displaying the Total for a field

    Hi all,
    I have a template that must have a field's total at the end of each page. I use <?add-page-total: InvAmt;’ ACCOUNTEDDR’?> for calculating the sum and<?show-page-total:InvAmt; 'C9G990D00';'(C9G990D00)'?> for showing the total. Its coming up properly.
    But on the last page i need the total of all the pages. I tried putting up <xdofo:inline-total display-condition="everytime" name=" InvAmt "> <xdofo:show-carry-forward name="InvAmt " format="99G999G999D00"/> in the footer but its printing the whole code as such. I tried to do a sum <?sum (ACCOUNTEDDR)?> after the for-each, but its returning a NaN. I couldnt find a solution for this.
    Please help.

    The NaN display that you get is probably due to some nulls. Filter out the nulls: <?sum(ACCOUNTEDDR[.!=''])?>
    For last page only content, take a look at the section "Last Page Only Content" in the guide here: http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187.pdf
    Hope that helps.
    Bipuser

  • Report painter, lead column doesn't display the key, only description is di

    Hi Gurus,
    I am facing a problem as the report painter report only shows the description for the objnr (charasterstic) and not the key and description thoughin the format key and description is set. Kindly suggest me the how to overcome this problem.
    Example of the problem-
    The problem is that the report displays the descriptions (like u201CRéseauAiru201D on the first line) and not the code (E100/002831/EP-AIR) that we wish in the lead clolumn.
    Regards,
    Sachin

    Hi
    Once you execute the report and the output is displayed....
    Go to Settings > Char Display > Choose "Key and Description"
    Then Choose menu Report > Save Definition
    BR,Ajay M

  • Field over flow can not display the total and subtotal in ALV

    hi
    i am running a z report with huge data in quality system.
    in 2 columns and not able to show the total and subtotal in 2 columns
    it says field overflow and cannot be dispayed.
    value is around 20character integer.

    You can create a domains with 20 positions and 2 decimal, for example.
    Than, associate this domain a data element.
    To finish assign that data element to the column you wanna sum.
    I hope help.

  • My measures for my tabular model don't display the totals any more next to the measure.

    In the lower measures grid in the Visual Studio IDE I no longer see my totals next to the measure itself. What caused them to go away and can I get them back?

    do you mean the total like on the screenshot below?
    It seems that the totals was use defined to calculate the total amount.

  • How to display the editable fields in output of an ALV report?

    Hi all,
    I have a requirement of displaying values in ALV Grid format and above this grid display i have to put some fields , that are editable.
    I know making ALV grid fields as editable, but here requirement is to display some fields before displaying the ALV grid dispaly and to enable these fields editable to user and when printing this the values entered by user also has tobe printed.
    Please help me on solving this problem? Is it possible to do this with ALV function modules?
    Thanks,
    Vamshi.

    Hi all,
    Thanks for your replies.
    But this is not  my requirement. I mentioned in my question that i too know how to edit the fields in ALV grid report.
    Here my requirement is .
                                             name :_____________
                                             amount:____________
    alv grid display
    Like above i need to display.  after name the user can be enter value and after amount also the user can be enter some value at output . But this is not the header of ALV .
    Is this possible in classical ALV or Classical report? If not please specify alternative?
    Thanks,
    Vamshi.

  • In scripts i want to display the total puchage order amount in text format

    Hi to all,
    Here my requirement is to display puchage order number,date,amount for individual order and total purchage order amount in same window in decimal format and i want to display this purchage order total amount in text format in another window ,is it possible or not
    please give solution asap urgent.
    regards,
    surya.

    Hi Surya
    It is possible ....jst call the routine in script..
    /:PERFORM SPELL_AMOUNT IN PROGRAM ZXYZ
    /:USING &REGUD-SWNES&
    /:USING &REGUD-WAERS&
    /:CHANGING &WORDS&
    /:CHANGING &DECIMAL&
    /:CHANGING &WAERS&
    /:ENDPERFORM
    P1 <C1>&WORDS& AND &DECIMAL&
    ....and write the code in  tht routine program....
    data: it_spell like spell.
    data: swnes type regud-swnes,
          waers type regud-waers,
          var1(20) type c,
          var2(20) type c.
    *&      form  spell_amount
          text
         -->input      text
         -->output     text
    form SPELL_AMOUNT  tables  input structure itcsy
                               output structure itcsy.
      read table input index 1.
    input = swnes.
      replace all occurrences of '*' in input-value with space.
      shift input-value left deleting leading space.
      translate input-value using ', '.
      condense input-value no-gaps.
      split input-value at '.' into var1 var2.
      condense: var1, var2.
      swnes = input-value.
      read table input index 2.
      waers = input-value.
      call function 'SPELL_AMOUNT'
       exporting
         amount          = swnes
         currency        = waers
      filler          = ' '
         language        = sy-langu
       importing
         in_words        = it_spell
       exceptions
         not_found       = 1
         too_large       = 2
         others          = 3
      if sy-subrc eq 0.
        refresh: output.
        output-name = 'WORDS'.
        condense waers.
        case waers.
          when 'USD'.
            concatenate it_spell-word 'DOLLARS' into
             it_spell-word separated by space.
          when 'EUR'.
            concatenate it_spell-word '' into
             it_spell-word separated by space.
           concatenate var2 'euros' into var2 separated by space.
          when others.
        endcase.
        output-value = it_spell-word.
        append output.
        output-name = 'WAERS'.
        output-value = waers.
        append output.
        condense waers.
        case waers.
          when 'USD'.
            concatenate var2 'CENTS***' into var2 separated by space.
          when 'EUR'.
            concatenate var2 'EUROS' into var2 separated by space.
          when others.
        endcase.
        output-name = 'DECIMAL'.
        output-value = var2.
        append output.
      endif.
    endform.                    "spell_amount
    this will give output as TEN DOLLARS & 20 CENTS....
    u can change the code as per ur requrement...
    Reward if Helpful....
    thnx
    Rohit

  • I'm on iTunes 11.0.0.63 for Windows. iTunes used to display the total number of songs in my library, along with total playtime and memory footprint, at the bottom of the window. How can I make it display this information like it used to?

    Hello! Thanks in advance for reading my question.
    so, I updated iTunes to 11.0.0.63 on Windows, and the new layout looks nice, but iTunes no longer gives my total song count, memory footprint, and total play-time at the bottom of the window, the way it used to. I just want to know how to get that info back. Thanks so much!

    Ctrl / or View > Show Status Bar should do it.
    Weirdly having turned mine on the menu is not there to hide it again and the shortcut doesn't work.
    tt2

Maybe you are looking for

  • Merging 2 Columns into 1 in ALV

    Hi Experts, I am using ALV grid to display data. I have two fields for icon in my internal table. if i concatenate the fields into one in the internal table itself then the second icon is displayed like @8O@ -> internal representation. Is there any w

  • How to implement "colorise" hue/saturation in game development.

    I am  a game developer, recently the art desiginer give me lots of image ,whitch changed color use photoshop colorise hue/saturation from one garyscale image . In order to reduce the image size. I have google for a lot time, I awalys do not konw the

  • Is there a specific tv apple tv works with?

    I have a sony and we are considering apple tv. Can it work with any type of TV?

  • Recommended practice for handling page level validation?

    I'm wondering what the recommended practice is for handling what I would call "page level validation?" For example, I have two text boxes. Either one text box or the other must have a non-null value. If they are both null, I want the page validation

  • Audio Units appear blank (white)

    Can anybody help me out with some Audio Unit problems. I have installed the vst to au converter and have the mda vst package of plugins. On my MacBook everything works okay. However, on my Intel MacPro (10.5.4 w/ GB '08 4.0.0) the plugins show up und