SlideShare a Scribd company logo
BUSINESS OBJECT REPOSITORY
Business Object Repository Business object repository is a collection of business objects. Business objects integrate the data and functions of business applications into your workflows. They enable the communication with business applications with all the flexibility and robustness required for a production environment. Business objects are also the main interface between SAP workflow and business applications in SAP components. Business objects helps to minimize development and maximize return on investment you have already made in implementing your SAP component. Business objects give the SAP workflow access to the data and functions in business applications. A directory of all object types defined in the SAP System is managed in the business object repository. These object types are each assigned to a business application component.  In addition to the business object types, the business object repository also contains structural object types, such as company code, plant, or sales organization, and technical object types, such as text, note, work item, or archived document. Customers can define their own object types.  Object types and their elements can be found quickly by accessing this business object repository with the appropriate search functions (either via the component hierarchy or with a generic search using parts of a name).
Business Objects Business data can be used  : In control steps (including conditions, loops, container operations) In bindings (including event to workflow, workflow to task, task to method, workflow to rule) In texts (including work items texts and user instructions) In start conditions used to determine which workflow will be started and whether a workflow will be started. Business functions can be used  : In methods, within tasks, within workflows In agent determination rules and XML rules. In event linkages with start conditions, check function modules or receiver type function modules. In secondary before and after methods within workflow step definition.
Business Objects Business objects provide you with an object oriented view of business applications. They organize the business data and functions into the reusable components that can be accessed throughout the workflow. From a workflow perspective, the main advantage of object-orientation are : Reusability :  Each piece of business data and business function defined is potentially available to all workflows. Business data is available as an attribute of an object and Business function is available as a method of an object. Encapsulation :  Each piece of business data and business function is defined once and only once for the most relevant business object. Inheritance :  SAP provides many business objects with data and functions, instead of starting from the scratch, you can inherit the SAP- provided business objects to your own business objects. You can even replace provided data and functions with your own. Polymorphism :  Business objects allow generic programming.
Relationships Between Object Types or Business Objects A business object type can have various relationships to other business object types. Relationship between attributes are extremely useful throughout workflow. Relationships are as follows : 1 .  Inheritance  :  (inherits from) Relationship between object types allowing common attributes and methods to be passed automatically from supertypes to subtypes.  The object type which passes on attributes and methods is the supertype. The subtype takes on ("inherits") the attributes and methods from the supertype. The supertype program coding connected with the attributes and methods is referenced. Inherited attributes and methods can be redefined for the subtype. The interface, however, may only be enhanced.  If the attributes and methods of the supertype are known, it is only necessary to describe the differences (changes and enhancements) in the relevant subtype. All other attributes and methods defined once are used again which reduces the implementation work involved. The error probability when changes are made later also decreases.  In inheritance, the subtype usually has the same key fields as its supertype, but enhanced functionality.
Composition : "Is part of" relationship between object types.  The object type  order item  "is part of" the object type  order .  The object type  order  is then the  aggregate type  of the object type  order item .  In composition, the ‘is part’ object type usually has an extended key when compared to the aggregate type (for example, order key + item) and a completely different functionality . Composition relationships are implemented by creating an attribute that links one object to another. Interface : Relationship expressing which object types support an interface.  To maintain this relationship, the relevant interfaces must be entered as components of the object type.  Association : Relationship between object types resulting from an object type being referenced as an object attribute of another object type.  The object type  customer  is referenced in the attribute  ordering party  of the object type  sales order .  Relationships Between Object Types or Business Objects
Business Object Tools There are two main tools that you can use to work with business objects: 1.  Business Object Builder  : Transaction SWO1 or Definition Tools ->Business object builder. Use the Business Object Builder to display, test, create, generate, change, delete, delegate, and change the status of business objects. You can see all the relationships between object types using Utilities -> Relationships on the initial screen. To access a business object type in the Business Object Builder use its technical ID 2.  Business Object Repository Browser  : Transaction SWO1 or Definition Tools ->Business object Repository. Business object Repository browser presents a hierarchical view of all the business objects available, by SAP application module. Each object type is assigned to an SAP application module indirectly via its package. You can inspect the definition of existing object types, but you cannot create new object types here.
Business Objects : Some Basic Terminology While using business objects you may be referring some of the following terms: 1.  Object type  : It is a design and implementation of the access to data and functions i.e. the object types contains the program that reads or calculates data and calls business functions. 2.  Object Instance  : It is a single runtime copy of its object type that holds the data or accesses the functions relevant to that particular instance of the object. 3.  Object reference  : It holds the technical ID of object type, the object key, and other technical information needed by the system to access an object instance. Each object of business object type has the following components. Key Field. Attributes. Methods. Events.
Key Field Fields for unique identification of an object.  The key defines each object instance uniquely. For e.g. for the Customer object type the key is customer ID. The definition of the key fields of an object type determines the structure of the identifying key, via which the system can access a specific object, that is, an instance of the object type. The key fields of an object type are usually also the key fields in the table containing the header data for the object type.  Only character-based data types are allowed as key fields. The total length allowed for all key fields is 70 characters. Each key field refers to a field in the ABAP Dictionary.  Key fields are simply declared within the object and are filled when the object is instantiated. Each key field  must have a reference to a ABAP Dictionary table/field. This is used to define the data type and length of a key field.
Creating Key Fields Steps for creating the key field : Key field is provided by calling workflow, task, method, attribute or event whenever the object is used. The object instance instantiated from the object type and key, give you access to all the attributes and methods of that object. Example: We will add the Material ID as a key field of some object called ZWIDGET1. If you are not using BUS1001 object type, we can create the same fields with the same data type references as your example object type. Bring the ZWIDGET1in change mode to add the key field by choosing the component title “Key” and choosing ‘create’. Base the key field on the dictionary table MARA field MATNR. Once the key field has been created, go back to the object type program and see that the object declaration has changed. Regenerate and test your new changed object. Attempt to add a new key field to ZWIDGET2. Key will not be added since ZWIDGET2 is a subtype.
Attributes Attributes provide access to business data. This may be data extracted from the database or calculated values. Attributes may reference a single value or multiple values. Attributes can in themselves be references to other business objects, setting up relationships between objects. Attributes can be used to formulate conditions in the workflow definition. The system reads or establishes the attribute values at runtime and controls the workflow with them. A object attribute can return data as follows:  The value of a field of the ABAP Dictionary (database field attribute)  An object reference to an object defined in the  Business Object Repository .  The attributes of an object are defined and implemented as components of an object type in the Business Object Repository.  Attributes are passed on from the supertype to its subtypes.
Creating Attribute Bring the ZWIDGET1 in change mode to add a new attribute by choosing the component title “Attributes” and choosing ‘Create’. Click on yes to the question “Create with ABAP Dictionary field proposals?”. Base your new component on dictionary table MARA field MTART (Material type). Accept system’s proposal for names and descriptions of an attribute. Notice what checkboxes and values have been set for you in the attribute details screen. You will see that the attribute ID, name, description, database flag, and data-type reference have all been set for you. Notice that the attribute is only in modeled status. Save your object and regenerate it. Try testing your object. Can you use the new attribute in modeled status? No. Go back to your object, choose your new attribute and choose Program. The system will ask you if you want it create an implementation for your attribute. Click on Yes. Do not change the code generated at this stage, just inspect it. Note that status of your attribute is automatically changed to implemented. Regenerate your object and test it again with the valid material number. This attribute will show the material type for material chosen.
Methods Method provide access to business functions. Method is also known as operation that can be performed on an object.  The methods of an object are defined and implemented as components of an object type in the Business Object Repository.  Methods and their interfaces are passed on from the supertype to the subtypes.  A method generally refers to ABAP/4 functionality which is already available (function module, transaction, dialog module, ...) and is called via an interface determined mainly by the method name and method parameters. The actual implementation of the method therefore remains abstract. It is not visible externally and does not need to be known to the calling program of the method.  If you want to use a function in a workflow, it must be first defined as a method of an object. A method is usually a single activity that can be performed on an object instance. A method may involve a combination of business functions or even call other methods within its program code.
Synchronous and Asynchronous Methods Methods can be subdivided as follows depending on their response characteristics:  Synchronous methods   Synchronous object methods assume process control for the duration of their execution and report back to the calling program once they have been executed.  Synchronous methods can accept import parameters and a result, export parameters, and exceptions. Asynchronous methods  Asynchronous methods do not report back to the calling program directly after their execution. The response is made via events which are used to report the processing results of the methods.  Asynchronous methods can only accept import parameters; they cannot return any results to the workflow directly. Results can be returned indirectly via terminating events. Synchronous and asynchronous methods can be distinguished according to the way in which they are used in single-step tasks: A single-step task which refers to an asynchronous method must be completed by an event.
Method Parameters and Result Method Parameters Parameters are used to exchange information between the calling program of a method and the method.  Parameters of a method are values which are either passed to the method at runtime (import parameters) or are returned from the method (export parameters).  When the parameters are defined, the interface of the method call is also defined.  A method need not necessarily have parameters; many methods can be used without parameters.  Method Result  The result of a method is different to the export parameters. Possible values for the result can be fixed or contained in a check table. They are therefore known in a workflow definition and can be taken into account during process modeling. The various follow-up steps can be modeled in a workflow definition according to the results. A method can only ever have one result, although there is no limit to the number of export parameters.  A method need not necessarily have a result.
Events Events transmit the status change of an object (e.g. Created, Changed). Events should always be seen in connection with the object they are "reporting" on. The events belonging to an object are therefore specified in the object type definition.  Events are published without the application, the event creator, knowing whether a receiver is interested in this event and whether it will respond. Potential receivers of an event are listed in the event receiver linkage table, where receivers can make and remove their entries as required. This allows the events created to be responded to flexibly. Events are used in the SAP Business Workflow environment. to start tasks (multistep tasks and single-step tasks). The events are therefore defined as the triggering events of the respective tasks.  to complete single-step tasks which refer to an asynchronous object method. The events are therefore defined as the terminating events of the respective single-step tasks.  Events are linked to runtime-dependent data (event parameters) which is available to the event receiver and can be used for event-driven control and communication mechanisms.
Creating Events Steps for creating events: Bring the ZWIDGET1 in change mode to add a new event by choosing the component title “Events” and choosing ‘Create’. Give your event a name. Regenerate your object and test it.
THANK YOU

