Unit 2: Identifying and Enhancing Object Types

Procedure

Object Type BUS2005 (Production Order)

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

  1. Choose Start of the navigation pathTools Next navigation step Business Workflow Next navigation step Development Next navigation step Definition Tools Next navigation step Business Object BuilderEnd of the navigation path.

  2. Enter BUS2005 in the Object/interface type field and choose Display.

    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

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 BUS2005 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 .

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

  2. Choose Subtype.

    The dialog box Create object type appears.

  3. Enter the following data:

    • Object Type: Z ini _2005

    • Object Name: < Production order>

    • Name: < Production order>

    • Short text: < Production order extension BUS2005>

    • Program: Z ini _2005

    • Application: Z

  4. Choose Save 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 .

    The Change Object Type Zini_2005 dialog box is then displayed.

  2. Enter the following data:

    • Event: released1

    • Name: < Order released>

    • Short text: < Production order released>

  3. Choose .

  4. Position the cursor on the event released1 and choose Start of the navigation pathEdit Next navigation step Change Release Status Next navigation step Object Type Component Next navigation step In ImplementedEnd of the navigation path.

  5. Choose to check the object type.

  6. 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 Start of the navigation pathObject Type Next navigation step Change Release Status to Next navigation step ImplementedEnd of the navigation path.

  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 Z ini _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 more information, see Extending and Adapting Object Types.

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 Z ini _2005 and extended this by adding an event.