You are on page 1of 12

Gross Margin Calculation in Order Management

An Oracle White Paper


July 2009

What is Gross Margin?


Gross margin calculation provides a faster way to evaluate the profitability of an
order, helping the customers to apply the appropriate business rules based on sales
order margin information. This functionality is available in the following forms:
Standard Sales Orders, Quick Sales Orders and Price & Availability form.

Setup steps
We have used a Vision Demo environment, Release 11.5.10.2 to setup this
functionality. The following application responsibility has been used: Order
Management SuperUser, Vision Operations.
1. Enable Margin Calculation system parameter.
Order Management > Setup > System Parameters> Values

Figure1 Seting Margin Calculation system parameter

The possible vales for this OM System Parameter are:


Do not calculate When set to this option, Gross Margin is not calculated.
Price based - calculate Margin% by dividing the difference between Selling Price
and Cost Price by Selling Price
Cost based - calculate Margin% by dividing the difference between Selling Price
and Cost Price by Cost Price.

2. Set

Minimum Margin Percent (in case Margin Hold functionality needs to be


implemented) for the Order Transaction Type.

Order Management > Setup > Transaction Types> Define


Query for the Order Transaction Type:

Figure2 Illustrating Minimum Margin Percent option in Transaction Types window

3. Implement Gross Marging security options


Decide which responsibilities do NOT have the rights to see Gross Margin
information in the Sales Orders window, Quick Sales Order and the Pricing &
Availability window.
Using the System Administrator responsibility, navigate to Applications >
Responsibility, define or query up a responsibility with Orders, Returns Main Menu
attached, and exclude the function Sales Orders: View Gross Margin from those
responsibilities.

Figure3 Implementing function security Sales Orders: View Gross Margin

4. Create a folder in the Sales Orders, Quick Sales Orders and Pricing &
Availability forms.
The fields: Margin Amount, Margin% and Unit Cost are hidden. In order to make
them visible, go to Folder menu > Show Field
Choose them from the list of values.
Important: If the fields that contain margin information are made visible on the Sales
Order form, they are visible also on the Quotes window.

Figure4 Display hidden fields using Show Field option from Folder menu

4.1 In the Sales Orders window, Order Information tab, Other sub-tab: create a folder
in order to display both or either Margin Amount and Order Margin %.

Figure5 - Creating a Folder at Sales Order (header) level

Figure6 Illustrating Marging Amount and Margin% fields on Sales Order (header) level

4.2 In Line Items tab, create a folder to display any or all of the Unit Cost, Margin
Amount and Margin % fields on the Main sub-tab or the Pricing sub-tab.
Assign that folder to be the default folder for those responsibilities who can see
margin.
4.3 Create a folder for the Pricing & Availability window Pricing tab to display any or
all of the Cost, Margin Amount and Margin % fields and assign that folder for those
responsibilities who are allowed to see margin.
5. Define an item cost for item.
Order Management integrates with Oracle Cost Management in order to get the item
cost.

Navigation: Inventory > Item Costs > Item Costs: choose the inventory organization
(warehouse) M1.

Figure7 Defining a Pending Item Cost

In our testcase (we used a Vision Demo environment), since M1 organization is a


Standard Costing organization, we defined a cost as pending cost and then we run
Standard Cost Update in order to update the Frozen cost of this item.
Navigation: Inventory> Costs> Item Costs> Standard Cost Update>Update Costs

Figure8 - Run Update Standard Cost program to create a Frozen Cost Type for item MS_ASSY_ITEM

In the case of average costing, you need to define an item cost appropriately.
Order Management uses the API cst_cost_api.get_item_cost in order to obtain the
current item cost used in margin calculation. The unit cost of the item is get from
inventory organization ( warehouse) displayed on Sales Order line level, Shipping tab.
For more details on how to define an item cost, please review Oracle Cost
Management User Guide, chapter 3 Item Costing.
If the item is an OPM item, OM will call OPM cost API:
GMF_CMCOMMON.cmcommon_get_cost

All Margin related calls are in OE_MARGIN_PVT (OEXVMRGS.pls). This is


private API.

6. Attach the item to a price list

Figure9 Attach item to a Price List

7. Create a sales order and check the gross margin calculation.


Note: currently, gross margin is not displayed for PTO Models.
You can see gross margin for the following types of outbound lines: service lines,
standard lines (both process or discrete) and ATO items - for which costing is
enabled. Only standard lines and ATO items will display the fields: the unit cost ,
margin and margin % .
Also, Gross Margin functionality is currently not available for drop ship lines
(External Line Type). See Enhancement Request 7139851 - GROSS MARGIN
CALCULATION FOR EXTERNAL LINES
Currently the fields: Unit Cost, Margin% and Margin Amount are displayed only for
"Standard" Item Types. The Gross Margin functionality is not supported for the
following item type codes : 'KIT' , 'MODEL' , 'INCLUDED' , 'CLASS' ,
'CONFIG' , 'OPTION'.
The following Enhancement Request 5194646 is raised for this issue.

How to apply a Gross Margin Hold?


