Sie sind auf Seite 1von 28

Oracle Purchasing

Account Generator
Workflow
Customization Example
RELEASE 11

October 1998

Oracle Purchasing Account Generator Workflow Customization Example


Release 11

Copyright E 1998, Oracle Corporation. All Rights Reserved.


Contributing Authors: Rachel Haas
Contributors: Imran Ali, Kareem Benjamin, Vance Checketts, Vijay Pawar, Eddy So, Dave
Stephens
The Programs (which include both the software and documentation) contain proprietary
information of Oracle Corporation; they are provided under a license agreement
containing restrictions on use and disclosure and are also protected by copyright, patent
and other intellectual and industrial property laws. Reverse engineering, disassembly
or decompilation of the Programs is prohibited.
The information contained in this document is subject to change without notice. If you
find any problems in the documentation, please report them to us in writing. Oracle
Corporation does not warrant that this document is error free. Except as may be expressly
permitted in your license agreement for these Programs, no part of this document may be
reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the US Government or anyone licensing or using the
Programs on behalf of the US Government, the following notice is applicable:
Restricted Rights Notice
Programs delivered subject to the DOD FAR Supplement are commercial computer
software and use, duplication and disclosure of the Programs including documentation
shall be subject to the licensing restrictions set forth in the applicable Oracle license
agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations
are restricted computer software and use, duplication and disclosure of the Programs
shall be subject to the restrictions in FAR 52.22719, Commercial Computer Software
Restricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA
94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or
other inherently dangerous applications. It shall be licensees responsibility to take all
appropriate failsafe, backup, redundancy and other measures to ensure the safe use of
such applications if the Programs are used for such purposes, and Oracle disclaims liability
for any damages caused by such use of the Programs.
Oracle is a registered trademark, and Enabling the Information Age, Oracle Web
Employees, Oracle Workflow, PL/SQL, and SQL* are trademarks or registered trademarks
of Oracle Corporation. All other company or product names mentioned are used for
identification purposes only, and may be trademarks of their respective owners.

Contents

Account Generator Customization Example . . . . . . . . . . . . . . . . . . . . . . 1


Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Charging to a Project Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Account Generator Customization Example


You can customize the default Account Generator process that Oracle
Purchasing provides if it doesnt meet your accounting requirements.
In the examples below, we modify accountbuilding processes by
assigning new values to the account segments of the code combination
(account) being built.
This customization example assumes Workflow 2.0.3, which is the
version included with Release 11.
The Oracle Purchasing Account Generator Workflows Documentation
Update, also posted on MetaLink, Oracles customer support Web site,
contains important customization guidelines that you should know
before making any customizations. Read that document before you
read this one.

Attention: Depending on your specific setup, this


customization example may need to be implemented
differently at your site. Therefore, as with all customizations,
test this example on a test database before implementing it.

Before You Begin


Before you use or customize the Account Generator in Oracle
Purchasing, make sure you have done the following:

Set up Purchasing. See the Oracle Purchasing Users Guide.


Read the Oracle Purchasing Account Generator Workflows
Documentation Update, posted on MetaLink.

Familiarized yourself with the basic concepts of Oracle Workflow


in the Oracle Workflow Guide.

Read important information about standard Account Generator


features and customization guidelines in the Account Generator
section/chapter of the Oracle Applications Flexfields Guide.

Installed and set up Oracle Workflow, including the Oracle


Workflow Builder. See the Oracle Workflow Guide.

Made sure your access level is set to 100 or higher in the Workflow
Builder, by choosing About Oracle Workflow Builder from the Help
menu.

Account Generator Customization Example

Made backup copies of the Account Generator workflows. (This is


described in the steps that follow.)

Charging to a Project Account


The subprocess Build Project Related Account is a dummy process,
available for you to customize if Oracle Projects is installed. To use this
process, you provide your own rules to the process, in the form of
workflow process definitions, to build the account. If you dont
customize the process, the Account Generator doesnt use it. If you do
customize it, you can use it to bill expense items to a project account,
rather than to the default expense account in Purchasing.