More Related Content

PPTX
SAP ALE Idoc
PDF
How to extend an outbound i doc
PPT
Step by step lsmw tutorial
PPTX
SAP BADI Implementation Learning for Functional Consultant
PDF
Sap query creation & transcation code creation for sap query
DOCX
Oracle Web Adi For upload item master
DOCX
Oracle inventory R12 Setup Guide
DOC
Oracle Assets Period Closing
SAP ALE Idoc
How to extend an outbound i doc
Step by step lsmw tutorial
SAP BADI Implementation Learning for Functional Consultant
Sap query creation & transcation code creation for sap query
Oracle Web Adi For upload item master
Oracle inventory R12 Setup Guide
Oracle Assets Period Closing

What's hot (20)

PPTX
Oracle EBS: ATO with Outside Processing
PDF
Oracle Order Management & Shipping Execution – Sales Order Line Status Flow &...
DOC
Important tables for sap sd
PDF
Introducing enhancement framework.doc
PPT
Call transaction method
PDF
Lsmw by guntupalliharikrishna
PDF
All About Multi Organization Access
PDF
Enhancement framework the new way to enhance your abap systems
PPTX
Oracle Apps SCM Functional Overview
PDF
Inventory receiving processes for serial controlled items
PDF
White Paper Oracle Subledger Accounting
DOCX
Oracle Quality setup
PDF
Pricing Routine In Vofm
PDF
Smartforms interview questions with answers
PDF
Oracle forms personalization
DOCX
Move order types
PDF
Abap proxies
PPTX
SAP IDoc Overview and Outbound IDoc.pptx
PDF
Bapi step-by-step
PDF
Oracle Financials R12 - GL STEP 1 - Chart Of Accounts
Oracle EBS: ATO with Outside Processing
Oracle Order Management & Shipping Execution – Sales Order Line Status Flow &...
Important tables for sap sd
Introducing enhancement framework.doc
Call transaction method
Lsmw by guntupalliharikrishna
All About Multi Organization Access
Enhancement framework the new way to enhance your abap systems
Oracle Apps SCM Functional Overview
Inventory receiving processes for serial controlled items
White Paper Oracle Subledger Accounting
Oracle Quality setup
Pricing Routine In Vofm
Smartforms interview questions with answers
Oracle forms personalization
Move order types
Abap proxies
SAP IDoc Overview and Outbound IDoc.pptx
Bapi step-by-step
Oracle Financials R12 - GL STEP 1 - Chart Of Accounts
Ad

