Unit 2: Identifying and Extending Object Types 

Object Type BUS2005 (Production Order)

Execute the following steps, in order to learn about the object type BUS2005

  1. Choose Tools ® SAP Business Workflow ® Development ® Definition tools ® Business Object Builder.
  2. Enter BUS2005 in the Object/interface type field and choose .
  3. The screen Display object type BUS2005 is then displayed.

    If the folder symbol in front of one of the entries Interfaces, Key fields, Attributes, Methods or Events contains a plus sign, elements are available and defined for this object type component.

    Open the folders to display an overview of the existing elements.

    Interface

    In addition to the IFSAP interface, which is supported by every object type, this object type supports three further interfaces.

    Key fields

  4. Double-click the entry ProductionOrder.Number to display detailed information on this key field.

The key field of the object type BUS2005 is Number (Order number) and refers to the table field AUFK-AUFNR. The key field of an object of the type BUS2005 identifies it uniquely and enables read access to its attributes.

Attributes

Attributes are defined for the object type BUS2005.

The two database field attributes LastChangedBy (name of person who made last change) and ChangeDate (date of last change) are used later on, since they are to be included in the request text (along with the key field).

Methods

The Display method is used in this scenario.

Enhancements to the Object Type BUS2005

The definition of the object type BUS2005 is incomplete and cannot be used in this scenario. In other words, this object type must be extended.

You need an event to publish the change to the material master data throughout the system. All events which are to be used must be defined beforehand as elements in their object type.

Create Subtype for Available Object Type

Since you cannot make any direct changes to the SAP object type BUS2005, first create a customer-specific object type as a sub-type of this object type. This sub-type inherits all attributes and methods of its super type.

  1. Choose .
  2. You are now in the Business Object Builder: Initial Screen. The object type BUS2005 is still entered.

  3. Choose Subtype.
  4. The dialog box Create object type appears.

  5. Enter the following data:
  6. Object type: Z ini _2005

    Object name: < Production order >

    Name: < Production order >

    Description: < Production order extension BUS2005 >

    Program: Z ini _2005

    Application: Z

  7. Choose and save the subtype as a local object.

You are now on the Change Object Type Zini_2005 screen and can edit the new object type you created.

Ensure that this object type has inherited all methods and attributes from the super-type BUS2005. Inherited elements are marked in red.

Creating an Event

The status change should be broadcast with an event with the name released1.

This event can only be generated if it is defined for the object type. This is not yet the case.

  1. Position the cursor on the Events node and choose .
  2. The Change Object Type Zini_2005 dialog box is then displayed.

  3. Enter the following data:
  4. Event: released1

    Name: < Order released >

    Description: < Production order released >

  5. Choose .
  6. Position the cursor on the event released1 and choose Edit ® Change release status ® Object type component ® To implemented.
  7. Until now, within the object type definition, you have only described the fact that the event released1 is intended to be used with object type Zini_2005. You must ensure that the event is actually created. This is described in one of the following chapters.

  8. Choose to check the object type.
  9. Choose .

Implementing and generating an object type

You are on the screen Business Object Builder: Initial Screen. You object type is entered in the Object/interface type field.

  1. Choose Object type ® Change status to ® Implemented.
  2. Choose to generate the object type.

Delegation

In order to be able to work through this tutorial more than once or with a number of different users at the same time and on the same system, edit the new object type Zini_2005, which you created as a sub-type of the object type BUS2005. This procedure is particularly appropriate for training situations.

For extensions to object types and their use in productive workflow scenarios, SAP recommends an extended procedure in which you define the sub-type as the delegation type of the object type.

For further information, please refer to Extending and Adapting Object Types.

Delegation functionality is not used in this tutorial.

Result

In this unit, you were introduced to the Business Object Builder and the object type BUS2005. For the object type BUS2005, you have created a subtype Zini_2005 and extended this by adding an event.