Attributes as object types

Roehlen, Peter PRoehlen at powercor.com.au
Wed Mar 13 19:16:59 EST 2002


Thanks Alan,
 
The ability to combine the EX operator with further logic in the one
condition is very good and saves having to use multiple conditions.
 
Just one final question:  Is the EX operator predicated on the object having
an Existence Check method defined?
 
Regards
 
Peter Roehlen
Team Lead - SAP Technical & Development
Powercor Australia Ltd
0409 950 263
 
 
 
-----Original Message-----
From: Rickayzen, Alan [mailto:alan.rickayzen at sap.com]
Sent: Wednesday, 13 March 2002 20:01
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attributes as object types
 
 
Peter,
Just one final point. The order in which the parts of the condition are
evaluated is according to the priority of the logical operators and when all
else is equal left to right (I.e. clean Boolean logic). For performance
reasons, and also the reasons you describe below, the rule processor
terminates the evaluation of the complex condition as soon as it reaches a
conclusion.
 
In other words, supposing your expression is
 
    object EX AND obj.attribute > 100
 
and the object does not exist. The condition will return FALSE without even
starting to evaluate obj.attribute (avoiding an error).
 
You can see this yourself when you use the simulation part of the condition
editor.
 
This is true of the release you are working on and also future releases, so
this algorithm is robust.
 
Kind regards,
 
Alan Rickayzen
 
PS: Apologies for not being as active as I'd like to be in this forum. I'm
trying to keep my focus on a couple of other pressing matters.
 
PS: I'm not at all upset about Alon's mentioning the ashes statistics.
Absolutely not. No, no, no. Totally unruffled.
 
 
-----Original Message-----
From: Roehlen, Peter [mailto:PRoehlen at powercor.com.au]
Sent: 13 March 2002 03:59
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attributes as object types
 
 
Thanks Tomasz,
 
I never realised that the 'EX' operator was there until you pointed it out.
 
Thanks to everyone else who also replied and especially to Alon for 'feeling
my pain.' :)
 
Regards
 
Peter Roehlen
Team Lead - SAP Technical & Development
Powercor Australia Ltd
0409 950 263
 
 
 
-----Original Message-----
From: Zmudzin,Tomasz,VEVEY,GL-DS/DM [mailto:Tomasz.Zmudzin at nestle.com]
Sent: Friday, 8 March 2002 19:25
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Attributes as object types
 
 
Peter,
 
It's pretty hard to judge that from the distance, but... this looks to me
like a modelling issue in your processes. Contrary to a plain ABAP field the
business objects are supposed to be "living beings" corresponding to
existing real-life objects. Thus in your processes you should never access
generic (i.e. uninitialized) business objects, just as you don't use a "any"
car to drive home. There's some more philosophy behind, but the basic rules
of object-oriented modelling apply.
 
As a quick fix to your problems - within the condition builder in WF there's
the operator EX (object exists) you can use. Or use the ExistenceCheck
method that will raise the exception if the object exists. It's not perfect,
but should suffice in most of the cases. Follow up on this posting if you
need more details.
 
Rgds,
Tomasz
 
-----Original Message-----
From: Roehlen, Peter [mailto:PRoehlen at powercor.com.au]
Sent: Friday, March 08, 2002 8:44 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Attributes as object types
 
 
Hello workflowers,
 
I'm seeking some guidance from anyone who has come across the following
problem:
 
When we add a new attribute to a business object type, we usually try to
make the 'type reference' of the attribute itself an 'object type'.  An
object type as the type reference is typically a lot more useful to workflow
designers than just the field value; doing this can often meet the needs of
future workflow templates as well.  For example: if someone asks me to add
the 'Superior Functional Location' as an attribute to business type
ZBUS0010, "Functional Location", I would automatically make the new
attribute reference an object type (in this case it would also be ZBUS0010)
rather than just reference the ABAP dictionary field.
 
The ease with which a regular attribute can be made to reference an object
type is a tribute to the SAP designers, however when we do this there is
often one problem that continually crops up: If the field value for the
attribute is initial - ie with no value - then the object reference is
'nothing'.  This causes workflow templates to terminate if you use the
attribute in a Condition step.  If, however, the attribute references the
ABAP dictionary field then the initial value causes no problem.
 
One work around is to have two attributes for each field, one referencing
the appropriate object type and the other the ABAP dictionary field.  This
is pretty ugly though.
 
Has anyone got any thoughts on the above?
 
Peter Roehlen
Team Lead - SAP Technical & Development
Powercor Australia Ltd
0409 950 263
 
 
 
 
**********************************************************************
Powercor Australia Ltd. This email and any file attachments are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email in
error please tell us immediately by return email and delete the
document.
**********************************************************************
 


More information about the SAP-WUG mailing list