WF Sap

Download as pdf or txt
Download as pdf or txt
You are on page 1of 168

WORK CYCLE

SAP Configuration Guide


Version: 7.2
Written by: Product Knowledge, R&D
Date: August 2016
© 2016 Lexmark International Technology, S.A. All rights reserved.
Lexmark is a trademark of Lexmark International Technology, S.A., or its subsidiaries, registered in the
U.S. and/or other countries. All other trademarks are the property of their respective owners. No part of this
publication may be reproduced, stored, or transmitted in any form without the prior written permission of
Lexmark.
WORK CYCLE 7.2 SAP Configuration Guide

Table of Contents
Introduction ................................................................................................................................................. 5
Welcome .................................................................................................................................................... 5
About this guide ......................................................................................................................................... 5
Typographical conventions ........................................................................................................................ 6
Creating workflows ..................................................................................................................................... 7
Creating workflows: Overview ................................................................................................................... 7
Creating workflow shells ............................................................................................................................ 7
Creating workflow steps ............................................................................................................................ 7
Assigning workflow steps to workflow shells ............................................................................................. 8
Activating workflows .................................................................................................................................. 8
Assigning default recipients ....................................................................................................................... 9
Processor pre-allocation and assignment matrix ...................................................................................... 9
Line-item approval ................................................................................................................................... 11
Workflow step conditions ......................................................................................................................... 12
Deleting workflows ................................................................................................................................... 15
Other configuration tasks ........................................................................................................................ 16
Overview .................................................................................................................................................. 16
User management ................................................................................................................................... 16
Email templates ....................................................................................................................................... 20
One-time vendor fields in the Web Application ....................................................................................... 29
Viewing PROCESS DIRECTOR documents ........................................................................................... 29
Creating field statuses ............................................................................................................................. 30
Integrating with the SAP Business Workflow .......................................................................................... 33
Programs and functions ........................................................................................................................... 51
Overview .................................................................................................................................................. 51
ARCHIV_NOTE_LATE ............................................................................................................................ 52
ARCHIV_WCLOG_REPAIR .................................................................................................................... 52
DUE_DATE_CHECK ............................................................................................................................... 53
/COCKPIT/WC_CHK_DEL_USRS .......................................................................................................... 54
WC_DEBUG ............................................................................................................................................ 54
WC_RFC_LOG ........................................................................................................................................ 55
WC_SET_NOT_ARCHIVED ................................................................................................................... 55
WC_UMA_PASSWD_INIT ...................................................................................................................... 55

3
WORK CYCLE 7.2 SAP Configuration Guide

WC_USER_UPDATE .............................................................................................................................. 56
WC_WEB_LOGGING.............................................................................................................................. 58
XPRA_V720_SP0 .................................................................................................................................... 58
Appendix A – IMG ..................................................................................................................................... 59
Setting the Web Application URL ............................................................................................................ 59
Defining the workflow .............................................................................................................................. 59
Defining workflow steps ........................................................................................................................... 61
Optional settings for workflow steps ........................................................................................................ 68
Workflow steps, assign processors ......................................................................................................... 71
Workflow processes and step conditions ................................................................................................ 72
Activate workflows ................................................................................................................................... 74
Set up general workflow texts.................................................................................................................. 74
Activate authorization checks in WORK CYCLE ..................................................................................... 75
Message transformation for checks ........................................................................................................ 76
Limit attachment visibility in applications ................................................................................................. 77
Email settings .......................................................................................................................................... 77
Presentation and interface....................................................................................................................... 80
User management ................................................................................................................................... 94
Set notes................................................................................................................................................ 100
Schedule background processing ......................................................................................................... 101
Amendments ......................................................................................................................................... 102
Creating field statuses ........................................................................................................................... 102
Appendix B – User Exits......................................................................................................................... 105
Overview ................................................................................................................................................ 105
Developing User Exits ........................................................................................................................... 106
List of User Exits .................................................................................................................................... 107
Appendix C – Other tasks ...................................................................................................................... 163
Copying forms to another client ............................................................................................................. 163
Support for other languages .................................................................................................................. 164
Index ......................................................................................................................................................... 165

4
WORK CYCLE 7.2 SAP Configuration Guide

Introduction
Welcome
Welcome to the ReadSoft WORK CYCLE 7.2 – SAP Configuration Guide.
WORK CYCLE is the workflow component for PROCESS DIRECTOR Accounts Payable, for approving
invoices. SAP users can perform these tasks inside the SAP environment. For non-SAP users, a Web
Application is available.
This document explains how you can configure WORK CYCLE to suit the requirements of your
organization.

Note: This guide explains how to configure WORK CYCLE for PROCESS DIRECTOR Accounts Payable
only. For information on configuring workflows for other process types, refer to the PROCESS
DIRECTOR 7.2 SAP Configuration Guide.

Please also refer to the following ReadSoft guides:

 PROCESS DIRECTOR 7.2 – Web Application Configuration Guide

 PROCESS DIRECTOR 7.2 Accounts Payable – Configuration Guide

About this guide


This guide describes how to configure WORK CYCLE, the workflow component for PROCESS
DIRECTOR Accounts Payable.
The guide contains the following chapters:

 Creating workflows

Explains how to create and configure workflows.

 Other configuration tasks

Describes user management, creating email templates, and other tasks.

 Programs and functions

Details about some programs and functions to perform routine tasks, such as sending emails for
overdue invoices.

 IMG

A complete reference for the WORK CYCLE IMG.

5
WORK CYCLE 7.2 SAP Configuration Guide

 User Exits

Descriptions for the 40 User Exit interfaces/templates that come packaged with WORK CYCLE.

 Other tasks

Information about copying forms between clients in SAP.

Typographical conventions
The following typographical conventions are used:

 Menu names, commands, and dialog names appear in bold.

 Names of keys on your keyboard appear in SMALL CAPITAL LETTERS.

 Names of files, folders, and settings appear in Courier.

 SAP transaction codes and program names appear in ARIAL MONOSPACE.

 Variables that have to be replaced by an actual value are italicized or appear in <>.

6
WORK CYCLE 7.2 SAP Configuration Guide

Creating workflows
Creating workflows: Overview
There are four steps to create a workflow:

1. Create a workflow "shell."

2. Create one or more workflow steps.

3. Assign workflow steps to the workflow shell.

4. Activate the workflow.

The above four steps are the minimum required to get a workflow up and running.

Other configuration options


 Assigning default recipients

 Optional settings for workflow steps

Creating workflow shells


Workflow shells are the framework for workflows. To create a shell:
1. Go to /COCKPIT/WC_WCID.

2. Specify a Workflow ID and a Workflow description.

The workflow description is displayed to workflow recipients, so enter a helpful description.

3. Enter a Maximum processing time, in days, Selection list order, Workflow type.

4. Specify values for the remaining settings, which are all optional.

5. Save your entry.

Creating workflow steps


Workflow steps are the building blocks that are combined to form workflows. To create a workflow step,
go to /COCKPIT/WI3 and complete all relevant fields.

7
WORK CYCLE 7.2 SAP Configuration Guide

Assigning workflow steps to workflow shells


After you have created both workflow shells and workflow steps, you must assign the steps to the shells,
thereby building a workflow. To do so:
1. Go to /COCKPIT/WI4.

2. Create a new entry.

3. Specify a workflow.

4. Specify the workflow step that will be the first step in the workflow.

5. Specify 1 as the position of the workflow step in the workflow.

6. Repeat steps 4-5 for each subsequent step in the workflow, using positions, 2, 3, 4, etc.

7. Save your entry.

Note: A workflow step can be assigned to more than one workflow shell. For example, if you create a
general approval workflow step intended for a manager, you can use this step in multiple workflows,
without having to recreate the same workflow step for each workflow.

Activating workflows
Activating workflows is the last step in creating workflows. You must activate your workflow in order for it
to be used.
1. Go to /COCKPIT/WI7.

2. Optional: Select a Company Code and/or a PD document type.

Do this only if you wish to restrict a workflow to one or both of these parameters.

3. Select the workflow to activate.

4. Select either MM or FI.

If you want to make the workflow available for both types of documents, create a new entry and
specify the other document type.

5. Save your entry.

8
WORK CYCLE 7.2 SAP Configuration Guide

Assigning default recipients


There are three ways users can be assigned as recipients of workflow steps:

 Manually, either in PROCESS DIRECTOR or WORK CYCLE, when starting or continuing a


workflow.

 Automatically and statically, via a pre-defined recipient allocation to a workflow step.

 Automatically and dynamically, via a User Exit.

Note: The Business Solution Package contains other methods for determining the workflow recipient; for
example, based on the creator of the purchase order.

Processor pre-allocation and assignment matrix


The result of the processor assignment settings is influenced by the Pre-allocate agent setting for the
workflow step and on any user exits that may pre-assign users to workflow steps. The following table
shows the results of using the processor assignment and pre-allocate agent settings together.

/COCKPIT/WI3 /COCKPIT/WUM2 Result

Pre-allocate Non-default Default Non-default Default Possible


agent processors processors processors processors processor
assigned assigned pre-allocated pre-allocated allocation to
to step to step step

() No default No No N/A N/A Email and User


Groups only

Yes No None N/A /COCKPIT/WUM2


users, Email
users, and User
Groups only

Yes Yes None Default /COCKPIT/WUM2


processor users, Email
users, and User
Groups only

9
WORK CYCLE 7.2 SAP Configuration Guide

/COCKPIT/WI3 /COCKPIT/WUM2 Result

(X) Default No No N/A N/A Email and User


Groups only

Yes No Yes N/A /COCKPIT/WUM2


users, Email
users, and User
Groups only

Yes Yes Yes Default /COCKPIT/WUM2


processor users, Email
users, and User
Groups only

(A) No default, No No N/A N/A All users


any other
processors
Yes No None N/A All users

Yes Yes None Default All users


processor

(B) Default, No No N/A N/A All users


any other
processors
Yes No Yes N/A All users

Yes Yes Yes Default All users


processor

10
WORK CYCLE 7.2 SAP Configuration Guide

Line-item approval
Line and accounting items for MM and FI invoices can be approved individually, including by different
processors. This feature is intended for documents where different people are responsible for different
items on invoices. The workflow steps are completed when all the processors have either approved or
rejected their items.

Process description
The following describes the basic features of line-item approval:
1. A workflow is started for a document with multiple line or accounting items.

2. Recipients are either entered manually by the PROCESS DIRECTOR user, or determined by a
User Exit.

3. Workflow processors can open the document and view and approve all the items assigned to
them, as well as the unassigned items.

4. After all the items have been approved or rejected, the workflow step is completed.

Activating line-item approval


1. Go to /COCKPIT/WI3.

2. Activate Line item/account approval and All recipients must process.

Note: You should activate line-item approval for only one step per workflow.

Assigning users to items


When a user is assigned to an item, no other workflow recipients can view the item.
There are two ways users can be assigned to an item:
 Post-workflow start: Whenever the user checks the Approve box for the item and clicks the
Approve button.

As no items are pre-assigned to anyone, workflow recipients can initially view all the items in the
document. After approving one or more items, these items are cleared and other workflow
recipients can no longer view or approve them.

 Pre-workflow start: Users can be manually assigned to each line item in PROCESS DIRECTOR
Accounts Payable. Alternatively, users can be determined via the Step User Exit 2: Determine
processor of step. ReadSoft recommends this method as the best practice.

11
WORK CYCLE 7.2 SAP Configuration Guide

Workflow step conditions

Overview
Workflow step conditions are rules that determine whether a step has been started or not. For example, in
a typical two-step FI approval workflow, you may only want to have the second approval step performed if
the value for an invoice is above a certain amount. You create conditions based on the values of certain
fields, and can have more than one condition for a step.

Creating workflow step conditions


1. Go to /COCKPIT/WI4.

2. Select a workflow step and double-click Step conditions.

3. Enter 1 for Sequence.

This will be the first condition executed. Subsequent steps will be 2, 3, and so on.

4. Specify the Structure and Internal field that the condition is based on.

Note: If using the COSTCENTER field in the Account assignments table, the From value and To
value must be 10 digits long. For example, for cost center 2500, enter 0000002500. Otherwise,
the step condition will not be activated.

5. Set Inclusion/exclusion to Including if you want the From/To values included in the step
condition.

6. Set the Comparative options as approriate.

For example, use GE – Greater than or equal to from-value to create a condition based on an
amount exceeding the value in the From value field.

7. Enter values for From value and To value.

You only need a To value if using BT – Between from-value and to-value.

Note: Enter the values in the SAP internal format. For example, for cost center 1000, enter
0000001000; for vendor 2500, enter 0000002500.

8. Select an Opening bracket or Closing bracket, if there are multiple step conditions and you
want to perform two or more conditions together before performing another.

9. If more than one condition is created, use AND or OR for the Boolean operator, as appropriate.

12
WORK CYCLE 7.2 SAP Configuration Guide

Example
To create a step condition for a gross amount exceeding 1000 EUR or 1400 USD, you need the following
four items:

Setting Value

Item/Sequence 1

Structure HEADER (header data)

Internal field GROSS_AMOUNT

Inclusion/exclusion Including

Comparative options GT – Greater than from-value

From value 1000

Opening bracket/Closing Opening bracket


bracket

Boolean operator AND

Setting Value

Item/Sequence 2

Structure HEADER (header data)

Internal field CURRENCY

Inclusion/exclusion Including

13
WORK CYCLE 7.2 SAP Configuration Guide

Setting Value

Comparative options EQ – Same as from-value

From value EUR

Opening bracket/Closing Closing bracket


bracket

Boolean operator OR

Setting Value

Item/Sequence 3

Structure HEADER (header data)

Internal field GROSS_AMOUNT

Inclusion/exclusion Including

Comparative options GT – Greater than from-value

From value 1400

Opening bracket Active

Boolean operator AND

Setting Value

Item/Sequence 4

14
WORK CYCLE 7.2 SAP Configuration Guide

Setting Value

Structure HEADER (header data)

Internal field CURRENCY

Inclusion/exclusion Including

Comparative options EQ – Same as from-value

From value USD

Opening bracket/Closing Closing bracket


bracket

Boolean operator [Blank]

Deleting workflows
Before deleting any workflows or workflow steps, ensure that no documents are currently active in them.
You must either wait for these documents to finish, or recall the documents from the workflow.
You can use /COCKPIT/1 to view which documents are currently active for specified workflows and
workflow steps, by using the Workflow ID and Workflow step ID fields.

15
WORK CYCLE 7.2 SAP Configuration Guide

Other configuration tasks


Overview
 User management

 Email templates

 One-time vendor fields in the Web Application

 Viewing PROCESS DIRECTOR documents

 Integrating with SAP Business Workflow

For all other configuration topics, refer to the IMG reference in Appendix A.

User management

Overview
SAP users, provided they have the appropriate authorization, can access WORK CYCLE in both SAP
and the Web Application by using the regular username and password. In addition, you can create
WORK CYCLE users who can access the Web Application. This is an easy way for non-SAP users to
access and participate in workflows.

 Creating users

 Importing users

 Creating user groups

 Using a substitute profile

 Defining search help for workflow processors (/COCKPIT/WI5)

Creating users
You can create WORK CYCLE users who can access the Web Application.
1. Go to /COCKPIT/WUM.

2. In the Workflow processor field:

 Enter a username if you want to specify one yourself.

 Leave it blank if you want the system to generate one automatically (see the User
generation setting in /COCKPIT/WI6 for the methods of creating a username).

16
WORK CYCLE 7.2 SAP Configuration Guide

3. Click the Create user icon.

4. Complete the details for the user and click the Continue icon.

A password for the user is displayed. You can specify a default initial password in /COCKPIT/WI6. If no
default password is set, a random password is generated.
Tip: Activate the sending of emails to newly-created users. You can do this by enabling the Create or
delete setting in /COCKPIT/WI6.

Importing users from a file


You can import users into WORK CYCLE from a file (for example, CSV).

1. Write a function module to perform the import.

The function module must map and save the data to the /COCKPIT/TWC_UMP table (which
contains the WORK CYCLE users).

You can copy /COCKPIT/WC_MAP_IMP_EXAMPLE, an example function, and modify it to your


requirements. This example function works with CSV files.

2. Go to /COCKPIT/WI6.

3. Enter the name of the function module you created in the Mapping module.

4. Go to /COCKPIT/WUM.

5. Click the Import user icon.

6. Enter the filename to import and click .

Importing users from an LDAP directory


You can import users into WORK CYCLE from an LDAP directory.
1. Go to /COCKPIT/WI27.

2. Map the fields you want to import between the LDAP directory (Attribute name) and WORK
CYCLE (Internal field name).

If you want to modify any imported values, you can write your own function module and specify it
here as well.

3. Go to SE38 and run /COCKPIT/WC_USER_UPDATE.

This program imports the user data using the mapping table in /COCKPIT/WI27.

17
WORK CYCLE 7.2 SAP Configuration Guide

Creating user groups


User groups can be created that can consist of:

 WORK CYCLE users

 SAP users

 Other user groups

1. Go to /COCKPIT/WUM1.

2. Specify a Work group ID and a Description.

3. Select the group and double-click Assigned processors.

4. Specify the users and user groups that belong to this user group.

Using a substitute profile


When processors create substitutes, they can specify a substitution Profile to be assigned:

When documents are sent to workflow recipients, the substitutes who can view them can be filtered:

1. Go to /COCKPIT/WI33.

2. Enter a substitute profile and save (you can only specify one).

Result

 Substitutes with the defined profile in /COCKPIT/WI33 are the preferred substitutes for the
document (see Rules below).

18
WORK CYCLE 7.2 SAP Configuration Guide

 Substitutes created in the Web Application are assigned to this profile automatically (there is no
Profile field in the Web Application).

Rules
 If no profile is specified in /COCKPIT/WI33, the substitute Profile setting is ignored and the
documents are available for all the substitutes.

 If a profile is specified in /COCKPIT/WI33, the documents are available only to the substitutes with
this profile. If no substitutes have this profile, the documents are available to the substitutes that
have no profile specified.

Example

Settings
User 1: Jones

Substitute Profile

Muller PD

Schmidt ALL

User 2: Smith

Substitute Profile

Muller [None]

/COCKPIT/WI33

Profile

PD

Action
Two separate documents are sent to Jones (100) and Smith (200).

19
WORK CYCLE 7.2 SAP Configuration Guide

Result
Substitute Available documents

Muller 100, 200

Schmidt [None]

Email templates

Overview
Templates are used for workflow emails, which are sent at various times, such as when a workflow is
started, is overdue, and so on. WORK CYCLE comes with its own templates, and you can also create
your own.

 Creating custom email templates

 Creating custom HTML email templates

 Built-in email templates

 Email text variables

Creating email templates: Overview


Plain text or HTML?
Before creating email templates, you must first decide whether the emails will be plain text or HTML (you
cannot use both).

With HTML emails, URLs can be displayed as more user-friendly hyperlinks, rather than as long URLs.
Header, line-item, and account assignment data can also be displayed in HTML emails (and not in plain
text emails).

1. Go to /COCKPIT/WI30.

2. Under Format, select either Plain text or HTML.

20
WORK CYCLE 7.2 SAP Configuration Guide

Creating templates
There are two steps to creating email templates:

1. Create the text to use in /SE61.

Use plain text. Even if you have activated HTML emails, the text will be formatted as HTML
before being sent. You can specify the styles in the HTML start template.

There are built-in templates that you can use or copy to your own templates and modify.

