Skip to Content

ABAP Overwrite Enhancement

Hey Guys,

just a simple Question:

If I have a SAP Standard class and implement an Overwrite Exit. Is it possible to call the Original implementation of the SAP standard?

My customer requests every Enhancement to be deactivated on Demand by editing some Custom Table parameters, and I would like to tie the Activity status to my Enhancement run.

I have already implemented this kind of conditional Enhancement in an Web Dynpro Component Overwrite Enhancement by calling me->method( ) in order to refer to the Original implementation.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 16, 2018 at 01:38 PM

    You may implement the implicit enhancement point at the beginning of the method (whirlpool icon + context menu to firstly display the implicit points and secondly create implementation). As the code is inserted directly in the body of the method, the RETURN statement (EXIT being recommended only for leaving loops) will leave the enhanced method.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16, 2018 at 01:50 AM

    Hi Robin,

    I would rather implement before exit. In before exit I can check user condition and execute EXIT command to skip standard method implementation or if needed continue with standard method execution.

    Regards, Uladzislau

    Add comment
    10|10000 characters needed characters exceeded

    • Within a pre-method, EXIT does not prevent the standard method from executing (because a pre-method is coded in its own method, so EXIT (or preferrably RETURN) will only exit the pre-method). Within a pre-method, the only way to prevent the enhanced method from executing is the triggering of a brutal stop (like the triggering a class-based exception); of course the consequence is huge and often it's not advisable to do it.

  • Jan 16, 2018 at 09:35 AM

    Hey Uladzislau,

    thanks for your suggestion.

    Would this work for an explicit Pre-Exit Enhancement for a method? I´d suppose a RETURN or EXIT statement within a Pre-Exit would just leave this procedure, but would not abort the processing of the standard method.

    Or would this suggestion rather work for implicit enhancements?



    Add comment
    10|10000 characters needed characters exceeded