Attributes as object types

Roehlen, Peter PRoehlen at powercor.com.au
Tue Mar 12 21:59:22 EST 2002


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