When defining a persistence representation, using either database tables or ABAP Dictionary structures, you also need to define the attributes of persistent classes or to assign fields from tables or structures to existing attributes. The following types of attributes are available:
You can get single-valued attributes explicitly using generated SET and GET methods. These are generated for each single attribute.
If the attribute is part of a business key acting as a primary key, the system generates a GET method for the attribute but not a SET method. These attributes are called key attributes. You cannot change key attributes, but can determine them explicitly using the IMPORT parameter of the constructor when you create an instance of a class.
Reference attributesrepresent references to persistent objects. Each object reference is mapped to a field for the instance GUID and to a field for the classes GUID. A SET and a GET method are generated for each reference attribute.
The system starts the Mapping Assistant and displays a dialog box in which you enter the name of a database table or a dictionary structure.
The table (view, or structure) is displayed.
The corresponding database access methods are generated implicitly at the same time as the attributes.
The generated access methods are displayed.
You have created persistent attributes, the corresponding SET and GET methods, and methods for loading and saving object instances and can use these after the activation of the class in your application. These methods allow you to access attributes of the state object, and also provide the application programmer with an invisible, implicit connection to object services.
See also: