ABAP Objects vs. BOR to trigger event?

Dart, Jocelyn jocelyn.dart at sap.com
Thu Feb 10 19:05:42 EST 2011


Hi Rick, 
We regularly use your option 3 below where the config doesn't easily allow us to repoint to an ABAP class. Yes it's possible to write an event receiver function module to transform the object event to a class event but this takes some skill and you need to consider the risk of introducing event errors into your code. 

SWEHR1/2/3 are fairly easy to work with as there are plenty of examples of the function module that shows how to adjust the event being raised. 

Similarly change documents config very easily allows OO events to be raised.

But status mgt doesn't give an option for OO :-( and most of the other special event config doesn't consider it. 

Of course if you are raising events from your own code or user exit ABAP OO event raise is easy enough.

Regards,
Jocelyn 


________________________________________
From: sap-wug-bounces at mit.edu [sap-wug-bounces at mit.edu] On Behalf Of Sample, Rick [Rick.Sample at graybar.com]
Sent: Friday, 11 February 2011 2:47 AM
To: SAP Workflow Users' Group
Subject: RE: ABAP Objects vs. BOR to trigger event?

Hi Jocelyn, Mike and Mike,

No real hurry on this project, learning thing. I want to be as forward thinking as practical and possible and follow best practices.
So Little clarification please. (I am ordering the 2nd addition. will need that for others anyway)

Like most shops, we have many existing WFs in BOR and little in the way of OO staffing. So, ABAP Objects must coexist with BOR.  Rewrite where needed, leave rest alone until business reason dictates re-write.

If I use the BOR objects only for GOS, I need clarification on where to plug these in.
1. Event Receiver (from a BOR event) and create my ABAP event to trigger. We have high volume, so this may not be good for us.

2. SAP Config (as stated in something I read, was not really ready yet?)  SWEC? Add my ABAP Objects onChange, Create, Delete?

3. My prior post, which no one seemed to like, GET_INSTANCE after BOR event triggered and WF started.

I am flexible at this point. Learning prj and would like to conform to best practices. The OO to WF hurdle is still a learning thing, so I have a bit of time to make changes.

Thanks much folks and Best Regards,
Rick