The default function activity Requisition ProjectRelated? by default


always returns a value of False. This is what is meant by the Build
Project Related Account processs being a dummy process. It isnt used
until you replace the function activity Requisition ProjectRelated?
with one of your own that checks a document for a Project ID.
Therefore, if you want to bill items to a project account, you must
customize the Build Project Related Account process, and replace
Requisition ProjectRelated with your own function activity.

Oracle Purchasing

In this example, you will use the Standard workflow function activity
Compare Number in place of Requisition ProjectRelated?. You will
use Compare Number to see if the Project ID on a document is null, to
determine whether the Build Project Related Account process builds
the account or the default expense account does.
You will also modify the Build Project Related Account process. In this
process, you will use the same Accounting Flexfield structure as is used
by the Generate Default Charge Account process, but assign different
values to the segments.
In this example, assume that your Generate Default Charge Account
process assigns the following Charge Account values to the following
Charge Account segments:
Charge Account
Services Company

00

Services Department

001

Services Account

2210

Services Product

001

You will use the Build Project Related Account process to assign the
following, different values to these same segments, for those
documents that are projectrelated:
Charge Account
Services Company

01

Services Department

110

Services Account

5500

Services Product

000

Note: This example uses an Oracle Projects account. If you wanted to


customize the PO Account Generator or PO Requisition Account
Generator for an item or set of items for some other kind of account,
you would use a similar approach as used in this example. Keep in
mind that the Build Project Related Account process is available to
customize for Oracle Projects only. For a nonOracle Projects account,
you would create your own process, but you might do similar things in
that process as you do in this example.

Account Generator Customization Example

In this example, you will customize the PO Requisition Account


Generator, although you could make these customizations to either or
both of the PO Account Generator and PO Requisition Account
Generator workflows.
Build Expense Charge Account Process Before Modification

Build Expense Charge Account After Modification

Oracle Purchasing

Build Project Related Account Before Modification

Build Project Related Account After Modification

Account Generator Customization Example

Each Assign Value to Segment function activity in the modified Build


Project Related Account process looks at each of the segments
belonging to the code combination being built by the Generate Default
Charge Account processServices Company, Services Department,
Services Account, and Services Productand assigns a new value to
each.
In the steps that follow, you will:
Create a new function activity in the Build Expense Charge
Account process that determines whether a document is
associated with a project account.
Modify the Build Project Related Account itself to update the
appropriate account segments.
Test your customization.
For additional information on building projectrelated accounts in the
Account Generator workflow, see Using the Account Generator in
Oracle Projects, Oracle Projects Users Guide.
Step 1

Set up Oracle Projects and General Ledger


If youre using an Oracle Projects account as we are in this example,
you need to set up Oracle Projects and General Ledger.

Step 2

Create a backup of the PO Requisition Account Generator workflow


Since Purchasing can call only one PO Account Generator or PO
Requisition Account Generator workflow, unlike other workflows in
Purchasing, you cannot copy and rename the Account Generator
workflows; you must create a backup of the originals instead, and
modify the original.
You can create a backup from a UNIX prompt or through the Workflow
Builder. Or, you may have your own source control system. Below are
sample instructions for making backups.

Attention: Remember to make your customizations to a test


database first.

From a UNIX prompt:


1.

Change to the directory that contains the .wft file:


$PO_TOP/admin/import

2.

Use the copy command to copy the .wft file to a backup


directory/file.

Oracle Purchasing

For example:
cp poxwfrag.wft
/my_directory/my_backups/poxwfrag.wft/
Through the Workflow Builder:
1.

Open the workflow in the Workflow Builder.

2.

Select the workflow in the Navigator and choose Save As from the
File menu.

3.

Choose File to save the backup to a local hard disk.


