Sei sulla pagina 1di 10

6/28/2019 Document 1674412.

1
Copyright (c) 2019, Oracle. All rights reserved. Oracle Confidential.

How To Customize Oracle Asset Tracking to Meet Specific Business Requirements (Doc ID
1674412.1)

In this Document

Goal
Solution
Purpose
Scope
Details
Overview
Client Extensions Process Flow
List of Client Extension Stubs
Client Extension Stubs Code

APPLIES TO:

Oracle Asset Tracking - Version 12.1.1 and later


Information in this document applies to any platform.

GOAL

This document provides details about available client extention hooks that can be used to change default logic of Oracle
Asset Tracking.

SOLUTION

Purpose
To provide details about available client extention hooks that can be used to change default logic of Oracle Asset Tracking.
These client extention hooks can offer great flexibility for customers to implement their own logic to derive the attributes
for a fixed asset during the asset creation/move processes in Oracle Asset Tracking module.

Scope
This article is intended for Asset Tracking implementers and/or Application Administrators for R12.

Details

Overview

Client extensions enable users to extend Oracle Asset Tracking by allowing custom logic to supersede the default logic
shipped with Oracle Asset Tracking which is used during the asset creation process or synchronization of asset moves.

Client Extensions Process Flow

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 1/10
6/28/2019 Document 1674412.1

List of Client Extension Stubs

The following client extension stubs can be used to derive the attributes for a fixed asset during the asset creation/move
processes:

Client Extension Stub Usage

get_asset_name To override the default functionality of deriving the asset


name

get_asset_description To override the default functionality of deriving the


description on an asset

get_asset_category To override the default functionality of deriving the asset


category

get_book_type To override the default functionality of deriving the Fixed


Assets Book Type code

get_date_place_in_service To override the default functionality of deriving the Date


Placed In Service of an asset

get_asset_key To override the default functionality of deriving the asset


key

get_asset_location To override the default functionality of deriving the asset


location

get_deprn_expense_ccid To override the default functionality of deriving the


Depreciation Expense code combination ID

get_search_method To override the default functionality of deriving the search


method to be used to search for an existing asset

get_tag_number To override the default functionality of deriving the tag


number of an asset, if applicable

get_model_number To override the default functionality of deriving the model


number of an asset, if applicable

get_manufacturer To override the default functionality of deriving the


manufacturer of an asset

get_employee To override the default functionality of deriving the


https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 2/10
6/28/2019 Document 1674412.1

employee assigned to an asset

get_payables_ccid To override the default functionality of the deriving the


Asset Clearing Code combination ID

get_txn_class_flag To override the default functionality of the deriving the


Transaction Class Flag

get_catchup_flag To override the default functionality of the deriving the


Depreciation Catchup Flag

get_inv_depr_acct To override the default functionality of the deriving the


dummy inventory acct for depreciable items

get_inventory_item To override the default functionality of


maintaining/creating Fixed Asset using Inventory Item

get_non_mtl_retire_flag To override the default functionality of Retiring Non


Material Costs

get_product_code To override the default functionality of deriving Product


Code which will be used in grouping the asset

get_redeploy_flag To override the default functionality to check if the asset is


being redeployed

skip_asset_creation To override the default functionality of creating assets and


programatically block asset creation

get_asset_type_n_dpis To override the default functionality of CAPITALIZED asset


type

populate_mass_addition_dff To override the default functionality of deriving


po_distribution_id for the line_type_lookup_code

Client Extension Stubs Code

Empty stubs are shipped with Oracle Asset Tracking via package CSE_ASSET_CLIENT_EXT_STUB (CSEFASTB.pls). Custom
code need to be added in any of the below stubs, if the default functionality need to be overridden:

1. The default value of the hook (x_hook_used) is 0 when empty stubs are shipped with Oracle Asset Tracking
2. In order for the custom logic to be enforced by Oracle Asset Tracking, set x_hook_used to 1 in any of the following
stubs (by default x_hook_used is set to 0)
3. It is suggested that you define appropriate error handling routines to capture exception messages
4. Custom code added in any of these client extension stubs are considered pure customization and customers are
responsible to maintain it
5. Oracle is not responsible for any issues occur due to implementing such custom code
6. Custom code written within client extension stubs are preserved during the regular patch application

