SAP class override

Hi,
Does anybody know if there is any workaround to override final clases in ABAP ? I need to add new functionality to cl_salv_tree thats why I need to override it. When trying to override it with jus ordinary method:
CLASS zcl_salv_node DEFINITION INHERITING FROM cl_salv_node.
  PUBLIC SECTION.
    METHODS: change_item2 IMPORTING settings TYPE lvc_s_layi.
ENDCLASS.                    "zcl_salv_node DEFINITION
I get an infromation that it is the final class. Any workaround ?

Hello Lukasz
I would create a "wrapper" class by copying CL_SALV_TREE (e.g. to ZCL_SALV_TREE) and remove all coding from the methods.
Next I would add an instance attribute MO_TREE (of TYPE REF TO cl_salv_tree).
Within the FACTORY method of your class you simply call the FACTORY method of CL_SALV_TREE and instantiate MO_TREE.
Within the methods of your class you simply call the corresponding method of me->mo_tree except for those methods which you would like to override.
Regards
  Uwe

Similar Messages

  • I want authorization for SAP classes

    my company are provided computer courses.I want authorization for SAP classes.what are i doing for this process

    Hi,
    can you please reformulate your question? Are you looking to become an authorized training partner? If so which country?
    Thanks,
    Arnold

  • Authoring Environment Tutorial or SAP Class

    Hi ,
    In order to learn the details of Authoring Environment ( LSO 300 or LSO 600 ) , what is the best ? SAP class HR270: SAP Learning Solution Overview, seems the only class were Authoring Environment is presented , is HR270 a good class (enough detailed) ?
    Or if somebody as a link to Authoring Environment  tutorial, that will be also welcome .
    Thank you .

    Sorry - not sure I understand the second half of your question.
    Basically, if the test is 3rd party and SCORM compliant, then 'Pass/Fail' results will be passed to the backed ERP tables.  If the provider puts results in the 'suspend data' field, you will be able to report on those with a custom report.
    If the test is created in the AE using the testing tool, then results should be passed to the backend (pass/fail and test item stats) as long as the test is not a 'self-test' (must be a pre-test/post-test or stand-alone test.)  And if you require passing of the post-test to pass the class, then you can inhibit the learner from receiving a qual.  Hope this helps.
    Cheers,
    Sharon

  • Class override, how to create the child class and then the base class

    I started to write a program for a smart DMM, the problem is every version of the DMM the company change the communication commend.
    My idea is to write a child class for every DMM version and every SubVI of the child will override the base class SubVI.
    My problem is, i want first to create one child class and after i will see every thing is work,  start to create the base class. that way i will see if am thinking the right way.
    My question is
    How can i create a child class and then create the base class and configure the SubVi of the child class to be Override of the base class?
    I tried to search in the property of the class but i didn't see nothing.
    Thanks
    Solved!
    Go to Solution.

    This can be done and I've done it on occasion.
    You simply create the base class with the dynamic dispatch methods you require (connector panes need to be identical to thos of the child class).
    Then set the inheritance of the class to inherit from this base class.  If your method is defined as a dynamic dispatch method in the parent, you'll most likely now have some errors (unless your child method was already DD in which case you might just be OK already).
    To change the inheritance of a class, right-click the properties of the class in your project and select properties.  I believe the ineritance tree is at the lower end of the properties.  Click on the "change inheritance" (or something similar) to choose the class from which you now wish to inherit.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Some generic anonymous class overriding methods compile, while others don't

    I have the following (stripped-down) code. The abstract class SessionHandler<T> is used by other code to define and run an operation that needs a session to something. This is best done in my code with anonymous classes, because of the shear number of operations defined. In the EntityOps<T> class, these work great. But, in the last class shown here, SomeClass, the anonymous class definition fails, though the semantics are almost identical. (List<T> vs.List<AnotherClass>) What am I doing wrong here? Or is this a bug in Java?
    Thanks, Tom
    public interface IEntityOps<T> {
        T get();
        List<t> getAll();
    public abstract class SessionHandler<T> {
        abstract T handle(Session session) throws Throwable;
        public final T perform() {
            ... calls handle(session) ...
    // These anonymous class definitions compile fine!
    public class EntityOps<T> implements IEntityOps<T> {
        public T get() {
            T ret = null;
            ret = new SessionHandler<T>() {
                T handle(Session s) throws Throwable {
                    T ret = (some T object calculation);
                    return ret;
            }.perform();
            return ret;
        public List<T> getAll() {
            T ret = null;
            return new SessionHandler<List<T>>() {
                List<T> handle(Session s) throws Throwable {
                    List<T> ret = (some List<T> calculation);
                    return ret;
            }.perform();
    // This anonymous class definition fails with the error:
    // "SomeClass.java": <anonymous someMethod> is not abstract and does not override abstract method handle()
    //     in SessionHandler at line XX, column XX
    public class SomeClass {
        public List<AnotherClass> someMethod() throws {
            List<AnotherClass> ret = null;
            ret = new SessionHandler<List<AnotherClass>>() {
                List<AnotherClass> handle(Session s) throws Throwable {
                    List<AnotherClass> ret = (some List<AnotherClass> calculation);
                    return ret;
            }.perform();
            return ret;
    }

    I added @Override above the abstract method override, and it provides this additional error:
    "HousingConfigImpl.java": method does not override a method from its superclass at line 382, column 17
    I have also reconstructed the code layout in a separate set of classes that have no dependancies, but there's no error coming from these!
    public class CustomThing {
    public interface ISomeInterface<T> {
        List<T> interfaceMethod();
    public abstract class SomeAbstractClass<T> {
        private Class _c = null;
        public SomeAbstractClass(Class c) {
            _c = c;
        protected Class getC() {
            return _c;
        public abstract T methodToOverride(Object neededObject) throws Throwable;
        public final T finalMethod() {
            try {
                return methodToOverride(new Object());
            } catch(Throwable e) {
                throw new RuntimeException(e);
    import java.util.List;
    import java.util.Collections;
    public class SomeInterfaceImpl<T> implements ISomeInterface<T> {
        public List<T> interfaceMethod() {
            return new SomeAbstractClass<List<T>>(CustomThing.class) {
                public List<T> methodToOverride(Object neededObject) throws Throwable {
                    return Collections.emptyList();
            }.finalMethod();
    import java.util.Collections;
    import java.util.List;
    public class SomeOtherClass {
        public List<CustomThing> someMethod() {
            return new SomeAbstractClass<List<CustomThing>>(CustomThing.class) {
                public List<CustomThing> methodToOverride(Object neededObject) throws Throwable {
                    return Collections.emptyList();
            }.finalMethod();
    }So, there's something about my code that causes it to be, somehow, different enough from the example provided above so that I get the error. The only differences in the override method definitions in my actual code are in the return type, but those are different in the example above as well. Here are the class declarations, anonymous abstract class creation statements, and abstract method declarations from the actual code.
    public abstract class SessionHandler<T> {
        abstract T handle(Session session) throws Throwable;
    public class EntityOps<T> implements IEntityOps<T> {
                return new SessionHandler<List<T>>(_mgr, _c, "getAll" + _c.getName()) {
                    List<T> handle(Session s) throws Throwable {
    public class HousingConfigImpl implements IHousingConfigOperations, ISessionFactoryManager {
                ret = new SessionHandler<List<Tenant>>((ISessionFactoryManager)this, Housing.class, "getTenantsInNeighborhood") {
                    List<Housing> handle(Session s) throws Throwable {I can't for the life of me see any syntactical difference between my example and the real code. But, one works and the other doesn't.

  • Where can I find this standard SAP class?

    Hi all,
    Which PAR file contains this class:
    com.sapportals.wcm.control.search.SearchLanguageControl
    It is a standard search component called "search_language". I have two problems with this component:
    1. Too many languages are displayed (e.g. Greek and Serbian. However, I don't know why these languages are displayed)
    2. I want that the user language is only selected and not the predefined language, too.
    Kind regards
    Philipp Kölsch

    Hi,
    Refer this link it explain you how to set default language.
    http://help.sap.com/saphelp_nw04/helpdata/en/44/e4561731e767d6e10000000a155369/frameset.htm
    Regards,
    Senthil K.

  • Abap 00 and HR SAP classes

    Hi,
    I am developer and beginner in HR
    I found many classes for HR in the repository. I think, the most interesting class for me is
    CL_HRBAS_PLAIN_INFOTYPE_ACCESS
    because I need to read single infotypes and not all records. The problem is: I found no examples for this class.
    Can someone help me further?
    Thank you!
    Have a nice time!
    Patrizia

    Hi Patrizia,
    I know this is a bit late but hopefully it still helps.
    In short you would be better to use one of the available function modules (e.g. HR_READ_INFOTYPE, HR_INFOTYPE_OPERATION) or to use the PNP logical database statements (GET PERNR, RP_PROVIDE) as Jamie alluded to.
    For detailed info on how the HR Infotypes have been implemented using ABAP Objects  you can refer to this SAP Library content which explains the decoupled infotype framework
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/43/a503b963161bbfe10000000a1553f7/frameset.htm">Decoupling Infotypes</a>
    For understanding why the HR Infotypes were decoupled you can refer to this SAP Library content introducing concurrent employment:
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/16/08c73c52aacf5be10000000a114084/frameset.htm">Infotype Framework for Concurrent Employment</a>
    If you still really want to use ABAP Objects to perform this action then please ignore class CL_HRBAS_PLAIN_INFOTYPE_ACCESS since that is used for PD infotypes only. You can refer to the example code I'm pasting below for reading a PA infotype:
    *& Report  zptest0002
    *& Test program to use the ITF to read infotype 0002 for a person
    REPORT  zptest0002.
    * data declarations
    DATA: prelp_tab       TYPE hrpad_prelp_tab.
    DATA: a_read_infotype TYPE REF TO if_hrpa_read_infotype.
    DATA: data_exists     TYPE boole_d.
    DATA: i_pa0002      TYPE TABLE OF p0002,
          wa_pa0002 LIKE p0002.
    DATA t_pernr TYPE pernr-pernr.
    * supply existing pernr for testing or implement a parameter
    t_pernr = 2.
    * initiate the infotype framework
    CALL METHOD cl_hrpa_masterdata_factory=>get_read_infotype
      IMPORTING
        read_infotype = a_read_infotype.
    CLEAR i_pa0002.
    REFRESH i_pa0002.
    * perform the read operation
    CALL METHOD a_read_infotype->read
      EXPORTING
        tclas         = 'A'
        pernr         = t_pernr
        infty         = '0002'
        subty         = space
        objps         = space
        sprps         = if_hrpa_read_infotype=>unlocked
        begda         = if_hrpa_read_infotype=>low_date
        endda         = if_hrpa_read_infotype=>high_date
        no_auth_check = 'X'
      IMPORTING
        infotype_tab  = prelp_tab
        data_exists   = data_exists.
    * cast prelp return value into infotype structure
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn_tab
      EXPORTING
        prelp_tab = prelp_tab
      IMPORTING
        pnnnn_tab = i_pa0002.
    * loop to process or get first record
    CLEAR wa_pa0002.
    READ TABLE i_pa0002 INDEX 1 INTO wa_pa0002.
    * write to the screen or perform other operations
    WRITE: / 'First name: ', wa_pa0002-vorna.
    WRITE: / 'Last name: ' , wa_pa0002-nachn.
    Please reward points if you found this helped. ***
    regards,
    Paul

  • Enhanced SAP class with new methods - Not showing these from standard task

    Dear Gurus,
    I have enhanced SAP standard class with new methods. After I have activated my new methods and would like to create a workflow task using these new methods. when I create a task and input object category as "ABAP Class" and object type is SAP enhanced class. When I try to drop down for methods SAP is not showing my new methods. I do not know why. Am I missing any? Any help would be appreciated.
    Note: Remember I am trying to use SAP ABAP class custom methods.
    Thanks,
    GSM

    Hi,
    Your thread has had no response since it's creation over
    2 weeks ago, therefore, I recommend that you either:
    - Rephrase the question.
    - Provide additional Information to prompt a response.
    - Close the thread if the answer is already known.
    Thank you for your compliance in this regard.
    Kind regards,
    Siobhan

  • Why in primary key class overrided in EJB?

    in EJB ... why in primary key class Object's Equals() and HashCode() method's were overridden ??

    please see the other question.. sorry for inconvinance..

  • SAP class (or FM) populating the list of CATS request to approve by the manager

    Hello guys,
    I have a problem when I want to approve CATS request via ESS. The problem is that despite the task is being created and is appearing in manager´s UWL, when I click on the task, the CATs list is displaying all CATs request but one subtype. This is what I see in frontend:
    And this is what I see in backend:
    What I would like to know is if there is any customizing that filters what subtypes are available to be displayed in frontend, as the subtype that appears in backend and not in front end is new, and I suspect I am missing something.
    Any hint?
    Thanks!

    Hello Mohsin,
    Of course.
    First screenshot belongs to the manager CATS overview in ESS, so this is the request the manager sees pending to approve through ESS.
    The second screenshot belongs to backend. These are the request the manager sees after clicking in the task in SBWP transaction.
    As you see, in backend he sees one request more (subtye PRES). This subtype has been recently configured and I am afraid I have lost some customizing. My question is if there is some place where you filter which subtypes are displayed for manager approval.
    The subtype request triggers a workflow, and approved and posted in backend goes to the right infotype, so there must be some customizing missing in portal.
    Kr,

  • Whats ABAP class should I take for SAP BW

    Hi Gurus:
                I want to learn ABAP to code in  SAP BW and R/3. I am planning to take some class from SAP Education, what SAP class you experts recommend.
    I am working on SAP BW and my focus is to get better in ABAP coding for BW purpose.
    Please suggest me.

    You can go through SAM's Teach Yourself in 21 days for ABAP. This good one for Basics. There are lot of posts in SDN regarding routines. You can also go through them and i hope you get some idea ......... Regarding SAP Class from SAP Education i have no idea
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    http://www.geocities.com/rmtiwari/
    Regards
    Naga

  • Class to run standard SAP Query

    Hi,
    Could you help me with finding standard SAP class to run query created in SQ01?
    Thank you

    Hi,
    You can create the TCode for the Sap Query and use to run query.
    refer the links to create tcode for sap query..
    how to create a tcode for abap query
    tcode for sap query

  • Enhance standard class with event handler method

    In trying to enhance a standard class with a new event handler class, I find that the ECC 6.0 EHP4 system does not appear to recognise the fact the method is an event handler method.  The specific example is a new method to handle the event CL_GUI_ALV_GRID->USER_COMMAND. 
    I notice that the flag called Active has not been ticked - see image below.  Perhaps this is the reason why the event handler is not being triggered.
    Note that there is an event handler for the same event in the standard class which obviously is executed as expected.  Any ideas on limitations in the system or I am missing a step?
    Thanks
    John

    Thank you for your replies.
    There is a bug in the ALV handler of a standard SAP class (when executed in ITS WebGUI) and I was hoping to create a custom event handler as an Enhancement to execute some custom code to sort of "handle the bug". 
    I agree - ideally it should be done in a Z class but that will not give me access to the object methods and attributes of the enhanced class.
    Cheers,
    John

  • How to deploy a single class to the web portal?

    EDIT: I've been able to create the deployment file. I found an older copy of NWDS and the old project folders are working perfectly again. I'll cross that bridge with the new version another time.
    Firstly, sorry if this post is in the wrong section ... I looked around and couldn't find a section that I thought fitted.
    A while back my company created a simple login module to similate a single sign on for our network. The module worked perfectly for a few months, then about a months ago it started rejecting logins for no apparent reason. I've asked all involved with the system and everyone claims that they haven't touched anything and that the problem must be within the Java class.
    Due to recent workstation upgrades, I now have the latest version of NetWeaver Development Studio installed (SDN_Preview_SR_5_IDECE71). This new version does not like the old project that was created for this task, and I am struggling to create a new project which will do what I need.
    Can someone point me to up-to-date documentation that explains how I can create a project which contains only a single java class that is to be deployed to a web portal? The class that is created extends the SAP class; com.sap.engine.interfaces.security.auth.AbstractLoginModule.
    Please note that I have already look at some of the online documentation, for example: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
    And that was of no help as it seems the documentation is no longer up-to-date with the current version ... or am I looking at the wrong documentation?
    Another possibility is to install the older NetWeaver Development Studio, the problem here is I do not know where I can download a copy for Windows? I can only find the latest version for Windows online.
    Thanks in advance for any and all assistance,
    Edited by: Markus Schönenberger on Sep 30, 2010 3:07 PM

    Hi Andreas,
    You need to do the following:
    - Upload the text file as a local configuration file in the "Local Content":
    http://wikis.sun.com/display/OC2dot5/Uploading+a+Local+Configuration+File
    - Create an OS Update Profile for the configuration file:
    http://wikis.sun.com/display/OC2dot5/Creating+an+OS+Update+Profile
    - Create a job and select the profile you have created as well as the servers you want to deploy the text file on:
    http://wikis.sun.com/display/OC2dot5/Updating+From+a+Solaris+OS+Profile
    Regards,
    [email protected]

  • Help needed in overriding the finalize() method!

    Hi
    I need some help in overwriting the finalize() method.
    I have a program, but at certain points, i would like to "kill" a particular object.
    I figured that the only way to do that is to make that object's class override the finalize method, and call it when i need to kill the object.
    Once that is done, i would call the garbage collector gc() to hopefully dispose of it.
    Please assist me?
    Thanks
    Regards

    To, as you put it, kill an object, just null it. This
    will be an indication for the garbage collector to
    collect the object. In the finalizer, you marely null
    all fields in the class. Like this:
    public class DummyClass
    String string = "This is a string";
    Object object = new Boolean(true);
    public void finalize() throws Throwable
    super.finalize();
    string = null;
    object = null;
    public static void main(String[] args)
    //Create a new object, i.e allocate an
    te an instance.
    DummyClass cls = new DummyClass();
    //Null the reference
    cls = null;
    This is a pointless exercise. If an object is being finalized, then all the references it contains are about to cease being relevant anyway, so there's no purpose to be served in setting them to null.
    All that clearing a reference to an object does is to clear the reference. Whether the object is subsequently finalized depends on whether the object has become unreachable.
    Directly calling finalize is permitted, but doesn't usually serve any purpose. In particular, it does not cause the object to be released. Further, calling the finalize method does not consitute finalization of the object. Finalization occurs when the method is called as a consequence of a garbage collector action.
    If a variable contains a reference to an object (say a table), and you want a new table instead, then create a new table object, and assign its reference to the variable. Assuming that the variable was the only place that the old table's reference was stored, the old table will, sooner or later, get finalized and collected.
    Sylvia.

Maybe you are looking for

  • DSO desing

    Hello, I have to create DSO based on R/3 extracter/DS. Where in extracter there three fields as primary keys What is my question is here that which fields i need to keep in DSO as key fields and Data fields. Please some one can expain about it

  • How many computers can I install Indesign CS4 and Illustrator CS4 on with an Asia Pacific Education version?

    I've tried to have a look around among discussions, however, as it's CS4 and thus pretty outdated at this point, I'm having to start something new. This is not for me, but a community organisation that I am volunteering for that has the copies and ha

  • Tables where vendor invoice paid details are stored

    Hello all, I have a technofunctional question. Once vendor invoices are paid through F110 transaction, what is the table that stores information regarding vendor invoice document number, its payment method and bank check number ? Regards, Rajesh.

  • Missing device registration info

    After the infamous security breach of Sony's "secure" network, my device info I had registered last January is now missing. Looks like a reset of information. Also, I wasn't prompted to change my password when I logged into the Sony site as mentioned

  • Photoshop CS6 [ Command + Click ] Layer Selection "Problem" Solved

    Good afternoon fellas, I've recently noticed something uncommon when working with Photoshop CS6 under Mac OS X 10.8.x. When I naturally tried to select a Layer by the [ Command + Click ] (let's say) shortcut, it failed. This little thing was driving