Enter the path name of the new directory in which you want to
save a backup copy.
For example:
D:\my_directory\my_backups

Step 3

Open the PO Requisition Account Generator workflow


In the Workflow Builder, open the PO Requisition Account Generator
workflow. See also: Opening and Saving Item Types, Oracle Workflow
Guide.

Step 4

Study the default function activity before replacing it


1.

In the Workflow Builder, in the PO Requisition Account Generator


branch, open the Build Expense Charge Account process diagram.

Account Generator Customization Example

2.

Select Requisition ProjectRelated?, rightclick, and choose


Properties.
Its Control Properties window appears.

Oracle Purchasing

3.

Choose the second Edit button from the top.


The Activity tab and fields appear.

4.

In the Activity tab, examine the name in the Function field:


PO_WF_PO_CHARGE_ACC.IS_PO_PROJECT_RELATED
This is the name of the PL/SQL procedure that this function
activity calls.
In general, you should see if the PL/SQL procedure called by a
function activity that you want to replace, uses a SetItemAttr,
Insert, or Update statement. (This function activity doesnt.) A
SetItemAttr statement means that the function activity is setting
a value that will be used by some other function activity later in the
workflow process. If you delete this function activity altogether, a
later function activity may not work unless you keep the
SetItemAttr statement in your new function activitys PL/SQL
procedure. For a list of workflow function activities that use
SetItemAttr, Insert, or Update statements, see the Oracle
Purchasing Account Generator Workflows Documentation Update, on
MetaLink.

5.

Note the Result Type and Icon fields.


Boolean refers to the result Lookup Type associated with this
function activity; it consists of the Lookup Codes True and False.

Account Generator Customization Example

QUESTION.ICO refers to the icon that is displayed in the


Workflow Builder diagram to represent a function activity that asks
a question.
You dont have to use the same Result Type in your new function
activity as in the function activity you are replacing. (In fact, you
wont in this example.) Just be aware that a function activity with a
Yes/No or Success/Failure Result Type (to give just a few
examples) needs a corresponding Yes (or Success) branch and a
corresponding No (or Failure) branch in the process diagram.
6.
Step 5

Choose Cancel twice to close the Control Properties window.

Replace the function activity Requisition ProjectRelated?


Use the Standard workflow function activity Compare Number in
place of Requisition Project Related?. Use Compare Number to see if
the requisition has any Project ID on it.
Compare Number compares values or checks whether a value is null.
In this example, if the Project ID is null, the Account Generator process
builds the default expense account. If the Project ID is not null, the
Build Project Related Account process builds the account.
To implement Compare Number, follow these steps:

10

1.

In the Build Expense Charge Account process diagram, rightclick


Requisition ProjectRelated?, and choose Delete Selection.

2.

Open the Standard workflow item type in the Workflow Builder


Navigator.

3.

Select and drag Compare Number to the Build Expense Charge


Account process diagram.

Oracle Purchasing

Account Generator Customization Example

11

4.

In the process diagram, rightclick Compare Number, choose


Properties, and select the Attribute Values tab.

5.

Fill in the Attribute Values area as follows:

The Test Value is the value you want to checkin this case, the
item attribute Project ID. The Reference Value is what youre
comparing against. In this example, since youre simply checking if

12

Oracle Purchasing

the Project ID on the document is null, you dont use the Reference
Value. However, since Compare Number expects a Reference
Value, enter 0.
6.

Choose OK.

7.

Connect Compare Number to the other activities in the diagram,


like this, using the Default and Null transitions:

Null: If there is no Project ID on the requisition, the Null branch is


taken; it goes to the Expense Account function activity and builds
the default expense account.
Default: If there is a Project ID on the requisition, the Default
branch is taken; it goes to the Build Project Related Account
process. Default in this case simply means that if the Project ID
isnt Null, take the default path.
To connect the activities:
1.

