Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BOR

Former Member
0 Kudos
121

Hi Experts,

Im new to Workflow.

I have the doubt on Event Parameters. What is the use of Event parameters ?

Thanks,

Points will be rewarded.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
81

Creation of Event Parameters With Event Creation

Use

The system adds the old and new values of all changed fields to the event container of the event created. These values can then be read and evaluated in the workflow started by the event in order to influence the process flow of this workflow.

Prerequisites

Writing values into the event container

In order for the system to write the old and new values of a changed field into the event container, this field must be defined as a database field attribute for the object type in the Business Object Builder.

Using values in the binding

In order for you to define a binding from the event container to the workflow container, the relevant fields must be defined as multiline event parameters for the event in the Business Object Builder.

Features

After a change document has been written and the system has recognized from the assignment table that an event of a particular object type is to be created for it, the system checks whether the changed fields are defined as database field attributes of this object type. If this is the case, the changed value and the new value are written under the name of the attribute as a two-line element into the event container. (New value with index 0001 , old value with index 0002 .)

The values are put into the container as described even if they are not defined as event parameters. The definition as event parameters is required so that you can access it in a binding definition.

Activities

If you want to use the function of additional event parameters with event creation, you must proceed as follows:

Define an appropriate database field attribute for each relevant field, a change in which can create an event. Ensure that this attribute refers to a table field for which a change is actually logged with the change document. Adopt the name proposed by the system.

For further information, refer to Definition of Attributes for an Object Type.

In the same manner, define a multiline event parameter for the event to be created upon the change for each of the fields above. Adopt the name proposed by the system.

For further information, refer to Definition of Events for an Object Type.

Define a binding between the event container and the container of the event receiver (usually the workflow container of the workflow to be started).

You can have the event container sent to you as a mail in order to check its contents. To do this, you must enter a function module as event receiver, which converts the container content into a mail and sends it. Create a type linkage with the following values:

Enter the object type and the event that you assigned to the change document object.

Enter your user name as receiver type.

Enter SWE_EVENT_MAIL as receiver function module.

Set the indicator type linkage activated.

For further information, refer to Evaluation and Maintenance of Type Linkages.

Example

You have created a subtype for the object type BUS1007 ( customer). You have added the following components to this subtype:

Attribute PostalCode with database field reference KNA1-PSTLZ

Attribute City with database field reference KNA1-ORT01

Attribute District with database field reference KNA1-ORT02

Event changed with event parameters PostalCode , City and District (database field references as with attributes).

The container of the event created when a customer’s address changes (relocation from Trier to Cologne) has not only the standard system elements but also the following multiline elements, each of which has a two-line value.

Element

Value

Index

PostalCode

50999

54294

0001

0002

City

Cologne

Trier

0001

0002

District

Rodenkirchen

Pallien

0001

0002

2 REPLIES 2

Former Member
0 Kudos
81

hi

just refer to the link below

http://www.sapmaterial.com/workflow.html

<b>step by step procedure with screen shots</b>

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Former Member
0 Kudos
82

Creation of Event Parameters With Event Creation

Use

The system adds the old and new values of all changed fields to the event container of the event created. These values can then be read and evaluated in the workflow started by the event in order to influence the process flow of this workflow.

Prerequisites

Writing values into the event container

In order for the system to write the old and new values of a changed field into the event container, this field must be defined as a database field attribute for the object type in the Business Object Builder.

Using values in the binding

In order for you to define a binding from the event container to the workflow container, the relevant fields must be defined as multiline event parameters for the event in the Business Object Builder.

Features

After a change document has been written and the system has recognized from the assignment table that an event of a particular object type is to be created for it, the system checks whether the changed fields are defined as database field attributes of this object type. If this is the case, the changed value and the new value are written under the name of the attribute as a two-line element into the event container. (New value with index 0001 , old value with index 0002 .)

The values are put into the container as described even if they are not defined as event parameters. The definition as event parameters is required so that you can access it in a binding definition.

Activities

If you want to use the function of additional event parameters with event creation, you must proceed as follows:

Define an appropriate database field attribute for each relevant field, a change in which can create an event. Ensure that this attribute refers to a table field for which a change is actually logged with the change document. Adopt the name proposed by the system.

For further information, refer to Definition of Attributes for an Object Type.

In the same manner, define a multiline event parameter for the event to be created upon the change for each of the fields above. Adopt the name proposed by the system.

For further information, refer to Definition of Events for an Object Type.

Define a binding between the event container and the container of the event receiver (usually the workflow container of the workflow to be started).

You can have the event container sent to you as a mail in order to check its contents. To do this, you must enter a function module as event receiver, which converts the container content into a mail and sends it. Create a type linkage with the following values:

Enter the object type and the event that you assigned to the change document object.

Enter your user name as receiver type.

Enter SWE_EVENT_MAIL as receiver function module.

Set the indicator type linkage activated.

For further information, refer to Evaluation and Maintenance of Type Linkages.

Example

You have created a subtype for the object type BUS1007 ( customer). You have added the following components to this subtype:

Attribute PostalCode with database field reference KNA1-PSTLZ

Attribute City with database field reference KNA1-ORT01

Attribute District with database field reference KNA1-ORT02

Event changed with event parameters PostalCode , City and District (database field references as with attributes).

The container of the event created when a customer’s address changes (relocation from Trier to Cologne) has not only the standard system elements but also the following multiline elements, each of which has a two-line value.

Element

Value

Index

PostalCode

50999

54294

0001

0002

City

Cologne

Trier

0001

0002

District

Rodenkirchen

Pallien

0001

0002