PROCEDURE get_asset_name(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec,
x_asset_name OUT NOCOPY VARCHAR2,
x_hook_used OUT NOCOPY NUMBER,
x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- Please set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving asset name.
NULL ;
END get_asset_name;

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 3/10
6/28/2019 Document 1674412.1

PROCEDURE get_asset_description(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_description OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving asset description.
NULL ;
END get_asset_description ;

PROCEDURE get_asset_category(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Asset Category

NULL ;
END get_asset_category ;

PROCEDURE get_book_type(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving FA book type code .
NULL ;
END get_book_type ;

PROCEDURE get_date_place_in_service(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_in_service_date OUT NOCOPY DATE
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Date Placed In Service.
NULL ;
END get_date_place_in_service ;

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 4/10
6/28/2019 Document 1674412.1

PROCEDURE get_asset_key(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_asset_key_ccid OUT NOCOPY NUMBER
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving asset key.
NULL ;
END get_asset_key ;

PROCEDURE get_asset_location(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving asset location.
NULL ;
END get_asset_location ;

PROCEDURE get_deprn_expense_ccid(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_deprn_expense_ccid OUT NOCOPY NUMBER
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Depreciation Expense CCID.
NULL ;
END get_deprn_expense_ccid ;

PROCEDURE get_search_method(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_search_method OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving search method .
NULL ;
END get_search_method ;

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 5/10
6/28/2019 Document 1674412.1

PROCEDURE get_tag_number(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_tag_number OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving tag number.
NULL ;
END get_tag_number ;

PROCEDURE get_model_number(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_model_number OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving model number.
NULL ;
END get_model_number ;

PROCEDURE get_manufacturer(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_manufacturer_name OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving manufacturer name.
NULL ;
END get_manufacturer ;

PROCEDURE get_employee(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_employee_id OUT NOCOPY NUMBER
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Employee ID.
NULL ;
END get_employee ;

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 6/10
6/28/2019 Document 1674412.1

PROCEDURE get_payables_ccid(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_payables_ccid OUT NOCOPY NUMBER
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Payables CCID.
NULL ;
END get_payables_ccid ;

PROCEDURE get_txn_class_flag(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, p_txn_class IN VARCHAR2
, x_process_flag OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN

x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Transaction Class Flag.
END get_txn_class_flag ;

PROCEDURE get_catchup_flag(
p_asset_number IN VARCHAR2,
p_instance_asset_id IN NUMBER,
x_catchup_flag OUT NOCOPY VARCHAR2,
x_hook_used OUT NOCOPY NUMBER,
x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Depreciation Catchup Flag.

END get_catchup_flag ;

PROCEDURE get_inv_depr_acct(
p_mtl_transaction_id IN NUMBER
, x_dummy_acct_id OUT NOCOPY NUMBER
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN

x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving the dummy inventory acct for depreciable items.
END get_inv_depr_acct ;
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 7/10
6/28/2019 Document 1674412.1

PROCEDURE get_inventory_item(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN

x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of maintaining/creating Fixed Asset using Inventory Item.
-- By default Fixed Asset NOT will be created based on Inventory Item.
-- If you want to create Fixed Asset based on Inventory Item, please set the
-- x_inventory_item_id to the Inventory_item_id, which you can get from CSI_TRANSACTION_ID

END get_inventory_item ;

PROCEDURE get_non_mtl_retire_flag(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, p_asset_id IN NUMBER
, x_retire_flag OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN

x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of Retiring Non Material Costs.

END get_non_mtl_retire_flag ;

PROCEDURE get_product_code(
p_asset_attrib_rec IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
, x_product_code OUT NOCOPY VARCHAR2
, x_hook_used OUT NOCOPY NUMBER
, x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN

x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of deriving Product Code which will be used
-- in grouping the asset

END get_product_code ;

PROCEDURE get_redeploy_flag(
p_inventory_item_id IN NUMBER,
p_serial_number IN VARCHAR2,
p_transaction_date IN DATE,
x_redeploy_flag OUT NOCOPY VARCHAR2,
x_hook_used OUT NOCOPY NUMBER,
x_error_msg OUT NOCOPY VARCHAR2)
IS
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 8/10
6/28/2019 Document 1674412.1
BEGIN

x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality to check if the asset is being redeployed

END get_redeploy_flag ;

PROCEDURE skip_asset_creation(
p_inventory_item_id IN OUT NOCOPY NUMBER
, p_organization_id IN OUT NOCOPY NUMBER
, p_csi_transaction_id IN OUT NOCOPY NUMBER
, p_depreciable_item_flag IN OUT NOCOPY VARCHAR2
, x_skip_flag OUT NOCOPY VARCHAR2
, x_hook_used out nocopy number
, x_error_msg OUT NOCOPY VARCHAR2)
IS

l_return_status varchar2(1) := fnd_api.g_ret_sts_success;


l_error_message varchar2(2000);

BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override asset


-- creation process

-- After skipping Asset creation if the CSI transaction needs to be updated to


-- COMPLETE, please use API to complete the transaction
-- cse_asset_creation_pkg.complete_csi_txn(
-- p_csi_txn_id => p_csi_transaction_id,
-- x_return_status => l_return_status,
-- x_error_message => l_error_message);

END skip_asset_creation ;

PROCEDURE get_asset_type_n_dpis (
p_instance_id IN NUMBER
, p_inventory_item_id IN NUMBER
, x_asset_type OUT NOCOPY VARCHAR2
, x_date_placed_inservice OUT NOCOPY DATE
, x_hook_used out nocopy number
, x_error_msg OUT NOCOPY VARCHAR2
)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to override the default
-- functionality of CAPITALIZED asset type

-- Return either 'CAPITALIZED' or 'CIP' for x_asset_type


-- If asset type is 'CIP' then return FND_API.G_MISS_DATE for x_date_placde_inservice
END get_asset_type_n_dpis ;

PROCEDURE populate_mass_addition_dff (
x_mass_add_rec IN OUT NOCOPY fa_mass_additions%rowtype
, x_hook_used out nocopy NUMBER

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 9/10
6/28/2019 Document 1674412.1
, x_error_msg OUT NOCOPY VARCHAR2
)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add your code here if you want to pass mass


-- addition dff (ie) x_mass_add_rec.attribute1 to
-- x_mass_add_rec.attribute30, context etc

END populate_mass_addition_dff;

PROCEDURE derive_po_distribution_id (
p_invoice_distribution_id IN NUMBER,
p_line_type_lookup_code IN VARCHAR2,
x_derived_po_distribution_id OUT NOCOPY NUMBER,
x_hook_used OUT NOCOPY NUMBER,
x_error_msg OUT NOCOPY VARCHAR2)
IS
BEGIN
x_hook_used := 0 ;
-- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
x_error_msg := null ;

-- Please add the logic to derive po_distribution_id for the


-- line_type_lookup_code

END derive_po_distribution_id;
Didn't find what you are looking for?

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11ikj5neqq_453&id=1674412.1 10/10

Potrebbero piacerti anche