Beruflich Dokumente
Kultur Dokumente
1. INTRODUCTION .................................................................................. 4
2. USER HOOKS FOR CHARGES CREATION ................................ 4
3. USER HOOKS FOR CHARGES UPDATE ..................................... 6
4. USER HOOK FOR PRICING ............................................................. 8
5. USER HOOKS FOR SUBMITTING ORDERS ............................... 9
6. CONCLUSION ......................................................................................11
1. INTRODUCTION
Charges is a basic and core functionality used by many customers of Service, Depot Repair, and Field Service for
billing and for the entering of customer logistics orders to handle exchanges, replacements, and return for credit.
It is tightly integrated with TeleService, Field Service, and Depot Repair applications. In addition to the core
functionality provided out of the box, Charges also includes a set of user hooks that can be leveraged to
customize and extend customer functionality. These user hooks include:
Charges Creation Pre and Post Hooks
Charges Update Pre and Post Hooks
Charges Pricing User Hook
Submit Order User Hooks
This document presents each of these user hooks and describes its usage and purpose.
PROCEDURE Create_Charge_Details_Post (
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_object_version_number OUT NOCOPY NUMBER,
x_estimate_detail_id OUT NOCOPY NUMBER,
x_line_number OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_resp_appl_id IN NUMBER DEFAULT NULL,
p_resp_id IN NUMBER DEFAULT NULL,
p_user_id IN NUMBER DEFAULT NULL,
p_login_in IN NUMBER DEFAULT NULL,
p_transaction_control IN VARCHAR2 DEFAULT FND_API.G_TRUE,
p_est_detail_recIN CS_CHARGE_DETAILS_PUB.Charges_Rec_Type);
p_api_version IN NUMBER Parameter for the API version. If the API is called
with a value that does not match the version of the
API being called, the API returns an Unexpected
Error message.
p_init_msg_list IN VARCHAR2 FND_API.G_FALSE or FND_API.G_TRUE.
FND_API.G_TRUE causes the API to initialize
the message stack. If the value is
FND_API.G_FALSE, the calling program must
initialize the message stack using the API
FND_MSG_PUB.initialize.
Default FND_API.G_FALSE
p_commit IN VARCHAR2 Indicates if the API is to commit its results.
Default FND_API.G_FALSE
1 As of the publication date of this whitepaper, the official R12 Charges API whitepaper has not yet been released. Please
refer to that whitepaper for the exact API signatures and parameter names.
3.1 Description
Charges can be updated through the TeleService UIs or through the Update_Charge_Details API. This API
supports usage of the Customer Pre and Post JTF user hooks. As the name suggests, the pre hook is executed
before the charge lines are updated. The post hook is executed after the charge lines are updated. The customer
user hook APIs are defined in packages CS_Charge_Details_CUHK and are invoked from within the
CS_Charge_Details_PVT.Update_Charge_Details API.
3.2 Usage Examples
Please refer to the examples given in section 2.
PROCEDURE Update_Charge_Details_Post (
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_object_version_number OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_estimate_detail_id OUT NOCOPY NUMBER,
p_resp_appl_id IN NUMBER := FND_GLOBAL.RESP_APPL_ID,
p_resp_id IN NUMBER := FND_GLOBAL.RESP_ID,
p_user_id IN NUMBER := FND_GLOBAL.USER_ID,
p_login_id IN NUMBER := NULL,
p_transaction_control IN VARCHAR2 := FND_API.G_TRUE,
p_est_detail_rec IN OUT Charges_Rec_Type := G_MISS_CHRG_REC);
p_api_version IN NUMBER Parameter for the API version. If the API is called
with a value that does not match the version of the
API being called, the API returns an Unexpected
Error message.
p_init_msg_list IN VARCHAR2 FND_API.G_FALSE or FND_API.G_TRUE.
FND_API.G_TRUE causes the API to initialize
the message stack. If the value is
FND_API.G_FALSE, the calling program must
initialize the message stack using the API
FND_MSG_PUB.initialize.
Default FND_API.G_FALSE
p_commit IN VARCHAR2 Indicates if the API is to commit its results.
Default FND_API.G_FALSE
p_validation_level IN NUMBER Parameter for controlling the validation level in the
API. Values are
FND_API.G_VALID_LEVEL_FULL and
FND_API.G_VALID_LEVEL_NONE.
Default FND_API. G_VALID_LEVEL_FULL
x_return_status OUT VARCHAR2 Return status of the API request.
x_msg_count OUT NUMBER Count of the messages returned by the API.
x_object_version_num OUT NUMBER Object version of the charge line created.
ber
x_msg_data OUT VARCHAR2 A concatenated error/warning message string.
x_estimate_detail_id OUT NUMBER Estimate detail identifier of the charge line created.
p_resp_appl_id IN NUMBER User Responsibility Application Identifier.
Default fnd_global.resp_appl_id
p_resp_id IN NUMBER User Responsibility Identifier
Default fnd_global.resp_id
p_user_id IN NUMBER User Identifier
Default fnd_global.user_id
p_login_id IN NUMBER Login Session Identifier
Default fnd_global.login_id
p_transaction_control IN VARCHAR2 Used by the API for transaction Control. This
parameter is set to 'F' (False) only if the API is
called from triggers, as triggers do not allow
Transaction Control in procedures.
p_est_detail_rec IN CHARGES_R PL/SQL record type that has all the attributes
EC_TYPE users can provide to create charge details.
Please see section 3.6.1 below for more details.
4.1 Description
The Call Pricing Item API is invoked during the creation of a charge line as well during the update of a charge
line. If a charge line is being created, this API is called to return the price of the item selected, given the quantity,
contract and pricelist for the charge line. After the charge line is created, if the user attempts to change the item,
quantity, contract, or the pricelist values, then this API is again invoked to recalculate the price.
The Call Pricing Item API supports usage of the Customer Pre JTF user hook. If the user hook is called and a
list price is returned, then no additional calls are made to the Pricing API to fetch the item price. This is different
from other pre hooks that simply precedes the normal procedure invocation.
4.2 Usage
Example 1: Customers can leverage this user hook to integrate with Advanced Pricing to retrieve the item price
based on modifiers, qualifiers, and other advanced pricing features. The logic in the user hook will need to inquire
Advanced Pricing tables either through SQL or Advanced Pricing APIs to calculate the appropriate item price.
Customers are strongly advised to work with the Advanced Pricing team to develop the logic.
Example 2: Customers can leverage this user hook to perform currency conversion of the item price. The
current Charges functionality does not allow agents to select a currency for the charge line that is different from
the base currency of the pricelist. Customers can customize the UI to allow users to select a different currency
and trigger a call to the Pricing API. The logic in the Pricing user hook can then be used to do the currency
conversion to return the correct item price based on the newly selected currency.
PROCEDURE Create_Order (
p_api_version_number IN NUMBER,
l_header_rec IN OUT NOCOPY ASO_QUOTE_PUB.Qte_Header_Rec_Type ,
l_hd_shipment_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Shipment_Tbl_Type,
l_line_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Qte_Line_Tbl_Type,
l_line_dtl_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Qte_Line_Dtl_Tbl_Type,
l_ln_shipment_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Shipment_Tbl_Type,
l_hd_payment_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Payment_Tbl_Type,
l_line_price_adj_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Price_Adj_Tbl_Type,
l_lot_serial_tbl IN OUT NOCOPY ASO_ORDER_INT.Lot_Serial_Tbl_Type,
l_control_rec IN OUT NOCOPY ASO_ORDER_INT.control_rec_type,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2);
PROCEDURE Update_Order (
p_api_version_number IN NUMBER,
l_header_recIN OUT NOCOPY ASO_QUOTE_PUB.Qte_Header_Rec_Type,
l_line_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Qte_Line_Tbl_Type,
l_line_dtl_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Qte_Line_Dtl_Tbl_Type,
l_ln_shipment_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Shipment_Tbl_Type,
l_hd_payment_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Payment_Tbl_Type,
l_line_price_adj_tbl IN OUT NOCOPY ASO_QUOTE_PUB.Price_Adj_Tbl_Type,
l_lot_serial_tbl IN OUT NOCOPY ASO_ORDER_INT.Lot_Serial_Tbl_Type,
l_control_rec IN OUT NOCOPY ASO_ORDER_INT.Control_Rec_Type,
x_order_header_rec OUT NOCOPY ASO_ORDER_INT.Order_Header_rec_type,
x_order_line_tbl OUT NOCOPY ASO_ORDER_INT.Order_Line_Tbl_Type,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2);
6. CONCLUSION
User hooks are designed to provide flexibility to incorporate additional logic within the core applications. The
Charges user hooks presented in the document allow customers to customize the functionality in the charges module
without having to worry about future upgrades and patches. Because they occur in the API level, the user hook logic
applies whether charges are created on the UI level or through APIs invoked from its integrated applications.
2Leveraging these user hooks is an obvious choice for extending charges functionality.
2 Bug 15959759 has been filed to invoke the create/update charges user hook from the UI.
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
oracle.com