There are variables that you can use in the text (for example, &WEB_CYCLE_USER_NAME& to insert
the recipient's name).

Note: The Document class in /SE61 must be set to General text.

2. Activate the use of the text in either the workflow step (for workflow starts) configuration or the
general workflow text configuration.

For plain text emails, no further configuration is required. For HTML emails, please refer to Creating
HTML email templates.

Built-in email templates


PROCESS DIRECTOR Accounts Payable comes packaged with the following email templates that you
can use or copy to your own templates and modify:

Action Built-in template Activated in*

Starting a /COCKPIT/WEB_CYCLE_START /COCKPIT/WI3


workflow
(for plain text emails)

/COCKPIT/WEB_CYCLE_TEMPL_HTM
(for HTML emails)

Recalling a /COCKPIT/WEB_CYCLE_STOP /COCKPIT/WI9


document

Reminders for /COCKPIT/WEB_CYCLE_REMINDER


overdue
workflows

Substitute /COCKPIT/WEB_CYCLE_TAKEOVER
taking over
processing

21
WORK CYCLE 7.2 SAP Configuration Guide

Action Built-in template Activated in*

Collective email /COCKPIT/WEB_CYCLE_COLLECT

Starting a /COCKPIT/WEB_CYCLE_SUBST
workflow – email
to active
substitutes

Answering a /COCKPIT/WEB_CYCLE_ANSWER
query

Sending a query /COCKPIT/WEB_CYCLE_QUERY

Forwarding a /COCKPIT/WEB_CYCLE_FORWARD
workflow

* The subjects of the emails are specified in the same transactions.

Email text variables


There are various variables (aliases) that you can use in the text (for example, &WEB_CYCLE_USER_NAME&
to insert the recipient's name). The following variables are available:

Variable Description

&SENDER_EMAIL& The email address of the person who starts the


workflow, as saved in /SU01.

&SENDER_PHONE& The phone number of the person who starts the


workflow, as saved in /SU01.

&SENDER_FAX& The fax number of the person who starts the


workflow, as saved in /SU01.

&SENDER_NAME& The full name of the person who starts the workflow,
as saved in /SU01.

22
WORK CYCLE 7.2 SAP Configuration Guide

Variable Description

&SENDER_DEPARTMENT& The department of the person who starts the


workflow, as saved in /SU01.

&SENDER_FUNCTION& The function of the person who starts the workflow,


as saved in /SU01.

&SENDER_COMPANY& The company of the person who starts the workflow,


as saved in /SU01.

&WEB_CYCLE_DESCRIPTION& The description of the workflow, as saved in


/COCKPIT/WI2.

&WEB_CYCLE_STEP_DESCRIPTION& The description of the workflow step, as saved in


/COCKPIT/WI3.

&HEADER-x The name of the PROCESS DIRECTOR Accounts


Payable header field, where x is the field ID in the
/COCKPIT/THDR table.

&VENDOR-x The name of the vendor, where x is a field ID in the


BAPI1008_4 table.

&SY-x The name of a system variable, where x is a field ID


in the SYST structure.

&WEB_CYCLE_SINGLE_DOCUMENT_LINK& The URL of the Web Application in a single


document.

&WEB_CYCLE_SINGLE_SIGN_ON_LINK& The URL of the Web Application logon page.

&WEB_CYCLE_DOCUMENT_LIST_LINK& The URL of the Web Application for the list of


&WEB_CYCLE_DIRECT_DOCUMENT_LINK& documents to approve.

23
WORK CYCLE 7.2 SAP Configuration Guide

Variable Description

Note: Two aliases/variables exist to provide


backward compatibility with previous versions.

&WEB_CYCLE_SUBST_DOC_LIST_LINK& The URL of the list of documents from a person for


whom another person is a substitute.

&WEB_CYCLE_USER& The ID of the workflow processor.

&WEB_CYCLE_USER_NAME& The full name of the workflow processor.

&WEB_CYCLE_SUBST_NAME& The full name of a substitute.

&DUE_DAYS& The number of days remaining for the document to


be approved.

&MOBILE_APPROVE& The mailto URL to approve the document.*

&MOBILE_REJECT& The mailto URL to reject the document.*

&MOBILE_NOTE& The mailto URL to add a note to the document.*

* MOBILE APPROVAL must be active for the link to appear in the email.

24
WORK CYCLE 7.2 SAP Configuration Guide

Variables for HTML emails


The following variables can only be used in HTML emails, not in plain text emails.

If no documetn data exists in the line item, account and multi-account assignment tables, these tables are
not displayed in the emails.

Variable Description

&HEADER_DATA& Displays the document header data as a table.

&ITEM_DATA& Displays the document line-item data as a table.

&ACCOUNT_DATA& Displays the document account assignment data as a table.

&MULTI_ACC_ASS_DATA& Displays the (MM) document account assignment data as a table.


Note: If Add multi acc. ass. to items is active in /COCKPIT/WI30, the
account-assignment data is included in the line-item table
(&ITEM_DATA&).

&WORKFLOW_HISTORY& Displays the current log of the workflow (basically the same
information that is presented in the workflow status in the SAP GUI
and in the Web Application). It also includes any notes that have been
created in WORK CYCLE.

Note: The workflow history table is not included in the emails sent for
the first step of workflows.

&MOBILE_BUTTONS& Displays the Approve, Reject and Note buttons for MOBILE
APPROVE (MOBILE APPROVE must be activated.
Note: MOBILE APPROVAL must first be active for the workflow step
(/COCKPIT/MAI2).

 To specify which fields appear in each of these tables, see /COCKPIT/WI32.

 To specify how many fields per row are displayed, see the Fields number per row setting in
/COCKPIT/WI30.

25
WORK CYCLE 7.2 SAP Configuration Guide

Creating HTML email templates


To create an email template in HTML format:
1. Go to /COCKPIT/WI30.

2. Under WORK CYCLE email type, select HTML.

3. Specify the HTML code to use for the HTML Start, HTML End and MOBILE APPROVAL links.

4. Specify the display names for the links to the Web Application.

5. Under Fields number per row, enter the number of fields to be displayed in each table row.

Example showing four fields per row:

6. Select Add Multi acc. ass. to items to include multi-account assignment fields (for MM
documents) in the line-item table. If not selected, multi-account assignment fields are displayed
as a separate table.

7. If MOBILE APPROVAL is active for a workflow step, only one field is displayed per table row and
the Field numbers per row setting is not used. By selecting Ignore MOBILE APPROVAL,
the Field numbers per row setting is used.

Default table display for MOBILE APPROVAL, with only one field per row:

26
WORK CYCLE 7.2 SAP Configuration Guide

8. Specify the fields that are displayed in HTML emails.

9. Specify the email Background image.

HTML emails - Start and end code


When creating HTML email templates, you must specify the start and end of the HTML code (HTML start
and HTML end settings).

PROCESS DIRECTOR Accounts Payable comes with templates that you can use for both these:
/COCKPIT/HTML_START and /COCKPIT/HTML_END.

If you want to create your own templates, you should copy the code from these default templates to your
own files. The main thing to change is the styles, to change the appearance of the HTML emails.

Background image filename


The background image filename that appears in the /COCKPIT/HTML_START template cannot be changed:
backgrnd.gif. However, the image file you upload and use from the SAP repository can be any
filename. It does not have to be backgrnd.gif. PROCESS DIRECTOR Accounts Payable links your
image with this filename automatically.

HTML emails – Background images


You can add a background image to your HTML emails. For example, the image could be a bar extending
across the top of the email, a company logo, or an image/color as a background to the entire email.

If no background image is specified, the default (backgrnd.gif) is used:


To set a background image:

27
WORK CYCLE 7.2 SAP Configuration Guide

1. Upload the image you want to use to the SAP Web Repository.

2. Go to /COCKPIT/WI30.

3. In Background, enter the ID of the image you uploaded.

Note: Enter the image ID in the repository, not the original filename.

Note: There is no requirement for the image filename. It does not have to be backgrnd.gif, as
it appears in the HTML start template. PROCESS DIRECTOR links your image with this filename
automatically.

Note: Not all email programs (including some versions of Microsoft Office) support background images
for HTML emails. In this case, the background image appears as an email attachment.

Disabling background images


To disable the use of background images, check the Disable email background option in
/COCKPIT/WI30.

Adding an image to the SAP Web Repository


To add an image to the SAP Web Repository, for use as a background image to a HTML email:
1. Go to /SMW0.

2. Select Binary data for WebRFC applications and click the Find button.

3. Click the Execute button.

4. Click the Create button.

5. Enter an Obj. name and description.

6. Click Import.

7. Select the image file and click Transfer.

Note: There is no requirement for the image filename. It does not have to be backgrnd.gif, as
it appears in the HTML start template. PROCESS DIRECTOR Accounts Payable links your image
with this filename automatically.

8. Specify the Development class and click Save.

28
WORK CYCLE 7.2 SAP Configuration Guide

One-time vendor fields in the Web Application


Workflow processors can enter and save information about one-time vendors, for which there are no
master records. For WORK CYCLE users in the SAP GUI, users can add this information on the Vendor
tab. For WORK CYCLE users in the Web Application, you must specify which fields are displayed.
However, the Name (NAME1) and City (ORT01) fields are always displayed—you do not need to add them
here.
1. Go to /COCKPIT/WI29.

2. Click the Display/Change button and click New entries.

3. Specify a Vendor number if the field should be displayed for that vendor only.

4. Enter the PROCESS DIRECTOR Field name.

5. Under Display, specify whether the field is displayed (Normal field), if a value must be entered
(Mandatory field), is read-only (Only display), or hidden (Hide).

6. Specify the Priority number. This determines the row order in which the fields are displayed
(lowest to highest value).

7. Save your changes.

Viewing PROCESS DIRECTOR documents


In the WORK CYCLE Web Application, an additional tab called PD documents can be displayed for
members of a specific user group. In this tab, users can select and view any PROCESS DIRECTOR
document, that is, not just the ones sent to these users in a workflow.

29
WORK CYCLE 7.2 SAP Configuration Guide

To display the PD documents tab:

1. Go to /COCKPIT/WI25 and specify the user group for whom this tab is displayed.

2. Go to /COCKPIT/26 and specify which fields to have as the selection criteria.

Creating field statuses


1. Go to /COCKPIT/C23.

2. Add a new entry.

3. Enter a name/ID in Field status.

4. Under Field status identification, specify if header fields, line-item fields, and/or account
assignment fields should be made read-only.

Checking No account assignment line with MM invoices hides the account assignment fields
section for the FI items in MM documents.

5. Double-click Characteristic value of status.

30
WORK CYCLE 7.2 SAP Configuration Guide

6. Specify the individual fields that will be hidden, read-only, mandatory, or normal.

Note: Mandatory fields here prevent the document from being saved if the field has no value.

7. Save the new field status.

8. Go to /COCKPIT/WI3.

9. Open the desired workflow step and enter the name of the Field status you created.

Note: The field status is activated for only the selected workflow step, and not for PROCESS
DIRECTOR. Field statuses for PROCESS DIRECTOR are activated in /COCKPIT/C24.

10. Save the change.

Example
Objective: To make all header fields read-only, except for:

Header field Display setting

Business area Normal field (a field whose value can be changed)

Assignment Hidden

Reference document Mandatory

Step 1: Make all header fields read-only.

31
WORK CYCLE 7.2 SAP Configuration Guide

Step 2: Specify the three fields that will not be read-only.

Result:

32
WORK CYCLE 7.2 SAP Configuration Guide

Integrating with the SAP Business Workflow


This tutorial shows you how to set up SAP Business Workflow integration for WORK CYCLE. This means
that if a WORK CYCLE workflow step is sent to an SAP user, it also appears as a new work item in the
Workflows category of the receiver's SAP Business Workplace Inbox (SAP transaction, SBWP). With a
little extra configuration, the WORK CYCLE step can also be accessed from the Universal Worklist
(UWL).

Overview
1. Go to SAP transaction, SWDD.

2. Create a new workflow definition—initial setup.

3. Create a Container element—this is what is responsible for mapping a WORK CYCLE workflow
step to an SAP Business Workflow step.

4. Set up the workflow start event—this lets WORK CYCLE trigger an SAP Business Workflow
when a WORK CYCLE workflow step is started.

5. Add a Container operation to delete superfluous attachments—because any actual step


processing occurs in WORK CYCLE, we want to display only the work item itself and remove any
extraneous attachments that might be confusing. By selecting the work item, the user will click
through to WORK CYCLE.

6. Add an activity for the WORK CYCLE workflow step.

7. Activate your workflow definition—this finalizes the configuration and takes it into production.

Additional information
As a supplement to the information in this topic, Ginger Gatling's SDN eLearning session "Building a
Workflow from Scratch" (requires SDN login) provides a tutorial-style introduction to developing SAP
Business Workflows.

Creating a new workflow definition


1. In SWDD, select the menu path, Workflow > New, and then save.

A popup appears, prompting you to enter an abbreviation and name for the workflow definition:

2. Confirm.

33
WORK CYCLE 7.2 SAP Configuration Guide

Another popup appears, asking you to create an Object Directory entry for the workflow definition:

3. Use search help to pick a package name, and then save.

Creating a container element


Previous step Next step

1. Select the Workflow Container tab and double-click the item, <Double-Click to Create>:

The Change Container Element popup appears.

34
WORK CYCLE 7.2 SAP Configuration Guide

2. Enter an element, name and description and the object type, /COCKPIT/W. Your screen should
look like this:

3. Select the Properties tab and check the Parameter settings > Import check box.

35
WORK CYCLE 7.2 SAP Configuration Guide

4. Confirm.

Setting up the workflow start event


Previous step Next step

1. Click the toolbar button .

2. Select the Version-Independent (Task) > Start Events tab and add these settings:

Required settings

Object Category 5. BO BOR Object Type

Object Type 6. /COCKPIT/W

Event of the object 7. STARTED

36
WORK CYCLE 7.2 SAP Configuration Guide

Your screen should look like this:

3. Then activate the event linkage by clicking the button . You will be prompted for a customizing
request.

Note: In some customer implementations, the activation may need to be executed manually in
every client and system.

4. Next, configure the event binding by clicking the button . The Change Binding for Workflow
popup appears.

5. Drag and drop the Event container field, _EVT_OBJECT onto your new workflow container,
SingleDocumentLink, as shown here:

37
WORK CYCLE 7.2 SAP Configuration Guide

8. If an event is raised, the instance of the object which raised the event is available in the Event
container field, _EVT_OBJECT. This field must be copied into the corresponding field in the
Workflow Container. This is the field, SingleDocumentLink, which was created in the workflow
step. It is the only available field for event binding because it is the only field marked as an Input
field.

6. Confirm.

38
WORK CYCLE 7.2 SAP Configuration Guide

Now you can specify how the work item recipients will be determined.

1. Click the toolbar button . The Maintain Agent Assignment dialog box is displayed.

2. Click the toolbar button .

3. Select the General task option and confirm. This setting allows all SAP users as possible work
item recipients.

4. Finally, activate the assignment by clicking the toolbar button .

Adding a container operation


Previous step Next step
As you do not need to transport any attachments from PROCESS DIRECTOR into SBWP, you can delete
them from the workflow.

1. Click the toolbar button to return to the overview.

2. Double-click Undefined- Double-click as shown here:

The Step Selection popup appears.

3. Double-click the step type, Container Operation.

4. Enter these settings in the Control tab:

39
WORK CYCLE 7.2 SAP Configuration Guide

Required settings

Step name Enter Delete useless attachments.

Outcome name Enter Attachments deleted.

Step not in workflow log Select this check box.

Result element Use search help to pick _Attach_Objects.

5. Confirm.

Your screen should look like this:

40
WORK CYCLE 7.2 SAP Configuration Guide

Adding an activity for the WORK CYCLE workflow step


Previous step Next step
1. Right-click Workflow completed, then select the context menu item, Create...:

The Step Selection popup appears.

2. Double-click the step type, Activity.

3. In the Control tab, open the Task drop-down menu and select Create task:

41
WORK CYCLE 7.2 SAP Configuration Guide

The task creation dialog box is displayed.

4. In the Basic Data tab, enter these settings:

Required settings

Abbr PDWCProcess

Name WORK CYCLE process

Object Category BO BOR Object Type

Object Type /COCKPIT/W

Method DISPLAY

Your screen should now look like this:

42
WORK CYCLE 7.2 SAP Configuration Guide

5.

6. You can also add some documentation for the task in the Description tab (optional).

7. Next, you need to ensure that the work item will disappear from the Workplace if it has been
canceled, retracted or finished from within PROCESS DIRECTOR Accounts Payable or WORK
CYCLE. To configure this, select the Terminating events tab and define a terminating event:

Required settings

Element _WI_OBJECT_ID

Object Category BO BOR Object Type

Object Type /COCKPIT/W

Event FINISHED

43
WORK CYCLE 7.2 SAP Configuration Guide

8. Save your settings.

9. The Create Object Directory Entry popup appears and prompts you to assign a package. Enter
an appropriate Z package.

Warning: Be sure to double-check your work before returning to the activity definition, as then
you will no longer be able to edit the task.

10. Click the SAP GUI toolbar button to return to the activity definition dialog box.

11. You will receive a proposal for a binding:

12. Confirm.

13. Now use the search help to select an expression for the Agents assignment:

44
WORK CYCLE 7.2 SAP Configuration Guide

The Expression for step agent popup appears.

14. Select the expression, Container > SingleDocumentLink > User, as shown here:

45
WORK CYCLE 7.2 SAP Configuration Guide

15. Confirm.

16. Specify the agent assignment by clicking the button in Task Properties. The Maintain Agent
Assignment dialog box is displayed.

17. Click the toolbar button .

The Task popup appears.

18. Select the General Task option and confirm.

19. Return to the Workflow Builder by clicking the SAP GUI toolbar button twice.

Activating the workflow definition


Previous step

Click the toolbar button to generate and activate the runtime version of the workflow.
Your screen should now look like this:

46
WORK CYCLE 7.2 SAP Configuration Guide

Prerequisites for UWL


SAP Business Workflow tasks can also be accessed via the SAP Universal Worklist (UWL). To access
WORK CYCLE workflows from UWL, in addition to the steps described for integrating WORK CYCLE with
the SAP Business Workflow, you must also create a binding from the workflow container to the task
container in order that the WORK CYCLE URL can be accessed from UWL. For information on
configuring UWL, refer to the SAP documentation.
1. Go to SWDD.

2. Double-click the WORK CYCLE activity that you created previously.

3. In the Task field, double-click the task number to open the task details.

47
WORK CYCLE 7.2 SAP Configuration Guide

4. Select the Container tab or the Container button on the toolbar (depending on your SAP
version).

5. In change mode, click the New button on the tab toolbar.

6. Select ABAP Dictionary Reference and enter the structure, /COCKPIT/SWC_DUMMY and the
field URL. Your screen should look like this:

48
WORK CYCLE 7.2 SAP Configuration Guide

7. Save and go back.

8. In the Activity screen, click the Binding (Exists) button.

9. Expand the SingleDocumentLink workflow container on the left-hand side and drag and drop
the DocumentSingleLink field to the SingleDocumentLink task container on the right-hand
side.

49
WORK CYCLE 7.2 SAP Configuration Guide

A new entry is added in the table, Binding Workflow -> Step 'WORK CYCLE process'.

10. Confirm and save.

50
WORK CYCLE 7.2 SAP Configuration Guide

Programs and functions


Overview
WORK CYCLE comes with a series of programs and functions that you can use.

Name* Description

ARCHIV_NOTE_LATE Archives notes that have not been archived normally.

ARCHIV_WCLOG_REPAIR Archives workflows that have not yet been archived.

DUE_DATE_CHECK Sends reminder emails for overdue workflows, as well as collective


emails.

WC_CHK_DEL_USRS Checks whether a user who no longer exists, is still assigned to user
groups or workflow steps, or as a substitute.

WC_DEBUG Enables the creation of log entries for PROCESS DIRECTOR and
WORK CYCLE RFC calls, including those by the Web Application and
User Exits.

WC_RFC_LOG Displays all the RFC log entries (a record of RFC calls made by the
Web Application).

WC_SET_NOT_ARCHIVED Resets the ARCHIVED flag so that the workflow can be archived
again.

WC_UMA_PASSWD_INIT Resets passwords for multiple users.

WC_USER_UPDATE Imporst users from an LDAP directory.

WC_WEB_LOGGING Records all the RFC calls made by the Web Application. Used in
conjunction with WC_DEBUG.

51
WORK CYCLE 7.2 SAP Configuration Guide

Name* Description

XPRA_V720_SP0 Required to enable searching for WUM users by email addresses after
upgrading to PROCESS DIRECTOR 7.2 from a previous version. Also
required in order that the user-type independent search help on
workflow start functions correctly after an upgrade.

* All programs and functions are contained within the /COCKPIT/ namespace.

ARCHIV_NOTE_LATE
Archives notes that have not been archived normally.
This program archives internal notes and all other notes that have not yet been archived with the
workflow. All the notes relevant to the workflow are already automatically archived when terminating the
workflow. Notes that have been entered after the termination of the workflow and internal notes (are not
displayed in the workflow) can be archived with this program.
Workflow notes can be created by workflow recipients in WORK CYCLE and the Web Application and are
visible there, while internal notes can be created only in /COCKPIT/1 and are not visible in WORK CYCLE
or the Web Application.

ARCHIV_WCLOG_REPAIR
Archives workflows that have not yet been archived. Sometimes the archiving can fail (for example, a
wrong configuration could result in the archive being offline).
If this program also fails to archive your workflow, follow this procedure:
1. Run /COCKPIT/WC_SET_NOT_ARCHIVED.

This program resets the ARCHIVED flag so that the workflow can be archived again.

2. Run /COCKPIT/ARCHIV_WCLOG_REPAIR again.

52
WORK CYCLE 7.2 SAP Configuration Guide

DUE_DATE_CHECK
You can use the DUE_DATE_CHECK program to send reminder emails for overdue workflows. Use the
standard SAP transaction, /SE38 to run the program once, or /SM36 to schedule it as a background job.

Setting Description

Document number The range of PROCESS DIRECTOR Accounts Payable documents to


be processed.

Workflow due date Specify if the program should only run for workflows whose due date is
past this date.

Overdue to specified date Select if you have specified a due date above.

Activate email dispatch Select to send reminder emails.

Send collective emails You can set collective versus individual email sending in the
customizing of the workflow step. The program, when executed, will
check for processors who have received a workflow step and are now
due a new collective email.

WEB CYCLE user The user specified here is used as the sender of collective emails.

53
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

User type I – WEB CYCLE user

S – SAP user

G – User group

Create application log Creates messages in the SAP application log.

Show application log on Displays the SAP application log after the program has been executed.
finish

Object and Sub-object The object and sub-object that are included in the messages in the
SAP application log.

/COCKPIT/WC_CHK_DEL_USRS
Checks whether a user who no longer exists, is still assigned:

 To user groups

 To workflow steps

 As a substitute

WC_DEBUG
Enables the creation of log entries for PROCESS DIRECTOR and WORK CYCLE RFC calls,
including those by the Web Application and User Exits. It can be used for debugging purposes. You can
record log entries for calls made by specific users.

54
WORK CYCLE 7.2 SAP Configuration Guide

WC_RFC_LOG
Displays all the RFC log entries (a record of the RFC calls made by the Web Application) stored in the
/COCKPIT/TWC_LOG table. That is, it displays all the log entries created by the WC_WEB_LOGGING function.

Setting Description

Show RFC log Displays the RFC log file saved in the /COCKPIT/TWC_LOG table.

Put separator after Displays a horizontal line between entries, after each specified period.
seconds

Delete all RFC log Deletes all the RFC log entries saved in the /COCKPIT/TWC_LOG table.
entries

WC_SET_NOT_ARCHIVED
This program resets the archive flag so that the workflow can be archived again with
/COCKPIT/ARCHIV_WCLOG_REPAIR.
/COCKPIT/WC_SET_NOT_ARCHIVED can be used for workflows that have been marked as archived, but
actually have the archive missing.

WC_UMA_PASSWD_INIT
This program is used to reset passwords for WORK CYCLE users, or to force them to change their
passwords when they next log in.

Setting Description

Selection

Workflow processor The WORK CYCLE user(s).

Email (in uppercase The email adress(es) of the WORK CYCLE user(s).
letters)

Language key The language setting for the WORK CYCLE user(s).

Complete name The WORK CYCLE user(s) full name.

55
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Telephone The telephone number of the WORK CYCLE user(s).

Department The department of the WORK CYCLE user(s).

New password

Test run Displays a log of users whose passwords will be reset, without actually
performing the reset operation (where reset is either generating a new
password or forcing the user to change their password; see below).

Password is being Generates a new password for the WORK CYCLE user(s).
regenerated

User must change Forces WORK CYCLE user(s) to change their password(s) the next time
password
they log in.

WC_USER_UPDATE
This program is used to import users from an LDAP directory.

Setting Description

LDAP server The LDAP server ID configured in the SAP system. (They can be viewed
and managed using the LDAP transaction.)

Search filter Allows you to import only selected users, based on search criteria.
The default search filter is (&(objectclass=user)(mail=*)), which selects all
users.
Example: To select only users from a specific user group, you might use
(&(objectCategory=group)(description=Sales)).

System user active Uses the current SAP system user to log on to the LDAP server.

56
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

If this setting is not selected, you must specify the username and
password for an LDAP domain account to be used instead (see below).

User ID for logon Username for the LDAP domain account to log on to the LDAP server.

Password for logon Password for the LDAP domain account to log on to the LDAP server.

Send email Existing users whose data is updated are notified via email.

Retrieve WORK CYCLE Recalls (cancels) all workflows that are currently being processed by a
user whose data is updated.

Exclude from update Specify users whose data will not be updated by the import (even if
updated data exists).

Attribute name Name of the LDAP attribute/field.

Note: This field must be mapped to a WORK CYCLE field in


/COCKPIT/WI27.

Attribute value The value for the above field. If this value is found in any of the existing
users, they are deleted.
Note: The WC_USER_UPDATE program searches for the value in the
WORK CYCLE field that the above LDAP Attribute name has been
mapped to in /COCKPIT/WI27.

Delete all others Deletes any existing user whose data is not updated by the import.

Exclude from delete Specify existing users who are not deleted (only valid if Delete all others
is active).

Commit database Saves the imported data. If unselected, WC_USER_UPDATE performs a test
changes
run only and no data is imported or changed.

57
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Create application log Creates a log of the import.

Show application log on Displays the log after the import has been completed.
finish

Object The name of the object to use to classify the log.

In order to create an application log (which is based on standard SAP


functionality), you must specify an Object and Sub object (see below).
The Object and Sub object classify the log, so it is best to use custom
(Z*) ones.

Sub object The name of the Sub object to use to classify the log.

WC_WEB_LOGGING
This function module records all the RFC calls made by the Web Application. You should activate it in the
WC_DEBUG program. The resulting log messages can be viewed using the WC_RFC_LOG program.

XPRA_V720_SP0
This program is required only if you have upgraded to PROCESS DIRECTOR 7.2 from a previous version
and created Web Application (WUM) users in that previous version. This program ensures that it is
possible to search for WUM users by email addresses.

58
WORK CYCLE 7.2 SAP Configuration Guide

Appendix A – IMG
Setting the Web Application URL
/COCKPIT/WI1

Setting Description

Activate WORK CYCLE Turns on/off WORK CYCLE.

URL of WORK CYCLE Web The URL that is used in email templates for workflow starts, reminders,
Application
and so on.
Note: This URL does not affect the setup or configuration of the Web
Application.

Defining the workflow


/COCKPIT/WI2

Setting Description

Workflow ID The name of the workflow.

Workflow description The description of the workflow that appears in PROCESS DIRECTOR
Accounts Payable.

Maximum processing The period in which the workflow must be completed, after which daily
time, in days
reminder emails are sent.

Selection list order An integer that determines the position of the workflow in the workflow
selection list in PROCESS DIRECTOR Accounts Payable. 0 places the
workflow at the top of the list.

59
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

The values for this field for each workflow do not have to be in
sequential order. For example, you could have 0 = Workflow1, 5 =
Workflow2, 20 = Workflow3.

Workflow type  Unposted or unparked documents – Only unposted or


unparked documents can be sent to the workflow.

 Posted or parked documents – Only posted or parked


documents can be sent to the workflow.

 All documents – All documents except rejected documents can


be sent to the workflow.

Save notes in archive Notes created in WORK CYCLE are saved in the archive.

Omit Determines whether Fridays, Saturdays and Sundays are used in the
Friday/Saturday/Sunday
calculation of the Maximum processing time (above).

Factory or Holiday Determines if a specified factory or holiday calendar is used in the


calendar ID
calculation of the Maximum processing time (above). In other words,
non-working days in these calendars are not included in the Maximum
processing time calculation.

You can select only a factory calendar or a holiday calendar, not both.
If both are selected, the factory calendar is used. If you want to use
both a factory and holiday calendar, assign a holiday calendar to a
factory calendar in /OY05, and then select a factory calendar here for
the workflow.

PD document type for The PD document type used when creating documents using WORK
document creation
CYCLE.

Mandatory note Before the workflow can be started, a WORK CYCLE note must be
created.

60
WORK CYCLE 7.2 SAP Configuration Guide

Defining workflow steps


/COCKPIT/WI3

Setting Description

Workflow The workflow step ID.


step

Necessary settings
Setting Description

Step The description of the workflow step that appears in PROCESS DIRECTOR Accounts
description
Payable and WORK CYCLE.

Workflow  1 - Release: Document cannot be edited; only approved or rejected. Notes can
type be added. Document cannot be edited in PROCESS DIRECTOR Accounts
Payable while in a workflow.

 2 - Correction: Document can be edited and approved or rejected. Document


cannot be edited in PROCESS DIRECTOR Accounts Payable while in a
workflow.
 3 - Release and correction: Document can be edited and approved or rejected.
Document cannot be edited in PROCESS DIRECTOR Accounts Payable while
in a workflow.
 4 - For information purposes: Document can be edited, but a field status
disallowing edits is recommended, as the document can be edited in
PROCESS DIRECTOR Accounts Payable while in a workflow. No approval or
reject functions, just an button to acknowledge receipt/viewing of the
document. A workflow step of this type can only be the last step of the entire
workflow (thus, the only step in the workflow or the last step in a multi-step
workflow).

Text of The text label of the Approve/Release button in the Web Application.
release
function Note: In the SAP GUI, the tooltip text is always Approve document.

61
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Subject of The subject of the email sent to the recipient(s) of the workflow step.
email
message

Text for the The content of the email sent to the recipient(s) of the workflow step. There are pre-
confirmation
installed templates you can use or copy and edit. For example:
email
/COCKPIT/WEB_CYCLE_START.

Field status The field status to apply to the document when it is opened in WORK CYCLE.
Note: If you leave the Field status blank, then no document edits are permitted.

Validity The period in which the workflow step must be completed, after which reminder emails
period
are sent.

Note that the sum total of the validity periods for all the workflow steps assigned to a
workflow must equal the Maximum processing time in the workflow configuration.

Interval for For overdue workflow steps, the interval of sending reminder emails (in days).
reminder
emails

Optional settings
Setting Description

Forward Determine if documents can be forwarded to other users, and if queries can be sent.

 Not allowed
Document cannot be forwarded. Queries cannot be sent.

 X - Forward
Document can be forwarded. Queries cannot be sent.
 1 - Queries without document handover
Queries are allowed. After a query is sent, the document remains in the
sender's worklist. Forwarding is not allowed.

62
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

 2 - Queries with document handover


Queries are allowed. After a query is sent, the document disappears from the
sender's worklist until the query is answered. Forwarding is not allowed.

 3 - Forward and queries without document handover


Forwarding and queries are allowed. After a query is sent, the document
remains in the sender's worklist.

 4 - Forward and queries with document handover


Forwarding and queries are allowed. After a query is sent, the document
disappears from the sender's worklist until the query is answered.

All recipients If activated, all the recipients of the workflow step must approve/release the
must
document in order for the document to move to the next workflow step, or for the
process
workflow to be completed (when the workflow step is the last in the workflow).

If deactivated, after one recipient has approved/released the document, the document
moves to the next workflow step/the workflow is completed.

Line Permits each line item (MM invoices) and accounting lines (FI invoices) to be
item/account
approved by separate processors. For example, when each processor is responsible
approval
for a different cost center.

Note: To use this feature, you must also select All recipients must process, above.

See Line item approval.

Send emails Determines if recipients of the workflow step receive an email notification, and if so,
what kind of email (single or collective, and if the document image is included as an
attachment.
 Individual email without image attachment
A single email is sent to each recipient of the workflow step. The document
image is not included.

 A - Individual email with image attachment


A single email is sent to each recipient of the workflow step. The document
image is included as an attachment.

 X - No email
No email is sent. Recipients must manually check their WORK CYCLE
worklists for new documents.

63
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

 S - Collective email
A collective email is sent to each recipient of the workflow step. Collective
emails are scheduled and sent using the DUE_DATE_CHECK program.

Reject Specifies what happens when the workflow is rejected. The workflow can be canceled
completely, or the document can be returned to the first or previous workflow step
recipient or processor.

A recipient is the person to whom the workflow step is sent. A processor is the person
who actually approves or rejects the workflow step. In most cases, this will be the
same person. However, if the recipient forwards the document to another person, or
the recipient’s substitute processes the document, the processor is not the same
person as the recipient. Thus, it is possible to specify whether the document should
be returned to the person who received the workflow step or to the person who
actually processed it.

This diagram illustrates the process.

Important

If it is possible for this step to be a start step of a workflow, you must set this to: 1
Cancel the workflow.
 Back to PROCESS DIRECTOR processor.
Document remains in the workflow, but a PROCESS DIRECTOR Accounts
Payable user must determine what action to take (cancel workflow, send
document to another recipient, etc.)

64
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

 X - Back to previous workflow recipient


Document is sent to the recipient of the previous step in the workflow.

 1 - Cancel workflow
Entire workflow is canceled.

 2 - Back to first workflow processor


Document is sent to the processor of the first step in the workflow (default
behavior).

 3 - Back to first workflow recipient


Document is sent to the recipient of the first step in the workflow.

 4 - Back to previous workflow processor


Document is sent to the processor of the previous step in the workflow.
Note: For invoice documents created in the Web Application, the following rules
apply:
 If the Reject setting for the first workflow step is set to Cancel workflow, the
document is deleted from the system if the first workflow processor rejects it
and it has not been processed by other users.

 However, if the document has undergone processing by other users (for


example, it was forwarded, queried, processed by a substitute or returned to
the first workflow processor through the rejection of the subsequent steps),
the document is not deleted when the first workflow processor rejects it.

Email Determines if notification emails are archived or not and if these emails can be edited
archive
before sending in WORK CYCLE.

 Do not archive as a note


Notification emails are not recorded as notes. Emails cannot be changed in
WORK CYCLE.

 X - Archive as a note
Notification emails are recorded as notes. Emails cannot be changed in
WORK CYCLE.

 A - Do not archive as a note, changeable in WORK CYCLE


Notification emails are not recorded as notes. Emails can be changed in
WORK CYCLE.

 B - Archive as a note, changeable in WORK CYCLE


Notification emails are recorded as notes. Emails can be changed in WORK
CYCLE.

65
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Executability Determines whether a workflow step must be competed (Mandatory) or not


(Optional).

Doc. upload Determines if processors can attach additional files to the document in the Web
Application.

Recall Determines if processors can recall documents in the Web Application.


documents
in Web
Application

Agent
Setting Description

Any email address Email users can be recipients of the workflow step.

SAP users SAP users can be recipients of the workflow step.

Internet users WORK CYCLE users can be recipients of the workflow step.

User groups User groups can be recipients of the workflow step.

Pre-assign processors Determines which users can be recipients and if any are pre-allocated.

 Default assigned processors only


Only processors listed in /COCKPIT/WUM2 (or specified in a
User Exit) can be recipients. Default processors are pre-
assigned to the workflow step.
 X -All assigned processors
Only processors listed in /COCKPIT/WUM2 (or specified in a
User Exit) can be recipients. Default and non-default
processor(s) are pre-assigned to the workflow step.

 A - Default assigned, any other processor


Processors listed in /COCKPIT/WUM2 (or specified in a User

66
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Exit) and any other users can be recipients. Default


processor(s) are pre-assigned to the workflow step.

 B - All assigned, any other


Processors listed in /COCKPIT/WUM2 (or specified in a User
Exit) and any other users can be recipients. Default and non-
default processor(s) are pre-assigned to the workflow step.

Assignment of processors  In PROCESS DIRECTOR Accounts Payable


The processor can only be assigned manually in PROCESS
DIRECTOR Accounts Payable.

 1 - In WORK CYCLE*
The processor can only be assigned manually in WORK
CYCLE.

 2 - In PROCESS DIRECTOR Accounts Payable or WORK


CYCLE
The processor can only be assigned manually in PROCESS
DIRECTOR Accounts Payable or WORK CYCLE.

 3 - In background* (automatic, without manual intervention)


The processor is assigned automatically. Use for automatic
workflow starts and for workflow steps in the 2nd or
subsequent position where the previous workflow step
processor must not select the recipient(s) of the next step.

* Workflow step recalls are not possible when this option is active.

User Exits
You can activate User Exits at the following points to perform some action(s):

 Check if the WORK CYCLE step can be started

 Define possible processors and parallel steps

 Logic after the step action has been performed

 Logic after the step has been released

 Check recipients of the step

67
WORK CYCLE 7.2 SAP Configuration Guide

Optional settings for workflow steps


/COCKPIT/WI17

Setting Description

Workflow step The workflow step ID.

Note settings
Setting Description

Note required Specifies when a note must be created before performing the following
steps:

 Before replying to the workflow step

 Before querying the workflow step


 Before forwarding the workflow step

 Before releasing the workflow step (approving step)

 Before rejecting the workflow step


Note: Mandatory notes cannot be applied to the workflow steps of type
4 - For information purposes.

Cover sheet settings


Setting Description

Print cover sheet? This setting displays a Print cover sheet button when the document is
opened in the Web Application. When clicked, a PDF is opened in a
popup window that displays a cover sheet for the document.

Cover sheets can be used to attach subsequent documents to a


document by using the ReadSoft DOCUMENTS Rescan function.
Cover sheets contain the PROCESS DIRECTOR document number,
as well as a barcode, which are used to identify documents.

Form name The name of the PDF form to use for the cover sheet.

68
WORK CYCLE 7.2 SAP Configuration Guide

Recipient settings
Setting Description

Single recipient of Only one user can be the recipient of the document. Other processors
workflow step
cannot be added.

Permitted recipient check Restrictions on which users can be recipients of a document in the
workflow step:

 S – New recipient (not the current processor)

 X – Principle of dual control (recipient not previous processor)

 – None

 F – None, forwarding permitted to oneself

 I – Sender/iniator cannot be processor of the workflow

Forward to arbitrary The document can be forwarded to users not listed in /COCKPIT/WUM2
processors
(non-default users).
* Only applicable if the Pre-allocate agent setting in /COCKPIT/WI3 is
set to Default or No default.

Query arbitrary The document can be forwarded to users not listed in /COCKPIT/WUM2
processors
(non-default users).
* Only applicable if the Pre-allocate agent setting in /COCKPIT/WI3 is
set to Default or No default.

PD message type Determines whether unassigned steps are checked when a workflow is
start/continue
started or continued in PROCESS DIRECTOR.
When a workflow is started or continued, if no recipient has been
assigned to certain steps and step customizing only allows a
PROCESS DIRECTOR user to assign steps, the user can be informed
of these missing step recipients by a pop-up:

If a warning pop-up appears, the user can decide whether he/she


wants to send the workflow anyway or correct the assignment.
If an error pop-up appears, he/she must correct the assignment.

69
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

The first character of this flag refers to the workflow start, the second
line refers to the workflow continuation.

If the line is empty or contains an "S", no check is carried out.

If "W" is entered, a warning pop-up will appear.

If "E" is entered, an error pop-up will appear.

Please note that recipients must be entered in the first item when a
workflow is started, and in the next item when a workflow is continued.
If this is not done, an error message will appear, which cannot be
overruled by any of the settings described here .

No processor takeover for As a result of setting this flag, automatic processing does not take
substitution
place if the step of a workflow goes to two processors, and one of the
processors is also the substitute of the other processor and takes over
processing.

Use

It makes sense to set this flag if all processors must process the
workflow step, and in the case of substitutes, manual take over of
processing by the substitute should be enforced, even though the
substitute is also a recipient of the workflow step.
Dependencies

The prerequisite for this is that the workflow step must be processed by
all recipients (All recipients must process).
Example

A workflow step that must be processed by all processors is sent to


user A and user B. A is also the active substitute of B.
The step is normally automatically processed by A as well, if this flag is
not set. Setting the flag has the effect that after A has processed the
workflow step, B must still process the workflow step and thus it could
be processed again by A in the capacity of a substitute.

70
WORK CYCLE 7.2 SAP Configuration Guide

Line item/account approval


Setting Description

Default recipient type This setting determines the default recipient type. If only one user type
is defined in the workflow step settings, this user type is defaulted. If
several user types are defined in the step settings, it is possible to
define the default user type here.

Show all lines By default, workflow processors see only those lines that are assigned
to them, or the lines that are not assigned to anyone. Via this Show all
lines configuration option, it is possible to display the items (in read-
only mode) assigned to the other processors, rather than hiding them.

Workflow steps, assign processors


/COCKPIT/WUM2

In this table, you pre-allocate recipients to workflow steps. To display the table, select a Workflow
ID/Workflow step combination and double-click Workflow processors.

Setting Description

Workflow ID The name of the workflow.

Workflow step The workflow step ID.

Workflow processor The ID of the user who is a pre-allocated recipient of the workflow step.

User type  I – WORK CYCLE user

 S – SAP user

 G – User group

Set default Indicates the user is a default processor (there can be more than one)
for the workflow step. The Pre-assign processors setting in the
workflow step configuration determines if non-default and/or default
users are pre-allocated to the step when the step is started. See the
Processor pre-allocation and assignment matrix for details.

71
WORK CYCLE 7.2 SAP Configuration Guide

Workflow processes and step conditions


/COCKPIT/WI4

There are two tables in this transaction. The first is to allocate workflow steps to workflow shells. The
next, accessed by double-clicking Define step conditions, is to specify conditions that the workflow step
must meet, for it to be executed.

Workflow processes
Setting Description

Workflow ID The name of the workflow.

Workflow step ID The workflow step ID.

Position The position of the workflow step in the workflow, where 1 is the first
step in a workflow, 2 is the second step, and so on.
Note: A workflow step can be used in/assigned to more than one
workflow.

Step conditions
Setting Description

Item/Sequence Multiple conditions can be created. The Item number is the sequence
or order in which the condition is calculated.

Structure The type of field:

 CHECKDATA (used to identify the vendor)

 HEADER (header data)

 ITEM (line item data)


 TAX (tax data)

 ACCOUNT (account assignment data)

 ACCASS (multi-account assignment data)


 SORDER (purchase order data)

72
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

 CPD (one-time vendor)

Internal field The name of the PROCESS DIRECTOR field that the condition
calculation is based on.

Inclusion/exclusion Indicates whether the From and To values (below) are included in the
calculation or not.

Comparative options The function to commpare the From and To values (below).

 BT – Between from-value and to-value

 EQ – Same as from-value

 NE – Different to from-value

 CP – Same pattern as from-value

 GE – Greater than or equal to from-value

 GT – Greater than from-value

 LE – Less than or equal to from-value

 LT – Less than from-value

From value/To value The values used in the calculation of the condition.

Note: To avoid errors, enter the values in the SAP internal format. For
example, for cost center 1000, enter 0000001000; for vendor 2500,
enter 0000002500.

Opening bracket/Closing If more than two conditions are specified, opening and closing brackets
bracket
can be used to perform a calculation block of two or more conditions,
before the next condition is calculated.

Boolean operator Used to join conditions. Select from AND or OR.

73
WORK CYCLE 7.2 SAP Configuration Guide

Activate workflows
/COCKPIT/WI7

This table is used to activate workflows.

Setting Description

Company code The buying organizational unit.

FI/MM FI or MM documents.

PD document type The PROCESS DIRECTOR document type.

Note: Workflows to which a document type has been assigned will be


available in the Invoice type selection list when users create a new
invoice.

Workflow ID The name of the workflow.

Set up general workflow texts


/COCKPIT/WI9

In this table, you specify the Subjects and Texts of workflow emails for the following uses:

Use Description

Recalling a Sent when a workflow step is recalled, or the entire workflow is canceled.
workflow

Reminders for Sent when a workflow step, or an entire workflow, is overdue.


overdue
workflows

Processing by a Sent to the original recipient of a workflow when a substitute takes over the
different user processing of a document.

74
WORK CYCLE 7.2 SAP Configuration Guide

Use Description

Collective emails Collective emails are emails that contain links to more than one document, which
are sent using the /COCKPIT/DUE_DATE_CHECK program. Collective emails are
activated in the workflow step configuration and are a replacement for sending
individual emails for every workflow a user receives.

In addition, you also specify the Sender of the email, which can be any SAP user.

Active substitutes Sent to active substitutes when a document is sent.


at workflow start

Answering Sent when a user answers a query about a document.


queries

Sending queries Sent when a user sends a query about a document to another user.

Forwarding a Sent when a user forwards a workflow to another user for processing.
workflow

There are built-in templates that you can use or modify for the email texts.
The text used for sending emails to workflow recipients is specified in the workflow step configuration
(Text for the confirmation email).

Activate authorization checks in WORK CYCLE


/COCKPIT/WI13

Setting Description

Authorization object The name of the SAP authorization object employed to permit access
to WORK CYCLE. If no authorization object is specified, all the SAP
users can access WORK CYCLE.

75
WORK CYCLE 7.2 SAP Configuration Guide

Message transformation for checks


/COCKPIT/WI22

You have the ability to change the type of messages that are presented for different checks, as well as
suppress them completely. This applies to both PROCESS DIRECTOR and SAP messages. It could be
useful, for example, if you do not wish to have coding block (COBL) error messages appear for the
documents where no cost center has been assigned. You can apply such rules for all the workflow steps,
or restrict them to specific workflow steps.

Setting Description

Message check time The time when the check that you wish to change occurs.

Workflow step ID The workflow step ID.

Type The type of check that you wish to change.

Message ID The message class. See /SE91. The message class contains a
collection of messages (see Message No. below).
All PROCESS DIRECTOR message classes are saved in /COCKPIT/*.

Message No. The message ID. The actual message you wish to change or suppress.
See /SE91 for a list of message numbers and the message text.

Any message If active, the rule applies to all the messages; the Message ID and
Message No. are ignored.

Action The change to the type of message or error that is generated. Or,
whether the message is suppressed/ignored.

76
WORK CYCLE 7.2 SAP Configuration Guide

Limit attachment visibility in applications


/COCKPIT/WI28

Here you can restrict which types of attachments in PROCESS DIRECTOR can be viewed in the Web
Application.

Setting Description

Web application The part of the Web Application where the attachment is to be hidden:

 WORK CYCLE (history)


When viewing documents that have already been processed.

 WORK CYCLE (document selection)


When viewing the document detail screen.
 WORK CYCLE (worklist selection)
When viewing the document list.

Workflow step ID The workflow step ID.

Document type The PROCESS DIRECTOR archive document type, which has to be
hidden.

Email settings

Email settings
/COCKPIT/WI30

Setting Description

Format P - Plain text: Emails are sent in plain text format. The remaining
settings in this table are ignored.

H - HTML: Emails are sent in HTML. The remaining settings in this


table are applied to configure the structure and format or the HTML
emails.

77
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

If no value is specified here (the case if no change is made to this


table), plain text is used.

HTML start The start of the HTML email, from the <HTML> tag to the <BODY> tag.
Default: /COCKPIT/HTML_START

HTML end The end of the HTML email, from the </BODY> tag to the </HTML>
tag.
Default: /COCKPIT/HTML_END

MOBILE APPROVAL links The formatting of the MOBILE APPROVAL links for approving,
rejecting and adding notes to documents.
Default: /COCKPIT/HTML_MOBILE_BUTTONS

Link names See /COCKPIT/WI31.

Number of fields per row The number of fields to appear in each table row.

A field consists of the field name and the field value. That is, two cells
are displayed.
Note: This setting is not used if MOBILE APPROVAL is active for a
workflow step. In this case, only one field/row is displayed.

Add multi acc. ass. to Determines if multi-account assignment fields (for MM documents) are
items
included as part of the line-item table, or is displayed as a separate
table.

Ignore MOBILE If MOBILE APPROVAL is active for a workflow step, only one field is
APPROVAL
displayed per table row and the Field numbers per row setting is not
used. By selecting Ignore MOBILE APPROVAL, the Number of
fields per row setting is used.

78
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Field selection See /COCKPIT/WI32.

Disable email background If you do not want to use a background image in the email, check this
check box.

Background The ID of the image to use for the background of the email.
If no background image is specified, the default (backgrnd.gif) is
used:

HTML email link names


/COCKPIT/WI31

Use this table to specify the display names for the document URLs. That is, instead of displaying the
URL, a display name is used for the hyperlink.

Setting Description

Alias  &WEB_CYCLE_DIRECT_DOCUMENT_LINK&
The URL of the Web Application for the list of documents to be
approved.
 &WEB_CYCLE_DOCUMENT_LIST_LINK&
Same as above: The URL of the Web Application for the list of
documents to be approved. (Two aliases/variables exist to
provide backward compatibility with the previous versions of
PROCESS DIRECTOR Accounts Payable.)

 &WEB_CYCLE_SINGLE_DOCUMENT_LINK&
The URL of the Web Application for a single document.

 &WEB_CYCLE_SINGLE_SIGN_ON_LINK&
The URL of the Web Application logon page.
 &WEB_CYCLE_SUBST_DOC_LIST_LINK&
The URL of the list of documents from a person for whom
another person is a substitute.

79
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Value The display name for the hyperlink.

Email field selection


/COCKPIT/WI32

Use this table to specify which fields are displayed in the HTML workflow emails.

Setting Description

Structure The type of field/the table in which a field is located:

 HEADER - Header data


 ITEM - Line item data

 ACCOUNT - Account assignments for FI items

 ACCASS - Account assignments for MM items

Internal field name The name of the field in PROCESS DIRECTOR Accounts Payable.

Presentation and interface

Maximum number of fields in the Web Application


/COCKPIT/WI11

This table lists the fields that can be displayed in the Web Application. If a field is not listed here, it cannot
be displayed in the Web Application.

Setting Description

Structure The type of field/the table in which a field is located:

 HEADER - Header data


 ITEM - Line item data

80
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

 ACCOUNT - Account assignments for FI items

 ACCASS - Account assignments for MM items

 TAX - Tax fields

 CHECKDATA - Bank and other data fields.

 SORDER - Purchase order fields*

 CPD - One-time vendor fields

Internal field name The name of the field in PROCESS DIRECTOR.

* You can extend the /COCKPIT/SORDER table using fields from the BAPIEKPO (purchase order) and
BAPIEKBES (purchase order history) tables using the CI_COCKPIT_ORDER include.

Creating the field status and assigning field characteristics


/COCKPIT/C23

Field status identification

Setting Description

Field status The name/ID of the field status.

Header data can only be Display all header fields as read-only.


displayed

Display invoice items only Display all line-item fields as read-only.

Only display account Display all account assignment fields as read-only.


assignment

No account assignment The account assignment fields for FI items in MM documents are
line with MM invoices
hidden.

81
WORK CYCLE 7.2 SAP Configuration Guide

Screen variants

Setting Description

Invoice items ...

Account assignments ...

PO account assignment ...

PO data ...

Characteristic value of status

Setting Description

Structure The type of field:

 CHECKDATA (used to identify the vendor)

 HEADER (header data)

 ITEM (line item data)

 TAX (tax data)

 ACCOUNT (account assignment data)

 ACCASS (multi-account assignment data)

 SORDER (purchase order data)

 CPD (one-time vendor)

Internal field name The name of the field in PROCESS DIRECTOR.

Display  D - Only display

Display the field as read-only.

 H - Hide

82
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Do not display the field.

 M - Mandatory field

Force a value to be entered in the field before the document


can be saved.

 Normal field

A field whose value can be changed.

Maintain default layouts for the WORK CYCLE transaction overview screen
/COCKPIT/WI12

Here you can specify the default layout, using variants, of the following sections in the WORK CYCLE
document list:

 Layout of heading list

 Layout of MM invoice items

 Layout of FI coding items

Activate WORK CYCLE customer-specific functions


/COCKPIT/WI14

Displays menu items to execute custom functions. Use the PROCESS DIRECTOR User Exit 12
(/COCKPIT/USEX_CUSTFCT_PROCESS) to link menu items to functions.

Setting Description

Workflow step The workflow step ID.

Activate customer Enables the additional menu in /COCKPIT/WC.


functions

83
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Menu description The name of the menu.

Setting Description

Description The name of the menu item.

Icon An icon to use for the menu item. (Optional)

Op. mode Specifies whether the function should lock the document (no other
changes permitted while locked) or not.

 _ - Lock and update document

 1 - Lock, but do not update document

 2 - No lock and no update of document

Process several Specifies whether the function can be executed on more than one
documents
document simultaneously.

Archive document types for document upload in the Web Application


/COCKPIT/WI15

In this table, you can specify the permitted document types that can be uploaded in the Web Application.
The document types are the ones created for PROCESS DIRECTOR during installation, in /OAC2.
Document types must be listed here in order for Web Application users to upload files of that type in the
Web Application.

84
WORK CYCLE 7.2 SAP Configuration Guide

Define forms for workflow steps for the Web Application


/COCKPIT/WI16

In this table, you list the archive document types to use when Web Application users fill in and submit
forms. If this table is empty, the first matching entry in /COCKPIT/C15 is used.

Setting Description

Workflow step ID The workflow step ID.

Language The language of the form.

File name of form The filename (as it appears in the Web Application) of the form.

Name of form The name of the form.

Document type The archive document type to use for the form. The document types
are the ones created for PROCESS DIRECTOR during installation, in
/OAC2.

Extend selection criteria for workflow history


/COCKPIT/WI24

This table contains additional fields displayed on the History > New invoice selection tab, when
searching for processed documents. These selection fields are also displayed in the SAP GUI Workflow
> Display releases (history) popup. The default fields are:

 Workflow name

 Last approval/action from/to

 Display approvals only

 Maximum number of rows

85
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Table name The type of field:

 HEADER – Header fields

 WEB_CYCLE – WORK CYCLE workflow fields (workflow step


ID, due date, read/unread status).

Field name The name of the field.

Selection type The type of selection for the field:


 1 – Single parameter provides one field for entry of a single
value.

 2 – From/To parameter provides two fields for entry of a


range; for example, between document numbers 1000 to 2000.
 3 – Check box allows multiple selection of the available
options.
 4 – Radio button allows selection of only one of the available
options.

Warning: Use the Radio button selection type only with fields with an
applicable type. Using it with fields whose types are CHARACTER or
INTEGER will result in incorrect search results.

Status description The display text for the field in the Web Application. If no text is
entered, the standard field name from the data dictionary is used.

Sequence The order in which the fields are displayed (lowest to highest value).

Note: The remaining configured fields are available via the Other selection fields button. Only simple
From-To selections are allowed; it is not possible to define ranges or single values.

86
WORK CYCLE 7.2 SAP Configuration Guide

Web Application search help


Insert or adapt search helps
/COCKPIT/WI19

In these tables, you can override and add additional search helps provided by the system. However, this
applies to only the Web Application.

Setting Description

Structure The type of field:

 CHECKDATA (used to identify the vendor)

 HEADER (header data)

 ITEM (line item data)

 TAX (tax data)

 ACCOUNT (account assignment data)

 ACCASS (multi-account assignment data)

 SORDER (purchase order data)

 CPD (one-time vendor)

Internal field name The name of the field in PROCESS DIRECTOR.

Function module The function module that provides the search help for the specified
field.

To suppress a search help provided by default, leave this field blank.

Search help fields


For each field you add above, you must specify the fields that can be used to search and are displayed in
the search results.

Setting Description

Field name in search help The name of the field to display in the search results.

87
WORK CYCLE 7.2 SAP Configuration Guide

You must include the field that you added in the above table. It may be
the same (PROCESS DIRECTOR) field or the corresponding SAP
field.
Example: If TAX_CODE (a PROCESS DIRECTOR field) was in the
above table, you must add MWSKZ (an SAP field) to this table. If you
added FOLLOW_UP (a PROCESS DIRECTOR table) to the above table,
you can also add FOLLOW_UP to this table.

Priority The order of the fields, starting on the left with 1, then 2, 3, and so on.

Note: The search field must be assigned to 1. For example, if you


added TAX_CODE to the above table, the MWSKZ field must be added to
this table and assigned 1 as the Priority.

ABAP type The data type (for example, Character string, Date, Time, etc.)

No. of characters The length of the field to display the field values.

Search/display Determines whether the field can used as input for searching and/or
displayed in the search results.

 S – Search

 D – Display

 B – Both

Label The label of the field in the search form and the header of the result list
column.
Warning: If the label is not available in the language in which the user
is currently logged on, the entire field will not be displayed in the
search help.

88
WORK CYCLE 7.2 SAP Configuration Guide

Optional: SAP search helps


If /COCKPIT/WC_SHLP_GENERAL has been used in the first table, you must define an SAP search help to
use here.

Setting Description

Table name Any table or structure that contains the field name and where a search
help has been provided for that field. Typically, this would be either:
 /COCKPIT/SHDR_DISP

 /COCKPIT/SITEM_DISP

 /COCKPIT/SACCT_DISP

 /COCKPIT/TACCAS

Search help name An elementary search help with the search help provided in the
table/structure above.

Default search helps


/COCKPIT/WI18

This table contains the default search helps for the Web Application. If you want to add/edit/suppress any
search help, do not edit this table; use /COCKPIT/WI19 instead.

Setting Description

Structure The type of field:

 CHECKDATA (used to identify the vendor)


 HEADER (header data)

 ITEM (line item data)

 TAX (tax data)

 ACCOUNT (account assignment data)

 ACCASS (multi-account assignment data)

 SORDER (purchase order data)

 CPD (one-time vendor)

89
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Internal field name The name of the field in PROCESS DIRECTOR.

Function module The function module that provides the search help for the specified
field.

Search help fields


Setting Description

Field name in search help The name of the field to display in the search results.

Priority The order of the fields, starting on the left with 1, then 2, 3, and so on.

ABAP type The data type (for example, Character string, Date, Time, etc.)

No. of characters The length of the field to display the field values.

Search/display Determines whether the field can used as an input for searching and/or
displayed in the search results.

 S – Search

 D – Display
 B – Both

Label The label of the field in the search form and the header of the result list
column.

90
WORK CYCLE 7.2 SAP Configuration Guide

Optional: SAP search helps


Setting Description

Table name Any table or structure that contains the field name and where a search
help has been provided for that field.

Search help name An elementary search help with the search help provided in the
table/structure above.

Web Application: Document selection


Web Application: User group for document selection
/COCKPIT/WI25

Here you specify the user group that can view PROCESS DIRECTOR documents in the Web Application
(that is, any PROCESS DIRECTOR document, not just ones sent to these users in a workflow). You can
only specify one user group.

Setting Description

Work group Any WORK CYCLE user group.

Web Application: Criteria for document selection


/COCKPIT/WI26

This table contains the document selection criteria for the PD documents tab.

Setting Description

Table name The type of field:

 HEADER – Header fields

 WEB_CYCLE – WORK CYCLE workflow fields (workflow step


ID, due date, read/unread status).

Field name The name of the field.

91
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Selection type The type of selection for the field:

 1 – Single parameter provides one field for entry of a single


value.

 2 – From/To parameter provides two fields for entry of a


range; for example, between document number 1000 to 2000.
 3 – Checkbox allows multiple selection of the available
options.

 4 – Radio button allows selection of only one of the available


options.
Warning: Use the Radio button selection type only with fields with an
applicable type. Using it with fields whose types are CHARACTER or
INTEGER will result in incorrect search results.

Alternative assignment The display text for the field in the Web Application. If no text is
entered, the standard field name from the data dictionary is used.

Sequence The order in which the fields are displayed (lowest to highest value).

Maintain default values for document creation


/COCKPIT/WBI7

When the ability to create invoices in the WORK CYCLE Web Application has been given (by activating
the wb_create parameter in webcycle-app.properties), you can list the default values for the
header fields.

Setting Description

PD document type The PROCESS DIRECTOR document type. A blank entry here will
make a value the default for all documents, unless an entry exists with
a specific document type.

Internal field name The name of the PROCESS DIRECTOR header field.

92
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Field value The value that is displayed for the field when creating a new invoice.

Web Application: Configuring fields for one-time vendors


/COCKPIT/WI29

This table lists the one.time vendor fields that are displayed for the vendor record in the Web Application.

Setting Description

Vendor The name of the vendor. Can be used to apply different field settings to different vendors. If
left blank, the field setting is applied to all the vendors.

Field The name of the field in PROCESS DIRECTOR.


name

Display  D - Only display

Display the field as read-only.

 H - Hide

Do not display the field.

 M - Mandatory field

Force a value to be entered in the field before the document can be saved.

 Normal field

A field whose value can be changed.


Note: The NAME1 (Name) and OTRO1 (City) fields are displayed as mandatory fields in the
Web Application and do not need to be entered here.

Priority The row position of the field, with 0 being the highest row. If more than one field has the
same row number, the fields are sorted alphabetically.

93
WORK CYCLE 7.2 SAP Configuration Guide

User management

Mapping of LDAP attributes to user master data


/COCKPIT/WI27

This is the mapping table used by /COCKPIT/WC_USER_UPDATE to import users from an LDAP directory to
WORK CYCLE.

Setting Description

Attribute name The name of the field in the LDAP directory.

Internal field name A WORK CYCLE user field. Use the search help for possible fields
(from the /COCKPIT/TWC_UMP table).

Function module Optional. Use a function module to modify the import data before it is
saved in /COCKPIT/TWC_UMP. No standard function module exists—
you must write your own to modify the data as you wish.

Set WORK CYCLE user management


/COCKPIT/WI6

This table contains various settings regarding the creation of new WORK CYCLE users.

Setting Description

User Management Customizing

User generation The method used to create WORK CYCLE usernames (if one is
not specified).

 – Random name
Random characters are used to compose usernames.

 1 – Generate name from email


The first part of email addresses are used to compose
usernames.

94
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Mapping module The function module used to import user data from a file.
/COCKPIT/WC_MAP_IMP_EXAMPLE is a built-in example that can
be used to import users from CSV files.

Initial password The initial password for all users. Each user must change this
initial password when they first log in.

If no initial password is specified here, the system automatically


generates a random password.

Note: This password is stored in an encrypted form on the


database.

Use eMails

Create or delete Sends an email to newly created or deleted users.

Create Mail Txt The email text to send to newly created users.

Delete Mail Text The email text to send to deleted users.

Mail Text to Subs The email text to send to substitutes for newly created or deleted
users.

Lock or unlock Sends an email to users who have been locked or unlocked.

Mailtext The email text to send to users who have been locked or
unlocked.

Change password Sends an email to users when their password changes.

Mailtext The email text to send to users when their password changes.

95
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Duplicate check

Check user ID Validates whether an SAP user with the same user ID already
exists.

Check mail address Validates whether an SAP user with the same mail address
already exists.

Check name (first Validates whether an SAP user with the same first name and last
name/last name)
name already exists (for example: John Smith).

Check name (last Validates whether an SAP user with the same last name and first
name/first name)
name already exists (for example: Smith John).

WORK CYCLE user management


/COCKPIT/WUM

You can create, edit and delete users, as well as perform the other tasks described below.

To perform most of these actions, you must first enter the username in the Workflow processor field.

Icon Action Description

Create Open the User data dialog box to enter the details of the new user.

Change Open the User data dialog box to change the details of an existing
user.

Display Open the User data dialog box to display the details of an existing
user.

96
WORK CYCLE 7.2 SAP Configuration Guide

Icon Action Description

Lock Lock the user. If the user is logged on when you apply the lock, they
can continue to work in the current session.
Warning: Locking or deleting users may result in unfinished workflows.
For example, if the locked or deleted user is the sole user assigned to
the last workflow step, the workflow cannot be completed. In such
cases, the workflow must be recalled.

Unlock Unlock the user.

Delete Delete the user.

Warning: Locking or deleting users may result in unfinished workflows.


For example, if the locked or deleted user is the sole user assigned to
the last workflow step, the workflow cannot be completed. In such
cases, the workflow must be recalled.

Initialize Generate a new password for the user.


password
The user must change this initial password when they log in. You can
define this initial password in /COCKPIT/WI6.

Use the WC_UMA_PASSWD_INIT program to initialize passwords for


more than one user at the same time.

Change Manually specify a new password for the user.


password

Import Open the Import user dialog box, where you can specify the file to
import users from. The function module for performing the import is
specified in /COCKPIT/WI6.

User group Open /COCKPIT/WUM1 to manage user groups.

Assign users Open /COCKPIT/WUM2 to assign users to workflow steps.

97
WORK CYCLE 7.2 SAP Configuration Guide

Icon Action Description

PROCESS Open /EBY/ICWC_UM3 to assign authorization roles. This option only


DIRECTOR
appears if you have PROCESS DIRECTOR installed (not just
authorization
roles PROCESS DIRECTOR Accounts Payable). See the PROCESS
DIRECTOR SAP Configuration Guide for details.

User group management


/COCKPIT/WUM1

You can create and manage user groups in this table.

Setting Description

Workgroup The unique ID of the user group.

Description A descriptive text of the user group.

Assigned processors

User type There are three kinds of users that can be included in user
groups:

 I – WORK CYCLE user

 S – SAP user
 G – User group

Email users/addresses cannot be included in user groups.

Workflow processor The user name.

98
WORK CYCLE 7.2 SAP Configuration Guide

Define search help for workflow processor


/COCKPIT/WI5

When search help is used inside SAP to select the users for a workflow (for example, when a PROCESS
DIRECTOR user starts a workflow), the search help for finding users looks at all users of the specified
user type (SAP, WORK CYCLE, and User Group). However, you can restrict which users are searched
by:

1. Writing a function for the specific user search you wish to implement.

2. Specifying the User type for which this search will be used in the above table.

Note: This configuration only affects user search helps for WORK CYCLE in the SAP GUI. It does not
affect user search helps in the Web Application.

Setting Description

User type The type of user for which the search help function will be used.

 I – WORK CYCLE user


 S – SAP user

 G – User group

Search help name The search help function to find users.

Define substitute profile


/COCKPIT/WI33

Here you specify the substitute profile in SAP that takes precedence when allocating substitutes. The
profile is also assigned to new substitutes created using the Web Application.
See Using a substitute profile for the full explanation.

99
WORK CYCLE 7.2 SAP Configuration Guide

Set notes

Use WORK CYCLE notes


/COCKPIT/WI8

Here you can restrict which types of attachments to PROCESS DIRECTOR can be viewed in the Web
Application.

Setting Description

Use notes Enables the creation of WORK CYCLE notes.

Document type WORK The document type to use for archiving WORK CYCLE notes. The
CYCLE notes document type must be listed in /OAC2.

If PDF is used, a form must be entered for the creation of the PDF (see
Form for creating PDFs below). The /COCKPIT/TEXT form is
available, but can be changed if a new form has to be used.

Archive as text document Archives notes in the TXT format.

Archive as PDF document Archive notes in the PDF format.

Form for creating PDFs The form to use to create PDFs from WORK CYCLE notes. Mandatory
if archiving as PDFs.

Archive as HTML Archive notes in the HTML format.

Document type internal The document type to use for archiving internal notes.
notes

Notes in list Enables notes to be displayed in the document worklist.

Notes in detail Enables notes to be displayed when viewing documents. A separate


tab appears in the document header.

100
WORK CYCLE 7.2 SAP Configuration Guide

Setting Description

Comment symbol for note The character to use to denote comments in the note's title (which
title
displays the note's metadata, such as Subject, Creator, etc.). For
example, using * will result in:

*** 24 / 24 ********************************************************************

* Note type : Email for workflow start

* Subject : Please approve

* Creator : John SMITH (SAP User: SMITH)

* Date / Time : 16.06.2011 / 15:01:14 (CET)

********************************************************************************

Maintain WORK CYCLE note types


/COCKPIT/WI10

These settings are system based and may not be changed. They are supplied as default WORK CYCLE
settings. However, further note types can be defined for individual extensions, which must exist in the
customer's own SAP area; meaning they begin with Z* or Y*.

Schedule background processing

Schedule reminder emails


/SM36

A shortcut to /SM36 to define a background job for the DUE_DATE_CHECK program.

Schedule archiving of other notes


/SM36

A shortcut to /SM36 to define a background job for the ARCHIV_NOTE_LATE program.

101
WORK CYCLE 7.2 SAP Configuration Guide

Amendments

Activate User Exits


/COCKPIT/WI23

Setting Description

User Exits The ID of the PROCESS DIRECTOR template that the User Exit is
based on. It is necessary for the correct connection of the User Exit to
the processes, to be adjusted.

Function module The name of the User Exit.

No standard Indicates the User Exit replaces the standard functionality in


PROCESS DIRECTOR. It means that all the code called after this User
Exit is not executed.

Shortcut to view and edit the User Exit.

Creating field statuses


1. Go to /COCKPIT/C23.

2. Add a new entry.

3. Enter a name/ID in Field status.

4. Under Field status identification, specify if header fields, line-item fields, and/or account
assignment fields should be made read-only.

Checking No account assignment line with MM invoices hides the account assignment fields
section for the FI items in MM documents.

5. Double-click Characteristic value of status.

6. Specify the individual fields that will be hidden, read-only, mandatory, or normal.

Note: Mandatory fields here prevent the document from being saved if the field has no value.

7. Save the new field status.

102
WORK CYCLE 7.2 SAP Configuration Guide

8. Go to /COCKPIT/WI3.

9. Open the desired workflow step and enter the name of the Field status you created.

Note: The field status is activated for only the selected workflow step, and not for PROCESS
DIRECTOR. Field statuses for PROCESS DIRECTOR are activated in /COCKPIT/C24.

10. Save the change.

Example
Objective: To make all header fields read-only, except for:

Header field Display setting

Business area Normal field (a field whose value can be changed)

Assignment Hidden

Reference document Mandatory

Step 1: Make all header fields read-only.

103
WORK CYCLE 7.2 SAP Configuration Guide

Step 2: Specify the three fields that will not be read-only.

Result:

104
WORK CYCLE 7.2 SAP Configuration Guide

Appendix B – User Exits


Overview
WORK CYCLE comes with over 60 User Exit interfaces that you can use to customize the application to
suit business requirements.
Function module templates for the User Exits can be found in the /COCKPIT/WC_EXIT_SAMPLE function
group.
These function modules can be copied and subsequently modified to guarantee a stable interface.

Interface structure
The interface structures and tables in the local interface of the User Exit function templates start with I, E,
and C.

Prefix Description

E Data is exported only. Changes are possible.

I Data is imported only. Changes are not incorporated.

C Data can be changed. Changes are possible.

105
WORK CYCLE 7.2 SAP Configuration Guide

Developing User Exits


1. Select a User Exit template to use.

The User Exit templates are saved in various /COCKPIT/* function groups.

2. Copy the template to your own function module.

Use /SE37 to copy and create a new function module.

Note: Be sure to copy the function module to your own custom function group.

106
WORK CYCLE 7.2 SAP Configuration Guide

3. Develop your User Exit code.

4. Activate the User Exit in /COCKPIT/WI23.

List of User Exits


Note: This list only includes User Exit interfaces available in the standard transport. Other transports,
such as the Business Solution Package (BSP), contain their own fully-developed User Exits. For details
on these, refer to the BSP documentation.

User Exit Name

900 Before starting/continuing a workflow

901 Change WORK CYCLE message texts

902 Determine all WORK CYCLE workflows for one processor

903 Change WORK CYCLE notes and releases to be archived

904 Change subjects of WORK CYCLE messages

905 Own reminder function in WORK CYCLE

906 After starting/continuing a workflow and before saving

107
WORK CYCLE 7.2 SAP Configuration Guide

User Exit Name

907 Custom behaviour after workflow reminder

908 Own logic for email at workflow start

909 Define further or different substitutions

910 Own logic for determining user type and email

911 Define further or other substitutes

912 Own or additional logic when sending an email

913 When finishing a workflow

914 Adjust call of SAP API for sending emails

915 Adjust/Replace general account assignment block check

916 Adjust/Replace account assignment block check for vendor Ps

917 Data check in the Web Application

918 File upload via the Web Application

919 Calculate workflow validity period (due date)

920 Amend work item creation for SAP Business Workflow

921 Adapt what data the Web Application gets

108
WORK CYCLE 7.2 SAP Configuration Guide

User Exit Name

922 Read the overview data in WORK CYCLE

923 User check during logon to the Web Application

924 Set substitutes for the workflow

925 Set substitutes for SAP users

926 Adapt search help determination for check tables

927 After saving the logon timestamp

928 CPD data get

929 CPD data set

930 Reset WORK CYCLE user password

931 Get user data

932 Get user data

933 Get approved documents

LDAP User Exit Assign LDAP attribute to WORK CYCLE user field
1

Search help Search help for a field in the Web Application


User Exit

109
WORK CYCLE 7.2 SAP Configuration Guide

User Exit Name

Step User Exit 1 Check step conditions

Step User Exit 2 Determine processor of step

Step User Exit 3 After performing an action

Step User Exit 4 After full release

Step User Exit 5 Check step recipient

User Exit 900 – Before starting/continuing a workflow


This User Exit is called before a workflow is started or continued from PROCESS DIRECTOR in the SAP
GUI, and is called twice:

 After a user has started the Send to workflow action and before the Start Workflow in WORK
CYCLE dialog box is displayed.

In this case, the User Exit is used to adjust the list of workflows available in the popup window.

 After a user clicks the Start button to start a workflow.

In this case, the User Exit is used to prevent a workflow from being started.

Template

FUNCTION /COCKPIT/WC_USEX_BEFORE_START.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT 'X'

*" EXPORTING
*" REFERENCE(EC_PROC_WC) LIKE /COCKPIT/THIST-PROCESS

*" TABLES

110
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF

*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF

*" IT_TAX STRUCTURE /COCKPIT/STAX_IF

*" ET_WEBCYCLE STRUCTURE /COCKPIT/SWC_WEBCYCLE

*" ET_MESSAGE STRUCTURE BAPIRET2

*" CHANGING

*" REFERENCE(EC_WEBCYCLE_ID) LIKE /COCKPIT/SWC_WEBCYCLE-WC_ID

*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF

*" STRUCTURE /COCKPIT/SHDR_IF

*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

Example
The following example prevents the TestWorkflow workflow from being started:

FUNCTION Z_BL872_WC_USEX_BEFORE_START.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT 'X'

*" EXPORTING

*" REFERENCE(EC_PROC_WC) LIKE /COCKPIT/THIST-PROCESS

*" TABLES

*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF

*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF


*" IT_TAX STRUCTURE /COCKPIT/STAX_IF

*" ET_WEBCYCLE STRUCTURE /COCKPIT/SWC_WEBCYCLE

*" ET_MESSAGE STRUCTURE BAPIRET2

111
WORK CYCLE 7.2 SAP Configuration Guide

*" CHANGING

*" REFERENCE(EC_WEBCYCLE_ID)

*" LIKE /COCKPIT/SWC_WEBCYCLE-WC_ID


*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF

*" STRUCTURE /COCKPIT/SHDR_IF

*" EXCEPTIONS
*" ERROR_OCCURED

*"----------------------------------------------------------------------

* Dummy entry for user exit cross reference check

IF con_wc_usex_before_start IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

DATA: ls_message TYPE bapiret2.

IF ec_webcycle_id EQ 'TestWorkflow'.

ls_message-message = 'Error !'.

ls_message-type = 'E'.

ls_message-id = 'Error'.

ls_message-number = '002'.

APPEND ls_message TO et_message.

RAISE error_occured.

ELSE.

ls_message-message = 'Some message'.


ls_message-type = 'W'.

ls_message-id = 'Warning'.

ls_message-number = '001'.
APPEND ls_message TO et_message.

ENDIF.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

112
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 901 – Change WORK CYCLE message texts


This User Exit is called at the end of all functions that read a text module (for example, an email text
template) from the WORK CYCLE configuration. The User Exit can change the text in any way, with the
exception of placeholders, which are replaced with real values before this User Exit is called.

Template

FUNCTION /COCKPIT/WC_USEX_TEXT_ADAPT.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE


*" /COCKPIT/SHDR_IF OPTIONAL

*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE

*" /COCKPIT/SWC_WEBCYCLE OPTIONAL


*" REFERENCE(IS_TWC) LIKE /COCKPIT/TWC STRUCTURE /COCKPIT/TWC

*" OPTIONAL

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP OPTIONAL

*" REFERENCE(IS_WC_FLOW) LIKE /COCKPIT/TWCF STRUCTURE

*" /COCKPIT/TWCF OPTIONAL

*" REFERENCE(IC_SENDER) LIKE /COCKPIT/SWC_IF-WC_USER OPTIONAL

*" REFERENCE(IC_SENDER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE

*" OPTIONAL
*" REFERENCE(IC_DOCU_OBJECT) LIKE DOKHL-OBJECT OPTIONAL

*" REFERENCE(IC_FUNCTION) LIKE TFDIR-FUNCNAME OPTIONAL

*" REFERENCE(IC_ACTION) LIKE /COCKPIT/SWC_DUMMY-ACTION_TYPE


*" OPTIONAL

*" EXPORTING

*" REFERENCE(EB_EXIT) LIKE BOOLE-BOOLE

113
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" TABLES

*" ET_NOTE STRUCTURE /COCKPIT/SWC_NOTE

ENDFUNCTION.

User Exit 902 – Determine all WORK CYCLE workflows for one processor
This User Exit is called at the end of the API function that determines the list of documents that are in
WORK CYCLE for a specific user.

Template

FUNCTION /cockpit/wc_usex_docs_for_user.

*"----------------------------------------------------------------------

*"*" Local interface:


*" IMPORTING

*" REFERENCE(IC_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE

*" REFERENCE(IC_USER) LIKE /COCKPIT/SWC_IF-WC_USER

*" REFERENCE(IC_NO_SUBSTITUTION) LIKE BOOLE-BOOLE

*" TABLES

*" CT_WEBCYCLE STRUCTURE /COCKPIT/SWC_IF

*" CT_HEADER STRUCTURE /COCKPIT/SHDR_IF

ENDFUNCTION.

114
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 903 – Change WORK CYCLE notes and releases to be archived
This User Exit is called immediately before the WORK CYCLE workflow log is written to the archive. If the
No standard flag is set, the standard print functionality that creates an archive document from the actual
lines of text, is skipped.

Template

FUNCTION /cockpit/wc_usex_docs_for_user.

*"----------------------------------------------------------------------

*" IMPORTING

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/THDR STRUCTURE

*" /COCKPIT/THDR
*" REFERENCE(IB_UPDATETASK) LIKE BOOLE-BOOLE

*" REFERENCE(IB_CONNECT_FURTHER) LIKE BOOLE-BOOLE

*" REFERENCE(IS_NOTES_CUST) LIKE /COCKPIT/CNOTES STRUCTURE


*" /COCKPIT/CNOTES

*" EXPORTING

*" REFERENCE(EC_ARC_DOC_TYPE) LIKE TOADD-DOC_TYPE

*" REFERENCE(EN_LENGTH) LIKE SAPB-LENGTH

*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" CT_TEXT STRUCTURE /COCKPIT/SWC_NOTE

*" ET_CONTENT STRUCTURE TBL1024

*" ET_MESSAGES STRUCTURE BAPIRET2


*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

115
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 904 – Change subjects of WORK CYCLE messages


This User Exit is called during the process of email generation in order to change the email subject. It is
called before placeholders in the email subject are replaced.

Template

FUNCTION /COCKPIT/WC_USEX_SUBJ_ADAPT.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF OPTIONAL


*" REFERENCE(IC_SENDER) LIKE /COCKPIT/SWC_IF-WC_USER OPTIONAL

*" REFERENCE(IC_SENDER_TYPE) LIKE /COCKPIT/SWC_IF-WC_USERTYPE

*" OPTIONAL
*" REFERENCE(IC_WC_NAME) LIKE /COCKPIT/SWC_WEBCYCLE-WC_NAME

*" OPTIONAL

*" REFERENCE(IC_WC_STEP_NAME) LIKE /COCKPIT/SWC_STEP-WC_STEP_NAME

*" OPTIONAL

*" REFERENCE(IC_RECEIVER) LIKE /COCKPIT/SWC_IF-WC_USER OPTIONAL

*" REFERENCE(IC_RECEIVER_TYPE) LIKE /COCKPIT/SWC_IF-WC_USERTYPE

*" OPTIONAL

*" REFERENCE(IS_WC_FLOW) LIKE /COCKPIT/TWCF STRUCTURE

*" /COCKPIT/TWCF OPTIONAL


*" REFERENCE(IN_DUE_DAYS) LIKE /COCKPIT/SWC_STEP-WC_DUE_DAYS

*" OPTIONAL

*" EXPORTING
*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" CHANGING

*" REFERENCE(EC_EMAIL_SUBJ) LIKE /COCKPIT/CWC_STT-WC_EMAIL_SUBJ


ENDFUNCTION.

116
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 905 – Own reminder function in WORK CYCLE


This User Exit makes it possible to implement a specific due date check on a workflow step. If the No
standard flag is set, the standard send email functionality is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_REMINDER.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/TWCS STRUCTURE

*" /COCKPIT/TWCS
*" REFERENCE(IS_HEADER) LIKE /COCKPIT/THDR STRUCTURE

*" /COCKPIT/THDR

*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE


*" /COCKPIT/SWC_WEBCYCLE

*" REFERENCE(IS_WC_STEP_CUST) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP

*" REFERENCE(IS_WC_DATE_SEL) LIKE /COCKPIT/SWC_DATE_SELECTION

*" STRUCTURE /COCKPIT/SWC_DATE_SELECTION OPTIONAL

*" REFERENCE(IB_COLL_MAIL_SEL) LIKE BOOLE-BOOLE OPTIONAL

*" REFERENCE(IC_REC_USER_SEL) LIKE /COCKPIT/TWC_CML-WC_REC_USR

*" OPTIONAL

*" REFERENCE(IC_REC_USERTYPE_SEL) LIKE


*" /COCKPIT/TWC_CML-WC_REC_USR_TYPE OPTIONAL

*" REFERENCE(IC_SUBMIT) LIKE BOOLE-BOOLE DEFAULT SPACE

*" EXPORTING
*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" ET_MESSAGES STRUCTURE BAPIRET2


ENDFUNCTION.

117
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 906 – After starting/continuing a workflow and before saving


This User Exit is called after a workflow step has been started, but before the workflow information
changed by the start procedure has been written to the database. If the No standard flag is set, the
standard database update is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_AFTER_START.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT CON_TRUE


*" TABLES

*" ET_WC_FLOW STRUCTURE /COCKPIT/TWCF OPTIONAL

*" ET_WC_FLOW_NOTE STRUCTURE /COCKPIT/TWCFN OPTIONAL


*" IT_WC_STEP_DEF STRUCTURE /COCKPIT/SWC_STEP OPTIONAL

*" ET_MESSAGE STRUCTURE BAPIRET2 OPTIONAL

*" CHANGING

*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF OPTIONAL

*" REFERENCE(ES_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE

*" /COCKPIT/TWC OPTIONAL

*" EXCEPTIONS

*" ERROR_OCCURED
ENDFUNCTION.

118
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 907 – Custom behaviour after workflow reminder


This User Exit allows the implementation of customer-specific logic for a workflow reminder email. It is
possible to define rules to control the message dispatch.

Template

FUNCTION /COCKPIT/WC_USEX_AFTER_REMIND.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IC_SUBMIT) LIKE BOOLE-BOOLE DEFAULT SPACE

*" TABLES
*" ET_MESSAGES STRUCTURE BAPIRET2 OPTIONAL

ENDFUNCTION.

User Exit 908 – Own logic for email at workflow start


This User Exit is called before a workflow email is sent out when a workflow step is started. If the No
standard flag is set, the standard send email function is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_START_MAIL.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT CON_TRUE

*" EXPORTING
*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF OPTIONAL


*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF OPTIONAL

119
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" IT_TAX STRUCTURE /COCKPIT/STAX_IF OPTIONAL

*" ET_NOTE STRUCTURE /COCKPIT/SWC_NOTE OPTIONAL

*" ET_MESSAGE STRUCTURE BAPIRET2 OPTIONAL

*" CHANGING

*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF OPTIONAL

*" REFERENCE(ES_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE

*" /COCKPIT/TWC OPTIONAL

*" REFERENCE(ES_WC_FLOW) LIKE /COCKPIT/TWCF STRUCTURE

*" /COCKPIT/TWCF OPTIONAL

*" REFERENCE(ES_WC_STEP_DEF) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP OPTIONAL

*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

User Exit 909 – Define further or different substitutions


This User Exit is called at the beginning of the function that determines the substitution definitions of a
workflow processor. If the No standard flag is set, the standard substitution determination procedure is
skipped.

Template

FUNCTION /COCKPIT/WC_USEX_SUBST_GET.

*"----------------------------------------------------------------------
*"*"Local interface:

*" IMPORTING

*" REFERENCE(I_USER) LIKE /COCKPIT/TWCS-WC_USER


*" REFERENCE(I_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE

120
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" REFERENCE(I_DATE) LIKE SY-DATUM OPTIONAL

*" REFERENCE(IB_INACTIVE) LIKE BOOLE-BOOLE OPTIONAL

*" EXPORTING

*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" REFERENCE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

*" TABLES

*" ET_SUBSTITUTION STRUCTURE /COCKPIT/S_SUBSTITUTION

*" EXCEPTIONS

*" NOT_FOUND

ENDFUNCTION.

User Exit 910 – Own logic for determining user type and email
This User Exit is called at the beginning of the function that determines the user type from a user ID or the
user type and the user ID from an email address. If the No standard flag is set, the standard procedure
for user (type) determination is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_USRTYPE_GET.

*"----------------------------------------------------------------------
*"*"Local interface:

*" IMPORTING

*" REFERENCE(I_USER_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL


*" REFERENCE(I_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE OPTIONAL

*" EXPORTING

*" REFERENCE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2


*" REFERENCE(EC_USER_TYPE) LIKE /COCKPIT/SIF-US_TYPE

*" REFERENCE(EC_WC_USER) LIKE /COCKPIT/TWC_UMP-WC_USER

*" REFERENCE(EC_SAP_USER) LIKE USR02-BNAME

121
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" REFERENCE(EC_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL

*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" EXCEPTIONS

*" USER_DOESNT_EXIST

*" NO_EMAIL_ADDRESS

ENDFUNCTION.

User Exit 911 – Define further or other substitutes


This User Exit is called at the beginning of the function that determines the substitutes of a workflow
processor. If the No standard flag is set, the standard procedure for substitute determination is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_SUBTE_GET.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING
*" REFERENCE(I_USER) LIKE /COCKPIT/TWCS-WC_USER

*" REFERENCE(I_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE

*" REFERENCE(I_DATE) LIKE SY-DATUM OPTIONAL


*" REFERENCE(IC_READ_ACTIVE) LIKE /COCKPIT/S_SUBSTITUTION-ACTIVE

*" DEFAULT CON_WC_SUBST_ACTIVE

*" EXPORTING
*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" REFERENCE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

*" TABLES
*" ET_SUBSTITUTION STRUCTURE /COCKPIT/S_SUBSTITUTION

*" EXCEPTIONS

*" NOT_FOUND

122
WORK CYCLE 7.2 SAP Configuration Guide

Template

ENDFUNCTION.

User Exit 912 – Own or additional logic when sending an email


This User Exit is called at the beginning of the function that sends emails during workflow processing. If
the No standard flag is set, the standard procedure for sending emails is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_SEND_MAIL.

*"----------------------------------------------------------------------
*"*"Local interface:

*" IMPORTING

*" REFERENCE(IC_ATT_FILE_NAME) LIKE SOPCKLSTI1-OBJ_NAME OPTIONAL


*" REFERENCE(IC_ATT_FILE_EXT) LIKE SOPCKLSTI1-DOC_TYPE OPTIONAL

*" REFERENCE(IB_IGNORE_COLL_EMAIL) LIKE BOOLE-BOOLE OPTIONAL

*" REFERENCE(IN_WC_CH_TIMESTAMP) LIKE

*" /COCKPIT/TWCS-WC_CH_TIMESTAMP OPTIONAL

*" EXPORTING

*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" CT_NOTE STRUCTURE /COCKPIT/SWC_NOTE OPTIONAL

*" CT_MAILTEXT STRUCTURE SOLISTI1 OPTIONAL


*" CT_MESSAGES STRUCTURE BAPIRET2

*" CT_HTML_NOTE STRUCTURE /COCKPIT/SWC_NOTE OPTIONAL

*" CT_MORE_REC STRUCTURE /COCKPIT/SMAIL_MORE_REC OPTIONAL


*" CT_ATTACHMENTS STRUCTURE /COCKPIT/SWC_ARC_DOCS OPTIONAL

*" CHANGING

*" REFERENCE(CC_SENDER) LIKE SOXDA-ADDRESS

123
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" REFERENCE(CC_SENDER_TYPE) LIKE SOEXTRECI1-ADR_TYP

*" REFERENCE(CC_RECEIVER) LIKE BAPIADDR1-E_MAIL

*" REFERENCE(CC_RECEIVER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE

*" REFERENCE(CC_WC_REC_USR) LIKE /COCKPIT/TWC_CML-WC_REC_USR

*" REFERENCE(CC_WC_REC_USR_TYPE) LIKE

*" /COCKPIT/TWC_CML-WC_REC_USR_TYPE

*" REFERENCE(CC_MAILOBJECT) LIKE MCMAILOBJ-OBJNAM

*" REFERENCE(CC_MAILDESCRIPTION) LIKE MCMAILOBJ-OBJDES

*" REFERENCE(CC_ATTACHMENT_GUID) LIKE /COCKPIT/THDR-INVOICE_GUID

*" REFERENCE(CC_WC_STEP_ID) LIKE /COCKPIT/CWC_STP-WC_STEP_ID

*" REFERENCE(CC_TEXT_TYPE) LIKE /COCKPIT/CTXTYP-TEXT_TYPE

*" REFERENCE(CC_USER) LIKE /COCKPIT/TTXTHDR-CR_USER

*" REFERENCE(CC_USERTYPE) LIKE /COCKPIT/TTXTHDR-CR_USERTYPE

*" REFERENCE(CB_ATTACHMENT) LIKE BOOLE-BOOLE

*" REFERENCE(CB_CREATE_NOTE) LIKE BOOLE-BOOLE

*" REFERENCE(CB_SUBSTITUTE) LIKE BOOLE-BOOLE

*"----------------------------------------------------------------------

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch

*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality


* Dummy entry for user exit cross reference check

IF con_wc_usex_send_mail IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

124
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 913 – When finishing a workflow


This User Exit is called after a workflow is completed; that is, when the document is released (or rejected)
and is no longer in the In workflow status.

Template

FUNCTION /COCKPIT/WC_USEX_FINISHED.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IS_WC_DATA) LIKE /COCKPIT/SWC_IF STRUCTURE

*" /COCKPIT/SWC_IF
*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE

*" /COCKPIT/SWC_WEBCYCLE

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE


*" /COCKPIT/SWC_STEP

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE OPTIONAL

*" TABLES

*" ET_MESSAGE STRUCTURE BAPIRET2

*" CHANGING

*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" REFERENCE(ES_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE

*" /COCKPIT/TWC
*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

125
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 914 – Adjust call of SAP API for sending emails
With this User Exit, it is possible to adjust almost every parameter of an email (for example, the subject
and sender).

Template

FUNCTION /COCKPIT/WC_USEX_API_MAIL.

*"----------------------------------------------------------------------

*"*" Local interface:

*" TABLES

*" CT_PACKING_LIST STRUCTURE SOPCKLSTI1 OPTIONAL

*" CT_OBJECT_HEADER STRUCTURE SOLISTI1 OPTIONAL


*" CT_CONTENTS_BIN STRUCTURE SOLIX OPTIONAL

*" CT_CONTENTS_TXT STRUCTURE SOLISTI1 OPTIONAL

*" CT_RECEIVERS STRUCTURE SOMLRECI1 OPTIONAL


*" CT_MESSAGES STRUCTURE BAPIRET2

*" CHANGING

*" REFERENCE(CS_DOCUMENT_DATA) LIKE SODOCCHGI1 STRUCTURE

*" SODOCCHGI1

*" REFERENCE(CC_PUT_IN_OUTBOX) LIKE SONV-FLAG DEFAULT SPACE

*" REFERENCE(CC_SENDER_ADDRESS) LIKE SOEXTRECI1-RECEIVER OPTIONAL

*" REFERENCE(CC_SENDER_ADDRESS_TYPE) LIKE SOEXTRECI1-ADR_TYP

*" DEFAULT 'B'

ENDFUNCTION.
*"----------------------------------------------------------------------

* !! IMPORTANT !!

* For TABLES parameter CT_CONTENTS_BIN you can use


* - on systems lower than 4.7 - STRUCTURE SOLISTI1 or STRUCTURE SOLIX

* - on systems 4.7 and higher - STRUCTURE SOLIX

126
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 915 – Adjust/Replace General Account Assignment Block check


This User Exit provides an interface to disable or adjust the General Account Assignment Block check
(COBL check). The main purpose of this User Exit is to disable the COBL check under certain
circumstances. For example, in the case when posted and unposted documents are sent into the same
workflow, but only unposted documents must be checked according to COBL rules. In addition, this User
Exit can be used to adjust COBL checks and create messages.

Template

FUNCTION /COCKPIT/WC_USEX_CHECK_COBL.

*"----------------------------------------------------------------------

*"*" Local interface:


*" IMPORTING

*" REFERENCE(IS_ACCOUNT) LIKE /COCKPIT/SACCT_IF STRUCTURE

*" /COCKPIT/SACCT_IF
*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" EXPORTING

*" REFERENCE(EC_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" CT_MESSAGES STRUCTURE BAPIRET2

*" CT_COBL_MSEG STRUCTURE MESG

*" CHANGING

*" REFERENCE(CS_COBL) LIKE COBL STRUCTURE COBL


ENDFUNCTION.

127
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 916 – Adjust/Replace account assignment block check for vendor
Ps
This User Exit provides an interface to disable or adjust the Accounts Payable Coding Block check
(COBL_INT check). The main purpose of this User Exit is to disable this check under certain
circumstances, or to modify the data before the check is performed. If the No standard flag is set, the
standard check is replaced. If the flag is not set, the User Exit is executed in addition to (and before) the
standard check.

Template

FUNCTION /COCKPIT/WC_USEX_CHECK_APCOBL.
*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IS_ACCOUNT) LIKE /COCKPIT/SACCT_IF STRUCTURE

*" /COCKPIT/SACCT_IF

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" EXPORTING

*" REFERENCE(EC_NO_STANDARD) LIKE BOOLE-BOOLE


*" TABLES

*" CT_COBL_AP STRUCTURE ACIDLPAYCK

*" CT_MESSAGES STRUCTURE BAPIRET2


*" CT_COBL_MSEG STRUCTURE MESG

ENDFUNCTION.

*"----------------------------------------------------------------------

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

* This example implementation removes the message 'Transaction CO

* Through-postings from FI has been locked' ('Der Vorgang

* CO-Durchbuchung aus FiBu wurde gesperrt') from ct_cobl_mseg

DATA:

128
WORK CYCLE 7.2 SAP Configuration Guide

Template

ls_txt LIKE tj01t-txt,

ls_index LIKE sy-tabix.

IF 1 EQ 2. MESSAGE e806(ki) WITH space space space space. ENDIF.

READ TABLE ct_cobl_mseg

WITH KEY msgty = 'E' arbgb = 'KI' txtnr = '806'

TRANSPORTING msgv1.

CHECK sy-subrc EQ 0.

ls_index = sy-tabix.

* Look for correct translation of 'CO-Durchbuchung aus FiBu'

SELECT SINGLE txt FROM tj01t INTO ls_txt WHERE vrgng = 'COIN' AND

spras = sy-langu.

CHECK sy-subrc EQ 0.

CHECK ct_cobl_mseg-msgv1 EQ ls_txt.

DELETE ct_cobl_mseg INDEX ls_index.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

User Exit 917 – Data check in the Web Application


This User Exit provides an interface to disable, modify or replace the standard data checks that are
performed when a user saves a document in the Web Application. If the No standard flag is set, the User
Exit replaces the standard checks. If the flag is not set, it is executed in addition to, and after, the
standard checks.

Template

FUNCTION /cockpit/wc_usex_data_check.
*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING
*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_IF STRUCTURE

129
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" /COCKPIT/SWC_IF

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" TABLES

*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF

*" IT_TAX STRUCTURE /COCKPIT/STAX_IF

*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF

*" IT_ACCOUNT_ASSIGN STRUCTURE /COCKPIT/TACCAS

*" ET_MESSAGES STRUCTURE BAPIRET2

ENDFUNCTION.

*"----------------------------------------------------------------------

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

* Fill ET_MESSAGES with messages of type 'E' to indicate any errors to

* the WebApp.

LOOP AT it_item WHERE quantity EQ space.

CALL FUNCTION '/COCKPIT/OBJ_MESSAGE_APPEND'

EXPORTING

i_type = 'E'
i_id = '/COCKPIT/CHK'

i_number = '005'

i_message_v1 = it_item-invoice_item
TABLES

c_tab_messages = et_messages.

IF 1 EQ 2. MESSAGE e005(/cockpit/chk) WITH space. ENDIF.

ENDLOOP.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

130
WORK CYCLE 7.2 SAP Configuration Guide

Template

CHECK ct_cobl_mseg-msgv1 EQ ls_txt.

DELETE ct_cobl_mseg INDEX ls_index.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

User Exit 918 – File upload via the Web Application


This User Exit is called when a user uploads an attachment from the detail view of a document in the
Web Application. In the User Exit, it is possible to perform some action on the attachment data; for
example, evaluate the attachment data to update the document. If the No standard flag is set, the upload
is canceled. If it is not set, the uploaded attachment is archived and connected to the current document.

Template

FUNCTION /COCKPIT/WC_USEX_FILE_UPLOAD .
*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IC_AR_OBJECT) LIKE /COCKPIT/SWC_UPLOADS-AR_OBJECT

*" REFERENCE(IC_GUID) LIKE /COCKPIT/SIF-INVOICE_GUID

*" REFERENCE(IC_DOCNO) LIKE /COCKPIT/SIF-DOCNO

*" REFERENCE(IN_CONTENT_LENGTH) LIKE SAPB-LENGTH

*" REFERENCE(IB_INVOICE_IMAGE) LIKE BOOLE-BOOLE OPTIONAL

*" EXPORTING
*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" REFERENCE(EB_COMMIT_WORK) LIKE BOOLE-BOOLE

*" TABLES
*" IT_CONTENT STRUCTURE TBL1024

*" IT_TEXT STRUCTURE DOCS OPTIONAL

*" ET_MESSAGES STRUCTURE BAPIRET2 OPTIONAL


*" EXCEPTIONS

131
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" ERROR_OCCURED

ENDFUNCTION.

User Exit 919 – Calculate workflow validity period (due date)


This User Exit provides an interface to calculate the validity period (due date) of a workflow step. The
purpose of the validity date is to check it against the configuration of the workflow, in order to declare a
workflow step overdue or not. The User Exit is called before the standard calculations are done, so it can
either modify the values used for calculation or it can do the calculation completely. In the latter case, you
must check the No standard flag to skip the standard processing.

Template

FUNCTION /cockpit/wc_usex_get_due_date.
*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE

*" /COCKPIT/SWC_WEBCYCLE

*" REFERENCE(IS_WEBCYCLE_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP

*" REFERENCE(IS_FLOW) LIKE /COCKPIT/TWCF STRUCTURE /COCKPIT/TWCF

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE


*" /COCKPIT/SHDR_IF

*" VALUE(IB_CONTINUE) LIKE BOOLE-BOOLE

*" EXPORTING
*" VALUE(ED_DUE_DATE) LIKE /COCKPIT/TWCS-WC_DUEDATE

*" VALUE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" VALUE(ED_STEP_DUE_DATE) LIKE /COCKPIT/TWCS-WC_DUEDATE

132
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" TABLES

*" ET_MESSAGES STRUCTURE BAPIRET2

*" CHANGING

*" VALUE(CD_DATE) LIKE SY-DATLO DEFAULT SY-DATLO

*" VALUE(CN_DUE_DAYS) LIKE /COCKPIT/CWC_ID-WC_DUE_DAYS

*" VALUE(CN_STEP_DUE_DAYS) LIKE /COCKPIT/CWC_STP-WC_DUE_DAYS

*" VALUE(CD_PROPOSAL) LIKE /COCKPIT/TWCS-WC_DUEDATE

*" VALUE(CD_STEP_PROPOSAL) LIKE /COCKPIT/TWCS-WC_DUEDATE

*" EXCEPTIONS

*" DUE_DATE_UNREACHABLE

ENDFUNCTION.

User Exit 920 – Amend work item creation for SAP Business Workflow
When a workflow is started, a work item for the SAP Business Workplace is created. This User Exit
provides the possibility to modify the data that is used to create this work item. If the No standard flag is
set, the standard function to create the work item is not called.

Template

FUNCTION /COCKPIT/WC_USEX_WORKITEM.

*"----------------------------------------------------------------------

*"*" Local interface:


*" IMPORTING

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT CON_TRUE

*" EXPORTING
*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF OPTIONAL

133
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF OPTIONAL

*" IT_TAX STRUCTURE /COCKPIT/STAX_IF OPTIONAL

*" ET_NOTE STRUCTURE /COCKPIT/SWC_NOTE OPTIONAL

*" ET_MESSAGE STRUCTURE BAPIRET2 OPTIONAL

*" CHANGING

*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF OPTIONAL

*" REFERENCE(ES_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE

*" /COCKPIT/TWC OPTIONAL

*" REFERENCE(ES_WC_FLOW) LIKE /COCKPIT/TWCF STRUCTURE

*" /COCKPIT/TWCF OPTIONAL

*" REFERENCE(ES_WC_STEP_DEF) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP OPTIONAL

*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

User Exit 921 – Adapt what data the Web Application gets
This User Exit is called after the complete document data is read upon a “data get” call from the Web
Application. All the document data is available and can be modified in any way. The User Exit call is the
last statement in the “data get” RFC. Therefore, ensure that the messages table is properly filled. Also, do
not raise an exception.

Template

FUNCTION /cockpit/wc_usex_rfc_data_get.

*"----------------------------------------------------------------------

*"*"Local interface:
*" IMPORTING

134
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" REFERENCE(IC_GUID) LIKE /COCKPIT/SIF-INVOICE_GUID OPTIONAL

*" REFERENCE(IC_WC_ID) LIKE /COCKPIT/SWC_IF-WC_ID OPTIONAL

*" REFERENCE(IC_WC_STEP_ID) LIKE /COCKPIT/SWC_IF-WC_STEP_ID

*" OPTIONAL

*" REFERENCE(IN_WC_SUBPOS) LIKE /COCKPIT/SWC_IF-WC_SUBPOS DEFAULT

*" 999

*" REFERENCE(IC_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE OPTIONAL

*" REFERENCE(IC_USER) LIKE /COCKPIT/SWC_IF-WC_USER OPTIONAL

*" REFERENCE(IC_GET_CONTENT) LIKE COMMS-COMMIT_SW DEFAULT

*" CON_FALSE

*" REFERENCE(IC_ENQUEUE) LIKE COMMS-COMMIT_SW DEFAULT CON_FALSE

*" REFERENCE(IB_ALL_NOTES) LIKE BOOLE-BOOLE DEFAULT CON_FALSE

*" REFERENCE(IB_HISTORY) LIKE BOOLE-BOOLE DEFAULT CON_FALSE

*" REFERENCE(IC_LANGUAGE) LIKE SY-LANGU DEFAULT SY-LANGU

*" REFERENCE(IB_CONVERT) LIKE BOOLE-BOOLE DEFAULT CON_FALSE

*" REFERENCE(IC_WC_APPL) LIKE /COCKPIT/CWC_ID-WC_APPL DEFAULT

*" SPACE

*" TABLES
*" ET_ITEM STRUCTURE /COCKPIT/SITEM_IF OPTIONAL

*" ET_TAX STRUCTURE /COCKPIT/STAX_IF OPTIONAL

*" ET_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF OPTIONAL


*" ET_NOTICE STRUCTURE /COCKPIT/SWEBCYCLE_NOTE OPTIONAL

*" ET_CONTENT STRUCTURE TBL1024 OPTIONAL

*" ET_MESSAGES STRUCTURE BAPIRET2 OPTIONAL

*" ET_EMAIL STRUCTURE /COCKPIT/SWC_NOTE OPTIONAL

*" ET_FORMS STRUCTURE /COCKPIT/CWC_STF OPTIONAL

*" ET_ARC_DOCS STRUCTURE /COCKPIT/SWC_ARC_DOCS OPTIONAL

135
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" ET_ACCAS STRUCTURE /COCKPIT/TACCAS OPTIONAL

*" ET_NOTE_HDA STRUCTURE /COCKPIT/SWC_NOTE_HDA OPTIONAL

*" ET_NOTE_BOD STRUCTURE /COCKPIT/SWC_NOTE_BOD OPTIONAL

*" ET_ACCAS_PO STRUCTURE /COCKPIT/TACCAS OPTIONAL

*" ET_COPADATA STRUCTURE /COCKPIT/SWC_COPA_VALUES OPTIONAL

*" ET_WB_PMTRMS STRUCTURE /COCKPIT/CWB_PT OPTIONAL

*" CHANGING

*" REFERENCE(CS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF OPTIONAL

*" REFERENCE(CS_WEBCYCLE) LIKE /COCKPIT/SWC_IF STRUCTURE

*" /COCKPIT/SWC_IF OPTIONAL

*" REFERENCE(CI_CONTENT_LENGTH) LIKE SY-TABIX OPTIONAL

*" REFERENCE(CB_USER_ASSIGN) LIKE BOOLE-BOOLE OPTIONAL

*" REFERENCE(CC_URL) LIKE SAPB-URI OPTIONAL

*" REFERENCE(CC_MIME) LIKE /COCKPIT/TMIME-MIME_TYPE OPTIONAL

*" REFERENCE(CB_WB_CHANGE) LIKE BOOLE-BOOLE OPTIONAL

*" REFERENCE(CB_USE_COPA) LIKE BOOLE-BOOLE OPTIONAL

*" REFERENCE(CB_XCPDK) LIKE BOOLE-BOOLE OPTIONAL

ENDFUNCTION.

136
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 922 – Read the overview data in WORK CYCLE


After the user has logged on to the Web Application, an RFC is called to get the list of documents
available for the current user. If document GUIDs are passed here, only the documents that exactly
match the GUID are displayed in the list. This User Exit is called at the beginning of the RFC. If the No
standard flag is set, the User Exit replaces this standard call. If the flag is not set, the User Exit can be
used to modify some changeable parameters.

Template

FUNCTION /cockpit/wc_usex_get_multi.

*"----------------------------------------------------------------------

*"*" Local interface:


*" TABLES

*" ET_HEADER STRUCTURE /COCKPIT/SHDR_IF

*" ET_WEBCYCLE STRUCTURE /COCKPIT/SWC_IF


*" ET_MESSAGES STRUCTURE BAPIRET2

*" CHANGING

*" REFERENCE(CC_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE OPTIONAL

*" REFERENCE(CC_USER) LIKE /COCKPIT/SWC_IF-WC_USER OPTIONAL

*" REFERENCE(CC_GUID) LIKE /COCKPIT/SIF-INVOICE_GUID OPTIONAL

*" REFERENCE(CC_LANGUAGE) LIKE SY-LANGU OPTIONAL

*" REFERENCE(CB_CONVERT) LIKE BOOLE-BOOLE DEFAULT CON_FALSE

*" REFERENCE(CB_SUBSTITUTE) LIKE BOOLE-BOOLE DEFAULT CON_FALSE

*" REFERENCE(CB_NO_STANDARD) LIKE BOOLE-BOOLE OPTIONAL


*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

137
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 923 – User check during logon to the Web Application
This User Exit provides the possibility to authenticate a user when logging on to the Web Application by
using the user ID and password. The user ID is passed as IC_USER_EMAIL and the password as
IC_PASSWORD. If the No standard flag is set, the User Exit replaces the standard authentication. If so, the
User Exit must not only verify the existence of the user and the correctness of the password, but must
also determine the user ID, the user type and the user language.

The User Exit is also called when a user changes the password in the Web Application. In such cases,
the user ID and type are already known, so they are passed, instead of IC_USER_EMAIL.
IC_NEWPASSWORD is filled with the new password specified by the user.

Template

FUNCTION /COCKPIT/WC_USEX_RFC_USER_CHK.

*"----------------------------------------------------------------------

*"*" Local interface:


*" IMPORTING

*" VALUE(IC_USER_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL

*" VALUE(IC_USER) LIKE /COCKPIT/TWCS-WC_USER OPTIONAL

*" VALUE(IC_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE OPTIONAL

*" VALUE(IC_PASSWORD) LIKE /COCKPIT/SWC_DUMMY-PWD

*" VALUE(IC_NEWPASSWORD) LIKE /COCKPIT/SWC_DUMMY-PWD OPTIONAL

*" EXPORTING

*" VALUE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" VALUE(EC_USER) LIKE /COCKPIT/TWCS-WC_USER


*" VALUE(EC_USER_TYPE) LIKE /COCKPIT/SIF-US_TYPE

*" VALUE(EC_USER_LANGUAGE) LIKE T002-LAISO

*" VALUE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

*" VALUE(ED_LDATE) LIKE BAPIUSW01-LDATE


*" VALUE(ED_LTIME) LIKE BAPIUSW01-LTIME

ENDFUNCTION.

*"----------------------------------------------------------------------

138
WORK CYCLE 7.2 SAP Configuration Guide

Template

* IC_NEWPASSWORD is the flag to check whether the user exit is called

* from /COCKPIT/WC_RFC_USER_CHECK or /COCKPIT/WC_USER_PW_CHANGE

User Exit 924 – Set substitutes for the workflow


This User Exit is called when a user creates/changes/deletes a substitution setting using the Web
Application. A substitution setting consists of User ID, User Type, From data, To data and a flag to
indicate whether the substitution type is passive or active. If the No standard flag is set, the standard
processing for setting substitutes is skipped.

Template

FUNCTION /COCKPIT/WC_USEX_WEB_SUB_SET.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(I_USER) LIKE /COCKPIT/TWCS-WC_USER

*" REFERENCE(I_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE


*" REFERENCE(I_SUBS_USER_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL

*" REFERENCE(I_SUBS_USER) LIKE /COCKPIT/TWCS-WC_USER OPTIONAL

*" REFERENCE(I_SUBS_USER_TYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE


*" OPTIONAL

*" REFERENCE(I_VALID_FROM) LIKE /COCKPIT/TWC_UMS-VALID_TO

*" REFERENCE(I_VALID_TO) LIKE /COCKPIT/TWC_UMS-VALID_TO


*" REFERENCE(I_ACTIVE) LIKE /COCKPIT/TWC_UMS-ACTIVE

*" REFERENCE(I_DELETE) LIKE BOOLE-BOOLE DEFAULT SPACE

*" REFERENCE(IB_CURRENT_ONLY) LIKE BOOLE-BOOLE DEFAULT CON_TRUE


*" REFERENCE(LB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" ET_MESSAGES STRUCTURE BAPIRET2 OPTIONAL


*" EXCEPTIONS

139
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" OTHERS

ENDFUNCTION.

User Exit 925 – Set substitutes for SAP users


This User Exit is called when an SAP user creates/changes/deletes a substitution setting using WORK
CYCLE in the SAP GUI. If the No standard flag is set, the standard procedure for setting substitutes is
skipped.

Template

FUNCTION /COCKPIT/WC_USEX_SAP_SUB_SET.

*"----------------------------------------------------------------------

*"*" Local interface:


ENDFUNCTION.

User Exit 926 – Adapt search help determination for check tables
This User Exit is called when a “check table”-based value search is called from the Web Application. The
User Exit can override settings from the search help configuration in order to influence the search
behavior.

Template

FUNCTION /COCKPIT/WC_USEX_SHLP_BYTABLE.

*"----------------------------------------------------------------------

*"*" Local interface:


*" IMPORTING

*" REFERENCE(IC_STRUCTURE) LIKE /COCKPIT/SFIELDS-STRUCTURE

*" REFERENCE(IC_FIELD_NAME) LIKE /COCKPIT/SFIELDS-FIELD_SAP


*" REFERENCE(IC_INVOICE_GUID) LIKE /COCKPIT/THDR-INVOICE_GUID

140
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" OPTIONAL

*" REFERENCE(IC_COMP_CODE) LIKE /COCKPIT/SHDR_IF-COMP_CODE

*" OPTIONAL

*" EXPORTING

*" REFERENCE(EC_TABNAME) LIKE DFIES-TABNAME

*" REFERENCE(ES_SHLP_TAB) LIKE /COCKPIT/CWCSHSH STRUCTURE

*" /COCKPIT/CWCSHSH

ENDFUNCTION.

User Exit 927 – After saving the logon timestamp


This User Exit is called after the logon date/time for a Web Application user has been saved.

Template

FUNCTION /COCKPIT/WC_USEX_LOGON_SET.

*"----------------------------------------------------------------------

*"*" Local interface:


*" IMPORTING

*" REFERENCE(IC_USER) LIKE /COCKPIT/TWCS-WC_USER

*" REFERENCE(IC_USER_TYPE) LIKE /COCKPIT/SIF-US_TYPE


*" REFERENCE(ID_LDATE) LIKE BAPIUSW01-LDATE

*" REFERENCE(ID_LTIME) LIKE BAPIUSW01-LTIME

*" CHANGING
*" REFERENCE(CS_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

*" OPTIONAL

*" REFERENCE(CD_LDATE) LIKE BAPIUSW01-LDATE OPTIONAL


*" REFERENCE(CD_LTIME) LIKE BAPIUSW01-LTIME OPTIONAL

*"----------------------------------------------------------------------

ENDFUNCTION.

141
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 928 – CPD data get


This User Exit is executed at the end of the RFC that is called by the Web Application to get the data of a
CPD (one-time) vendor. You can use it to modify all relevant vendor data.

Template

FUNCTION /cockpit/wc_usex_cpd_get.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/THDR STRUCTURE

*" /COCKPIT/THDR
*" TABLES

*" ET_VENDOR_FIELDS STRUCTURE /COCKPIT/CWC_CPD

*" ET_MESSAGES STRUCTURE BAPIRET2


*" CHANGING

*" REFERENCE(CS_CPD_DATA) LIKE /COCKPIT/TCPDK STRUCTURE

*" /COCKPIT/TCPDK

ENDFUNCTION.

User Exit 929 – CPD data set


This User Exit is executed at the beginning of the RFC that is called by the Web Application when a CPD
(one-time) vendor data is saved. The User Exit can be used to modify and save the vendor data.

Template

FUNCTION /COCKPIT/WC_USEX_CPD_SET.
*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING
*" REFERENCE(IS_HEADER) LIKE /COCKPIT/THDR STRUCTURE

142
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" /COCKPIT/THDR

*" REFERENCE(IS_CPD_DATA) LIKE /COCKPIT/TCPDK STRUCTURE

*" /COCKPIT/TCPDK

*" EXPORTING

*" REFERENCE(EB_NO_STANDARD) LIKE BOOLE-BOOLE

*" TABLES

*" ET_MESSAGES STRUCTURE BAPIRET2

ENDFUNCTION.

User Exit 930 – Reset WEB CYCLE user password


This User Exit is executed at the beginning of the RFC that is called by the Web Application when a user
resets his/her password. For this User Exit, you must set the No standard flag because the values
returned by the User Exit are not used in standard processing.

Template

FUNCTION /COCKPIT/WC_USEX_USER_PW_RESET.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IC_USER) LIKE /COCKPIT/TWB_UMA-WB_USER

*" EXPORTING
*" REFERENCE(EC_PASSWORD) LIKE BAPIUID-PASSWORD

*" REFERENCE(ES_USER) LIKE /COCKPIT/TWB_UMP STRUCTURE

*" /COCKPIT/TWB_UMP
*" REFERENCE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

*" CHANGING

*" REFERENCE(CB_NO_STANDARD) LIKE BOOLE-BOOLE OPTIONAL


ENDFUNCTION.

143
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 931 – Get user data


Template

FUNCTION /COCKPIT/WC_USEX_USER_GET.

*"----------------------------------------------------------------------

*"*"Lokale Schnittstelle:

*" IMPORTING

*" VALUE(I_USER) LIKE /COCKPIT/TWCS-WC_USER OPTIONAL

*" VALUE(I_PLATFORM_USER) LIKE /COCKPIT/TWC_UMP-EMAIL OPTIONAL

*" VALUE(I_USER_TYPE) LIKE /COCKPIT/SIF-US_TYPE

*" VALUE(IS_USER_DATA) LIKE /COCKPIT/TWC_UMP STRUCTURE

*" /COCKPIT/TWC_UMP OPTIONAL

*" VALUE(IC_USER_FIELD) LIKE /COCKPIT/SCHK5-XCHECK1 OPTIONAL

*" VALUE(IB_CHECK_FOR_LOCK) LIKE BOOLE-BOOLE DEFAULT CON_FALSE

*" EXPORTING

*" VALUE(EC_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL

*" VALUE(EC_NAME) LIKE /COCKPIT/TWC_UMP-NAME


*" VALUE(EC_PHONE) LIKE /COCKPIT/TWC_UMP-PHONE

*" VALUE(EC_LANGUAGE) LIKE T002-LAISO

*" VALUE(EC_USER) LIKE /COCKPIT/TWCS-WC_USER


*" VALUE(EC_DEPARTMENT) LIKE /COCKPIT/SDUMMY-DPRTMNT

*" VALUE(EB_DOC_SEL) LIKE BOOLE-BOOLE

*" VALUE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

*" VALUE(ED_LDATE) LIKE BAPIUSW01-LDATE

*" VALUE(ED_LTIME) LIKE BAPIUSW01-LTIME

*" VALUE(ES_WC_USER) LIKE /COCKPIT/TWC_UMP STRUCTURE


*" /COCKPIT/TWC_UMP

*"----------------------------------------------------------------------

144
WORK CYCLE 7.2 SAP Configuration Guide

Template

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch

*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

* Dummy entry for user exit cross reference check

IF con_wc_usex_user_get IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

**SAMPLE CODING

*IF i_platform_user eq 'ALEXANDER.SCHMIDT@READSOFT.COM'.

*ec_user = 'SCHMIDT'.

*ENDIF.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

User Exit 932 – Get user data


This User Exit is called before a document is forwarded or sent to another processor by using the Web
Application, when the search help for user lookups is used. The User Exit modifies the display format of
the names that are returned by the search, to Firstname Lastname, from Lastname, Firstname (default).
When creating new users in /COCKPIT/WUM, only one name field exists (Complete name) and no format
specification is enforced. So the format may be different from the one for SAP users. This User Exit is a
way in which you can present all users' names the same way.
Note: To have names displayed the same way without using this User Exit, enter names in
/COCKPIT/WUM2 as Lastname, Firstname.

Template

FUNCTION /cockpit/wc_usex_user_get2.

*"----------------------------------------------------------------------

*"*"Lokale Schnittstelle:

*" IMPORTING

*" REFERENCE(IC_USER) LIKE /COCKPIT/TWCS-WC_USER


*" REFERENCE(IC_USERTYPE) LIKE /COCKPIT/SIF-US_TYPE

145
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" VALUE(IS_SAP_ADDRESS) LIKE ADDR3_DATA STRUCTURE ADDR3_DATA

*" OPTIONAL

*" VALUE(IC_SAP_EMAIL) LIKE ADSMTP-SMTP_ADDR OPTIONAL

*" VALUE(IC_SAP_PHONE) LIKE ADTEL STRUCTURE ADTEL OPTIONAL

*" VALUE(IS_WC_USERDATA) LIKE /COCKPIT/TWC_UMP STRUCTURE

*" /COCKPIT/TWC_UMP OPTIONAL

*" VALUE(IS_WB_USERDATA) LIKE /COCKPIT/TWB_UMP STRUCTURE

*" /COCKPIT/TWB_UMP OPTIONAL

*" CHANGING

*" REFERENCE(CC_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL

*" REFERENCE(CC_NAME) LIKE /COCKPIT/TWC_UMP-NAME

*" REFERENCE(CC_PHONE) LIKE /COCKPIT/TWC_UMP-PHONE

*" REFERENCE(CC_DEPARTMENT) LIKE /COCKPIT/SDUMMY-DPRTMNT

*"----------------------------------------------------------------------

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch

*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

* Dummy entry for user exit cross reference check


IF con_wc_usex_user_get2 IS INITIAL. ENDIF.

* >>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

DATA:
lt_split LIKE TABLE OF /cockpit/twc_ump-name WITH HEADER LINE,

lc_firstname LIKE /cockpit/twc_ump-name,

lc_lastname LIKE /cockpit/twc_ump-name.

* Format 'Lastname, Firstname'

CASE ic_usertype.

WHEN con_sap_user.

146
WORK CYCLE 7.2 SAP Configuration Guide

Template

CONCATENATE is_sap_address-name_last ',' INTO cc_name.

CONDENSE cc_name NO-GAPS.

CONCATENATE cc_name is_sap_address-name_first INTO cc_name

SEPARATED BY space.

WHEN con_internet_user.

SEARCH is_wc_userdata-name FOR ','.

IF sy-subrc NE 0.

* Convert format from 'Firstname Lastname'

* to 'Lastname, Firstname'

* For example: 'Name1 Name2 Name3 Name4' is converted to

* 'Name4, Name1 Name2 Name3'

SPLIT is_wc_userdata-name AT ' ' INTO TABLE lt_split.

IF sy-subrc EQ 0.

CLEAR cc_name.

LOOP AT lt_split.

lc_lastname = lt_split.

AT LAST.

CONCATENATE lc_lastname ',' INTO lc_lastname.


CONDENSE lc_lastname NO-GAPS.

CONCATENATE lc_lastname cc_name INTO cc_name

SEPARATED BY space.
EXIT.

ENDAT.

CONCATENATE cc_name lt_split

INTO cc_name SEPARATED BY space.

ENDLOOP.

ENDIF.

147
WORK CYCLE 7.2 SAP Configuration Guide

Template

CONDENSE cc_name.

ENDIF.

WHEN con_partner_user.

* nothing todo

WHEN OTHERS.

* nothing todo

ENDCASE.

** Format 'Firstname Lastname'

* CASE ic_usertype.

* WHEN con_sap_user.

** nothing todo

* WHEN con_internet_user.

* SPLIT is_wc_userdata-name AT ',' INTO lc_lastname lc_firstname.

* IF sy-subrc EQ 0.

* CONCATENATE lc_firstname lc_lastname INTO cc_name

* SEPARATED BY space.

* ENDIF.

* WHEN con_partner_user.

** nothing todo

* WHEN OTHERS.
** nothing todo

* ENDCASE.

** SORT et_user_list BY name.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

148
WORK CYCLE 7.2 SAP Configuration Guide

User Exit 933 – Get approved documents


This User Exit lists the approved and rejected documents from another user. This is helpful if someone
has more than one user account in SAP. With this User Exit active, clicking Workflow > Display
releases (History) lists documents from the currently logged-in user, plus any additional accounts
configured with this User Exit (and complementary user mapping table).

Template

FUNCTION /cockpit/wc_usex_approved_get.

*"----------------------------------------------------------------------

*"*"Lokale Schnittstelle:

*" IMPORTING

*" REFERENCE(IC_WC_USERTYPE) LIKE /COCKPIT/SWC_IF-WC_USERTYPE

*" VALUE(IC_WC_USER) LIKE /COCKPIT/SWC_IF-WC_USER


*" REFERENCE(IC_LANGUAGE) LIKE SY-LANGU DEFAULT SY-LANGU

*" REFERENCE(IB_ALL_WCS) LIKE BOOLE-BOOLE OPTIONAL

*" TABLES
*" IR_WC_ID STRUCTURE /COCKPIT/RWC_ID

*" IR_TIMESTAMP STRUCTURE /COCKPIT/RTSTMP

*" IT_INPUT_SEL STRUCTURE /COCKPIT/SWB_SELTAB

*" CT_HEADER STRUCTURE /COCKPIT/SHDR_IF

*" CT_WEBCYCLE STRUCTURE /COCKPIT/SWC_IF

*" CT_APPROVED STRUCTURE /COCKPIT/SWC_APPROVED


*" CT_APPROVER STRUCTURE /COCKPIT/SWC_APPROVER

*" CT_FLAG STRUCTURE /COCKPIT/TFLAG

*" CT_MESSAGES STRUCTURE BAPIRET2


*" EXCEPTIONS

*" NOT_FOUND

*"----------------------------------------------------------------------

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch


*@CU@aaa... => Customer Name

149
WORK CYCLE 7.2 SAP Configuration Guide

Template

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

* ICS1435 New User-Exit 933 in /COCKPIT/WC_APPROVED_GET

* Dummy entry for user exit cross reference check

IF con_wc_usex_approved_get IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

TYPES:

BEGIN OF ys_user_map,

new_wc_usertype LIKE /cockpit/swc_if-wc_usertype,

new_wc_user LIKE /cockpit/swc_if-wc_user,

old_wc_usertype LIKE /cockpit/swc_if-wc_usertype,

old_wc_user LIKE /cockpit/swc_if-wc_user,

END OF ys_user_map.

STATICS:

sb_old_user LIKE boole-boole.

DATA:

lt_user_map TYPE TABLE OF ys_user_map,

ls_user_map TYPE ys_user_map,

lt_header LIKE TABLE OF /cockpit/shdr_if,

lt_webcycle LIKE TABLE OF /cockpit/swc_if,

lt_approved LIKE TABLE OF /cockpit/swc_approved,

lt_approver LIKE TABLE OF /cockpit/swc_approver,


lt_flag LIKE TABLE OF /cockpit/tflag,

lt_messages LIKE TABLE OF bapiret2.

CHECK sb_old_user IS INITIAL.

sb_old_user = con_true.

* >>> User mapping

ls_user_map-new_wc_usertype = con_sap_user.

150
WORK CYCLE 7.2 SAP Configuration Guide

Template

ls_user_map-new_wc_user = 'GERKE'.

ls_user_map-old_wc_usertype = con_sap_user.

ls_user_map-old_wc_user = 'GERKE2'.

APPEND ls_user_map TO lt_user_map.

READ TABLE lt_user_map INTO ls_user_map

WITH KEY new_wc_usertype = ic_wc_usertype

new_wc_user = ic_wc_user.

* <<< User mapping

IF sy-subrc EQ 0.

CALL FUNCTION '/COCKPIT/WC_APPROVED_GET'

EXPORTING

ic_wc_usertype = ls_user_map-old_wc_usertype

ic_wc_user = ls_user_map-old_wc_user

ic_language = ic_language

ib_all_wcs = ib_all_wcs

TABLES

ir_wc_id = ir_wc_id

ir_timestamp = ir_timestamp
it_input_sel = it_input_sel

et_header = lt_header

et_webcycle = lt_webcycle
et_approved = lt_approved

et_approver = lt_approver

et_flag = lt_flag

et_messages = lt_messages

EXCEPTIONS

not_found =1

151
WORK CYCLE 7.2 SAP Configuration Guide

Template

OTHERS = 2.

APPEND LINES OF lt_header TO ct_header.

APPEND LINES OF lt_webcycle TO ct_webcycle.

APPEND LINES OF lt_approved TO ct_approved.

APPEND LINES OF lt_approver TO ct_approver.

APPEND LINES OF lt_flag TO ct_flag.

APPEND LINES OF lt_messages TO ct_messages.

ENDIF.

CLEAR sb_old_user.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

User Exit 934 – Manipulate WORK CYCLE flow definition


This User Exit provides the possibility to dynamically add a parallel step to a workflow.

Template

FUNCTION /COCKPIT/WC_USEX_GET_FLOW.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IC_INVOICE_GUID) LIKE /COCKPIT/THDR-INVOICE_GUID

*" REFERENCE(IC_WC_ID) LIKE /COCKPIT/CWC_FLA-WC_ID


*" TABLES

*" CT_WC_FLOW STRUCTURE /COCKPIT/SWC_FLOW

*"----------------------------------------------------------------------
*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch

*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

152
WORK CYCLE 7.2 SAP Configuration Guide

Template

* Dummy entry for user exit cross reference check

IF con_wc_usex_flow_modify IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

User Exit 935 – Note check


Template

FUNCTION /COCKPIT/WC_USEX_NOTE_CHECK.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_IF STRUCTURE

*" /COCKPIT/SWC_IF

*" REFERENCE(IC_WC_STATUS) LIKE /COCKPIT/SWC_IF-WC_STATUS


*" TABLES

*" ET_MESSAGES STRUCTURE BAPIRET2 OPTIONAL

*" EXCEPTIONS
*" ERROR_OCCURED

*"----------------------------------------------------------------------

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch


*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

* Dummy entry for user exit cross reference check


IF con_wc_usex_note_check IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

153
WORK CYCLE 7.2 SAP Configuration Guide

Template

ENDFUNCTION.

LDAP User Exit 1 - Assign LDAP attribute to WORK CYCLE user field
Template

FUNCTION /cockpit/wc_usex_ldapsimplemap.

*"----------------------------------------------------------------------
*"*" Local interface:

*" IMPORTING

*" REFERENCE(INPUT) TYPE C

*" EXPORTING

*" REFERENCE(OUTPUT) TYPE C

ENDFUNCTION.

Search help User Exit – Search help for a field in the Web Application
This User Exit is called when a value is searched (using search help) in the Web Application. The User
Exit can override settings from the search help configuration, to influence the search behavior.

Template

FUNCTION /cockpit/wc_usex_shlp.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IC_STRUCTURE) LIKE /COCKPIT/SFIELDS-STRUCTURE

*" REFERENCE(IC_FIELD_NAME) LIKE /COCKPIT/SFIELDS-FIELD_SAP

*" REFERENCE(IC_INVOICE_GUID) LIKE /COCKPIT/SINV_GUID-INVOICE_GUID


*" OPTIONAL

154
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" REFERENCE(II_MAX_ROWS) LIKE BAPIF4A-MAX_ROWS DEFAULT 500

*" TABLES

*" IT_INPUT_FIELDS STRUCTURE /COCKPIT/SWC_SHLP_NAMEVAL

*" ET_RESULTS STRUCTURE /COCKPIT/SWC_SHLP_GRPDNMVL

*" EXCEPTIONS

*" NO_SHLP_FOUND

*" INVALID_GUID

ENDFUNCTION.

*"----------------------------------------------------------------------

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

* Evaluate it_input_fields to see whether you should return a restricted

* set of results. The table may contain

* it_input_fields-name eq 'COMP_CODE'

* it_input_fields-value eq '1*'

* only company codes which start with the digit one are requested

* Make two result lines with two fields for each

et_results-num = '0'.

et_results-name = 'COMP_CODE'.
et_results-value = '0001'.

APPEND et_results.

et_results-num = '0'.
et_results-name = 'NAME'.

et_results-value = 'My test company code'.

APPEND et_results.

* Increment et_results-num for next result row

et_results-num = '1'.

et_results-name = 'COMP_CODE'.

155
WORK CYCLE 7.2 SAP Configuration Guide

Template

et_results-value = '1000'.

APPEND et_results.

et_results-num = '1'.

et_results-name = 'NAME'.

et_results-value = 'The one and only company'.

APPEND et_results.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

Step User Exit 1 – Check step conditions


With this User Exit, it is possible to control whether a workflow step should be triggered or not (by raising
the NOT_VALID exception). This User Exit is activated per workflow step, and must be specified in Check
if the WORK CYCLE step can be started in the workflow step definition (/COCKPIT/WI3).

Template

FUNCTION /cockpit/wc_usex_conditions.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE


*" /COCKPIT/SWC_WEBCYCLE

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP
*" REFERENCE(IS_WC_FLOW) LIKE /COCKPIT/SWC_FLOW STRUCTURE

*" /COCKPIT/SWC_FLOW OPTIONAL

*" TABLES
*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF

156
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF

*" IT_TAX STRUCTURE /COCKPIT/STAX_IF

*" ET_MESSAGES STRUCTURE BAPIRET2

*" EXCEPTIONS

*" NOT_VALID

ENDFUNCTION.

Step User Exit 2 – Determine processor of step


Use this User Exit to determine the receivers of a workflow step. Receivers are transferred to the
ET_RECEIVER table. This User Exit is activated per workflow step, and must be specified in Define
possible agents and parallel steps in the workflow step definition (/COCKPIT/WI3).

In addition to determining the recipient of a document, you can also use this User Exit to assign line and
accounting items to processors. Use the ET_ITM_RCVR structure for this purpose.

Template

FUNCTION /cockpit/wc_usex_receivers.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IB_CONTINUE) LIKE BOOLE-BOOLE

*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE


*" /COCKPIT/SHDR_IF

*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE

*" /COCKPIT/SWC_WEBCYCLE
*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP

*" REFERENCE(IS_WC_FLOW) LIKE /COCKPIT/SWC_FLOW STRUCTURE


*" /COCKPIT/SWC_FLOW

157
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" TABLES

*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF

*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF

*" IT_TAX STRUCTURE /COCKPIT/STAX_IF

*" ET_RECEIVER STRUCTURE /COCKPIT/SWC_RECEIVER

*" ET_ITM_RCVR STRUCTURE /COCKPIT/SWC_LIA_RECEIVER OPTIONAL

*" ET_MESSAGES STRUCTURE BAPIRET2

*" EXCEPTIONS

*" NOT_FOUND

*"----------------------------------------------------------------------

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch

*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

* Dummy entry for user exit cross reference check

IF con_wc_usex_receivers IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

* IB_CONTINUE is space on start

* is 'X' on continue, approval, etc.


* is 'F' on forward

* is 'Q' on query

* Sample implementation for fixed user assignment


MOVE-CORRESPONDING is_wc_flow TO et_receiver.

et_receiver-wc_usertype = 'S'.

et_receiver-wc_user = 'WCTEST1'.

APPEND et_receiver.

et_receiver-wc_user = 'WCTEST2'.

APPEND et_receiver.

158
WORK CYCLE 7.2 SAP Configuration Guide

Template

et_receiver-wc_user = 'WCTEST3'.

et_receiver-wc_def_user = 'X'.

APPEND et_receiver.

et_receiver-wc_user = 'WCTEST4'.

APPEND et_receiver.

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

Step User Exit 3 – After performing an action


This User Exit is called after all the process-related actions (for example, save and approve) from within
the SAP GUI or the Web Application. If the current process is interrupted, the ERROR_OCCURED
exception should be raised.

This User Exit is activated per workflow step, and must be specified in Logic after the step action has
been performed in the workflow step definition (/COCKPIT/WI3).

Template

FUNCTION /COCKPIT/WC_USEX_CHECK_ACTION .

*"----------------------------------------------------------------------

*"*"Local interface:
*" IMPORTING

*" REFERENCE(IS_WC_DATA) LIKE /COCKPIT/SWC_IF STRUCTURE

*" /COCKPIT/SWC_IF
*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE

*" /COCKPIT/SWC_WEBCYCLE

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE


*" /COCKPIT/SWC_STEP

*" VALUE(IC_WC_DYNPRO) LIKE /COCKPIT/SDUMMY-CHAR1 OPTIONAL

*" REFERENCE(IS_SUBSTITUTE) LIKE /COCKPIT/SWC_USER STRUCTURE

159
WORK CYCLE 7.2 SAP Configuration Guide

Template

*" /COCKPIT/SWC_USER OPTIONAL

*" VALUE(IC_ACTION) LIKE /COCKPIT/SWC_DUMMY-RUN_TYPE OPTIONAL

*" REFERENCE(IB_UPDATE) LIKE BOOLE-BOOLE OPTIONAL

*" TABLES

*" CT_ITEM STRUCTURE /COCKPIT/SITEM_IF

*" CT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF

*" CT_TAX STRUCTURE /COCKPIT/STAX_IF

*" CT_ACCOUNT_ASSIGN STRUCTURE /COCKPIT/TACCAS OPTIONAL

*" CT_NOTE STRUCTURE /COCKPIT/SWC_NOTE OPTIONAL

*" ET_MESSAGES STRUCTURE BAPIRET2

*" CHANGING

*" REFERENCE(CS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" REFERENCE(CC_OK_CODE) LIKE SY-UCOMM OPTIONAL

*" EXCEPTIONS

*" ERROR_OCCURED

*"----------------------------------------------------------------------

*@US@aa => Signature of Creator, e.g. HH for Harry Hirsch


*@CU@aaa... => Customer Name

*@K1@ ... *@K9@ => Keywords for Implemented Functionality

* Dummy entry for user exit cross reference check


IF con_wc_usex_check_action IS INITIAL. ENDIF.

*>>> START OF IMPLEMENTATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*

*<<< END OF IMPLEMENTATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*

ENDFUNCTION.

160
WORK CYCLE 7.2 SAP Configuration Guide

Step User Exit 4 – After full release


This User Exit is called after a workflow step is approved. It can be used to do some post processing.
Simply raising an exception here will not change the fact that the step is approved.

This User Exit is activated per workflow step, and must be specified in Logic after the step has been
released in the workflow step definition (/COCKPIT/WI3).

Template

FUNCTION /COCKPIT/WC_USEX_AFTER_EXEC.

*"----------------------------------------------------------------------

*"*" Local interface:

*" IMPORTING
*" REFERENCE(IS_WC_DATA) LIKE /COCKPIT/SWC_IF STRUCTURE

*" /COCKPIT/SWC_IF

*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/SWC_WEBCYCLE STRUCTURE


*" /COCKPIT/SWC_WEBCYCLE

*" REFERENCE(IS_WC_STEP) LIKE /COCKPIT/SWC_STEP STRUCTURE

*" /COCKPIT/SWC_STEP

*" REFERENCE(IB_ONLINE) LIKE BOOLE-BOOLE OPTIONAL

*" TABLES

*" CT_ITEM STRUCTURE /COCKPIT/SITEM_IF

*" CT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF

*" CT_TAX STRUCTURE /COCKPIT/STAX_IF

*" ET_MESSAGES STRUCTURE BAPIRET2


*" CHANGING

*" REFERENCE(CS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF
*" EXCEPTIONS

*" ERROR_OCCURED

ENDFUNCTION.

161
WORK CYCLE 7.2 SAP Configuration Guide

Step User Exit 5 – Check step recipient


This User Exit checks the recipients of a workflow step. This User Exit is activated per workflow step, and
must be specified in Check recipients of the step in the workflow step definition (/COCKPIT/WI3).

Template

FUNCTION /COCKPIT/WC_USEX_USER_CHECK.

*"----------------------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IC_WC_ID) LIKE /COCKPIT/TWC-WC_ID

*" REFERENCE(IC_WC_STEP_ID) LIKE /COCKPIT/TWCS-WC_STEP_ID


*" REFERENCE(IS_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE

*" /COCKPIT/SHDR_IF

*" REFERENCE(IC_USER_EMAIL) LIKE /COCKPIT/TWC_UMP-EMAIL


*" REFERENCE(IC_USER_TYPE) LIKE /COCKPIT/SWC_USERS-WC_USERTYPE_GRP

*" REFERENCE(IC_ACTION) LIKE /COCKPIT/SWC_DUMMY-ACTION_TYPE

*" OPTIONAL

*" EXPORTING

*" REFERENCE(EC_USER) LIKE /COCKPIT/TWCS-WC_USER

*" REFERENCE(EC_USER_TYPE) LIKE /COCKPIT/SIF-US_TYPE

*" REFERENCE(ES_MESSAGE) LIKE BAPIRET2 STRUCTURE BAPIRET2

ENDFUNCTION.

162
WORK CYCLE 7.2 SAP Configuration Guide

Appendix C – Other tasks


Copying forms to another client
Forms are imported as separate transports. They can only be imported into client 000. After import, you
must copy them to the target client. The following procedure shows how to copy the /COCKPIT/TEXT form
from client 000:

1. Logon to the client you wish to copy the form to.

2. Go to /SE71.

3. Go to Utilities > Copy from client.

4. Enter the Form name, Source client and Target form (name).

5. Click the Execute button.

163
WORK CYCLE 7.2 SAP Configuration Guide

Support for other languages


WORK CYCLE is available in many languages. In order to support the creation of workflow notes in
Russian and Polish, the following SAP notes must be installed:

 SAP note 322998 (for Russian)

 SAP note 141343 (for Polish)

164
WORK CYCLE 7.2 SAP Configuration Guide

Index

/ /COCKPIT/WUM2 71
/COCKPIT/C31 79 A
/COCKPIT/C32 80 accounting lines
/COCKPIT/WBI7 92 approving individually 11
/COCKPIT/WC_WCID 59 activating workflows 8
/COCKPIT/WI1 59 appearance
/COCKPIT/WI10 101 HTML email templates 27
/COCKPIT/WI11 80 ARCHIV_NOTE_LATE 52
/COCKPIT/WI12 83 ARCHIV_WCLOG_REPAIR 52
/COCKPIT/WI13 75 archiving
/COCKPIT/WI14 83 notes 52
/COCKPIT/WI16 85 attachments
/COCKPIT/WI17 68 supported for upload in Web App 84
/COCKPIT/WI19 87 C
/COCKPIT/WI22 76 conditions 12
/COCKPIT/WI24 85 creating 12
/COCKPIT/WI25 91 configuration
/COCKPIT/WI26 91 other tasks 16
/COCKPIT/WI27 94 copying/forms to other clients 163
/COCKPIT/WI28 77 D
/COCKPIT/WI29 93 deleting
/COCKPIT/WI3 61 workflows 15
/COCKPIT/WI30 77 documents
/COCKPIT/WI33 99 viewing ones not in a workflow 29
/COCKPIT/WI4 72 E
/COCKPIT/WI5 99 email templates
/COCKPIT/WI6 94 built-in 21
/COCKPIT/WI7 74 changing HTML styles 27
URL 59
/COCKPIT/WI8 100
using HTML 26
/COCKPIT/WI9 74
emails
/COCKPIT/WUM1 98

165
WORK CYCLE 7.2 SAP Configuration Guide

creating templates 20 suppress 76


list of variables 22 N
templates 20
notes
F
archiving 52
fields mandatory 59
for one-time vendors 29, 93 Russian and Polish 164
to display in Web Application 80 settings 100
when displaying workflow history 85 O
forms one-time vendors
archiving 85 fields 29, 93
copying to other clients 163
P
functions
passwords
executing via menu 83
changing for multiple users 55
overview 51
Polish
H
enabling for notes 164
HTML
pre-allocation of users 9
images in emails 27
profiles
using for emails 26
for substitutes 18, 99
I
programs
images
ARCHIV_NOTE_LATE 52
adding to SAP Web Repository 28
ARCHIV_WCLOG_REPAIR 52
in HTML emails 27
DUE_DATE_CHECK 53
L
overview 51
LDAP directory WC_DEBUG 54
importing users from 17, 56 WC_RFC_LOG 55
line items WC_SET_NOT_ARCHIVED 52
WC_USER_UPDATE 56
approving individually 11
WC_WEB_LOGGING 58
line-item approval 11
R
logs
recipient
RFC 55
determining via User Exit 157
M
reminder emails 53
mandatory notes 59
Russian
menus
enabling for notes 164
adding extra items 83
S
messages
SAP Business Workflow 33
change type 76
search help

166
WORK CYCLE 7.2 SAP Configuration Guide

default settings 89 909 - Define further or different substitutions


edit 87 120
for users in SAP 99 910 - Own logic for determining user type and
email 121
steps
911 - Define further or other substitutes 122
in a workflow 7 913 - When finishing a workflow 125
styles 914 - Adjust call of SAP API for sending
emails 126
HTML email templates 27
915 - Adjust/Replace general account
substitutes assignment block check 127
profiles 18, 99 916 - Adjust/Replace account assignment
block check for vendor Ps 128
T
917 - Data check in the Web Application 129
templates 918 - File upload via the Web Application 131
creating for emails 20 919 - Calculate workflow validity period (due
for emails 20 date) 132
text 920 - Amend work item creation for SAP
Business Workflow 133
default for emails 21 921 - Adapt what data the Web Application
in email templates 20 gets 134
U 922 - Read the overview data in WORK
CYCLE 137
upload
923 - User check during logon to the Web
supported attachments in Web App 84 Application 138
URL 924 - Set substitutes for the workflow 139
925 - Set substitutes for SAP users 140
Web Application 59
926 - Adapt search help determination for
User Exits check tables 140
900 - Before starting/continuing a workflow 927 - After saving the logon timestamp 141
110 928 - CPD data get 142
901- Change WORK CYCLE message texts 929 - CPD data set 142
113
930 - Reset WORK CYCLE user password
902 - Determine all WORK CYCLE workflows 143
for one processor 114
931 - Get user data 144
903 - Change WORK CYCLE notes and
932 - Get user data 145
releases to be archived 115
933 - Get approved documents 149
904 - Change subjects of WORK CYCLE
messages 116 934 - Manipulate WORK CYCLE flow
definition 152
905 - Own reminder function in WORK
CYCLE 117 activating 102
906 - After starting/continuing a workflow and LDAP User Exit 1 154
before saving 118 overview 105
907 - Custom behaviour after workflow Searchhelp User Exit 154
reminder 119 Step User Exit 1 156
908 - Own logic for email at workflow start 119 Step User Exit 2 157
Step User Exit 3 159

167
WORK CYCLE 7.2 SAP Configuration Guide

Step User Exit 4 URL 59


After full release 161 WORK CYCLE
user groups 96 users 96
creating 18 workflow
users building from steps 8
creating 16 workflow history
importing from a file 17
selection fields 85
importing from LDAP directory 17, 56
workflow recipients
manage 96
overview 16 assigning 9
pre-allocation matrix 9 workflow steps 7
V conditions 12
variables deleting 15
pre-allocation user matrix 9
within emails 22
using in multiple workflows 8
W
workflows
WC_DEBUG 54
activating 8
WC_RFC_LOG 55
assigning default recipients 9
WC_SET_NOT_ARCHIVED 52 creating 7
WC_UMA_PASSWD_INIT 55 deleting 15
WC_USER_UPDATE 56 integrating with SAP Business Workflow 33
workflow shells 7
WC_WEB_LOGGING 58
workflow steps 7
Web Application
worklist
fields 80
layout 83
fields for one-time vendors 93

168

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy