21.03.2013 Views

Object Oriented ABAP

Object Oriented ABAP

Object Oriented ABAP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

We need to check this box when we are defining any attribute as the Key Attribute.<br />

All key fields must be character-type fields (elementary types: CHAR, NUMC) and have a<br />

defined length. The maximum length allowed for all key fields is 32 characters. The length<br />

of the key field for the persistent display is 32 characters.<br />

In the case of persistent <strong>ABAP</strong> objects we can use the GUID, which is generated<br />

automatically by the object manager when an instance is created.<br />

Attributes:<br />

In addition to all the other data types that the Class Builder supports, we can also define<br />

attributes with reference to an object from the Business <strong>Object</strong> Repository (BOR). To do<br />

this, we have to use the structure SWOTOBJID as the data type. The BOR object is<br />

determined using the corresponding value.<br />

To assign a BOR object instance to an attribute we need to use the corresponding BOR<br />

macros. Normally, this is implemented within the CONSTRUCTOR of a class.<br />

To use the BOR macros in a class, two INCLUDES must be included.<br />

Include ……………contains the local types<br />

Include ……………contains the BOR macros

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!