ABAP-OO Workflow for PO-release

Florin Wach florin.wach at gmx.net
Tue Apr 22 05:58:41 EDT 2008


For purchase order (formerly BUS2012) I'm using the ABAP class

CL_PO_HEADER_HANDLE_MM

as supertype. The constructor of the subclass should correctly initialize the super class with the following piece of coding:

   super->constructor( i_purchaseOrderNumber ).
   me->po_initialize( ).
   me->set_po_number( i_purchaseOrderNumber ).

   me->po_read( im_tcode     = 'ME23N'
                im_trtyp     = 'A'
                im_aktyp     = 'A'
                im_po_number = space ).

Then there're already a bunch of methods/attribs available.

Best wishes,
Florin

-------- Original-Nachricht --------
> Datum: Tue, 22 Apr 2008 09:01:38 +0100 (BST)
> Von: "Mike Pokraka" <wug at workflowconnections.com>
> An: "SAP Workflow Users\' Group" <sap-wug at mit.edu>
> Betreff: RE: ABAP-OO Workflow for PO-release

> Ah, for classes yes, but I was talking about extending existing BORs with
> a class (this was Kietil's question). It's not as convenient as clicking
> on a 'Create Subtype' button, you need to build the class from scratch. A
> little extra effort but worthwhile in the long run.
> Apologies for any confusion to those who misunderstood.
> Cheers,
> Mike
> 
> 
> On Tue, April 22, 2008 5:12 am, Dart, Jocelyn wrote:
> > Mike,
> > The equivalent of "Create subtype" for ABAP OO classes, is to create
> your
> > class and then in the Properties tab nominate your Superclass.
> >
> > Delegation is unnecessary because narrowing/widening cast means you can
> > move between parent and child freely.
> > Regards,
> > Jocelyn
> >
> > ________________________________
> >
> > From: sap-wug-bounces at mit.edu on behalf of Mike Pokraka
> > Sent: Mon 21/04/2008 9:20 PM
> > To: SAP Workflow Users' Group
> > Subject: Re: ABAP-OO Workflow for PO-release
> >
> >
> >
> > On Fri, April 18, 2008 7:56 am, Kjetil Kilhavn wrote:
> >> This is interesting (well, anything from a SAP employee who has proven
> > OK I may not be a SAP Employee so take my input with a grain of salt..
> >
> >> However, I have assumed that for existing BOR objects it would be
> easier
> >> to
> >> implement additional methods (and redefine methods) in a BOR object
> type
> > which would then be delegated to.
> >>
> > It's a little more work to create the class up front - there's no
> "Create
> > Subclass" button. But once that's in place I find it easier to add
> > additional methods. See my other post to Sherie.
> >
> >
> >> Would you recommend that even for a small change such as the additional
> > attribute I've added to USR01?
> >> Such a strategy would mean the workflow becomes a mixture of tasks
> using
> > BOR
> >> objects and class objects.
> >>
> > Yes, and yes. Actually in many cases I've done away with the BORs
> because
> > it's a 10 minute job to add the two or three BOR components I actually
> > need into my class. The icing on the cake is being able to bind
> > _WI_ACTUAL_AGENT via functional method straight into an instance of
> > ZCL_WF_USER.
> >
> >> I see you recommend adding an attribute to the class to reference the
> > BOR
> >> object when needed. Would you recommend also adding a class object
> > reference
> >> as an attribute to a delegated BOR object type - or how would you
> > approach
> >> the need for crossing from one object type to the other.
> > Unfortunately it only works one way - BORs can't have class attributes.
> > Usually I end up working with both, which is not really a big issue.
> >
> >> --
> >> Kjetil Kilhavn (+47 40220607)
> >> Blue Consulting AS (http://www.bluec.no/)
> >> _______________________________________________
> >> 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