Professional Documents
Culture Documents
WhitePaper LCM Customize Charges and Taxes Final
WhitePaper LCM Customize Charges and Taxes Final
Management
An Oracle White Paper
Mar 2010
Table of Contents
2
Executive Overview
The Oracle Landed Cost Management Calculation process provides the ability to
calculate the estimated landed cost using charges manually assigned or automatically
allocated based on the configuration in advance pricing. Landed Cost Management also
uses taxes associated to the purchase order that was originally calculated by EB-Tax
while calculating estimated landed cost.
This white paper focuses on the LCM features that enable you to use customized charges
and taxes to calculate estimated landed cost.
Introduction
Oracle Landed Cost Management manages estimated and actual landed cost for an item
purchased from a supplier. Oracle Landed Cost Management determines the "real" costs
associated with acquiring items including non-recoverable taxes and charges. Changes
that are mainly considered in estimated landed cost calculation includes insurance,
transportation, handling, storage costs, container fees, and import or export charges.
Oracle Landed Cost Management integrates with Purchasing, advance pricing and other
modules. Landed Cost Management extracts the tax lines associated to the purchase order
that was originally calculated by EB-Tax while calculating estimated landed cost of
shipment. Similarly charges are extracted automatically from advance pricing while
calculating estimated landed cost of shipment.
Oracle Applications R12.1.1 onward allows custom logic to use taxes and charges during
estimated landed cost calculation in LCM. The setups for both tax and charge
customizations are discussed in this paper.
3
Landed Cost as a Service Flow
Oracle Landed Cost Management can be used as a service. In this functionality, after the
receipt of items into inventory the Landed Cost Management shipment is automatically
created. The estimation of the item landed cost is also automatically calculated based on
the purchase documents price, tax and the charge amounts.
LCM functionality to use customized tax and charges in estimated landed cost calculation
is available in Oracle Applications Release 12.1.2. Patch 9094631:R12.INL.B should be
applied on top of release 12.1.1 to enable custom taxes and charges functionality.
Landed Cost Management extracts the tax lines associated to the purchase order that was
originally calculated by EB-Tax while calculating estimated landed cost for shipment, tax
is associated with to its shipment Lines.
Technical Overview
Pre-Receiving flow: User creates the LCM Shipment through the LCM Shipments
Workbench UI. When the user chooses a PO Schedule as the source for creating an LCM
Shipment Line, the api INL_TAX_PVT.Generate_Taxes is executed.
LCM as a Service flow: User submits the Shipments Interface Import concurrent
program, to import the Receipts done in Receiving into LCM Shipments. This program
also provides the landed cost calculation for those LCM Shipments, but before that, it
also calls the api INL_TAX_PVT.Generate_Taxes.
4
Process Flow
5
Tax Lines PL/SQL table to be populated:
-- Record to keep Tax Line info.
TYPE tax_ln_rec IS RECORD(
tax_code VARCHAR2(30),
ship_header_id NUMBER,
source_parent_table_name VARCHAR2(30),
source_parent_table_id NUMBER,
tax_amt NUMBER,
nrec_tax_amt NUMBER,
currency_code VARCHAR2(15),
currency_conversion_type VARCHAR2(30),
currency_conversion_date DATE,
currency_conversion_rate NUMBER,
tax_amt_included_flag VARCHAR2(1),
-- Association attributes
to_parent_table_name VARCHAR2(30),
to_parent_table_id NUMBER
);
3. Then process flow checks the value of the parameter Override Default Processing
4. Tax information associated with the shipment is inserted into database tables
INL_TAX_LINES and INL_ASSOCIATIONS from output parameter Tax Lines
PL/SQL table tax_ln_rec.
6
Define Tax Code
Package INL_CUSTOM_PUB
create or replace
PACKAGE BODY INL_CUSTOM_PUB AS
7
--
-- Version : Current version 1.0
--
-- Notes :
PROCEDURE Get_Taxes(
p_ship_header_rec IN INL_TAX_PVT.Shipment_Header%ROWTYPE,
p_ship_ln_groups_tbl IN INL_TAX_PVT.sh_group_ln_tbl_tp,
p_ship_lines_tbl IN INL_TAX_PVT.ship_ln_tbl_tp,
p_charge_lines_tbl IN inl_tax_pvt.charge_ln_tbl_tp,
x_tax_ln_tbl OUT NOCOPY inl_tax_pvt.tax_ln_tbl,
x_override_default_processing OUT NOCOPY BOOLEAN,
x_return_status OUT NOCOPY VARCHAR2
) IS
BEGIN
-- x_override_default_processing := FALSE;
INL_CUSTOM_SAMPLE.Get_Taxes(
p_ship_header_rec => p_ship_header_rec,
p_ship_ln_groups_tbl => p_ship_ln_groups_tbl,
p_ship_lines_tbl => p_ship_lines_tbl,
p_charge_lines_tbl => p_charge_lines_tbl,
x_tax_ln_tbl => x_tax_ln_tbl,
x_return_status => x_return_status);
x_override_default_processing := TRUE;
RETURN;
END Get_Taxes;
END INL_CUSTOM_PUB;
Package INL_CUSTOM_SAMPLE
create or replace
PACKAGE BODY INL_CUSTOM_SAMPLE AS
PROCEDURE Get_Taxes(
p_ship_header_rec IN INL_TAX_PVT.Shipment_Header%ROWTYPE,
p_ship_ln_groups_tbl IN INL_TAX_PVT.sh_group_ln_tbl_tp,
p_ship_lines_tbl IN INL_TAX_PVT.ship_ln_tbl_tp,
p_charge_lines_tbl IN inl_tax_pvt.charge_ln_tbl_tp,
x_tax_ln_tbl OUT NOCOPY inl_tax_pvt.tax_ln_tbl,
x_return_status OUT NOCOPY VARCHAR2
) IS
l_debug_info varchar2(3000);
BEGIN
x_tax_ln_tbl(1).tax_code := 'STATE';
x_tax_ln_tbl(1).ship_header_id := p_ship_header_rec.ship_header_id;
x_tax_ln_tbl(1).source_parent_table_name := 'Open Interface';
x_tax_ln_tbl(1).source_parent_table_id := 1;
x_tax_ln_tbl(1).tax_amt := 10;
x_tax_ln_tbl(1).nrec_tax_amt := 10;
x_tax_ln_tbl(1).currency_code := 'USD';
x_tax_ln_tbl(1).tax_amt_included_flag := 'N';
-- Association attributes
x_tax_ln_tbl(1).to_parent_table_name := 'INL_SHIP_LINES';
x_tax_ln_tbl(1).to_parent_table_id := p_ship_lines_tbl(1).ship_line_id;
END Get_Taxes;
END INL_CUSTOM_SAMPLE;
8
Implement custom charges in estimated landed cost calculation
Oracle Landed Cost Management has integration with Advance Pricing for generating the
charges used in estimated landed costs calculation for both flows: “Pre-Receiving in
LCM” and “LCM as a service”.
Landed Cost Management extracts charges based on the modifiers setup of type “Freight
and Special charge List” defined in Advanced Pricing and associated to either its Line
Groups or its Shipment Lines during estimated landed cost calculation.
Technical Overview
Pre-Receiving flow: User creates the LCM Shipment through the LCM Shipments
Workbench UI. Api INL_CHARGE_PVT.Generate_Charges is executed when user
selects ‘Generate Charge” option from action list while calculating estimated landed cost.
LCM as a Service flow: User submits the Shipments Interface Import concurrent
program, to import the Receipts done in Receiving into LCM Shipments. This program
also provides the landed cost calculation for those LCM Shipments, but before that, it
also calls the api INL_CHARGE_PVT.Generate_Charges.
9
Process Flow
10
2. When custom logic is implemented to get charges in
INL_CUSTOM_PUB.Get_Charges procedure, the Override Default Processing
parameter should return TRUE. Custom charges are populated and passed as
output parameter charge_in_rec from INL_CUSTOM_PUB.Get_Charges.
3. Then process flow checks the value of the parameter Override Default Processing
4. Charges associated with the line group, shipment header and shipment are
inserted into database tables INL_CHARGE_LINES and INL_ASSOCIATIONS
from output parameter Charge Lines PL/SQL table charge_ln_rec.
11
Define Charges/Cost Factors
Use following query to identify the value of the parameter charge_line_type_id of the
charge type setup in above screen.
select price_element_type_id charge_line_type_id, price_element_code charge_code
from PON_PRICE_ELEMENT_TYPES
where price_element_code ='FREIGHT'
12
Sample Code: Implement Customized Charges
Package INL_CUSTOM_PUB
create or replace
PACKAGE BODY INL_CUSTOM_PUB AS
PROCEDURE Get_Charges(
p_ship_header_rec IN inl_ship_headers%ROWTYPE,
p_ship_ln_group_tbl IN inl_charge_pvt.ship_ln_group_tbl_tp,
p_ship_ln_tbl_tp IN inl_charge_pvt.ship_ln_tbl_tp,
x_charge_ln_tbl OUT NOCOPY inl_charge_pvt.charge_ln_tbl,
x_override_default_processing OUT NOCOPY BOOLEAN,
x_return_status OUT NOCOPY VARCHAR2 IS
BEGIN
-- x_override_default_processing := FALSE;
INL_CUSTOM_SAMPLE.Get_Charges(
p_ship_header_rec => p_ship_header_rec,
p_ship_ln_group_rec => p_ship_ln_group_rec,
p_ship_ln_tbl => p_ship_ln_tbl,
x_charge_ln_tbl => x_charge_ln_tbl,
x_return_status => x_return_status);
x_override_default_processing := TRUE;
RETURN;
END Get_Charges;
END INL_CUSTOM_PUB;
13
Package INL_CUSTOM_SAMPLE
create or replace
PACKAGE BODY INL_CUSTOM_SAMPLE AS
-- This custom code is for creating a $100 charge to be prorated into all Shipment Lines
-- of the Line Group passed as the input parameter.
PROCEDURE Get_Charges(
p_ship_header_rec IN inl_ship_headers%ROWTYPE,
p_ship_ln_group_rec IN inl_charge_pvt.ship_ln_group_rec,
p_ship_ln_tbl IN inl_charge_pvt.ship_ln_tbl,
x_charge_ln_tbl OUT NOCOPY inl_charge_pvt.charge_ln_tbl,
x_return_status OUT NOCOPY VARCHAR2)
IS
i number;
l_debug_info varchar2(3000);
charge_ln inl_charge_pvt.charge_ln_rec;
BEGIN
x_charge_ln_tbl(1).charge_line_type_id := 62;
x_charge_ln_tbl(1).landed_cost_flag := 'Y';
x_charge_ln_tbl(1).update_allowed := 'N';
x_charge_ln_tbl(1).source_code := 'OI';
x_charge_ln_tbl(1).charge_amt := 100;
x_charge_ln_tbl(1).currency_code := 'USD';
-- Association attributes
x_charge_ln_tbl(1).to_parent_table_name := 'INL_SHIP_LINE_GROUPS';
x_charge_ln_tbl(1).to_parent_table_id :=
p_ship_ln_group_rec.ship_line_group_id;
END Get_Charges;
END INL_CUSTOM_SAMPLE
References
1. Oracle Landed Cost Management Process Guide Release 12.1(Part No. E14299-
02)
14