View
1.081
Download
3
Category
Preview:
DESCRIPTION
Citation preview
SAP Workflow Course
Section 08-01: Business Objects & Builder
November, 2001
SAP Workflow Course – Section 08-01: Business Objects and Builder 2
Business Objects & Builder
Contents:
• Terminology
• Enhancing an object type
SAP Workflow Course – Section 08-01: Business Objects and Builder 3
Business Objects & Builder: Objectives
• At the conclusion of this section, you will be able to:
• Define components of a business object type
• Examine and extend a business object type
• Identify purpose of delegation of object type behavior
SAP Workflow Course – Section 08-01: Business Objects and Builder 4
Business Objects & Builder: Business Scenario
• During the first workflow design activities, you discovered that SAP ‘standard tasks’ does not support all required functional steps
• To build your own task, you will learn more about the basic components of a task
• In SAP Business Workflow an “Object Type” is the base for all single step tasks
• Explore and extend the material master business object type BUS1001
SAP Workflow Course – Section 08-01: Business Objects and Builder 5
Business Object Type
Business ObjectKernel
Internal StructureSpecialization
Consistencyrequirements
(object- related)
Business rules
(environment- related)
Interface
Accessvia:
Integrity
Representative "is part of"
"is a"
Events
Attributes
ABAP (RFC)
COM/DCOM
CORBABAPIs,Methods
SAP Workflow Course – Section 08-01: Business Objects and Builder 6
Business Object Repository (BOR)
BusinessWorkflow
ArchiveLink
BAPI
Modeling
BAPIBAPI
BAPIBAPIBOBO
BAPIBAPIBOBO
BAPIBAPI
BAPIBAPI BOBO
BOBO
BOBO
BOBO
BOBOBOBO
BOBO
BOBO
BOR
SAP Workflow Course – Section 08-01: Business Objects and Builder 7
Object type and Instance
Passenger planePassenger plane
AircraftAircraft
Specialization
Instancing
D4711Pilots: 1Passengers: 3
LH MunichPilots: 2Passengers: 3Freight: 80 kg
LH MunichPilots: 2Passengers: 3Freight: 80 kg
Class = Object type
Single object = Instance
R
ObjectObject
AA HollywoodPilots: 2Freight: 30.000 kg
BA Big BenPilots: 2Passengers: 5Freight: 200 kg
BA Big BenPilots: 2Passengers: 5Freight: 200 kg
Cargo planeCargo plane
Recreational planeRecreational plane Business planeBusiness plane
ClassClass
SAP Workflow Course – Section 08-01: Business Objects and Builder 8
Object Types and Runtime Objects
Object type
Runtimeobject
Persistency
Instance
BOR
R/3Database
tables
SAP Workflow Course – Section 08-01: Business Objects and Builder 9
Examples of Object Types
• SAP Object types
– Invoice (BSEG_MMIV)
– Sales Order (BUS2032)
– Delivery note (LIKP)
– Material (BUS1001)
– Bill of material (BUS1002)
• External documents
– Archived documents (TOAV0)
– Purchase order Idoc (IDOCORDERS)
SAP Workflow Course – Section 08-01: Business Objects and Builder 10
Multi step taskWorkflow definition
Task
SAPfunctionality
Object type
MethodAttribute
Object type
ABAPDictionary External
applications
Workflow
Work item
Execution of anobject method
Event
Workflow manager
Work item manager
Objects in Workflow
terminatingevent
triggeringevent
Database
SAP Workflow Course – Section 08-01: Business Objects and Builder 11
Material: My_part
Old Material: Original_partNew_part
Lab: PM1
Change documents
EventZBUS1001.Old_Material_changed
EventZBUS1001.Old_Material_changed
TaskDisplay Material
Business Object Type: ZBUS1001Key: MARA-MATNRAttribute: LaboratoryMethod: DisplayEvent: Old_Material_changed
Business Object Type: T024L
New Business Object Type
Database
SAP Workflow Course – Section 08-01: Business Objects and Builder 12
Object typeObject type
key fieldskey fields
functionmodulefunctionmodule
reportreport
ABAP codingABAP coding
transactiontransactionfield referencefield reference
objectreference
objectreference
Export/importparameter
Export/importparameter
resultresult
attributesattributes
methodsmethods
eventsevents
ProgramProgram
Object Type: Elements
SAP Workflow Course – Section 08-01: Business Objects and Builder 13
ZBUS1001My_MaterialZBUS1001
My_MaterialBUS1001Material
BUS1001Material
Supertype Subtype
key fieldskey fields
attributesattributes
methodsmethods
eventsevents
key fieldskey fields
attributesattributes
methodsmethods
eventsevents
MaterialnoMaterialno
MaterialTypeMaterialType
MaterialGroupMaterialGroupDivisionDivision
OldMaterialOldMaterial
DisplayDisplayCreateCreate
Edit
OrderUnitOrderUnitBasicMaterialBasicMaterial
Report1Report1
changedchangedCreatedCreated
MaterialGroupMaterialGroup
MaterialnoMaterialno
MaterialTypeMaterialType
DivisionDivision
OldMaterialOldMaterial
EditEdit
CreateCreate
DisplayDisplay
CreatedCreated
Object Type: Definition of a Subtype
SAP Workflow Course – Section 08-01: Business Objects and Builder 14
Without Delegation With Delegationbetween BUS1001 and ZBUS1001
No communication since Workflow system finds two business object types
Communication within Workflow possible between those two tasks
TASKbased onZBUS1001.Report1
TASKbased onBUS1001.Report1
Delegation
BUS1001 created
BUS1001 created
SAP Workflow Course – Section 08-01: Business Objects and Builder 15
Key fields:
• General: relationships to supertype, release, generation
• Change and transport data
• Defaults: for methods and attributes
• Customizing: display persons responsible/delegation
Basic Data:Object
Object Type Definition
• Identification of an object
• Data type reference
– Dictionary field: only character based data types, up to 70 characters total
SAP Workflow Course – Section 08-01: Business Objects and Builder 16
Object
Object Type Definition: Attributes
• Property of an object
• Source of information
– Database field
– Virtual
• Data type reference
– ABAP Dictionary field
– Object type
• Multi-line attributes are possible
SAP Workflow Course – Section 08-01: Business Objects and Builder 17
Object
Object Type Definition: Methods
• Allowed function on an object
• Properties:
– Dialog: yes - “Change material” no: “Delete request”
– Synchronous: yes - “Execute report” no: “Create material”
– Reference to SAP functionality
– Synchronous have a specified result (e.g., request rejected/approved)
– Exceptions for error handling
– Use method parameters
SAP Workflow Course – Section 08-01: Business Objects and Builder 18
asynchronousasynchronousobject methodobject methodasynchronousasynchronousobject methodobject method
synchronoussynchronousobject methodobject methodsynchronoussynchronous
object methodobject method
Synchronous and Asynchronous Methods
• Tasks can have terminating events
• Synchronous method
– Method is called, assumes process control and confirms to caller after processing
– Optional: import parameter
– Optional: result, export parameter, exceptions
• Asynchronous method
– Method is called, runs without connection to caller and does not confirm after processing
– Optional: import parameter
tasktask
terminatingevent
terminatingevent
tasktask
SAP Workflow Course – Section 08-01: Business Objects and Builder 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
SAP Workflow Course – Section 08-01: Business Objects and Builder 20
SELFITEMSELFITEMSELFITEMSELFITEM
SOFMSOFMSOFMSOFM
STD_TEXTSTD_TEXTSTD_TEXTSTD_TEXT
Sending SAP Mail
Send task descriptionSend task description
Office document Send SAPoffice documentSend SAPoffice document
SAP Script standard text Replace text symbols and display textReplace text symbols and display text
Method Examples :
HELPHELPHELPHELP
TSTCTSTCTSTCTSTC
Call extended help Display help objectDisplay help object
Transaction Execute transactionExecute transaction
TRDIRTRDIRTRDIRTRDIRABAPprogram
Execute programExecute program
Specific Object Types
SAP Workflow Course – Section 08-01: Business Objects and Builder 21
Business Object : Summary
• Workflow architecture is based on object types
• Object type: Key fields, attributes, methods, events
• Business Object Repository (BOR): Collection of SAP and own object (sub)types
SAP Workflow Course
PwC ConsultingTM refers to the management consulting services businesses of the member firms of the worldwide PricewaterhouseCoopers organisation.
2001 PricewaterhouseCoopers. All rights reserved.
Recommended