Gross Margin Hold works only at Order Level. Line level margin hold cannot be
applied. Currently, there is an Enhancement Request (ER 6156813) raised for this
issue.
Customer can set a minimum percent of margin for the sales order type and based on
this information, has the possibility to stop shipping when margin is too low.

Margin Holds are applied whenever the Margin% from the order level is below the
minim margin percent defined for Order Transaction Type associated with the Sales
Order.

A simple test case for applying a gross margin hold


1. Order Management > Setup > Transaction Types> Define
Query for the Order Transaction Type: Mixed and define a Minimum Margin Percent.

Figure10 Define a Minimum Margin Percent in Transaction Type window for Order Type associated
with the Sales Order

2. Create a Sales Order for MS_ASSY_ITEM and check the Gross Margin display

Figure11 See Gross Margin fields for a sales order line level for MS_ASSY_ITEM.

3. Check the Margin% field at Sales Order header level.

Figure12 - If Margin% at Sales Order header level is lower than Minimum Margin Percent defined
previously, the Sales Order line will be in Gross Margin hold.

4. Book the Sales Order and check if an order level margin hold is applied.

Figure13 Process Message window illustrating the margin hold applied to sales order

Important:

Orders entered before the Gross Margin feature is installed or enabled will not have
costs captured and thus will not have margin visible. If you want to obtain costs for
such lines or orders, you can use the Get Cost action. Costs are automatically
refreshed on unshipped order lines when attributes affecting the cost (warehouse and
project) change. But if you know the cost has changed in Oracle Cost Management,
you can manually obtain a more current cost by using the Get Cost action. Cost is
frozen on the order line at the time of shipping.
Repricing at Shipment Workflow
The reprice_line workflow activity usually is placed after shipping or fulfillment.
Cost is fixed at shipping, but margin can be changed by the reprice_line workflow
due to selling price change. Although cost does not change after shipping, the
margin can still change due to a selling price change, hence, a margin hold can be
applied to this order. This margin hold is useful to prevent orders with a wrong
price from going to AR. The Invoice interface workflow activity will honor this hold.

Diagnosing issues related to gross margin calculation


Gross Margin Hold is visible in the output of HTMomse.sql on the following section:

Figure14 Generic Holds section from output of the HTMomse.sql script.

Where HOLD_ID, HOLD_NAME and HOLD_TYPE come from


OE_HOLD_DEFINITIONS table.
The value of HEADER_ID (104411) is the value of header_id field from
oe_order_headers_all table for the sales order in question.
Note: The script HTMomse.sql is available to download from Note 133464.1

Known issues with Gross Margin


1. Unit Cost field in the sales order line is shown as null despite the fact that the item
has cost and Margin Calculation System Parameter is enabled.
This issue has been fixed in CSTCAPIB.pls 115.4.115100.2. Please apply patch
5662922.
Use the following command to determine the version of CSTCAPIB.pls:
strings -a $BOM_TOP/patch/115/CSTCAPIB.pls | grep -i '$Header'
2. When the Order Organizer is opened in Query Only Mode, the Gross Margin shows
as '*****' in spite of adding the function security to the Responsibility.
Bug 5967465 - CANNOT VIEW GROSS MARGIN IN QUERY_ONLY ORDER
ORGANIZER

10

The fix is delivered in OEXOELIB.pld 115.286.11510.48 . Please apply the patch


6856371 - September 2008, Order Management (11.5.10) Cumulative Patch
Use the following command to determine the version of OEXOELIB.pll:
strings -a $AU_TOP/resource/OEXOELIB.pll | grep -i '$Header'

3. Currently, the following Enhancement Requests are logged in regard to Gross


Margin functionality:
ER 6156813 - LINE LEVEL MARGIN HOLDS SHOULD BE ALLOWED VS JUST
ORDER LEVEL MARGIN
ER 7139851 - GROSS MARGIN CALCULATION FOR EXTERNAL LINES
ER6908911 - UNIT COST FOR INTERCOMPANY TRANS SHOULD COME
FROM ITEM VALIDATION ORG OF OU
ER6467578 - UNIT COST FIELD ONLY DISPLAYS TWO DECIMAL
POSITIONS
ER 5194646 ER NEED CTO ITEM UNIT COST AND CHOOSE COST TYPE
TO SHOW IN GROSS MARGIN DISPLAY

11

Gross Margin Calculation in Order Management


Author: Marian Stan
Senior Technical Support Engineer
Global Product Support
Email: marian.stan@oracle.com
Special thanks to Raminder Singh, Project Leader in Order Management
Development team for reviewing this white paper.

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
www.oracle.com
Copyright 2008, Oracle and/or its affiliates. All rights reserved.

This document is provided for information purposes only and the contents
hereof are subject to change without notice.
This document is not warranted to be error-free, nor subject to any other
warranties or conditions, whether expressed orally or implied in law, including
implied warranties and conditions of merchantability or fitness for a particular
purpose. We specifically disclaim any liability with respect to this document and
no contractual obligations are formed either directly or indirectly by this
document.
This document may not be reproduced or transmitted in any form or by any
means, electronic or mechanical, for any purpose, without our prior written
permission.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.

12

You might also like