Hiding Total of the Columns  in the Class CL_SALV_TABLE

Hi ,
I am using the class CL_SALV_TABLE for displaying ALV outputs. The client is adamant on using this class only for ALV o/p.
In on o/p there are some subtotals and totals calculation. I cannot remove the totals calculation. Only way is to hide it.
I need to hide the Totals for the fields .
I know how it is done in the CL_GUI_ALVGRID by setting layout-no_totline = 'X' .
Is there any similar way in CL_SALV_TABLE  class to hide the totals.

Hi,
U can make column invisble as set_visible (' ').
For example,
data: w_column TYPE REF TO cl_salv_column,
w_columns TYPE REF TO cl_salv_columns_table,
w_column ?= w_columns->get_column( 'M' ).
w_column->set_medium_text( 'Material' ).
w_column->set_long_text( 'Material' ).
w_column->set_output_length( 20 ).
w_column->set_visible( ' ' ).
For class cl_gui_alv_grid, u have to build catlog as
data:wa_fieldcat TYPE lvc_s_fcat,
it_fieldcat TYPE TABLE OF lvc_s_fcat,
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'M'.
wa_fieldcat-coltext = 'Material.
wa_fieldcat-NO_OUT = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
or u can do like this
Retrieve the columns that u want, creat a new table and passed this table as a parameter for the creation of  cl_salv_table object
Regards
Hiren K.Chitalia

