Skip to Content

Workflow Delegation, BAdI Selection, and WDJ Polymorphism: “It’s deja vu all over again !”

There are many blog posts here at SDN about minute technical details of specific technologies. And there should be, because there is a large audience who finds such posts very useful. But a case can be made for the occasional post which drops back and asks the reader to take another look at the big picture. For example, I was reviewing my BC600/601 workflow class material preparatory to taking BC610 next week and I got momentarily stuck on the notion of SAP object delegation to custom sub-objects. Why did I get stuck? Because I had already forgotten that in Business Objects, you can only delegate each SAP object once. So I was wondering how the heck the system knew what subobject to pick in an actual workflow, because the workflow references the object, not the subobject. Well of course, this got me thinking about BAdI implementation selection and how SAP internals search for the correct custom class that implements the SAP-delivered interface (you can actually watch this process in the debugger or update debugger, as I recently learned from Naren and others down in the Forums.) And this got me thinking about how workflow delegation and BAdI delegation is related to OOP polymorphism in general, e.g. as implemented in WDJ. In particular, I started to wonder whether in WDJ, you could actually emulate workflow delegation by coding some statement that tells the system that whenever it encounters an instance of superclass A, interpret it as an instance of subclass B. When I posted a question about this in the WDJ forum, it led to two very interesting replies by Maksim Raschynski and Valery Silaev here: Dumb question about super/sub classes in WDJ Less dumb follow-up question about super/sub classes in WDJ? And from these replies I was able to appreciate the role that custom class loading and factory methods play in the whole area of class instantiation. So, sometimes, if you step away from the details and let your mind dwell on the “big picture” for a while, you wind up with questions that help you to learn more about details you haven’t yet mastered. Something to think about, anyway.

You must be Logged on to comment or reply to a post.
    • Hi Bharathwaj –

      Thanks for taking the time to reply.

      I actually had an ulterior motive for making this blog post – to convince the SDN powers-that-be that it in addition to the WIKI “FAQ” section, it would be great to have a WIKI section entitled “SAP Internals Cross-Reference”.

      In this section of the WIKI, everyone could post their own realizations about how something in one area of SAP internals is related to something else in a different area of SAP internals.  In such posts, folks could even add syntax examples or “process navigation examples”.

      To take another example, I posted a while ago here:

      Why ABAPers should take BIT600/01/10 even if they’re gonna work in VC/CAF eventually

      about how container binding in workflow is clearly related to controller binding in WD.

      This example makes it even clearer that folks could benefit from a WIKI cross-reference section that would help folks who are familiar with one area of SAP internals to get familiar with a different area of SAP internals …

      … so maybe if there are more positive replies to this post, the SDN powers-that-be will consider this addition to the Wiki.

      Thanks again for taking the time to reply …

      • Not sure how many can tune into that line of thinking ! And how many would update that WIKI  , if created.

        Mebbe u can use your community profile , to sell this idea to SDN moderators 😉

        • … perhaps a dubious assumption …

          Anyway, it would be too bad if very few people really can tune into the idea of a cross-reference.

          Here’s why.

          As we try to keep our jobs and develop our careers, we find ourselves in the position of learning multiple technologies – ABAP, workflow, WDA, WDJ, VC/CAF, etc. etc.

          So we can decide one of two routes:

          a) learn each technology “in isolation from” what we know about any other technology;

          b) learn each technology “in relation to” what we know about every other technology.

          And since human memory is at least partly “associative”, it would seem that (b) is a much better alternative than (a) …

          Thanks again for taking the time to reply.

          • That’s one big reason why it’s hard to be a good SAP solution or technical architect especially as consultant. Too many interconnected moving parts from the past, present and even future.

            That’s one big reason why comfort zones are no good in IT. And that’s why SAP professionals are usually not cheap. And we love that.

          • Hi Andre-

            Thanks for taking the time to reply.

            The danger in what you just said is that it fails to take into account the desire of CIOs/CFOs/CEOs to “standardize” procurement criteria.

            These guys don’t wanna know anything about SAP’s evolutionary history and why it makes SAP consultants so expensive – they just want a standard way of comparing bids from two different SAP consulting companies against each other, or a standard way to compare bids from two different companies to do something in SAP or Oracle.

            So they hate any special “differentiators” thay make it difficult for them to standardize, and one of these days, this may wind up biting SAP and us consultants in the you-know-what …


          • i know and i agree. that’s the reason why 4.6c is still the king of all backends even 15 years later. but at the same time, a lot of water wnt under the bridge since then and changes happened. Agile and flexible enterprise is still pretty much a dream despite so much money invested. So on the provider side (vendors and solution and service partners), there’s plenty of innovation to deliver. Or the customers can sit on their R3 4.x investments forever or can they? Those in competitive industries don’t have that choice if they want to survive. But of course, who said common sense or logic supersedes politics and human mysteries in corporate world? :). On our world, only those who delivers value via innovation will survive. The bottom is getting commoditize and real fast and in this game not many people can survive with rates of $10~20/hr. So in theory we all have no choice to innovate unless we face the wrath of globalization and industrialization of human capital.
          • Hi Andre –

            Well-taken and well-expressed point.

            I have been thinking much lately about the same point and that’s why I posted this blog post and Coffee Corner thread:

            The Astrobiology of Enterprise SOA: How Planet ABAP Can Seed Life on Planet BPX

            When is customization dangerous even if the BADI’s/exits are all there ????

            What I think has to happen is that SAP has to deliver more BAdI’s and/or exits which allow customers to truly customize without using direct adds/changes/deletes to SAP core tables AND without using custom tables.

            For example, in the particular QM case discussed in the above two threads, all SAP has to to is say:

            “OK – if you don’t like the plan that SAP has picked for a lot during MIGO good receipts posting, then here’s a BAdI that will let you change the plan for the lot … you just specify the plan and we’ll take care of AFFL, AFVV, AFVC, AFVU, QALS.”

            Andre – I really believe that if SAP would generate more BAdI’s/exits like this example, 4.6c’ers would start to understand Enterprise SOA in “their own terms” and therefore make it much easier for them to then progress to Enterprise SOA in more “modern” terms, e.g. VC/CAF, WDJ/A, etc.

            Best regards

          • All users who have earned at least 100 points earn the right to a profile page and to blog there – you have earned that and your invitation is coming but we are working in a phased of around 100 a week. Currently we think by June most everyone will have been invited we might increase the number but it depends on several factors.

            As for selling it you don’t need to as I said the current Wiki environment has not yet been closed and therefore you can start now.

          • … I’ll be in Atlanta Mon-Wed and in the evenings I’m gonna wiki-wiki-wiki like its 1999 …

            Sincerely yours,
            The Blogger Formerly Known as …

      • You don’t have

        “to convince the SDN powers-that-be that it in addition to the WIKI ‘FAQ’ section, it would be great to have a WIKI section entitled ‘SAP Internals Cross-Reference’.”

        You just go to the wiki, here and click “ADD PAGE” at the top right corner, give your title and start working.

        There’s no need to bury your true motives in the middle of a post or anything like – it’s a Wiki and for the moment it’s still open for everyone to work on…