Skip to Content

What to do when user-exits are locked for several developments

Good morning experts!

In the client where I work, there is a big problem with SAP's user exits. I try to explain, the client have several projects which are developed at the same time, so when one project needs for example the user exit ZXQQMU20, the second project is delayed until the first project ends because of locking objects. Also we have the problematic that if there's any productive error and there is a project which is modifying the user exit, the project has to stop, the productive version has to be recovered and start again.

I've been thinking in which can be the better solution to stop this locking problem, and I have think in the creation of several includes inside ZXQQMU20 for inserting code...

What do you think it could be the best solution for solve this problem? Do you think the idea of new includes could be a good solution?

Thank you very much in advance.



Add comment
10|10000 characters needed characters exceeded

7 Answers

  • Posted on Feb 14 at 05:32 AM

    In my current project, we have solved this problem for good by making use of the decorator design pattern.

    Basically, we turned every user exit into a Z-BADI.

    Here are the steps involved:

    • Create an interface for the user exit in question (SE24) with a single EXECUTE method which imports / exports parameters of the exit itself.
    • Create a customizing Z-table to enlist the classes to be called from the user exit. This table shouldn't have a MANDT field so you can put the definition into workbench requests.
    • For each distinct functional requirement, create a class (SE24) implementing the interface, and write your functional ABAP code there + put your class into the Z-table.
    • The user exit itself should SELECT * from the Z-Table, dynamically create an object for each class, cast to the interface and call the EXECUTE method.

    If you do that:

    • You can send the user exit + Z-table and interface to the live system immediately.
    • For every distinct functional requirement, create a class, make a definition in the Z-table and put them into the same request.
    • Because the implementation requests are separate, you can send them to the live system on different points of time without affecting each other.

    This is the basic idea.

    In my current project, we don't even have a distinct interface for every user exit. Instead, I have created a generic interface & Z-Table shared by all user exists, and the parameters are passed over a container object (property container design pattern).

    But if that's too complicated, creating a distinct interface for each user exit (as described above) also works.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14 at 07:26 AM

    Rebeca - I raised a comparable question for the VA01 enhancement in SAPMV45A in 2017 and the discussion in that thread might be helpful for your issue as well:

    What are best practices to allow multiple developers to change the SAPMV45A enhancement?

    The bad and hopefully not too dispiriting news is, that we haven't yet made any progress on that front and things are still where they were 3 years ago just with even more lines of code all told ....



    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14 at 06:42 AM

    Try creating a BADI, call that BADI in your user exit. BADI offers interface, multiple implementations and is filter dependent. So it's just a matter of creating implementation for the custom BADI whenever it is required just like any standard BADI.

    As you mentioned there are multiple projects running right, so create an implicit enhancement inside the user exit and inside that call this badi. you can remove it any time and directly call it inside the user exits when it becomes free of your current locked transport.


    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14 at 05:34 AM

    Rebeca .,

    Yes you can multiple includes and inside each include write the necessary checks which should satisfy the respective scenario.

    Also while writing the code for include use IF FOUND keyword so that each development will not disturb other developments when moved to different systems.

    You can follow the below link for include SYNTAX.



    Add comment
    10|10000 characters needed characters exceeded

    • The typical problem with the "Include" approach is; somebody will eventually write CHECK or RETURN and prevent the code in other includes to execute.

      That risk also exists if you don't use includes, obviously.

      My class-based approach (above) prevents this risk too.

  • Posted on Feb 14 at 09:32 AM

    The general concept is to code a tiny front driver which calls implementations dynamically once for all. This should be agreed by all teams. Any implementation which is later created can be plugged without changing the driver.

    For instance, the driver may implement the calls via a customizing table as Kerem said.

    Or via custom BAdI as Mahesh said.

    Or via BRF+ so that to allow very dynamic conditions.

    This "driver" should be coded once for all and transported first without any implementation up to production system, to avoid issues with transports of implementations.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14 at 05:46 AM

    Thank you so much for your advices! I have also thought about the possibility of Z table creation, but instead with classes, use functions, and only call if the function exists for the develoment. I have to bear in mind all the development which already exists on the users ... I'm not sure what will be the technical best solution....o maybe all of them are goods solutions? Thanks once more time

    Add comment
    10|10000 characters needed characters exceeded

    • It would be a good idea to teach them... I wouldn't let my team insist on bikes while their Tesla's are collecting dust in the garage ;) But, as mentioned, an experienced architect with solid OO-ABAP and design pattern knowledge should be leading them. Otherwise, accidents / anti-patterns might surface.

  • Posted on Feb 14 at 06:00 AM

    Kerem, thanks for your advice, it is clear that if we finally decide any solution, it will be necessary to teach all the developers with things to do and not to do.... I can't decide what will be the best option.... I think I should study all the solutions in detail...Again thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Rebeca - veering off-topic for a second here ...

      Instead of responding to given answers with your own but then not properly threaded answer, please use "Comment" on the answer you actually want to reply to like Fred, Mahesh and I have done when we replied to Kerem's answer upthread. Makes it a lot easier to follow the discussion and is the intended use for the options we have available in Q&A!

      This is actually spelled out in and next to the editor box where answers are meant to go:

      Hope this helps!