AW: Access to the attributes of an object reference

Werner Kößl werner.koessl at hirschvogel.de
Tue May 20 09:22:53 EDT 2003


That helps a lot!
I misunderstood that before.
Thanks again for the detailed explanation Tomasz!
 
Werner.
 
 
-----Urspr|ngliche Nachricht-----
Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
Zmudzin,Tomasz,VEVEY,GL-IS/IT
Gesendet: Dienstag, 20. Mai 2003 15:00
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Re: Access to the attributes of an object reference
 
 
Hello Werner,
 
Now I don't know if we're still talking about the same issue:
 
1. If you are not sure what is the object type of the object you've just
retrieved (like in our wa_versions variable), use SWC_GET_OBJECT_TYPE
wa_versions my_type. Then my_type will contain the name of the respective
object type.
 
2. If you want to create new elements -- each object needs to be of a
specific type when it is created (you are expected to know what you're
creating). The only catch is that _Adhoc_Objects accepts objects of
differing types -- which is still ok as you can group all sorts of related
objects in it. In other words it's rather:
 
SWC_GET_TABLE container '_ADHOC_OBJECTS' my_adhoc_table.
* to retrieve existing ad-hoc objects
 
SWC_CREATE_OBJECT adhoc the_type_you_know the_key_you_know.
append adhoc my_adhoc_table.
* To have the new one appended ...
 
SWC_SET_TABLE container '_ADHOC_OBJECTS' my_adhoc_table.
* .. and passed back to the workflow
 
SWC_CONTAINER_TO_PERSISTENT container.
*.. so objects are not mangled
 
Hope this helps,
Tomasz
 
 
 
-----Original Message-----
From: Werner Kv_l [mailto:werner.koessl at hirschvogel.de]
Sent: Tuesday,20. May 2003 14:43
To: SAP-WUG at MITVMA.MIT.EDU
Subject: AW: Access to the attributes of an object reference
 
 
Thank you Tomasz!
 
But unfortunately i have another question:
I want to read the values of another object.
how can i create an object reference when the attribute has no object type
like the standard container element '_Adhoc_Objects'.
(  DATA: adhoc TYPE SWC_OBJECT.
   SWC_CREATE_OBJECT adhoc '???' ?key?. )
 
Kind regards,
Werner.
 
 
-----Urspr|ngliche Nachricht-----
Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
Zmudzin,Tomasz,VEVEY,GL-IS/IT
Gesendet: Montag, 19. Mai 2003 16:52
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Re: Access to the attributes of an object reference
 
 
...
data: wa_versions type SWC_OBJECT.
...
...
loop at versions into wa_versions.
  SWC_GET_PROPERTY wa_versions 'MY_ATTRIB' my_variable.
endloop.
 
 
Of course instead of the loop you can also "read table ... into wa_versions
where ..."
 
Kind regards,
Tomasz
 
-----Original Message-----
From: Werner Kv_l [mailto:werner.koessl at hirschvogel.de]
Sent: Monday,19. May 2003 15:02
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Access to the attributes of an object reference
 
 
Hi workflow experts,
 
i created a delegated subtype ZDRAW of the supertype DRAW.
In the implementation of ZDRAW i want to access to the multiline attribute
'DocumentVersions'.
 
I did it the following way:
  DATA document TYPE swc_object.
  DATA versions TYPE swc_object OCCURS 0.
 
  swc_create_object document 'DRAW' object-key.
  swc_get_table_property document 'DocumentVersions' versions.
 
But how can i access to the attributes of the object reference 'versions'
now???
 
Thanks in advance!
Werner.
 


More information about the SAP-WUG mailing list