Business Objects  & Builder <ul><li>Contents: </li></ul><ul><li>Terminology </li></ul><ul><li>Enhancing an object type </l...
Business Objects & Builder:  Objectives <ul><li>At the conclusion of this section, you will be able to: </li></ul><ul><li>...
Business Objects & Builder: Business Scenario <ul><li>During the first workflow design activities, you discovered that SAP...
Business Object Type Business Object Kernel Internal Structure Specialization Interface Access via: Integrity Representati...
Business Object Repository (BOR) Business Workflow ArchiveLink BAPI Modeling BAPI BAPI BO BAPI BO BAPI BAPI BO BO BO BO BO...
Object type and Instance Passenger plane Aircraft Specialization Instancing D4711 Pilots: 1 Passengers: 3 Class = Object t...
Object Types and Runtime Objects Object type Runtime object Persistency Instance BOR R/3 Database tables
Examples of Object Types <ul><li>SAP Object types </li></ul><ul><ul><li>Invoice (BSEG_MMIV) </li></ul></ul><ul><ul><li>Sal...
Objects in Workflow Multi step task Workflow  definition Task SAP functionality Method Attribute Object type External appl...
New Business Object Type  Material: My_part Old Material: Original_part New_part Lab: PM1 Change documents Event ZBUS1001....
Object Type: Elements Object type key fields function module report ABAP coding transaction field reference object referen...
Object Type: Definition of a Subtype ZBUS1001 My_Material BUS1001 Material Supertype Subtype key fields attributes methods...
Delegation  Without Delegation With Delegation between BUS1001 and ZBUS1001 No communication since Workflow system finds t...
Object Type Definition Key fields: <ul><ul><li>General: relationships to supertype, release, generation </li></ul></ul><ul...
Object Type Definition: Attributes <ul><li>Property of an object </li></ul><ul><li>Source of information </li></ul><ul><ul...
Object Type Definition: Methods <ul><li>Allowed function on an object </li></ul><ul><li>Properties:  </li></ul><ul><ul><li...
Synchronous and Asynchronous Methods <ul><li>Tasks can have terminating events </li></ul><ul><li>Synchronous method </li><...
Object Type Definition: Event Object System-wide message about change in object status Events are only defined in the obje...
Specific Object Types SELFITEM SOFM STD_TEXT Sending SAP Mail Send task description Office document Send SAPoffice documen...
Business Object : Summary <ul><li>Workflow architecture is based on object types </li></ul><ul><li>Object type: Key fields...
SAP Workflow Course PwC Consulting TM  refers to the management consulting services businesses of the member firms of the ...
Upcoming SlideShare
Loading in …5
×

08 01 businessobjectsbuilder

1,017 views

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,017
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
56
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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 &amp;quot;Customer&amp;quot;, &amp;quot;Material&amp;quot;, and &amp;quot;CompanyCode&amp;quot;. 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 &amp;quot;ObjectType&amp;quot; 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 &amp;quot;ObjectType&amp;quot;. 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&apos; 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.
  • 08 01 businessobjectsbuilder

    1. 2. Business Objects & Builder <ul><li>Contents: </li></ul><ul><li>Terminology </li></ul><ul><li>Enhancing an object type </li></ul>
    2. 3. Business Objects & Builder: Objectives <ul><li>At the conclusion of this section, you will be able to: </li></ul><ul><li>Define components of a business object type </li></ul><ul><li>Examine and extend a business object type </li></ul><ul><li>Identify purpose of delegation of object type behavior </li></ul>
    3. 4. Business Objects & Builder: Business Scenario <ul><li>During the first workflow design activities, you discovered that SAP ‘standard tasks’ does not support all required functional steps </li></ul><ul><li>To build your own task, you will learn more about the basic components of a task </li></ul><ul><li>In SAP Business Workflow an “Object Type” is the base for all single step tasks </li></ul><ul><li>Explore and extend the material master business object type BUS1001 </li></ul>
    4. 5. Business Object Type Business Object Kernel Internal Structure Specialization Interface Access via: Integrity Representative &quot;is part of&quot; &quot;is a&quot; Consistency requirements (object- related) Business rules (environment- related) Events Attributes ABAP (RFC) COM/DCOM CORBA BAPIs, Methods
    5. 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
    6. 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
    7. 8. Object Types and Runtime Objects Object type Runtime object Persistency Instance BOR R/3 Database tables
    8. 9. Examples of Object Types <ul><li>SAP Object types </li></ul><ul><ul><li>Invoice (BSEG_MMIV) </li></ul></ul><ul><ul><li>Sales Order (BUS2032) </li></ul></ul><ul><ul><li>Delivery note (LIKP) </li></ul></ul><ul><ul><li>Material (BUS1001) </li></ul></ul><ul><ul><li>Bill of material (BUS1002) </li></ul></ul><ul><li>External documents </li></ul><ul><ul><li>Archived documents (TOAV0) </li></ul></ul><ul><ul><li>Purchase order Idoc (IDOCORDERS) </li></ul></ul>
    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
    10. 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
    11. 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
    12. 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
    13. 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
    14. 15. Object Type Definition Key fields: <ul><ul><li>General: relationships to supertype, release, generation </li></ul></ul><ul><ul><li>Change and transport data </li></ul></ul><ul><ul><li>Defaults: for methods and attributes </li></ul></ul><ul><ul><li>Customizing: display persons responsible/delegation </li></ul></ul>Basic Data: <ul><li>Identification of an object </li></ul><ul><li>Data type reference </li></ul><ul><ul><li>Dictionary field: only character based data types, up to 70 characters total </li></ul></ul>Object
    15. 16. Object Type Definition: Attributes <ul><li>Property of an object </li></ul><ul><li>Source of information </li></ul><ul><ul><li>Database field </li></ul></ul><ul><ul><li>Virtual </li></ul></ul><ul><li>Data type reference </li></ul><ul><ul><li>ABAP Dictionary field </li></ul></ul><ul><ul><li>Object type </li></ul></ul><ul><li>Multi-line attributes are possible </li></ul>Object
    16. 17. Object Type Definition: Methods <ul><li>Allowed function on an object </li></ul><ul><li>Properties: </li></ul><ul><ul><li>Dialog: yes - “Change material” no: “Delete request” </li></ul></ul><ul><ul><li>Synchronous: yes - “Execute report” no: “Create material” </li></ul></ul><ul><ul><li>Reference to SAP functionality </li></ul></ul><ul><ul><li>Synchronous have a specified result (e.g., request rejected/approved) </li></ul></ul><ul><ul><li>Exceptions for error handling </li></ul></ul><ul><ul><li>Use method parameters </li></ul></ul>Object
    17. 18. Synchronous and Asynchronous Methods <ul><li>Tasks can have terminating events </li></ul><ul><li>Synchronous method </li></ul><ul><ul><li>Method is called, assumes process control and confirms to caller after processing </li></ul></ul><ul><ul><li>Optional: import parameter </li></ul></ul><ul><ul><li>Optional: result, export parameter, exceptions </li></ul></ul><ul><li>Asynchronous method </li></ul><ul><ul><li>Method is called, runs without connection to caller and does not confirm after processing </li></ul></ul><ul><ul><li>Optional: import parameter </li></ul></ul>asynchronous object method synchronous object method task terminating event terminating event task
    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
    19. 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
    20. 21. Business Object : Summary <ul><li>Workflow architecture is based on object types </li></ul><ul><li>Object type: Key fields, attributes, methods, events </li></ul><ul><li>Business Object Repository (BOR): Collection of SAP and own object (sub)types </li></ul>
    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.

    ×