How to use aggregation -Average using a class

Hi Gurus,
   In my report i have used cl_salv_table  and for event i have used cl_salv_events_table, now i want to calculate average for some of the fields as such subtotal calculation . In my normal alv reports i have used the class lcl_event_receiver also, but for the report which iam using a class , i d'not know how to compain both the class  (i.e) cl_salv_table, class lcl_event_receiver. Help me to solve the problem.

cancelled

Similar Messages

  • How can I make server use single class loader for several applications

    I have several web/ejb applications. These applications use some common libraries and should share instances of classes from those libraries.
    But applications are being deployed independently thus packaging all them to EAR is not acceptable.
    I suppose the problem is that each application uses separate class loader.
    How can I make AS use single class loader for a set of applications?
    Different applications depend on different libraries so I need a way that will not share library for all applications on the domain but only for some exact applications.
    When I placed common jar to *%domain%/lib* - all works. But that jar is shared between all applications on the domain.
    When I tried to place common jar to *%domain%/lib/applibs* and specified --libraries* attribute on deploying I got exception
    java.lang.ClassCastException: a.FirstDao cannot be cast to a.FirstDaoHere http://download.oracle.com/docs/cd/E19879-01/820-4336/6nfqd2b1t/index.html I read:
    If multiple applications or modules refer to the same libraries, classes in those libraries are automatically shared.
    This can reduce the memory footprint and allow sharing of static information.Does it mean that classes should be able to be casted ?

    You didn't specify which version of the application server you are using, but the config is similar as long as you know what to look for. Basically, you need to change the classloader delegation. Here's how it is done in 8.2
    http://download.oracle.com/docs/cd/E19830-01/819-4721/beagb/index.html

  • Re: How do you create and use "common" type classes?

    Hi,
    You have 2 potential solutions in your case :
    1- Sub-class TextNullable class of Framework and add your methods in the
    sub-class.
    This is the way Domain class work. Only Nullable classes are sub-classable.
    This is usefull for Data Dictionary.
    The code will be located in any partition that uses or references the supplier
    plan.
    2- Put your add on code on a specific class and instanciate it in your user
    classes (client or server).
    You could also use interface for a better conception if needed. The code will
    also be in any partition that uses or references the supplier plan where your
    add on class is located.
    If you don't want that code to be on each partition, you could use libraries :
    configure as library the utility plan where is your add-on class.
    You can find an example of the second case (using a QuickSort class,
    GenericArray add-on) with the "QuickSort & List" sample on my personal site
    http://perso.club-internet.fr/dnguyen/
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    http://perso.club-internet.fr/dnguyen/
    Robinson, Richard a écrit:
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Richard,
    Your question about "utility classes" brings up a number of issues, all of
    which are important to long-term success with Forte.
    There is no such thing as a static method (method that is associated with a
    class but without an implicit object reference - this/self/me "pointer") in
    TOOL, nor is there such thing as a global method (method not associated
    with a class at all). This is in contrast to C++, which has both, and
    Java, which has static methods, but not global classes. Frequently, Forte
    developers will write code like this:
    result, num : double;
    // get initial value for num....
    tmpDoubleData : DoubleData = new;
    tmpDoubleData.DoubleValue = num;
    result = tmpDoubleData.Sqrt().DoubleValue;
    tmpDoubleData = NIL; // send a hint to the garbage collector
    in places where a C++ programmer would write:
    double result, num;
    // get initial value for num....
    result = Math::Sqrt(num);
    or a Java programmer would write:
    double result, num;
    // get initial value for num....
    result = Math.sqrt(num);
    The result of this is that you end up allocating an extra object now and
    then. In practice, this is not a big deal memory-wise. If you have a
    server that is getting a lot of hits, or if you are doing some intense
    processing, then you could pre-allocate and reuse the data object. Note
    that optimization has its own issues, so you should start by allocating
    only when you need the object.
    If you are looking for a StringUtil class, then you will want to use an
    instance of TextData or TextNullable. If you are looking to add methods,
    you could subclass from TextNullable, and add methods. Note that you will
    still have to instantiate an object and call methods on that object.
    The next issue you raise is where the object resides. As long as you do
    not have an anchored object, you will always have a copy of an object on a
    partition. If you do not pass the object in a call to another partition,
    the object never leaves. If you pass the object to another partition, then
    the other partition will have its own copy of the object. This means that
    the client and the server will have their own copies, which is the effect
    you are looking for.
    Some developers new to Forte will try to get around the lack of global
    methods in TOOL by creating a user-visible service object and then calling
    methods on it. If you have a general utility, like string handling, this
    is a bad idea, since a service object can reside only on a single
    partition.
    Summary:
    * You may find everything you want in TextData.
    * Unless you anchor the object, the instance will reside where you
    intuitively expect it.
    * To patch over the lack of static methods in TOOL, simply allocate an
    instance when required.
    Feel free to email me if you have more questions on this.
    At the bottom of each message that goes through the mailing list server,
    the address for the list archive is printed:
    http://pinehurst.sageit.com/listarchive/.
    Good Luck,
    CSB
    -----Original Message-----
    From: Robinson, Richard
    Sent: Tuesday, March 02, 1999 5:44 PM
    To: '[email protected]'
    Subject: How do you create and use "common" type classes?
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance

  • How to use custom password encryptor/decryptor class for jdbc connection

    I am in process of migrating application from Jrun server to weblogic . In jrun we use to provide our custom class which used to decrypt the password provided in resource file as below
    <username>webclt</username>
    <password>AAAAAAASSSSSSSCCCCCCCCCCCCCC</password>
    <encrypted>true</encrypted>
    <encryption-class>com.CustomEncryptor</encryption-class>
    How could i use the same class while configuring datasource in weblogic 10 server.

    1- By default, the jre will read the user's cacerts which runs the program.
    2- You can specify another cacerts this way :
    System.setProperty("javax.net.ssl.trustStore", my_trust);
    For the case 1 and 2, you need to put the certificate in the cacerts.. Or,
    3- You implement a custom TrustManager which, for example, accepts all certificates :
    class X509TrustManagerTrustAll implements X509TrustManager {
    public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public boolean isServerTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public boolean isClientTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
    return null;
    public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
    public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
    and you call it in the right place in the code you wrote (SSLContext,..)
    Hope it helps and deserves a duke star ;)

  • How to use abap memory in global class

    Hi experts,
                     I want to  know how to use abap memory in global class. when i try write export and import statement its showing
    error is export statement does not support in object oriented concept.
    Thanks
    Ramesh Manoharan

    Hi Ramesh,
    Export and import statements were not allowed to use in  classes. Create a global variable in public section of that class of type of  export parameter.Then pass value to the global variable of class  by calling that class.
    by
    Prasad GVK.

  • How to use logging in the actions classes extends standart actions?

    Hello!
    I have some action classes extends standart actions, for example Z_ExtMaintainBasketDispatcherAction extends MaintainBasketDispatcherAction. I tried to use logging functionality in my classes but there were no my lines in log and trace files.
    For example I added followed lines in basketPerform() method of Z_ExtMaintainBasketDispatcherAction:
    boolean isDebugEnabled = log.isDebugEnabled();
    if(isDebugEnabled){
    log.debug("++++++++++++++++ Test tracing in B2B_SNG. ++++++++++++++++");
    but in there was no such line neither in log file nor in trace file.
    How I can use logging functionality in my own classes? I need it for tracing and logging.
    CRM 5.0
    regards, Lev

    Well, here is solution. I created a log formatter and log destination like this:
    <log-formatters>
    <log-formatter name="application_sap.com/crm~b2b" type="TraceFormatter" pattern="%d,%-3p %t %s %l %m"/>
    </log-formatters>
    <log-destinations>
    <log-destination name="application_sap.com_crm.b2b" type="FileLog"
        count="10" effective-severity="ALL" limit="10000000" pattern=".\log\applications\isa_ru.log">
    <formatter-ref name="application_sap.com/crm~b2b"/>
    </log-destination>
    </log-destinations>
    and new log controller like this:
    <log-controller effective-severity="ALL" name="ru.sng.isa">
    <associated-destinations>
    <destination-ref name="application_sap.com_crm.b2b" association-type="LOG"/>
    </associated-destinations>
    </log-controller>
    in file META-INF\log-configuration.xml
    Thanks everybody for help!
    Regards, Lev.

  • V.Important: How to use se24 to build a class step by step:  Points assured

    hi all
    I am new to OO based abap programming.  I want to build a class using SE24 but i dont know where to put the various pieces of code in SE24.
    Can anyone please provide a step by step procedure (including screenshots) on how to use SE24 to build a class using most of the features like constructor, attributes , interface , friend etc.
    Documents would be more helpful as compared to links.
    Points will be awarded
    thanks in advance

    Hi,
    Just follow the below givenlink. Using this you can create a class in SE24.
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/f4b1406fecef0fe10000000a1550b0/content.htm
    I think the below document would be
    a very good introduction
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0a33479c-0b01-0010-7485-dc8c09d6bc69
    See the Following Dem Program:
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_DIALOG_BOX Splitter Control for Screen with Dialog Box
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    Regards,
    Padmam.

  • How to use a protected attribute of class cl_gui_alv_grid

    Hello all,
           i have a scenario where i need to use the attribute 'm_appl_events' which is protected attribute. in need to add this event type into my events and add this to registered events.
        when i tried to use this with refrence to class i defined, it showing an error message 'access to protected attribute m_appl_events is not allowed. i already inherieted the cl_gui_alv_grid class into my class
         can any one please tell me how exactly could i use the protected attribute.
    Thanks,
    raju N

    Hi Krishna,
    Protected method or attrubute can be accessed through Inheritence or Friends functionality. So you can inheritence easily in you case . so that you can access the variable in the Inherited sub class only. So you can write 2 methods ie GET or SET ing the value of your protected method.
    I think this informatio may help you.
    Best Regards,
    Vijay

  • How to use function of an abstract class??

    Hi all,
    I want to use the format(object obj) function of the package java.text.Format. But as the Format class is an abstract class i could not instantiate it, so that i can call the format(object obj) method using the dot(.) operator.
    I know what is an abstract class. i've studied and tried to understand. as everybody knows, studied the perfect example(because i've read it in all the abstract class tutorial, books) of the Shape class. But still i dont understand how am i going to use that format(object obj) method. Please help me..

    Instead of using the abstract class Format use the
    concrete classes DecimalFormat
    SimpleDateFormat etc check java.text APIS
    http://java.sun.com/j2se/1.4.2/docs/api
    Hi!! Thanks both of you.
    If Sun has a abstract class then there must be a
    concrete class which extends that abstract class .It
    is always better to check the APIWhat do you mean by this line. Is it true for all the abstract classes in the jdk?

  • How to specify different horizontal restore & collapse icon for af|panelSplitter using Skinning based on Style class or position?

    Hello,
    I am trying to provide different horizontal restore & collapse icon for af|panelSplitter using Skinning based on Style class or position. I have 2 af:panelSplitter with orientation="horizontal" - One with positionedFromEnd="true" one with positionedFromEnd="false". I want to specify the horizontal collapse and restore icon using Skinning. I want specify different icons based on positionedFromEnd. When I specify icons they are appearing for both splitters. I gave 2 different styleClass to these splitter but it is not taking them in account,
    JSPX Page -
    <af:panelSplitter orientation="horizontal" splitterPosition="196" positionedFromEnd="false" id="pnlSplitterLeft" collapsed="false" styleClass="panelSplitterLeftClass">
      <f:facet name="first">
      <!-- Content of First Facets -->
      </f:facet>
      <f:facet name="second">
      <af:panelSplitter orientation="horizontal" splitterPosition="196" positionedFromEnd="true" id="pnlSplitterRight" collapsed="false" styleClass="panelSplitterRighClass">
      <f:facet name="first">
      <!-- Content of First Facets -->
      </f:facet>
      <f:facet name="second">
      <!-- Content of First Facets -->
      </f:facet>
      </af:panelSplitter>
      </f:facet>
    </af:panelSplitter>
    CSS Skinn
    af|panelSplitter::horizontal-restore-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Open.gif");
    af|panelSplitter::horizontal-collapse-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Close.gif");
    af|panelSplitter.panelSplitterLeftClass::horizontal-restore-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Open.gif");
    af|panelSplitter.panelSplitterLeftClass::horizontal-collapse-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Close.gif");
    af|panelSplitter.panelSplitterRighClass::horizontal-restore-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Right_Open.gif");
    af|panelSplitter.panelSplitterRighClass::horizontal-collapse-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Right_Close.gif");
    It is always showing Left_Open.gif and Left_Close.gif for both splitters. But I want different image.
    How to specify different horizontal restore & collapse icon for af|panelSplitter using Skinning based on Style class or position?
    - Sujay

    CSS attribute selectors are what you are talking about, but binding the selector with EL is a more-common approach. Using selectors like this require you to ensure browser support.
    af|panelSplitter.panelSplitterRighClass::horizontal-collapse-icon [positionedFromEnd=true]

  • How to use aggregator with filter  operator

    Hi,
    how can i use aggregation with filter operator. i have a table, form this table i have to calculate this valurs
    1. no of notes
    2. no of open notes where attribute =y (logic for one notes is count(notes) where attribute =y)
    2. no of closed notes where attribute =n
    for this i used like this
    table --> two filter operators 1 is for attribute =y and one is for attribute=n ----> to aggregaror operator. --- i am getting error.
    Regards,
    Jyothy

    Jyothy,
    Try this..
    U can use the below code in the aggregator without filters
    sum(decode(notes,'y',1,0) adn sum(decode(notes,'n',1,0)
    Regards,
    Sivarama

  • How do I see how much data I use on average a month?

    I have AT&T, how can I see how much data on average I use in a month?

    Login to https://www.att.com/olam/loginAction.olamexecute?goto=welcome
    Then click: Analyze Past Usage
    You'll see a graph showing the past size months of usage.
    Total up your usage from April til Sept then divide by 6.

  • How to print a footer using CL_GUI_ALV_TREE class

    Dear Abapers.
    I'm using SET_TABLE_FOR_FIRST_DISPLAY method from CL_GUI_ALV_TREE class to display a report in an ALV Tree and I need to display the footer.
    Using the PRINT_END_OF_PAGE event from class CL_GUI_ALV_GRID we can display the header, but I need to use CL_GUI_ALV_TREE and there is no method for END_OF_PAGE.
    Can you please help me?
    Many thanks.
    Estela

    Dear Abapers.
    I'm using SET_TABLE_FOR_FIRST_DISPLAY method from CL_GUI_ALV_TREE class to display a report in an ALV Tree and I need to display the footer.
    Using the PRINT_END_OF_PAGE event from class CL_GUI_ALV_GRID we can display the header, but I need to use CL_GUI_ALV_TREE and there is no method for END_OF_PAGE.
    Can you please help me?
    Many thanks.
    Estela

  • How can I use  EntityManager in my pojo class in a JSF web app?

    Hi guys,
    I need to use EntityManager in my pojo class in a JSF web app. Because pojo is not managed by web container, I cant use resource injection.
    Is there any way I do that ? Thanks.

    If you want something done fast, then why don't you try reading the API. The API:
    a) points your to the Swing tutoral on "Using Text Components" which has a working example
    b) shows you 3 ways to load data into the JEditorPane.

  • How to check if still using a class or id

    Just wondering if there is a tool which will tell me if i am
    still using a particular id or class on my site
    Many thanks
    Mark

    "quiero mas" <[email protected]> wrote in message
    news:g1nof8$dms$[email protected]..
    > Just wondering if there is a tool which will tell me if
    i am still using a
    > particular id or class on my site
    I do that using Find and Replace.
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet

Maybe you are looking for

  • What adaptor do I need to connect from mini display port to a dvi monitor

    I want to connect a 2nd monitor to my mac mini via the mini display port, will the Apple adator do this ok or will I need an active adaptor

  • Purchase Order with Invoice Plan

    Hi, I need to understand working with Invoicing plans for a Purchase Order. Especially the service PO for the rents and other related services. How the PO is linked to the Invoice Plan and how the process happens in SAP? Thanks in advance!

  • Class Not Found Error Doesn't Make Sense

    Possible answer to CNF Exception problems. I have written a simple slide show applet that displays a sequence of jpgs. In order to make it work for the majority of people and older systems I used the AWT Applet rather than the JApplet framework. I co

  • Intermittent battery charger problem

    The green LCD on my Blackbook magnetic end of the battery charger sometimes glows dull when I connect it and has to be disconnected and reconnected again before it glows green . Any idea what's up - connnections are clean and no sign of loose or bet

  • Playing songs off iPOD without installed software.

    Ok so I am aware that if we set my iPod classic to manually manage and disk use mode, we can transfer it around with us and plug it into a computer with itunes we can listen to the music right off the ipod. I am wanting to be able to either install s