Q

How to use the 'Expression' functionality

I am trying to create a simple Workflow task that will send an email to the originator of a sales order, when the document has been released from treasurey hold by our credit department.

I am trying to create a simple Workflow task that will send an email to the originator of a sales order, when the document has been released from treasury hold by our credit department. I am not experienced in Workflow, but went to one class and thought I could figure out this simple one. I can get it to work if I put in a specific email address or user id, but when I try to use the option for putting in an expression and pick "created by" from the list of items in my container, my Workflow ends in an error. I added the sales order creator to my business object and I can see it pulling in the right value so I don't understand why it won't send the email. Is there a way to do this?
I am going to take an educated guess as to what the problem is. But first, a little bit of explanation about how to use the 'Expression' functionality in the agent routing of the task.

As you know SAP Workflow can be routed to various object including Users, Positions, Org Units, Jobs, etc… Each one of these is described by a type identifier and the corresponding value. An incomplete list is shown below

Object Name -- Type Identifier
User -- US
Position -- S
Org Unit -- O
Job -- C

So when you specify 'Expression', the SAP Workflow system is going to expect something like:

USJSMITH (this is broken into 'US' which is the type identifier and JSMITH is the User ID) or S 50002344 ('S' is the type identifier and 50002344 is the ID of the position.

The first two characters specify what kind of object. The remaining characters specify the object ID. Please note the single space after the 'S' . The first two characters must be the type identifier.

In your case you are binding the 'Created By' which would just return the User ID without the type identifier. Hence why your Workflow fails.

To fix this you should create an instance of object USR01 (passing in the value of 'Created By' as the key and then use the attribute NameWithLeadingUS as the expression.

This was first published in June 2006

Dig deeper on SAP workflow development

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close