Webdynpro ABAP - ALV how can i display Total of Column

Hi friends,
Webdynpro ABAP - ALV how can i display Total of Columns.
Please tell me any metod is there or any solution.
Thanks,
Kumar.

Hi
You can take help of following code snippet to create totals for a particular column
Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
  DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lr_column          TYPE REF TO cl_salv_wd_column,
        lt_column type salv_wd_t_column_ref,
        ls_column type salv_wd_s_column_ref.
Data:  lr_field_amnt type REF TO CL_SALV_WD_FIELD.
* get reference of ALV component
  lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
  wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
*  get function settings
  lr_function_settings ?= wd_this->alv_config_table.
* display columns in correct order
  lr_column_settings ?= wd_this->alv_config_table.
  lt_column = lr_column_settings->get_columns( ).
  loop at lt_column into ls_column.
CASE ls_column-id.
when 'AMOUNT'
* aggregate field
        CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
          EXPORTING
            FIELDNAME = 'AMOUNT'
          RECEIVING
            VALUE     = lr_field_amnt.
* create aggregate rule as total
        CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
          EXPORTING
            AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
          RECEIVING
            VALUE            = lv_aggr_rule.
endcase.
Regards
Manas DUa

Similar Messages

  • How can I display total playlist size in iTunes 11.  It used to be visible for each playlist or CD, but I can't find it now.

    How can I display total playlist size in iTunes 11.  It used to be visible for each playlist or CD, but I can't find it now.

    The Friend: Thanks from me too for that super simple fix!! I feel kinda stupid for not knowing that.
    Too bad Apple didn't:
    Give it a more intuitive name than "Status Bar"... "status" is what is shown at the top of the window along with the Artist and Song Title, e.g.; how far into the song/podcast/video I've played and how much is left,
    Put the keyboard commands in a more prominent place in their release notes when version 11 came out so we could more easily find the information they decided to hide in this attempt to make the desktop less cluttered and
    Allow us the option of displaying the data size along with the song count and duration just beneath the playllist title. The status bar is a redundant listing of information except for the data size!  Poorly conceived!
    Perhaps Apple will remedy this in a future release. For those of us who like to burn our playlists to CD, DVD and even a thumb drive this information is essential. WIthout it, we're left to guess whether a given playlist will fit on our target device.
    Thank you!

  • How can I display all the columns on the screen without scrolling from side to side?

    My clinic software has many columns. How can I display all the columns without having to scroll from left to right all the time?

    If the software you are using doesn't offer the ability to increase or decrease document size, as many do, then the only way is to increase your screen resolution. If that's not possible, maybe you can decrease your font size?  If you can't do any of these, I think you're out of luck!

  • In alv , how can i  display message like 'NO records in the table'in spool

    When there are no any records , i have to display a message in spool like 'No records exist'.
    how can i do this?/
    Thanks,
    Suresh.

    hi check this..
    if the final internal table is empty then you will show like this..
    if not it_final[] is initial.
    call function reuse_alv_list_display.
    elseif.
    message s000 with 'no data available for the selection'.
    endif..
    regards,
    venkat

  • Webdynpro ABAP ALV in SAP ECC6 - EHP4: To disable Column Selection

    Hi All,
    We are using SAP ECC6 EHP4 and  for Webdynpro ABAP application, after each column a vertical white line is appearing, and I need to hide this..
    SAP suggested us to disable COLUMN SELECTION I have tried the below code but still I am not able to get this done..
    Can you please suggest the appropriate method to achieve the same.
    Code:
    * show tab COLUMN SELECTION in Settings page
    CALL METHOD wd_this->alv_conf_table->if_salv_wd_std_functions~set_column_selection_allowed
      EXPORTING value = ABAP_false..
    here alv_conf_table refers to CL_SALV_WD_CONFIG_TABLE.
    Thanks in advance.
    Thanks
    Srinivas
    Edited by: Srinivas Manchi on Apr 22, 2010 11:35 AM
    Edited by: Srinivas Manchi on Apr 22, 2010 1:06 PM

    You have to disable the DDic binding on the column before your override text will show up:
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
      data l_salv_wd_table type ref to iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv( ).
      data l_table type ref to cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      data l_column type ref to cl_salv_wd_column.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'POSTING_DATE' ).
      data l_header type ref to cl_salv_wd_column_header.
      l_header = l_column->get_header( ).
      l_header->set_prop_ddic_binding_field(
        property =  if_salv_wd_c_ddic_binding=>bind_prop_text
        value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
      l_header->set_text( `Posting Date` ).

  • How can i get totals in columns with formated searches

    How can i do this with SDK if it isn´t posible since formated searches

    This is not possible with formated searches.
    With SDK, depends on if it is Matrix or Grid, on if it is a system form/your own form. But basically, loop throw the form or datasource, and do the sumatory.
    Regards,
    Ibai Peñ

  • How can I display the descriptor column from a view in my BR message

    I have a table, Memberships, that contains a column for staff id. The staff data is on a remote database and I have created a view to access the required data. I have set the descriptor sequence for the name column of the staff view but the BR still displays the id.
    I'm assuming that because staff is a view and has no capi of its own, the membership capi cannot call the staff capi function display_label.
    I still would like to display the name of the staff member instaid of the ID. Can anyone suggest a workaround to force the display but without having to customize the membership capi after it has been created by headstart?

    Hi,
    try altering the code to create the capi.
    I modified this code allready quite a lot to achieve my goals.
    I also had that problem, and solved it by altering the code that generates the display_label. For each display_label funtion, I add a call to a package- function 'APPPA_LABEL.display_label' with parameters the tablename and the pk of the record. In the packagefunction, you can write your own definition of the display-label.
    The Productivity Boosters look a bit difficult in the beginning, but when you get to know them, you can achieve some good results.
    Greetings,
    Kristof

  • How to upload file in webdynpro abap alv

    Hello Friends,
    how to upload file in webdynpro abap alv
    Regards
    Narendra
    Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
    Edited by: Thomas Zloch on Jun 6, 2011 11:55 AM

    Hi Narendra,
    You ahve to search before posting. This discussed many times.
    You need to use file upload ui element to upload data. and display in alv.
    Please go thorugh this..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    Re: Upload .xls file in WDABAP
    http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
    Cheers,
    Kris.

  • How can I display the vendor associated with result of my running total sum

    I have a report that lists vendors with their most vecent order dates.  I need to set up a rotation so that the vendor with the latest order date is next to be selected.  I used the running total summary to pick the latest date.  How can I display the vendor associated with result of my running total summary?

    If your "latest" order date means the "oldest" order date, why don't you try this:
    Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
    This will make your oldest order your first record shown. 
    You can then create a running total count for each record.
    Lastly, in your section expert under conditional suppress X+2 formula, write this:
    {#CountRecords}>1
    The result will only show the oldest record in your report.
    I hope that helps,
    Zack H.

  • Webdynpro abap ALV export to excel with images problem

    Hello experts,
    I'm having problems with standard excel export functionality in webdynpro abap ALV.
    In my table i have images taken from content server (employee photos) linked with URL to a table_cell Image, when i export the table to excel using standard function the images is showed as a broken picture with the following text:
    "The linked image cannot displayed. The file may have been moved, or deleted. Verify that the link points to the correct file and location."
    I'm running on sap basis 7.02 SP13 and implemented the notes 1975765 and 1985288 but not resolved this issue.
    Do you have any ideas?
    Thank you.

    Hi Jorge,
    Are you able to download the ICONs from alv table? try to use some icon source '~Icon/Add' and check out if you can download it to excel successfully.
    FYR:
    Regards,
    Rama

  • How can I display the holiday list in the portal

    System
    ECC 6.0
    EP 7.0
    ESS/MSS 1.0
    how can I display the holiday list in the portal.
    There will be a holiday list created by the ABAP-er in ECC, how can I include it in the portal?

    Hi,
    Create a WebDynpro Iview to create a simple application that pulls information from the RFM(that you has ABAPer created).
    Start from <a href="https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#backend">Here</a>
    (Or)
    To get an idea, download the world time BP from below link. It has calender with holidays displayed.
    http://www.sweetlets.com/world_times_preview.html
    Regards,
    N.

  • How can i display all the query items to a table?

    how can i display all the query items to a table in a jsp file?
    i always have an out of memory error..

    any body??any idea?
    is it possible thru configuration or i have to write a program by the abaper??
    Biswa

  • How do you display total time for playlist in Itunes 11

    how do you display total time for playlist in Itunes 11

    "I can see the total time in my playlist on the computer but not on my device??"
    I have just posted a question asking the same!
    Did you have any joy?

  • How can I display XSLT transformer errors on a web page ?

    Hi,
    I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
    static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
            // instantiate the TransformerFactory.
            TransformerFactory tFactory = TransformerFactory.newInstance();
            // creates an error listener
            XslErrorListener xel = new XslErrorListener();
            // sets the error listener for the factory
            tFactory.setErrorListener(xel);
            // generate the transformer
            Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
            // transforms the XML Source and sends the output to the HTTP response
            transformer.transform(new DOMSource(docXML), new StreamResult(pw));
    }If an exception is thrown during the execution of this code, its error message is displayed on the web page.
    This is the listener class:
    public class XslErrorListener implements ErrorListener {
        public XslErrorListener() {
        public void warning(TransformerException ex) {
            // logs on error log
            System.err.println("\n\nWarning on XEL: " + ex.getMessage());
        public void error(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nError on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
        public void fatalError(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
    }When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
    [Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
    Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
    "Could not compile stylesheet".
    How can I display the real cause of the error directly on the web page?
    Thanks,
    Andrea

    This code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
    As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
    In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
    I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
    (1) capture the Transformation exception on the server;
    (2) extract the message from the exception and put it into a message that can be easily understood by the user;
    The current error message that you have going to the web browser is not useful.
    And you should not have the Transformation exception sent to the web browser either.
    What you are attempting to do with the exception is not appropriate.
    Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
    />

  • How can I display True/False in my dropdownlist as "Yes" and "No"?

    Hi All,
    I want to bind a dropdownlist to a boolean value (so it's either true or false).  I'm particularly interested in using two-way binding to when the user changes from "yes" to "no" the boolean value automatically changes from "true" to "false."  But, I want the user to see "yes" and "no" as the options, rather than "true" and "false".
    How can I display "yes" and "no" and still take advantage of binding?  Or can I not use binding in this circumstance?
      -Josh

    Solution 1:
    In order to display Yes/No for True/False, you may specify labelFunction for the dropdownList.
    In MXML:
    <s:DropDownList labelFunction="myLabelFunction" />
    In actionscript:
    private var arr:ArrayCollection = new ArrayCollection(["true","false"]);
                private function mylabelFunction(item:Object):String
                    if(item.toString() == "true")
                        return "yes";
                    else return "No";
    OR
    Solution2:
    may be u can try making an array collection like
    private var arr:ArrayCollection = new ArrayCollection([{label:"yes",value:"true"},{label:"no",value:"false"}]);
    and specify labelField for the dropdownList like
    <s:DropDownList labelField="label" dataProvider="{arr}" />

Maybe you are looking for

  • Time capsule not recognizing Toshiba external hard drive

    I have a new time capsule unit.  it is up and running and works great.  I bought a Toshiba 1TB external drive and plugged into the usb port on time capsule.  I restarted Time capsule and it does not show up on my Macbook air anywhere (just bought thi

  • What's wrong with my phone? It's getting hot when I use or charge it

    Every time I charge or use  my phone, it gets extremely hot. Also, the battery life goes down real fast while I'm using it

  • ERROR USING HTML textarea with Java String

    I have a form in HTML that has a textarea for input messages. When user press submit, a java servlet gets the information and stores it in a Database as a String. Later, I have a JSP thata retrieves that information from the database and put it as th

  • Menu exit for Split Deliveriy screen of shipment

    Hi, i want to add a SELECT ALL button in the split deliveries screen of shipment. (VT02n->Deliveries->Split Deliveries). I have no clue how to do that. Is there any menu exit or screen exit for doing this. Can anyone kindly help me in this? regards,

  • Export song library to PDF document Mac vs Windows

    I have used iTunes under OSX and Windows and a feature that I cannot find under OSX is the ability to export my whole song library to a PDF document. In Windows I did this and it automatically created a PDF document nicely formatted with the album co