My Oracle Support Banner

How to define a Defaulting Sourcing Rules as PL/SQL API that use the ONT_HEADER_DEF_HDLR.g_record.attribute5 value? (Doc ID 1988263.1)

Last updated on JUNE 05, 2023

Applies to:

Oracle Order Management - Version 12.1.1 and later
Information in this document applies to any platform.
*** Currency Check 15-Aug-2016 ***

Goal

How to define a Defaulting Sourcing Rules as PL/SQL API that use the ONT_HEADER_DEF_HDLR.g_record.attribute5 value?

Summary of Issue:
As suggest on the attachment "OM Defaulting Steps" present in "OM-DEF: Defaulting Rules - FAQ (Doc ID 1320122.1)"
to define a Defaulting Sourcing Rules as PL/SQL API we created a package XX_CUST_OM_DEFAULTING_RULE with
function Get_SalesRep_Agency having the signature

FUNCTION Get_SalesRep_Agency(p_database_object_name IN VARCHAR2,
  p_attribute_code IN VARCHAR2)
RETURN VARCHAR2;

Set for Defaulting Sourcing Rule:
Application: Order Management
Entity: Order Header
for the Attribute: Salesperson
as Defaulting Condition in sequence


1 - PL/SQL API
  package Name: XX_CUST_OM_DEFAULTING_RULE
  function Name: Get_SalesRep_Agency
  Attribute1: OE_AK_ORDER_HEADERS_V
2 - Related Record : Agreement.Salesperson
3 - Related Record : Ship To.Salesperson
4 - Related Record : Invoice To.Salesperson
5 - Application Profile : OM: Default Salesrep
6 - Submitted the concurrent "Defaulting Generator".

The rule starts, but the value obtained from function PR_CUST_OM_DEFAULTING_RULE.Get_SalesRep_Agency it's null
because ONT_HEADER_DEF_HDLR.g_record.attribute5 it's empty so we can't use it to obtain the correct salesrep_id.
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.