7.pdf This presentation captures many uses and the significance of the number...
08 01 businessobjectsbuilder
1.
2.
3.
4.
5. Business Object Type Business Object Kernel Internal Structure Specialization Interface Access via: Integrity Representative "is part of" "is a" Consistency requirements (object- related) Business rules (environment- related) Events Attributes ABAP (RFC) COM/DCOM CORBA BAPIs, Methods
6. Business Object Repository (BOR) Business Workflow ArchiveLink BAPI Modeling BAPI BAPI BO BAPI BO BAPI BAPI BO BO BO BO BO BO BO BO BOR
7. Object type and Instance Passenger plane Aircraft Specialization Instancing D4711 Pilots: 1 Passengers: 3 Class = Object type Single object = Instance Object AA Hollywood Pilots: 2 Freight: 30.000 kg BA Big Ben Pilots: 2 Passengers: 5 Freight: 200 kg Cargo plane Recreational plane Business plane Class LH Munich Pilots: 2 Passengers: 3 Freight: 80 kg R
8. Object Types and Runtime Objects Object type Runtime object Persistency Instance BOR R/3 Database tables
9.
10. Objects in Workflow Multi step task Workflow definition Task SAP functionality Method Attribute Object type External applications Workflow Work item Execution of an object method Event Workflow manager Work item manager terminating event triggering event Object type ABAP Dictionary Database
11. New Business Object Type Material: My_part Old Material: Original_part New_part Lab: PM1 Change documents Event ZBUS1001. Old_Material_changed Task Display Material Business Object Type: ZBUS1001 Key: MARA-MATNR Attribute: Laboratory Method: Display Event: Old_Material_changed Business Object Type: T024L Database
12. Object Type: Elements Object type key fields function module report ABAP coding transaction field reference object reference Export/import parameter result attributes methods events Program
13. Object Type: Definition of a Subtype ZBUS1001 My_Material BUS1001 Material Supertype Subtype key fields attributes methods events key fields attributes methods events Materialno MaterialType MaterialGroup Division OldMaterial Display Create OrderUnit BasicMaterial Report1 changed Created MaterialGroup Materialno MaterialType Division OldMaterial Edit Create Display Created Edit
14. Delegation Without Delegation With Delegation between BUS1001 and ZBUS1001 No communication since Workflow system finds two business object types Communication within Workflow possible between those two tasks TASK based on ZBUS1001. Report1 TASK based on BUS1001. Report1 BUS1001 created BUS1001 created
15.
16.
17.
18.
19. Object Type Definition: Event Object System-wide message about change in object status Events are only defined in the object type The SAP application must raise the event, not the object type Event parameters transfer information from event creator to event receiver
20. Specific Object Types SELFITEM SOFM STD_TEXT Sending SAP Mail Send task description Office document Send SAPoffice document SAP Script standard text Replace text symbols and display text Method Examples : HELP TSTC Call extended help Display help object Transaction Execute transaction TRDIR ABAP program Execute program
21.
22. SAP Workflow Course PwC Consulting TM refers to the management consulting services businesses of the member firms of the worldwide PricewaterhouseCoopers organisation. 2001 PricewaterhouseCoopers. All rights reserved.
Notes de l'éditeur
Business Objects hide their internal structure via several layers. A business object is described by the following elements: Object ID Unique identifier Key field Number Object name Unique semantic designation Components Differentiated internal structure elements of the object Relationship type: “is part of” Subtypes Specialization of an object Relationship type: “is a” Attribute entered by, entry date, approved by, etc. Methods Implementation of the methods applicable to the object Events Events that generate the object in dependence upon its object status
The BOR is a complete development and runtime environment able to handle the following object types: Business objects: Business objects include objects such as "Customer", "Material", and "CompanyCode". They provide both a high-level business-oriented view of, and a programming interface to, the R/3 System. Technical objects: Technical objects include texts, notes, work items and archived documents, as well as desktop objects like texts, graphics and spreadsheets. These desktop objects can be described in condensed form in the BOR. Meta objects: Meta objects document object types, methods, attributes and events. Each object has an attribute "ObjectType" which refers to the metaobject to which it is assigned. The methods, attributes and events available for a particular object can be retrieved from its "ObjectType". Business Objects are modeled, abstracted in the Business Object Builder and stored in the Business Object Repository.
In SAP terminology, object classes are described as object types and a single business object is described as an instance. Object types (classes) describe an abstract business object, the data that belongs to it, methods, etc. Object types can be inherited. Inherited objects types contain all the methods and data fields of the parent including additional, specific data and methods. This allows polymorphism, which combines the same attributes from various, specialized objects. Polymorphism can also be used by implementing defined interfaces (attributes and methods) from objects. In this example, recreational and business planes are specific instances of a passenger plane. They are polymorphs relating to the object type class ‘Passenger plane.’ Multiple inheritance is not presently directly supported by the SAP business objects. An object can implement several interfaces. Instances of business objects contain actual data, for example, a customer order. There can be any number of instances of an object type.
In order to work with a business object, an instance must first be created that corresponds to the object type. For this purpose, the necessary metadata are retrieved from the Business Object Repository (BOR) and a runtime object is created. When creating an instance, there are two types of objects: persistent and non-persistent Persistent objects contain data from the R/3 database tables. The data also exists after destroying the runtime object. Persistent objects are uniquely identified by their key fields. Non-persistent objects are not linked to concrete database entries. For example, they are used to display data (list of all persistent business objects for a type), or to create new persistent business objects.
SAP Business Workflow represents the concept and implementation of an object-oriented approach. Objects are concrete, identifiable specific instances of an object type e.g. Object type notification of absence (FORMABSENC) Key field : number Attribute : entered by, entry date, approved by, etc. Methods : create, approve, edit, delete
The workflow architecture is based on Object Types. Special Object Type Attributes point to the fields in the ABAP Dictionary for all business data. Object Type Methods are encapsulation of behavior for performing tasks in processes. Implementation of objects can be changed without workflow definitions or organizational structures having to be modified Object Type Events can have a triggering or terminating effect on tasks or workflows.
New Business Object Type can be created. The following process describes the activities you have to accomplish at this level in order to support the Material Master Workflow exercise of this class. First : Check the functionality of the Business Object Type delivered by SAP. Make sure the display method is supporting your requirements. Otherwise you would have to build a new method for your sub-type. Second : You can create your own sub-type for this Business Object Type. In this case ZBUS1001 was created. Third : Check the attributes of this sub-type. You might have to create a new attribute for your sub-type. This attribute will establish the connection to another business object type, in this case T024L. Fourth : Create a new event for this sub-type.
Object methods: processing objects in a workflow Object attributes: controlling workflow process, formulating conditions in workflow definition; evaluation of runtime Implementation: implementation of method calls and attribute accesses are encapsulated in the program of the object type. Not visible to the caller. All objects have own interfaces for calling methods and/or reading attributes. Event: description of a change in status of an object Events must be “published” via appropriate mechanisms. Application and program knowledge are required for dealing with objects.
You can use DELEGATION to enhance the functionality of the SAP object types. Subtypes will give you the opportunity for: additional attributes additional methods additional events Each object type and all components have one of the four status assigned: modeled: there is no program for this yet. implemented: program is started but not officially finished yet. released: program can be executed by everyone. obsolete: do not use this anymore. Do not change anything in an SAP provided object type, unless the change procedure is described in an SAPNet / OSS note.
Without delegation, you would have to use two different business object types in your workflow. Mixing these two business object types will result in a container binding error at definition time or at runtime. Dataflow binding example of something, which does not work: Task Container Workflow Container WI_Object (ZBUS1001) BUS1001 Dataflow binding Example after delegation: The second task has to be based on the new method ‘Report1' of BUS1001 Task Container Workflow Container WI_Object (BUS1001) BUS1001
Default method: A default method is selected if no further specifications are made when an object of this object type is accessed. Example: Executing an object by double clicking from a display list. For your own object types you can select a default method.
The properties of an object can be described as object attributes. Attributes are used in workflow definition in the formulation of conditions and can therefore also be used for controlling workflows. Data type reference options in attributes : ABAP Dictionary field Definition: reference to database field Runtime: attribute value corresponds to content of table field Object type Definition: reference to object type Runtime: attribute value corresponds to object reference to an object of this type
Method : allowed function on an object Methods encapsulate the familiar and comprehensive functionality of the R/3 System and hence make it available for the workflow system. Information about the implementation used is deposited in the object type definition and is no longer required on the user interface and/or control level. The object methods refer to available ABAP functions (transactions, function modules, dialog modules, etc). Synchronous methods can have a specified result (optional) The possible values of the result can be deposited in a check table. The possible values of this result are hence known in the definition of a workflow as terminating events of that task, which will use this method.
Synchronous and asynchronous methods differ in calling and confirmation. Asynchronous methods : only import parameters Synchronous methods : import and export parameters
Published event: system-wide message about change in status of an object Example: customer order created invoice posted Events should only be used in conjunction with an object type.
The object type SELFITEM provides the functionality to send mail from within the workflow. Check the workflow tutorial for explanation. Use the workflow wizard to insert such a procedure into your workflow. The object type SOFM is more for SAP experts, who want to program functionality around the SAP office folders and documents. The object type STD_TEXT can be used to integrate SAP script text into a mail send out by workflow. (Although the SELFITEM approach is easier.) Use the object type TSTC to execute a transaction in a workflow step. Use the object type TRDIR to execute a report in a workflow step.