Accessing object attributes in a method

Ulrich Mende wug at mende-edv-beratung.de
Mon Apr 22 10:21:05 EDT 2002


Hi, Josi
in your method you want to access the attributes of the object, don't
you?
If so, so for instance BUS1001 (material) has a property MaterialType,
which can be used in a method (of a sybtype of BUS1001) as followes:
 
  data: mattype like mara-mtart.
  SWC_GET_PROPERTY SELF 'MaterialType' mattype.
 
Best regards  Uli
 
 
Jose Burgman <Jose.Burgman at palabora.co.za> schrieb am 22.04.2002,
15:57:09:
> Hi every-one
>
> Sorry again for this very basic question - in defense I did the academy 8
> months ago and I've been chucked into workflow for the first time since
> then. I'm creating a method and in it I want to access the attributes of a
> method. I use the macro swc_get_element. I tried to use SELF, but the object
> complains that it is not defined (???). I then use container, and I get a
> sy-subrc of 8. The business object is 2038 - the coding I use is for eg
> swc_get_element container 'Location' location [location is defined in a data
> statement]. Any assistence would be appreciated.
>
> Thanks for the trouble....
>
> Josi
 


More information about the SAP-WUG mailing list