Unit 3: Adding Further Attributes 
Use
In this unit, you will add further attributes that can be used in a workflow definition to the object type.
Procedure
"Last Changed by" as an Object Reference
The inherited attribute
LastChangedBy ( name of person who made last change) of the object type Zini_2005 returns the contents of the database field AUFK-AENAM . This is the user name of the person who made the last change.You can also use the name of the user from the user defaults in task descriptions or work item texts. To do so, you create a new attribute for your object type.

Instead of the user ID MILLERP, which is returned as the value of the attribute
The name of the user is an attribute of the object type
USR01 (SAP User). You must create an attribute for the object type Z ini_2005 ( production order) with a data type reference to the object type USR01 ( SAP user).The Change Object Type Zini_2005 screen is then displayed.
The query Create with ABAP Dictionary field proposals? appears.
Attribute:
Name
: Changed by (object)Description
: Last changed by (object reference)Reference table
: AUFKReference field
: AENAMObject type
: USR01
As this is a database field attribute (source database field) no implementation is carried out for this attribute.
Status of an Object Status as an Attribute
If the status (set or not set) of an object is to be available as an attribute of an application object, you must add the interface
IFSTATUS (status management) and implement the attributes StatusObjNumber and StatusObjTyp that it contains. Then add the ReleaseStatus attribute to your object type:The Enter Interface Type dialog box appears.
This interface provides the
StatusObjNumber and StatusObjTyp attributes.The entry changes color. You can now edit the attribute.
The dialog box "Do you want to have a template generated automatically for the missing section?" is displayed.
The source code, which is generated automatically, is displayed.
GET_PROPERTY STATUSOBJTYPE CHANGING CONTAINER.
OBJECT-STATUSOBJTYPE = 'ORH'.
SWC_SET_ELEMENT CONTAINER
'StatusObjType' OBJECT-STATUSOBJTYPE.
END_PROPERTY.
The entry changes color. You can now edit the attribute.
The dialog box "Do you want to have a template generated automatically for the missing section?" is displayed.
The source code, which is generated automatically, is displayed.
GET_PROPERTY STATUSOBJNUMBER CHANGING CONTAINER.
OBJECT-STATUSOBJNUMBER = 'OR'.
SWC_GET_PROPERTY SELF 'Number' OBJECT-STATUSOBJNUMBER+2.
SWC_SET_ELEMENT CONTAINER 'StatusObjNumber'
OBJECT-STATUSOBJNUMBER.
END_PROPERTY.
The query Create with ABAP Dictionary field proposals? appears.
Attribute:
ReleaseStatusName
: Object statusDescription
: Status of an object statusObject status
: I0002The system enters
SWCEDITOR as the reference table and OBJSTATUS as the reference field.As this is an object status attribute, no implementation is required for this attribute.
Generate and Test Object Type

You can enter the number of the production order that you used in Unit 1.
The list displays the values of all attributes for this object type. For the attributes that are created with a data type reference to an object type, you can navigate further to the attributes of the referenced object type.