Viewers also liked (20)

PPT
12 01 deadline
PPT
10 01 containersbindings
PPT
02 01 introduction
PDF
Custom development of web dynpro ess applications using floor plan manager
PPT
15 a 01 reporting
PPT
09 01 tasks
PPT
04 01 workplace inbox
PPT
03 01 whatisworkflow
PPT
07 b 01workflowdefinition
PPT
05 a 01workflowarchitecture
PPT
08 01 businessobjectsbuilder
PPT
05 b 01workflowcustomizing
PPT
11 01 routing
PPT
07 a 01templates
PDF
SAP Business Workflow - Best Practices
PPT
06 1 organizational structure
PPT
SAP workflow classics
PDF
SAP HCM EhP6 and HR Renewal Overview
PDF
Latest Enhancements in SAP ERP HCM Self-Services: HR Renewal, SAP Fiori, and ...
PDF
Sap workflow training
12 01 deadline
10 01 containersbindings
02 01 introduction
Custom development of web dynpro ess applications using floor plan manager
15 a 01 reporting
09 01 tasks
04 01 workplace inbox
03 01 whatisworkflow
07 b 01workflowdefinition
05 a 01workflowarchitecture
08 01 businessobjectsbuilder
05 b 01workflowcustomizing
11 01 routing
07 a 01templates
SAP Business Workflow - Best Practices
06 1 organizational structure
SAP workflow classics
SAP HCM EhP6 and HR Renewal Overview
Latest Enhancements in SAP ERP HCM Self-Services: HR Renewal, SAP Fiori, and ...
Sap workflow training
Ad

