WhitePaper LCM Customize Charges and Taxes Final
WhitePaper LCM Customize Charges and Taxes Final
Management
An Oracle White Paper
Mar 2010
Table of Contents
Customize Taxes and Charges in Landed Cost Management..............................................1
Table of Contents.................................................................................................................2
Executive Overview.............................................................................................................3
Introduction..........................................................................................................................3
Methods in Oracle Landed Cost Management....................................................................3
Pre-Receiving Flow........................................................................................................3
Landed Cost as a Service Flow.....................................................................................4
Prerequisite to use custom taxes and charges in LCM........................................................4
Releases and Patches.....................................................................................................4
Implement custom tax in estimated landed cost calculation...............................................4
Technical Overview........................................................................................................4
Process Flow...................................................................................................................5
Define Tax Code.............................................................................................................7
Sample Code: Implement Customized Tax.................................................................7
Implement custom charges in estimated landed cost calculation........................................9
Technical Overview........................................................................................................9
Process Flow.................................................................................................................10
Define Charges/Cost Factors......................................................................................12
Sample Code: Implement Customized Charges.......................................................13
References..........................................................................................................................14
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.
Technical Overview
Taxes calculation takes place in LCM depending on the following flows:
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.
Procedure INL_CHARGE_PVT.Generate_Taxes internally calls api
INL_CUSTOM_PUB.Get_Taxes which need to be modified to implement custom tax
logic.
Process Flow
Following diagram shows the process flow of API INL_CHARGE_PVT.Generate_Taxes
to calculate tax in estimated landed cost.
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.
Utility name
Type
:
Function
:
Pre-reqs
:
Parameters :
IN
:
OUT
: Get_Taxes
Public
None
p_ship_header_rec
p_ship_ln_groups_tbl
p_ship_lines_tbl
p_charge_lines_tbl
: x_tax_ln_tbl
x_override_default_processing
x_return_status
IN
IN
IN
IN
INL_TAX_PVT.Shipment_Header%ROWTYPE,
INL_TAX_PVT.sh_group_ln_tbl_tp,
INL_TAX_PVT.ship_ln_tbl_tp,
inl_tax_pvt.charge_ln_tbl_tp,
OUT inl_tax_pvt.tax_ln_tbl
OUT BOOLEAN
OUT NOCOPY VARCHAR2
--- 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
/* Code change begin to implement tax customization */
--
x_override_default_processing := FALSE;
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;
Technical Overview
Charge generation takes place in LCM depending on the following flows:
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.
Procedure INL_CHARGE_PVT.Generate_Charges internally calls api
INL_CUSTOM_PUB.Get_Charges which need to be modified to implement custom
charge logic.
Process Flow
Following diagram shows the process flow of API
INL_CHARGE_PVT.Generate_Charges to extract charges in estimated landed cost
calculation.
10
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
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
: Get_Charges
Public
None
p_ship_header_rec
p_ship_ln_group_rec
p_ship_ln_tbl
IN inl_charge_pvt.ship_header_rec_tp,
IN inl_charge_pvt.ship_ln_group_tbl_tp,
IN inl_charge_pvt.ship_ln_tbl_tp,
x_charge_ln_tbl
x_override_default_processing
x_return_status
PROCEDURE Get_Charges(
p_ship_header_rec
p_ship_ln_group_tbl
p_ship_ln_tbl_tp
x_charge_ln_tbl
x_override_default_processing
x_return_status
BEGIN
IN inl_ship_headers%ROWTYPE,
IN inl_charge_pvt.ship_ln_group_tbl_tp,
IN inl_charge_pvt.ship_ln_tbl_tp,
OUT NOCOPY inl_charge_pvt.charge_ln_tbl,
OUT NOCOPY BOOLEAN,
OUT NOCOPY VARCHAR2 IS
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;
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
p_ship_ln_group_rec
p_ship_ln_tbl
x_charge_ln_tbl
x_return_status
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
x_charge_ln_tbl(1).landed_cost_flag
x_charge_ln_tbl(1).update_allowed
x_charge_ln_tbl(1).source_code
x_charge_ln_tbl(1).charge_amt
x_charge_ln_tbl(1).currency_code
-- Association attributes
x_charge_ln_tbl(1).to_parent_table_name
x_charge_ln_tbl(1).to_parent_table_id
p_ship_ln_group_rec.ship_line_group_id;
END Get_Charges;
IN inl_ship_headers%ROWTYPE,
IN inl_charge_pvt.ship_ln_group_rec,
IN inl_charge_pvt.ship_ln_tbl,
OUT NOCOPY inl_charge_pvt.charge_ln_tbl,
OUT NOCOPY VARCHAR2)
:=
:=
:=
:=
:=
:=
62;
'Y';
'N';
'OI';
100;
'USD';
:= 'INL_SHIP_LINE_GROUPS';
:=
END INL_CUSTOM_SAMPLE
References
1. Oracle Landed Cost Management Process Guide Release 12.1(Part No. E1429902)
14