Similar Messages

  • Subtotal in ALV using class cl_salv_table

    Hello All,
    I am displaying a LAV using the class 'cl_salv_table'. I want to do a sub total on a field and at the end of each plant data I want to display the custom text "Total for Plant 'P1' " in the subtotal line.
    Please help me solve this.
    Thanks,
    Anju

    Hi,
    Firstly , add TEXT field your internal table. Then, fill this field.
    loop at itab.
    at the end of plant.
    itab-text = 'Sub total text'.
    endat.
    modify itab.
    endloop.
    Secondly,
    In fieldcat:
    loop at pt_fieldcat into ls_fcat .
        case ls_fcat-fieldname .
          when 'TEXT'.
            ls_fcat-col_pos = '1'.
            ls_fcat-tech = 'X'.
            ls_fcat-no_out = 'X'.
            modify  pt_fieldcat from ls_fcat.
       endcase.
    Thirdly;
    In Sort:
      ls_sort-fieldname = 'TEXT' .
      ls_sort-subtot = 'X'.
      ls_sort-up = 'X'.
      append ls_sort to pt_sort.

  • Suppress the column without hiding Total or Sum

    Hi,
    In my worksheet i have created Total for One column, But i want to suppress that column without hiding Total.Please help me ASAP.
    Thank You,
    Vikra,

    It is not clear what you mean by "a range of rows" ... how is that range going to be defined?
    Create a simple table:
    CREATE TABLE t (...
    Insert some sample data into it:
    INSERT INTO t VALUES (...
    Then give us a sample of the output you want.
    But sure to read the FAQ and learn how to use tags for your listing so we can read it.
    Then we can help you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Calculating the total of one column within a GridView

    Hello Everyone!
    I have created a Grid with 6 columns. The 6th column contains monetary values. I have set 'ShowFooter' to 'True' and have styled my footer however there is currently no data in the footer. What
    I'm looking to do is calculate the total of the 6th column and put the value within the footer at the bottom of the 6th column - I'm not sure how to go about this so any assistance would be much appreciated.
    Thank you

    Good morning Griffs, 
    Check this out...http://stackoverflow.com/questions/19808855/calculate-the-sum-of-gridview-column-data-and-store-its-value-in-a-variable
    Danny Rosales .NET Developer

  • How to add a total at the end of a characteristic column

    Hi All,
    There is a report where sales document number(0doc_number)is displayed in one of the columns,
    now There is a requirement where I need to add a total count of those doc numbers at the end of that column.
    I am not able to find a suitable way to do that.
    I tried exception aggregation for taking a count of doc numbers but that will be another column then while I need the total at the end of the same
    column which already exists.
    Please assist.
    Thanks,
    Dolly

    Hi Suman,
    A part of the report is :
    I need a count as 2 in above example at the bottom of sales document column.
    Dolly

  • 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.

  • Can I know the name, type, total number of column in Record Group?

    I created a record group with query dynamically.
    And then populated it.
    I don't know the column' count, type, name befause I get the query from user at runtime.
    Can I know the name, type, total number of column in Record Group?

    Unfortunately, there is no way to query the record group (RG) to get the metadata you are looking for. RGs are best used as data sources to an LOV or List Item rather than as an Array to hold the resultset of a dynamic query. For this, I would recommend you use a Collection type of construct (PL/SQL Table of Records, VArray, etc).
    Craig...

  • Adding a grand total to the columns

    Hi
    I need to add a total to one of the columns in my report. I have set Aggregation rule as "Sum" but it is not displaying Grand Total.
    Am I missing any thing or setting the rule incorrectly?
    Please advise.
    Thanks in Advance.
    Jas

    Hi Arvindh
    Thanks for your response. I am not using a pivot table I just tried to add total to the table which is created by just selecting columns required in the Define Criteria section.
    We can add a total w/o creating the pivot table also. By the way, I have found the solution. The key lies in the second step. If u want me to explain in detail. Just let me know.
    -Jas

  • Grand total of calculated column and case function in the same calcultd col

    Hi Gurus,
    In 9.0.4, the Grand total of the calculated column is not working as per the CASE function. It is taking the ELSE formula for all records. Is there a way to correct it.
    Thanks,
    Pooja

    Hi Pooja,
    In the totals ,which u mentioned try using cell sum function instead of sum function.
    Manikandan
    GKB Consulting Inc.,

  • Add Total to Stacked Column Chart on the top and another important thing is the data are from SharePoint site

    the same with the following description from another question:
    "How can I display a total on top of each column on a stacked column chart (using
    reporting services 2008)? If I use Data Labels I can display the
    values for each part of the stack on a stacked column, but I want to be display the total.
    For Example: If I have stacked column on chart with a value of 10 for the 1st stack, 20 for the 2nd stack,
    and 20 again for the 3rd stack - I want to display 50 (the SUM total) as the data label on top of the entire column..."
    and a solution for this would create a new column named SUM(category group), this can be done with data source from SQL server, but my data is from SharePoint site list. its query seems can't be changed which means I can't add a SUM column.
    what should I do with this? Can anyone give me a hand?
    thank you very much.

    Hi sophiexu,
    If we want to display a total for each column on the top of a stacked chart, we can use a matrix control to display the column total value to work around this issue.
    The following thread about how to simulate chart legend is for your reference:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cfb4fa19-b2ba-426a-804b-b5ea83d70d62/ssrs-2008-chart-legend-missing-customitems-property
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Mix AVG and Total for the same column in ALV grid

    Hi,
    We are using CL_GUI_ALV_GRID=>SET_TABLE_FOR_FIRST_DISPLAY, and I'd like to know if the following situation is possible.
    Let's say we have a column which contains a number of hours, and we set it up to subtotal by period, but as an average rather than a total (DO_SUM = "C"). This is not a problem so far.
    The problem is that we'd like for the "Grand Total" at the bottom of the ALV grid to total all of the subtotal averages, instead of calculating an average.
    Ex:
    Period            Hours
    2010/01           6.0
    2010/02           7.0
    2010/03           2.0
                    5.0  (This is an average... 6.0 + 7.0 + 2.0 / 3)
    2011/01          12.0
    2011/02           5.0
    2011/03           4.0
                    7.0  (This is an average... 12.0 + 5.0 + 4.0 / 3)
                12.0 (We want this to be a total of 5.0 + 7.0)
    So we want the "grand total" line to be 12.0 which is the sum, but it currently comes out as an average.
    Therefore we're looking to average at the sub total level, but we want a total of the subtotal levels at the grand total level for the same column.
    Thanks,
    Denis

    Refer to the suggestion given by Naimesh here Can we modify a sub-total in ALV making use of function GET_GLOBALS_FROM_SLVC_FULLSCR and the method GET_SUBTOTALS. You can see the parameter ep_collect01 refered in case of subtotals. Can you please check ep_collect00 for grand total in your case.
    As said about EP_COLLECT00,here goes a classic example Modify grand total in ALV GRID
    BR
    Keshav
    Edited by: Keshav.T on Sep 21, 2011 9:39 AM

  • Does the Class Word always have to be the last word in column name? What about Units?

    Sometimes we are required to store both a US and a metric column in the same table.  Is it ok to use the unit type as a suffix to the class word like AreaSqMi and AreaSqkm in the case of watersheds which cross both the US and Canadian borders?
    Before everyone jumps on me let me explain.  The software environment we are using is from ESRI's (Geographic Information System) for displaying maps.  The popups for displaying attribute data can only display existing columns so no derived columns.

    Use columns standarts
    http://www.codeproject.com/Articles/22947/A-Naming-Scheme-for-Database-Tables-and-Fields
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • To get a total of the column

    Hi, is possible to get a total of a column that have a date ('HH24:MI:SS') format, in a REPORT?
    Because I try with the option SUM of the attributes of the region but doesn't work.
    Thank!

    I think you have to do this manually. See my post from today talking on the leading total:
    How to display TOTAL before the rows ?
    Denes Kubicek

  • How to get the summed up total of the column?

    Hi BW gurus,
    i created a restricted keyfigure for amount,account#,0metype and for the corresponding 0metype and account# i am getting the amount for the fiscal period(12 months in column).
    i need to get the total for the amount for each fiscal period(columnwise total).
    If any more details needed plz reply me.
    Help is highly appreciated.
    Thanks in advance,
    Sam Mathew

    Hello Sam,
    You can try displaying the results row of 0metype or account#. Hope this helps.

  • Short dump when I do total or sub total in the ALV report

    Hi,
    When I do total or sub-total on the currency field in the ALV report, it'll give a short dump like
    " The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X)".
       Short text of error message:
       Technical information about the message:
       Message classe...... "0K"
       Number.............. 000
       Variable 1.......... " "
       Variable 2.......... " "
       Variable 3.......... " "
       Variable 4.......... " "
       Variable 3.......... " "
       Variable 4.......... " "
    Trigger Location of Runtime Error
        Program                                 SAPLSLVC
        Include                                 LSLVCF36
        Row                                     2,726
        Module type                             (FORM)
        Module Name                             FILL_DATA_TABLE
    sometime when I do the page down on the ALV report, the same short dump is coming.
    Can anyone help me out.
    Thanks
    Selva

    Hi,
    I'm getting this short dump in the standard program.
    I'm getting ALV report display perfectly. the problem is, when I do total or subtotal on the currency fields.
    2704
    2705 ************************************
    2706 * Column per Fieldcat Entry
    2707 ************************************
    2708         ls_lvc_data-value = space.
    2709         clear ls_lvc_data-style.
    2710         loop at it_fcat_local assigning <ls_fcat>
    2711                 where tech ne 'X' and no_out ne 'X'.
    2712           if l_invisible eq 'X'.
    2713             clear l_invisible.
    2714             if <ls_fcat>-do_sum is initial.
    2715               continue.
    2716             else.
    2717               clear ls_lvc_data-col_pos.
    2718             endif.
    2719           endif.
    2720
    2721           add 1 to ls_lvc_data-col_pos.
    2722
    2723           assign component <ls_fcat>-fieldname
    2724                            of structure <ls_data> to <l_field_value>.
    2725           if sy-subrc ne 0.
    >>>>>             message x000(0k).
    2727           endif.
    2728
    in this standard program, I'm getting the dump. the line is mentioned above in the code.

Maybe you are looking for

  • R/3 - Content server problem

    Hello, we have a SAP R/3 4.7 server linked to a SAP Content Server 6.2 version. This works ok. The only problem is that the Content Server saves all the documents + metadata from the documents in one big database. (With metadata I mean name of the do

  • IWSRPSessionReleaseService interface not found

    Hi, I need to change the MastHead iView according our functioanality. For that i have downloaded the par file make changes . I am not able find the interface com.sap.portal.iviewserver.wsrpservice.consumer.wsrpconsuming.sessionmanagement.IWSRPSession

  • How to express the unsigned byte in Java?

    we know that data are normally in unsigned byte format when communicating with COMM. How to express the unsigned byte in Java? java only supports 127 ~ -127 as byte, but I need 255~0. Anyone know how? Thanks!

  • Seeking overall guidance with network program causing OS lockup

    To start with I do realize that the problem is at source an OS one and therefore unresovable directly by me but I looking for guidance (mainly this is a good idea or a waste of time) in trying to isolate the problem and come up with a workaround if n

  • Capture/Ingest issue Premiere 2014

    hi we are having issues with capture on Premiere Pro. System is: Premiere Pro 2014 Blackmagic Ultra Studio 4k Digibeta/DVCAM MAC MINI We are going in SDI with embedded audio at SD 720x576 ingesting to PRORES HQ 1. Audio goes out of Sync especially on