Similar to 2.business object repository (20)

PPT
Analysis modeling in software engineering
PPT
Analysis modeling
PPT
Chapter 5 Analysis Modeling of Software Engineering.ppt
PPT
software_engg-chap-03.ppt
PPT
6. Requirement Modelinbbdhdhbdhhdbbdg.ppt
PDF
Ooluk Data Dictionary Manager
PPTX
ER modeling
PPTX
SFDC Training Day 2SFDC Training Day 2.pptx
PDF
ArchitectureOfAOMsWICSA3
PPT
database1
PPTX
model data objects concepts of entitty.pptx
PPTX
L5 m256 block2_unit5
DOC
Form part1
PPTX
Use Case Analysis and Diagramming
PPT
Cognos framework manager
PPT
ASP.NET System design 2
PPTX
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
PPTX
Go f designpatterns 130116024923-phpapp02
PDF
George McGeachie's Favourite PowerDesigner features
DOCX
pega training with project level Trainingwhatsup@8142976573
Analysis modeling in software engineering
Analysis modeling
Chapter 5 Analysis Modeling of Software Engineering.ppt
software_engg-chap-03.ppt
6. Requirement Modelinbbdhdhbdhhdbbdg.ppt
Ooluk Data Dictionary Manager
ER modeling
SFDC Training Day 2SFDC Training Day 2.pptx
ArchitectureOfAOMsWICSA3
database1
model data objects concepts of entitty.pptx
L5 m256 block2_unit5
Form part1
Use Case Analysis and Diagramming
Cognos framework manager
ASP.NET System design 2
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Go f designpatterns 130116024923-phpapp02
George McGeachie's Favourite PowerDesigner features
pega training with project level Trainingwhatsup@8142976573

