Virtual Attribute not working as expected.

Rick Sample Rick.Sample at gbe.com
Thu Aug 12 14:39:07 EDT 2004


Did some reading and poking around in some other objects and I think I figured it out. 
This works and "looks" like other code I reviewed in some other BO. 
 
CreatedBy is a DB value attribute. 
zCreator is my Virtual attribute. 
 
Opinions?
 
 
GET_PROPERTY ZCREATOR CHANGING CONTAINER.
 DATA: CreatedBy TYPE SWC_OBJECT.
 SWC_GET_PROPERTY SELF 'CreatedBy' CreatedBy.
 CONCATENATE 'US' CreatedBy INTO OBJECT-ZCREATOR.
 SWC_SET_ELEMENT CONTAINER 'zCreator' OBJECT-ZCREATOR.
END_PROPERTY.
 
Thanks!
 
 
 
 
>>> mark_pyc at gillette.com 8/12/2004 10:24:48 >>>
Where is ZNSRH-CREATOR supposed to come from with in that
property/attribute?
 
Are you relying on it being calculated in another attribute? There is no
gaurantee of the order of attribute calculation. You either need to
determine this value locally or ensure that the attribute you're relying is
calculated first by performing a SWC_GET_PROPERTY self  <?>.
 
Have fun,
Mark
 
 
                      Rick Sample
                      <Rick.Sample at gbe.co         To:      SAP-WUG at MITVMA.MIT.EDU 
                      m>                          cc:
                      Sent by: SAP                Subject: Virtual Attribute not working as expected.
                      Workflow
                      <Owner-SAP-WUG at MITV
                      MA.MIT.EDU>
 
 
                      12 Aug 2004 15:20
                      Please respond to
                      SAP Workflow Users'
                      Group
 
 
I have a BO with DB attributes and Virtual attributes.
 
In SWO1 test, the below works. zCreator gets populated.
When I Create event in SWUE and start the WF,
all I get is 'US' and my DB attributes. Non of my Virtual attributes are
being populated via SWUE an set in the WF containers.
I have my bindings set in the WF.
 
Also,
If I do not have at least one DB Attribute I get errors and object won't
even generate.
?
 
4.6c
 
 
GET_PROPERTY ZCREATOR CHANGING CONTAINER.
  DATA: l_Creator LIKE WFSYST-INITIATOR.
  CONCATENATE 'US' ZNSRH-CREATOR INTO l_Creator.
  SWC_SET_ELEMENT CONTAINER 'zCreator' l_Creator.
END_PROPERTY.
 
Rick Sample
WF Developer
Graybar, Inc.
 


More information about the SAP-WUG mailing list