08 01 businessobjectsbuilder

22
SAP Workflow Course Section 08-01: Business Objects & Builder November, 2001

Upload: tflung

Post on 22-Apr-2015

1.081 views

Category:

Business


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 08 01 businessobjectsbuilder

SAP Workflow Course

Section 08-01: Business Objects & Builder

November, 2001

Page 2: 08 01 businessobjectsbuilder

SAP Workflow Course – Section 08-01: Business Objects and Builder 2

Business Objects & Builder

Contents:

• Terminology

• Enhancing an object type

Page 3: 08 01 businessobjectsbuilder

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

Page 4: 08 01 businessobjectsbuilder

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

Page 5: 08 01 businessobjectsbuilder

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

Page 6: 08 01 businessobjectsbuilder

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

Page 7: 08 01 businessobjectsbuilder

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

Page 8: 08 01 businessobjectsbuilder

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

Page 9: 08 01 businessobjectsbuilder

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)

Page 10: 08 01 businessobjectsbuilder

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

Page 11: 08 01 businessobjectsbuilder

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

Page 12: 08 01 businessobjectsbuilder

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

Page 13: 08 01 businessobjectsbuilder

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

Page 14: 08 01 businessobjectsbuilder

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

Page 15: 08 01 businessobjectsbuilder

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

Page 16: 08 01 businessobjectsbuilder

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

Page 17: 08 01 businessobjectsbuilder

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

Page 18: 08 01 businessobjectsbuilder

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

Page 19: 08 01 businessobjectsbuilder

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

Page 20: 08 01 businessobjectsbuilder

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

Page 21: 08 01 businessobjectsbuilder

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

Page 22: 08 01 businessobjectsbuilder

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.