More from Ajay Kumar ☁ (16)

PPT
GB payroll with employee central
PDF
SAP Time Management
PPT
Payroll Basics
PPT
BANK Automated Clearing System
PPT
PPTX
Sap HANA Column Oriented Architecture
PPT
PPTX
Hcm trg uk_py_statutory_forms__e-filing
PPTX
Hcm trg uk_py_master_data
PPTX
Hcm ppt uk_py_national_insurance
PPTX
Court orders
PPTX
E rec kt-master_presentation
PPTX
Hcl indian payroll_3
PPTX
PPTX
Pensions v0.2
PPT
6.steps for using as business object
GB payroll with employee central
SAP Time Management
Payroll Basics
BANK Automated Clearing System
Sap HANA Column Oriented Architecture
Hcm trg uk_py_statutory_forms__e-filing
Hcm trg uk_py_master_data
Hcm ppt uk_py_national_insurance
Court orders
E rec kt-master_presentation
Hcl indian payroll_3
Pensions v0.2
6.steps for using as business object

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
RMMM.pdf make it easy to upload and study
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Cell Types and Its function , kingdom of life
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Supply Chain Operations Speaking Notes -ICLT Program
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPH.pptx obstetrics and gynecology in nursing
VCE English Exam - Section C Student Revision Booklet
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O7-L3 Supply Chain Operations - ICLT Program
102 student loan defaulters named and shamed – Is someone you know on the list?
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
RMMM.pdf make it easy to upload and study
Final Presentation General Medicine 03-08-2024.pptx
Basic Mud Logging Guide for educational purpose
Cell Types and Its function , kingdom of life
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Computing-Curriculum for Schools in Ghana
FourierSeries-QuestionsWithAnswers(Part-A).pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...