Rightclick Start and, while rightclicking, drag from Start to


Compare Number until a tiny box with an arrow in it appears
beneath the cursor. Then let go of the mouse button.

2.

Connect Compare Number to Build Project Related Account in the


same way.
When you let go of the mouse button, choose Default from the
results menu that appears.

3.

Connect Compare Number to Expense Account in the same way.

Account Generator Customization Example

13

When you let go of the mouse button, choose Null from the results
menu that appears.
For more information about Standard workflow activities like Compare
Number, see the Oracle Workflow Guide.
Step 6

Modify the Build Project Related Account process


Place the Assign Value to Segment function activities and transitions in
the Build Project Related Account process diagram.
Each of the four Assign Value to Segment function activities assigns
new attribute values to each of the four default segments being built by
the Generate Default Charge Account process.
Assign Value to Segment is a Standard Flexfield Workflow function
activity. For more information about this and other Standard Flexfield
Workflow function activities, see the Account Generator
section/chapter of the Oracle Applications Flexfields Guide.
Note: If you wanted to build different accounts for different
Project IDs, you could still use Compare Number as described
in the previous step. But inside the Build Project Related
Account process, you would need to create your own function
activities (and corresponding PL/SQL procedures) that branch
to different projectaccount subprocesses depending on what
the Project ID is. For instructions on creating new function
activities and their corresponding PL/SQL procedures, see the
Oracle Workflow Guide.
1.

14

In the Navigator, under Standard Flexfield Workflow > Functions,


select the Assign Value to Segment function activity and drag it to
the Build Project Related Account process diagram.

Oracle Purchasing

2.

Repeat this until you have a total of four Assign Value to Segment
function activities in the process diagram, like this:

Account Generator Customization Example

15

16

3.

Move the Start and End function activities apart.

4.

Select the transition arrow and choose Delete Selection.

5.

Arrange the four new function activities between them, like this:

Oracle Purchasing

6.

Rightclick Start and, while rightclicking, drag to Assign Value to


Segment until a box with an arrow in it appears next to your
cursor. Then release the mouse button.

7.

Repeat this for each function activity, until all of the function
activities are connected like this:

In the following steps, you will modify each Assign Value to


Segment function activity to assign the following new,
projectrelated values in place of the default Charge Account
segments:
Charge Account

8.

Services Company

01

Services Department

110

Services Account

5500

Services Product

000

Provide attribute values to the first Assign Value to Segment


function activity:

Account Generator Customization Example

17

Select the first Assign Value to Segment function activity,


rightclick, and choose Properties to open its Control Properties
window.
Select the Attribute Values tab and choose the first
valueSegment Identifier.
Fill in the four attribute values as follows:

Segment Identifier: Select Constant to indicate that youre using a


value. (If you had selected Item Attribute, that would have meant
that the segment for this function activity gets its value from an
item attributeone that Purchasing already provides, or one that
you create.) Select Name to indicate that the segment will be
identified by its name.
Segment: Select Constant, then enter the name of the segment
whose value you want to replace with the projectrelated value. In
this example, Services Company is the name of the first segment
used by the default charge account process.
Value: Select Constant, then enter the value of the segment. In this
example, 01 is the new value you want to assign to the segment
Services Company.
Note: Remember that Services Company has to correspond to
an actual segment defined in General Ledger.

18

Oracle Purchasing

Replace existing segment: Select Constant, then True. True means


that the Account Generator always replaces the account segment
with the substituted account segment. False means that the existing
value is replaced only if the account segment doesnt currently
have a value.
The information under the Type heading for each attribute above
defaults in based on the Value assigned to each attribute.
9.

Choose OK.

10. Provide attribute values to the second Assign Value to Segment


function activity just as you did in the previous step, only provide
a Segment of Services Department and a Value of 110.
In this example, Services Department is the name of the second
segment used by the default Charge Account process. Replace its
default value with a value of 110.

