Skip to Content

Overcome limitation of multiple use in BAdI ME_PROCESS_PO_CUST

Hi Experts,

I have a number of requests from users that came up at the same time to enhance ME21/2/3N.

They are related to different subjects and need to be saved in different transports.

I am very use to BAdIs, so I would like to use only ME_PROCESS_PO_CUST and NOT use CMOD to enhance MM06E005.

Does anyone know how to overcome the limitation of not having the "Multiple Use" flag checked to enable multiple ative implementations at the same time?

Has anyone been through this and came with a solution that doesn't require changing the standard configuration of ME_PROCESS_PO_CUST, like checking this flag?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 02, 2017 at 10:23 AM

    Hi!

    You can implement something like BTE, create class-implementations for each development with the interface from BAdi and call them according come lists (for example table with names of the classes or STVARV select-options). Also as noticed Deepak you can implement filters on which you can call only necessary classes

    Hope it's helpful

    Evgeny

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Evgeny!!! Your solution was most appropriate to my case and I have implemented it in DEV and already working!!!

      You also demonstrated a practical solution, which was key for my implementation.

      Thanks to you and all guys that helped me here!!!

  • Jun 01, 2017 at 04:40 PM

    Anyway, there will always be one common-master-initial transport request, to contain the driver, and it can't be avoided (even the modification of the "multiple use" flag, if possible, will have to be transported first; --but-- even if it would be possible I wouldn't recommend to changing it).

    Note: if one of the BAdI methods has an EXPORTING parameter, then you can't make it "multiple use" (the parameters can be only IMPORTING or CHANGING for such BAdIs)

    Do as Mike suggests: keep the BAdI, and build a "driver" in it so that the developers can create distinct implementations. The driver could be done in various technologies. I would recommend an enhancement point, and the developers will create completely independent implementations (which is not the case of several methods in the same class, as they will share the same visibility section which contains all method definitions -- only the implementation is strictly separate).
    Add comment
    10|10000 characters needed characters exceeded

    • I understand your ideas Mike.

      Very interesting, thank you very much!

      Will definitely considere them in my developments.

      For now, I had to leave it all implementations in one method for simplicity, and the first request is Live already.

      In future, we will implement something like more flexible and independent.

      Cheers!

  • Jun 01, 2017 at 04:24 PM

    Is there any reason you can't just include all your requirements in one implementation?

    If it's that important to keep coding separate, just build each requirement as a private method in your implementing class and call them all in your BADI implementation.

    Add comment
    10|10000 characters needed characters exceeded

    • That's a design question entirely up to you. It's a bit of effort so if every requirement just involves this SAP enhancement point, then I'd probably keep it in one for simplicity.

      The only reason I would create multiple BAdIs is if one solution involves something where the BAdI provides enhancement points that are also inserted into completely different pieces of code (e.g. Z-reports). But that's a pretty extensive design.

  • avatar image
    Former Member
    Jun 02, 2017 at 09:58 AM

    Hi Carlo,

    You can do as follows:

    There would be many a times the BADi is Single use and not multiple use but the business requirements and logic can be more than one.

    What you can do is You can create an Include for each of the Business Requirements and put in the entire business logic in that Include.

    All Your Data and types Declaration and the Logic Should be in that Include. Most important is that You also need to put in the Conditions that this Include should be Executed for Your Business logic ONLY. Example you want the BAdi to trigger only for Certain Material type or some Article / MAterial number or any such Conditions.

    The Other guy will use his Buisness Logic, Data types Declaration and Conditions in his Include. and so on and so forth.

    Mind you only one person should work with the BAdi at One Particlar time and should be under only one TR and not multiple.

    Let me know if you like this Solution.

    Reward Points if helpful.

    Regards,

    Deepak.

    Add comment
    10|10000 characters needed characters exceeded