ABAP OO objects as BOR method parameters.

Mike Pokraka wug at workflowconnections.com
Wed Jul 22 05:48:44 EDT 2009


If that’s all you’re trying to achieve then your best option is to make your CL object a private attribute of the BOR object. Use a FORM routine to access it, and in there you can instantiate it if it has no instance – have a look at the BOR generated code for DB attributes to see what I mean. 

 

Cheers, 

Mike

 

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Sharath K
Sent: 21 July 2009 18:04
To: SAP Workflow Users' Group
Subject: RE: ABAP OO objects as BOR method parameters.

 


Mike & Florin,
thanks very much for explanation. Initially I was using CL object in BOR method locally. As I am using the same object in different methods (steps), thought of passing object reference from first step…I will switch back to my previous code. May be I will do more experiments in next phases..

 

 

Thanks for your time…



--- On Tue, 7/21/09, Mike Pokraka <wug at workflowconnections.com> wrote:


From: Mike Pokraka <wug at workflowconnections.com>
Subject: RE: ABAP OO objects as BOR method parameters.
To: "'SAP Workflow Users' Group'" <sap-wug at mit.edu>
Date: Tuesday, July 21, 2009, 9:27 AM

Couple of comments: 

1) OO works with limitations on 620, but is not officially supported by SAP.


3) To be absolutely painfully specific here, the original question didn't
say the aim was to store the object in the container. It is possible to use
a class without IF_WORKFLOW in workflow as long as it isn't stored. 

Thus a binding of class-based objects OBJ1.OBJ2.ATTR ==> SOME_ELEMENT is
possible if OBJ2 doesn't have IF_WORKFLOW, because only OBJ1 and
SOME_ELEMENT live in the containers. This of course all falls apart when
bringing BOR into the mix. 

Generally speaking I agree with Florin and would not recommend mixing BOR
and classes in this way. Class->BOR is fine, but BOR->Class - although
technically possible - is fraught with problems because the BOR design
doesn't cater for classes (however it is no problem to use OO ABAP inside
BOR code). I would either build on the BOR object, or mostly I create a
class to replace it completely.

Cheers, 
Mike

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Florin Wach
Sent: 21 July 2009 08:42
To: SAP Workflow Users' Group
Subject: Re: ABAP OO objects as BOR method parameters.

Hi Sharath,

1) ... hm... didn't realize that OO-Workflow works on 4.7 already (stable).
Try using ABAP reference type SIBFLPOR

2) If you cannot define the parameter as CL -Object, the macro will try to
convert the runtime-reference of a BO to a persistent reference of the BO,
which has to fail for obvious reasons. If using the ABAP-Dic-Reference, then
it won't be a problem

3) Yes, the workflow cannot store OO-Object in the container, unless you've
fully implemented the interface

....

Anyhow, from my perspective it looks like you should keep using a new
business object implementation and not using the OO-part for the moment.
Maybe you give some explanation of how and why you like to use this kind of
container/implementation.

Best wishes,
Florin


-------- Original-Nachricht --------
> Datum: Mon, 20 Jul 2009 15:48:58 -0700 (PDT)
> Von: Sharath K <ksharath77 at yahoo.com>
> An: "SAP Workflow Users\' Group" <sap-wug at mit.edu>
> Betreff: ABAP OO objects as BOR  method parameters.

> Hi all, Here I am repostig the issue(seems my emails are ending in Junk
> folder). 
>  I am trying to return a class object from business
> object method to workflow container. I am not using this is class object
> in any
> of my tasks, using just as parameter..
> 
>    
> 
> 
> 
> 
> 
> Issue-1: I am unable to class object as BOR method parameter, I cant see
> any options to choose ABAP class
> type..the only two options are (i)ABAP Dictionary, (ii) Object type.. Is
> it a version issue..the client is on R/3 4.7.
> 
> 
> 
>    
>  
> 
> 
> 
> 
> 
> Issue-2: Object reference is not passed to task
> container with SWC_SET_ELEMENT CONTAINER macro from BOT method.
> 
>    
> 
> Issue-3: I have not implemented IF_WORKFLOW methods in the class..Do I
> need to
> implement the interface methods irrespective of its use in task?
> 
>    
> 
>    
> 
> Thanks for all your input. 
>    
> 
> Regards,
> 
> Sharath.
> 
> 
>       
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


__________ Information from ESET Smart Security, version of virus signature
database 4263 (20090721) __________

The message was checked by ESET Smart Security.

http://www.eset.com



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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20090722/b900a0c3/attachment.htm


More information about the SAP-WUG mailing list