> -----Original Message-----
> From: sap-wug-bounces at mit.edu
> [mailto:sap-wug-bounces at mit.edu] On
> Behalf Of Dart, Jocelyn
> Sent: Wednesday, February 09, 2011
> 11:52 PM
> To: 'SAP Workflow Users' Group'
> Subject: RE: ABAP Objects vs. BOR to
> trigger event?
>
> Hi Rick,
> Just FYI.
> On my sites, we actually always use the
> opposite approach i.e. use the class for
> everything and just use the BOR for
> events/GOS.
> I did have one site use the event receiver
> fm to convert a bor event to an OO event
> at runtime - so it does work but we haven't
> bothered with this again.
> The overhead of instantiating a class is
> usually pretty minimal  and so often you
> need to recode the bor object anyway
> ,e.g. because there's some unwanted auth
> check or awkward formatting anyway.
>
> It gets away from having to teach
> developers BOR coding at all.
> Regards,
> Jocelyn
>
> -----Original Message-----
> From: sap-wug-bounces at mit.edu
> [mailto:sap-wug-bounces at mit.edu] On
> Behalf Of Sample, Rick
> Sent: Thursday, February 10, 2011 6:25
> AM
> To: SAP Workflow Users' Group
> Subject: RE: ABAP Objects vs. BOR to
> trigger event?
>
> Mike P / Mike GT,
>
> Forgot about the need for BOR to use
> GOS.
>
> The need for BOR to use GOS is a big
> one for determining my approach to this
> low priority prj. This is a re-write of one of
> our first WFs (newbie code, patches
> galore, etc.) so would like to look forward
> as far as possible, but grey areas to be
> figured out by SAP at a later time, I will
> just avoid for now.
>
> Replacement for BOR-GOS or
> coexistence of ABAP Objects-GOS? Time
> line? SAP plan?
>
> I need BOR to use GOS, so I think I will
> simply continue to use BOR for all the
> events, links, etc. and add in only new
> ABAP Object code where required. I can
> already just instantiate the object or as
> you stated below.
>
> This seems like the simplest approach to
> me. This sounds like what most will be
> required to do anyway unless a complete
> custom app with all its own events, etc.
> etc. Yes?
>
> Thanks,
> Rick
>
>
> > -----Original Message-----
> > From: sap-wug-bounces at mit.edu
> > [mailto:sap-wug-bounces at mit.edu] On
> > Behalf Of Mike Pokraka
> > Sent: Wednesday, February 09, 2011
> > 11:27 AM
> > To: SAP Workflow Users' Group
> > Subject: RE: ABAP Objects vs. BOR to
> > trigger event?
> >
> > Hi Rick,
> >
> > Yes it is unfortunately necessary to have
> both in most cases.
> > Sometimes I just have the BOR in the
> WF container purely so the
> > workflow is visible from GOS. There are
> ways around that too but some
> > things aren't always worth the effort.
> >
> > A couple of ways around the
> instantiation:
> > 1.  An event replicator. The BOR event
> receiver in SWETYPV is a method
> > that looks at the BOR event and raises
> the clas event which starts the
> > workflow. Not suitable for high-volume
> processes.
> > 2. First prize is always to raise a class
> event in first place. If
> > using change docs or the likes you're all
> set.
> > 3. Create class instance in WF. This is
> what you have done, but far
> > less performance overhead is via a
> static GET_INSTANCE functional
> > method on the
> > class: this can then be called in a
> > conatiner operation step or even in a
> > binding of the first step that needs it.
> >
> > This is all explained in the second edition
> of the WF book. Author's
> > prceeds go to charity so this is not
> advertising :-)
> >
> > Cheers,
> > Mike
> >
> >
> > On Wed, February 9, 2011 4:39 pm,
> > Sample, Rick wrote:
> > > Note: I added a hack. I catch the BOR
> > Created event, then in
> > > background task, call a
> > CREATE_INSTANCE method to
> populate
> > the ABAP
> > > objects instance, but this seems a little
> > bit of a kludge way to do it.
> > >
> > >
> > >
> > >> -----Original Message-----
> > >
> > >> From: sap-wug-bounces at mit.edu
> > >
> > >> [mailto:sap-wug-bounces at mit.edu]
> On
> > >
> > >> Behalf Of Sample, Rick
> > >
> > >> Sent: Wednesday, February 09,
> 2011
> > >
> > >> 10:14 AM
> > >
> > >> To: SAP Workflow Users' Group
> > >
> > >> Subject: ABAP Objects vs BOR to
> > trigger
> > >
> > >> event?
> > >
> > >>
> > >
> > >> Hi all,
> > >
> > >>
> > >
> > >> I am playing around with a WF using
> > >
> > >> ABAP Objects. I built the object, wf,
> > some
> > >
> > >> tasks, and all seems to be going fine.
> > >
> > >>
> > >
> > >> The WF will be based on Sales
> > >
> > >> (BUS2032). I will obviously need to
> run
> > >
> > >> both BOR and ABAP objects to
> trigger
> > the
> > >
> > >> CREATE, CHANGED, etc. events.
> > When
> > >
> > >> BUS2032.CREATE triggers, how to I
> > also
> > >
> > >> trigger ABAP Objects?
> > >
> > >>
> > >
> > >> What is the "Best practices" to run
> side
> > by
> > >
> > >> side? I have several PDFs, but do
> not
> > see
> > >
> > >> this addressed.
> > >
> > >>
> > >
> > >> Thanks,
> > >
> > >> Rick
> > >
> > >>
> > >
> > >>
> >
> __________________________________
> > >
> > >> _____________
> > >
> > >> SAP-WUG mailing list
> > >
> > >> SAP-WUG at mit.edu
> > >
> > >>
> >
> http://mailman.mit.edu/mailman/listinfo/sap
> > >
> > >> -wug
> > >
> >
> __________________________________
> > _____________
> > > SAP-WUG mailing list
> > > SAP-WUG at mit.edu
> > >
> >
> http://mailman.mit.edu/mailman/listinfo/sap
> > -wug
> > >
> >
> >
> >
> __________________________________
> > _____________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> >
> http://mailman.mit.edu/mailman/listinfo/sap
> > -wug
>
> __________________________________
> _____________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap
> -wug
>
> __________________________________
> _____________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap
> -wug

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug



More information about the SAP-WUG mailing list