Overwrite Exit of method

Hi,
Can any one tell me how to enable the Overwrite exit of a method ? I want to enable the overwrite exit of a method CL_OPS_SWITCH_CHECK --> MM_SFWS_SERNO.
Regards,
Krishnam Raju

Hi Krishnam,
I have not idea so fas what an Overwrite exit  may be. But you can do anything you want using implicit enhancements. Create a small enhancement project and apply it to method MM_SFWS_SERNO of class CL_OPS_SWITCH_CHECK.
I for one would not do it but look for a better solution. I do no
think that implicit enhancements are a good idea (of SAP) at all. Because you can apply just any change to any SAP code without having a modification.
Regards,
Clemens

Similar Messages

  • Pre,Post,OverWrite Exit for web dynpro ABAP methods of component,view

    Hi,
    my question is i have created overwrite exit for method of component controller in one enhancement implementaion say ENH1, and i also created overwrite exit for same method in another enhancement implemenation say ENH2, it means i have two different implemenations now, 
    My questions here is, will both Enhancement implemenations will "execute", if yes in what order..
    Please clarify.
    Thanks.

    I'm afraid the information that Manas gave you is incorrect.  In an overwrite method, the enhancement completely overrides and replaces the original method.  Both versions are NOT executed.  This is the risk you run with the Overwrite enhancement - you are choosing to completely replace the SAP delivered logic. 
    From the Online Help:
    The overwrite exit method takes on the signature of the original method and overwrites it.  This means that an overwrite exit is executed instead of the original method.
    At runtime only one overwrite exit can be active. If several overwrite exits are active, a runtime error occurs.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/dc/e6ba426b81da11e10000000a155106/frameset.htm

  • Error message while creating Overwrite exit for a standard class method.

    Hi,
       I was trying to create an overwrite exit in class CL_HRTMC_AC_TA_DASHBOARD for method GET_DEVPLAN_ASSESSMENTS. I created an Enhancement Implementation first. But when I tried to insert Overwrite exit method, I got error message that "The class has not yet been converted to the new class-local types" . In the toolbar->Utilities, I saw an option "Convert Class-local types" and when I clicked that it asked for the Access key. Eventhough I cancelled the process, now I am seeing some inactive parts in from this class in my Inactive object list. When I try to activate, it's again asking for access key and not able to activate it.  Not sure what has actually happened. Is it possible to revert it to old form? Please advice!
    Thanks,
    Mahesh Nair.

    Inbound delivery is not part of Sales and Distribution. You might want to move your post to either the Logistics Materials Management (MM) forum or the Workflow forum.
    Also sometimes search for OSS notes by the message class and number helps.

  • How to call original method from an overwrite exit?

    I enhanced method m1 of class c1 by creating an overwrite exit for the method.
    The requirement is to do certain checks in the overwrite exit and then call method m1 if checks pass. How can i access the original method from the overwrite exit??

    keyword 'static' my friend.
    public class foo {
    public static void bar {
    System.out.println ("hello");
    foo.bar()

  • In Pre-Exit, prevent method from being called

    I have created an enhancment for a webdynpro component. Then, I have defined a pre-exit for a method in the component controller. Inside the pre-exit, I do a couple of checks, and depending on them, I would like to skip the processing of the method for which I have define the pre-exit. Is this possible?
    I thought of the RETURN statement, but this won't help. RETURN will jump out of the pre-exit, but not out of the method.
    my-pre-exit-of-method-SET_MY_VALUE.
      IF some_condition = some_value.
        "prevent the method SET_MY_VALUE from being called. but how??
      ENDIF.
    end-of-pre-exit.

    I just find out how to circumvent this...
    The trick is to use "Overwrite exit".  Add your own codes.  Depending on your conditions, you can call back the original method.  But when you call the original method, you need to use the syntax:
    me->original_method(...)
    Do not use:
    wd_this->original_method(...)
    Using "me" will only call the original method; using "wd_this" will trigger your overwrite exit which means this will jump to a recursive call to your own exit; This will certainly drain the resources of your system indefinitely until it dumps.
    Brian H.

  • Overwrite-exit not possible in view controller

    Hi all,
    Within a standard abap webdynpro application I see two columns for pre-exit and post-exit within the methods tab. I can't see a column for the overwrite-exit. Within transaction SE24 I can see all three columns.
    Does someone have an idea why the overwrite-exit is not visible within the webdynpro component?
    Thanks,
    Richard

    I found it myself. The overwrite-exit is only possible in enhancement pack 1 (7.01). We are still on 7.0.
    Kind regards,
    Richard

  • OverWrite Exits for Classes

    Hi,
    I am trying to create Overwrite exit for the class, while doing this SAP is creating local class in some include and giving me chance to put my code in the same method for which i am trying to create over write exit.
    Problem is from  this local class i am not able to access the global class methods in which i am doing all this stuff.
    How can i use the methods of global class, though instation of this global class requires some mandatory parameters which i cannot provide...
    is there any restrictions in using exits for class enhancements..
    need your inputs....
    Thanks..

    Just wondering if anybody has answer for this??
    when i create over-write exit for a method in class by using new enhancement framework, it creates local class i mentioned earlier in this thread.
    using this local class i need to call private method of the global class is it possible or forbidden by SAP??
    please let me know in general,
    whether local classes in Global classes can access private methods of global classes??
    whether global classes which itself has local classes def and implementations in it can access local classes methods????*
    Please Suggest!!!!
    Edited by: kranthi kumar on Sep 20, 2010 4:57 PM

  • Activate overwriting exit after note

    Hi guys.
    I wanna create an overwrite exit in standard FITV_VC_COST_ASSIGNMENT webdynpro component, but it seems not be possible. I set the overwrite exit in the componentcontroller, in the COST_***_GET method. I already had set exits in componentcontroller methods, working fine, but it doesnt. Firstly, I set my exit, but when I noted it was not taken into account by the system, I realized the componentcontroller was inactive. Someone else had set a note and he/she did not activate. When I asked for activation, the owner of the user responsible for the note activated in mandant 100. But I develop in 105, so she did the same with it. Since I do my tests in 115, I asked her activate at 115 too. But even so my code at pre, post and overwrite exits in this componentcontroller are not working. The enhacement workbench is fine, but the effect is null. I erased the exits and deleted my enhancement implementation and created anothers over the same standard method, but the result is negative. My code at these exits is "jumped" and only the standard code of the method is executed.
    What i should do? Capitulate? I know that there are more mandants in the system at the same level (DEV, not QAS). Should the responsible user that put the note activate in all the mandants? Does anyone know what is happening here? Thank you

    Hi guys.
    Inside the standard method, there was a call to another method. I used an enhancement point in that method, because it was imposible to enhance the standard web dynpro component. I am not sure why.

  • How to exit this method

    public class Main {
       static  int i=0;
    public static void main(String  args[]) {
    go();
    static void go(){
    i++;
    System.out.println("A");
    if(i==10){     
       System.exit(0);  // rather than terminating the program is there a way to exit this method ??
    go();
    }

    Assuming you mean the go method, you could use return, or just let the end of the method happen naturally.
    Like for example if i is 8 then the go method exits.
    You need to look into for loops, no clue what you are trying to do here, but it looks like you are trying to do a for loop without a for loop.
    JSG

  • In Pre-Exit, pervent method from being called

    I have created an enhancment for a webdynpro component. Then, I have defined a pre-exit for a method in the component controller. Inside the pre-exit, I do a couple of checks, and depending on them, I would like to skip the processing of the method for which I have define the pre-exit. Is this possible?
    I thought of the RETURN statement, but this won't help. RETURN will jump out of the pre-exit, but not out of the method.
    my-pre-exit-of-method-SET_MY_VALUE.
      IF some_condition = some_value.
        "prevent the method SET_MY_VALUE from being called. but how??
      ENDIF.
    end-of-pre-exit.

    this is probably not possible. i have to close this message because i can not have more than 10 open questions anyway.

  • How to pass value from EXIT to method

    Hi friends
    1)  My requirement is that when the person change the amount field in TRIP t-code i need to send a mail to the manager. So i found a exit FIT0002 here when ever the traveler change the amount i am setting the flag as x when he change and y when no amount is changed in exit. I did export to memory id and in my method i did import from memory id. But this is not performing gud. If at a time many users apply the trip and changes the advance the flag is not getting set. I checked in the log. No flag is set its empty no x nor y. After clearing the buffer SWU_OBUF. Again all the users applied the trip then the flag is set and every manager got the mail. But why this is happening?. Is there any other way to achieve it. I want to get the flag value to my method. Is there any other work around.
    2)  I tried with SAP_WAPI_WRITE_CONTAINER directly getting the value and writing to the workflow container its not correct way since i need to write commit work. But the exit itself does commit.
    3) I tried with SET/GET parameter but i don't no how to divert my flow from my method to exit when i use SET/GET parameters.
    Can any one throw some light on this issue.
    Regards
    vijay

    If you are able to get the workitem ID then try to use the below code snippet and check because even Iam setting some value back to the workitem container
    DATA :
          w_wiid      TYPE             sww_wiid     VALUE   'XXXX',
          w_ref       TYPE REF TO      if_swf_run_wim_internal,
          w_ref_cnt   TYPE REF TO      if_wapi_workitem_context,
          w_wi_ref    TYPE REF TO      if_swf_ifs_parameter_container,
          ls_agent    TYPE             swr_wihdr.
    TRY.
        CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
          EXPORTING
            im_wiid     = w_wiid
          RECEIVING
            re_instance = w_ref.
      CATCH cx_swf_run_wim_enq_failed .
      CATCH cx_swf_run_wim_read_failed .
      CATCH cx_swf_run_wim .
    ENDTRY.
    CALL METHOD w_ref->get_workitem_context
      RECEIVING
        re_ctx = w_ref_cnt.
    CALL METHOD w_ref_cnt->get_wi_container
      RECEIVING
        re_container = w_wi_ref.
    TRY.
        CALL METHOD w_wi_ref->set             " Setting the Value Back to WORKITEM CONTAINER
          EXPORTING
            name       = lc_result
            value      = lv_value       
          IMPORTING
            returncode = lv_return.
      CATCH cx_swf_cnt_cont_access_denied .
      CATCH cx_swf_cnt_elem_access_denied .
      CATCH cx_swf_cnt_elem_not_found .
      CATCH cx_swf_cnt_elem_type_conflict .
      CATCH cx_swf_cnt_unit_type_conflict .
      CATCH cx_swf_cnt_elem_def_invalid .
      CATCH cx_swf_cnt_container .
    ENDTRY.

  • Exiting from method in enhancement

    Hi Experts,
    I am enhancing a standard class method thought an exit point at the beginning of the method. When a certain condition is satisfied in the enhancement point I want to stop the processing further and exit the complete method.
    EXIT will not work here as its only for a processing block. Any suggestions?
    Thanks

    AFAIK this is not allowed, else you could successfully replace the full SAP code by inserting in a pre-method or any start Implicit enhancement points any customer code and then exiting the form/method/module, that would not be an enhancement but a full modification of the standard SAP code and should require [SSCR key|http://service.sap.com/sscr ].
    (For the same reason someone already posted a thread where he put an IF and ELSE in a first Enhancement and the ENDIF if another, good try, but SAP editor/enhancement builder didn't get fooled
    You could only raise an error or error message to leave the processing block  behind the enhancement (FORM, FM, Method)
    Regards,
    Raymond

  • How to exit from method if there is any Error message

    Hi All,
    I have one button (Retrieve) and on that button I am calling a method(OnRetrive) and in that method i am calling func module and in that i am getting some messages.
    <b>Now If that FM gives Error message then i have to exit from that method without processing further code.</b>
    How can i do this? Help!!!
    Expecting your reply ASAP.

    Use the RETURN statement. It will get out of your method.
    Regards
    Nithya

  • Redefinition / Overwriting of inherited method using class-builder

    Hi,
    I have a class which inherits some methods from it's baseclass. I want so overwrite ( re-define ) some of the methods from the baseclass using se80 / se24.
    How can this be done ?
    Best Regards,
    Frank

    Hi,
    <b>go se80</b> 1) enter the class name which u have inherited from the base class
    2) in the herarchy ...methods---->Inherited Methods
    3) right click on the method which u have to redifine.
    4) select redifine option.
    5) ur method will be placed under redifination list.
    6) go write the code
    note :- U cannot redifine final Method...Appropriate message will be shown
    save and activate.
    Mark Helpful answers
    Message was edited by: Manoj Gupta

  • Error accessing constnt public attribute of a class in an overwrite method.

    Hi Gurus,
    I am facing an error while accessing a constant public attribute while using it in the overwrite-exit of a methods.
    The constant which is declared as public in the attribute section of the class is not available in the overwrite-exit of the method.
    Please suggest me how to access the public attributes in the overwtire exits of the methods.
    Thanks.

    Hi Ramneek,
    Let me explain you the entire scenario:
    Actually we are trying to ehance the SAP standard class : CL_FITV_POWL_FEEDER_TRIPS in ECC 6.0 EHP 5 .
    We tried to create and overwrite-exit of the method "IF_POWL_FEEDER~GET_ACTIONS".
    Overwrite-exit of a method is just like a method which will be called instead of the standard method : IF_POWL_FEEDER~GET_ACTIONS.
    But the problem which we are facing here is that the Attributes which are defined in the class CL_FITV_POWL_FEEDER_TRIPS,  are getting accessed from the overwrite-exit method.
    Becuase of this we are not able to implement our custom logic.

Maybe you are looking for