2.business object repository

  • 2. Business Object Repository Business object repository is a collection of business objects. Business objects integrate the data and functions of business applications into your workflows. They enable the communication with business applications with all the flexibility and robustness required for a production environment. Business objects are also the main interface between SAP workflow and business applications in SAP components. Business objects helps to minimize development and maximize return on investment you have already made in implementing your SAP component. Business objects give the SAP workflow access to the data and functions in business applications. A directory of all object types defined in the SAP System is managed in the business object repository. These object types are each assigned to a business application component. In addition to the business object types, the business object repository also contains structural object types, such as company code, plant, or sales organization, and technical object types, such as text, note, work item, or archived document. Customers can define their own object types. Object types and their elements can be found quickly by accessing this business object repository with the appropriate search functions (either via the component hierarchy or with a generic search using parts of a name).
  • 3. Business Objects Business data can be used : In control steps (including conditions, loops, container operations) In bindings (including event to workflow, workflow to task, task to method, workflow to rule) In texts (including work items texts and user instructions) In start conditions used to determine which workflow will be started and whether a workflow will be started. Business functions can be used : In methods, within tasks, within workflows In agent determination rules and XML rules. In event linkages with start conditions, check function modules or receiver type function modules. In secondary before and after methods within workflow step definition.
  • 4. Business Objects Business objects provide you with an object oriented view of business applications. They organize the business data and functions into the reusable components that can be accessed throughout the workflow. From a workflow perspective, the main advantage of object-orientation are : Reusability : Each piece of business data and business function defined is potentially available to all workflows. Business data is available as an attribute of an object and Business function is available as a method of an object. Encapsulation : Each piece of business data and business function is defined once and only once for the most relevant business object. Inheritance : SAP provides many business objects with data and functions, instead of starting from the scratch, you can inherit the SAP- provided business objects to your own business objects. You can even replace provided data and functions with your own. Polymorphism : Business objects allow generic programming.
  • 5. Relationships Between Object Types or Business Objects A business object type can have various relationships to other business object types. Relationship between attributes are extremely useful throughout workflow. Relationships are as follows : 1 . Inheritance : (inherits from) Relationship between object types allowing common attributes and methods to be passed automatically from supertypes to subtypes. The object type which passes on attributes and methods is the supertype. The subtype takes on ("inherits") the attributes and methods from the supertype. The supertype program coding connected with the attributes and methods is referenced. Inherited attributes and methods can be redefined for the subtype. The interface, however, may only be enhanced. If the attributes and methods of the supertype are known, it is only necessary to describe the differences (changes and enhancements) in the relevant subtype. All other attributes and methods defined once are used again which reduces the implementation work involved. The error probability when changes are made later also decreases. In inheritance, the subtype usually has the same key fields as its supertype, but enhanced functionality.
  • 6. Composition : "Is part of" relationship between object types. The object type order item "is part of" the object type order . The object type order is then the aggregate type of the object type order item . In composition, the ‘is part’ object type usually has an extended key when compared to the aggregate type (for example, order key + item) and a completely different functionality . Composition relationships are implemented by creating an attribute that links one object to another. Interface : Relationship expressing which object types support an interface. To maintain this relationship, the relevant interfaces must be entered as components of the object type. Association : Relationship between object types resulting from an object type being referenced as an object attribute of another object type. The object type customer is referenced in the attribute ordering party of the object type sales order . Relationships Between Object Types or Business Objects
  • 7. Business Object Tools There are two main tools that you can use to work with business objects: 1. Business Object Builder : Transaction SWO1 or Definition Tools ->Business object builder. Use the Business Object Builder to display, test, create, generate, change, delete, delegate, and change the status of business objects. You can see all the relationships between object types using Utilities -> Relationships on the initial screen. To access a business object type in the Business Object Builder use its technical ID 2. Business Object Repository Browser : Transaction SWO1 or Definition Tools ->Business object Repository. Business object Repository browser presents a hierarchical view of all the business objects available, by SAP application module. Each object type is assigned to an SAP application module indirectly via its package. You can inspect the definition of existing object types, but you cannot create new object types here.
  • 8. Business Objects : Some Basic Terminology While using business objects you may be referring some of the following terms: 1. Object type : It is a design and implementation of the access to data and functions i.e. the object types contains the program that reads or calculates data and calls business functions. 2. Object Instance : It is a single runtime copy of its object type that holds the data or accesses the functions relevant to that particular instance of the object. 3. Object reference : It holds the technical ID of object type, the object key, and other technical information needed by the system to access an object instance. Each object of business object type has the following components. Key Field. Attributes. Methods. Events.
  • 9. Key Field Fields for unique identification of an object. The key defines each object instance uniquely. For e.g. for the Customer object type the key is customer ID. The definition of the key fields of an object type determines the structure of the identifying key, via which the system can access a specific object, that is, an instance of the object type. The key fields of an object type are usually also the key fields in the table containing the header data for the object type. Only character-based data types are allowed as key fields. The total length allowed for all key fields is 70 characters. Each key field refers to a field in the ABAP Dictionary. Key fields are simply declared within the object and are filled when the object is instantiated. Each key field must have a reference to a ABAP Dictionary table/field. This is used to define the data type and length of a key field.
  • 10. Creating Key Fields Steps for creating the key field : Key field is provided by calling workflow, task, method, attribute or event whenever the object is used. The object instance instantiated from the object type and key, give you access to all the attributes and methods of that object. Example: We will add the Material ID as a key field of some object called ZWIDGET1. If you are not using BUS1001 object type, we can create the same fields with the same data type references as your example object type. Bring the ZWIDGET1in change mode to add the key field by choosing the component title “Key” and choosing ‘create’. Base the key field on the dictionary table MARA field MATNR. Once the key field has been created, go back to the object type program and see that the object declaration has changed. Regenerate and test your new changed object. Attempt to add a new key field to ZWIDGET2. Key will not be added since ZWIDGET2 is a subtype.
  • 11. Attributes Attributes provide access to business data. This may be data extracted from the database or calculated values. Attributes may reference a single value or multiple values. Attributes can in themselves be references to other business objects, setting up relationships between objects. Attributes can be used to formulate conditions in the workflow definition. The system reads or establishes the attribute values at runtime and controls the workflow with them. A object attribute can return data as follows: The value of a field of the ABAP Dictionary (database field attribute) An object reference to an object defined in the Business Object Repository . The attributes of an object are defined and implemented as components of an object type in the Business Object Repository. Attributes are passed on from the supertype to its subtypes.
  • 12. Creating Attribute Bring the ZWIDGET1 in change mode to add a new attribute by choosing the component title “Attributes” and choosing ‘Create’. Click on yes to the question “Create with ABAP Dictionary field proposals?”. Base your new component on dictionary table MARA field MTART (Material type). Accept system’s proposal for names and descriptions of an attribute. Notice what checkboxes and values have been set for you in the attribute details screen. You will see that the attribute ID, name, description, database flag, and data-type reference have all been set for you. Notice that the attribute is only in modeled status. Save your object and regenerate it. Try testing your object. Can you use the new attribute in modeled status? No. Go back to your object, choose your new attribute and choose Program. The system will ask you if you want it create an implementation for your attribute. Click on Yes. Do not change the code generated at this stage, just inspect it. Note that status of your attribute is automatically changed to implemented. Regenerate your object and test it again with the valid material number. This attribute will show the material type for material chosen.
  • 13. Methods Method provide access to business functions. Method is also known as operation that can be performed on an object. The methods of an object are defined and implemented as components of an object type in the Business Object Repository. Methods and their interfaces are passed on from the supertype to the subtypes. A method generally refers to ABAP/4 functionality which is already available (function module, transaction, dialog module, ...) and is called via an interface determined mainly by the method name and method parameters. The actual implementation of the method therefore remains abstract. It is not visible externally and does not need to be known to the calling program of the method. If you want to use a function in a workflow, it must be first defined as a method of an object. A method is usually a single activity that can be performed on an object instance. A method may involve a combination of business functions or even call other methods within its program code.
  • 14. Synchronous and Asynchronous Methods Methods can be subdivided as follows depending on their response characteristics: Synchronous methods Synchronous object methods assume process control for the duration of their execution and report back to the calling program once they have been executed. Synchronous methods can accept import parameters and a result, export parameters, and exceptions. Asynchronous methods Asynchronous methods do not report back to the calling program directly after their execution. The response is made via events which are used to report the processing results of the methods. Asynchronous methods can only accept import parameters; they cannot return any results to the workflow directly. Results can be returned indirectly via terminating events. Synchronous and asynchronous methods can be distinguished according to the way in which they are used in single-step tasks: A single-step task which refers to an asynchronous method must be completed by an event.
  • 15. Method Parameters and Result Method Parameters Parameters are used to exchange information between the calling program of a method and the method. Parameters of a method are values which are either passed to the method at runtime (import parameters) or are returned from the method (export parameters). When the parameters are defined, the interface of the method call is also defined. A method need not necessarily have parameters; many methods can be used without parameters. Method Result The result of a method is different to the export parameters. Possible values for the result can be fixed or contained in a check table. They are therefore known in a workflow definition and can be taken into account during process modeling. The various follow-up steps can be modeled in a workflow definition according to the results. A method can only ever have one result, although there is no limit to the number of export parameters. A method need not necessarily have a result.
  • 16. Events Events transmit the status change of an object (e.g. Created, Changed). Events should always be seen in connection with the object they are "reporting" on. The events belonging to an object are therefore specified in the object type definition. Events are published without the application, the event creator, knowing whether a receiver is interested in this event and whether it will respond. Potential receivers of an event are listed in the event receiver linkage table, where receivers can make and remove their entries as required. This allows the events created to be responded to flexibly. Events are used in the SAP Business Workflow environment. to start tasks (multistep tasks and single-step tasks). The events are therefore defined as the triggering events of the respective tasks. to complete single-step tasks which refer to an asynchronous object method. The events are therefore defined as the terminating events of the respective single-step tasks. Events are linked to runtime-dependent data (event parameters) which is available to the event receiver and can be used for event-driven control and communication mechanisms.
  • 17. Creating Events Steps for creating events: Bring the ZWIDGET1 in change mode to add a new event by choosing the component title “Events” and choosing ‘Create’. Give your event a name. Regenerate your object and test it.