Note: Remember that Services Department has to correspond


to an actual segment defined in General Ledger.
11. Choose OK.
12. Provide attribute values to the third Assign Value to Segment
function activity, only provide a Segment of Services Account and
a Value of 5500.

Account Generator Customization Example

19

In this example, Services Account is the name of the third segment


used by the default Charge Account process. Replace its default
value with a value of 5500.

Note: Remember that Services Account has to correspond to


an actual segment defined in General Ledger.
13. Choose OK.
14. Provide attribute values to the fourth Assign Value to Segment
function activity, only provide a Segment of Services Product and a
Value of 000.
In this example, Services Product is the name of the fourth segment
used by the default Charge Account process. Replace its default
value with a value of 000.

20

Oracle Purchasing

Note: Remember that Services Product has to correspond to an


actual segment defined in General Ledger.
15. Choose OK.
Step 7

Preserve your customizations


If you want to protect your customizations during future upgrades of
Purchasing, check the Preserve Customizations check box in the
Control Properties window for each process customized in this
example:
The Generate Default Charge Account process
The Build ProjectRelated Account process

Account Generator Customization Example

21

At an Access Level of 100, checking the Preserve Customizations check


box prevents the activity from being modified by anyone with an access
level less than 100, including a future upgrade. Checking the Lock at
this Access Level check box prevents a particular activity from being
modified by anyone with an access level greater than 100.
For complete information, see: Overview of Oracle Workflow Access
Protection, Oracle Workflow Guide. See also: To Set the Access Level for
an Object, Oracle Workflow Guide.
Step 8

Verify your changes in the Workflow Builder


Close the Build Expense Charge Account process diagram, then choose
Verify from the File menu.
Verify checks to see if the design of your workflow is correctif you
have the appropriate Start and End activities, and so on. It does not
verify that your workflow will do what you intended. You do that in
the next step.

Step 9

Test your customization on a test database


Again, you should have already set up your project account in General
Ledger before making the customizations, and before following the
testing steps below.

22

Oracle Purchasing

The steps below describe one testing scenario. Be sure to test that
your customizations work for all applicable scenarios in your business.
Prerequisite: Make sure the profile option Account Generator: Purge
Runtime Data is set to No in Purchasing. Setting this profile option to
Yes purges data before you get a chance to view it in the Workflow
Monitor.
1.

Save your changes to a flat file, and then load the flat file to your
test database.
For more information, see the Oracle Workflow Guide.

Step 10

2.

On a test database, create an Expense requisition in Purchasing


and, in the Project alternative region, enter a valid Project number
in the Project field.

3.

Save the requisition and see if the appropriate charge account, with
the projectrelated segments, is generated.

4.

On a test database, create another Expense requisition, and dont


enter any Project information.

5.

Save this requisition and see if the appropriate default charge


account, without the projectrelated segments, is generated.

Monitor your customized workflow


Use the Workflow Monitor to monitor the status of a workflow.
For information on how to use the Workflow Monitor, see the section
Overview of Workflow Monitoring in the Oracle Workflow Guide.
To monitor a document as it proceeds through a workflow, you need to
provide the Workflow Monitor with an item key, which is specific both
to the document you are monitoring and the process in which youre
monitoring it.

"

To determine the item key for the Account Generator workflows:


1.

In Purchasing, open the projectrelated requisition you have just


created and choose Tools > Examine from the Help menu.
Tools > Examine is sometimes controlled by a password. If you
dont have access to it, see your system administrator.

2.

Select the downarrow box to the right of the Block field.

3.

In the list of values that appears, choose PARAMETER and choose


OK.

4.

In the Field field, enter charge_acc_wf_itemkey.

Account Generator Customization Example

23

The item key appears in the Value field. Use this item key when
you are prompted by the Workflow Monitor to enter the item key.

24

Oracle Purchasing

Das könnte Ihnen auch gefallen