Unable to Default Line Type Based on Ordered Item DFF (Doc ID 1365994.1)

Last updated on JULY 29, 2016

Applies to:

Oracle Order Management - Version 12.1.3 and later
Information in this document applies to any platform.
OEXEDEPB.pls
***checked for currency 22-Apr-2013***


Symptoms

On : 12.1.3 version, Transaction Entry

ACTUAL BEHAVIOR
---------------
Unable to default line_type on the order line from custom API

EXPECTED BEHAVIOR
-----------------------
Expect line_type on the order line to get default value from custom API

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1) Item DFF created at Org Level
2) During item creation, DFF value fill with line type value
3) Open Sales Order form
4) Go to SO Line level, take any item
5) Line type should be defaulted at Line type field at SO line level as per Defaulting Rule Setup
( with API having Package name - GEIIPL ONT Default Package and function name - Get_line_type


PACKAGE BODY GEIIPL_ONT_DEFAULT_PKG

FUNCTION GET_LINE_TYPE (
p_database_object_name IN VARCHAR2,
p_attribute_code IN VARCHAR2)
RETURN VARCHAR2
IS
v_header_rec OE_AK_ORDER_HEADERS_V%ROWTYPE;
v_line_rec OE_AK_ORDER_LINES_V%ROWTYPE;
v_line_type oe_transaction_types_tl.NAME%TYPE;
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
BEGIN
-- Getting the defaulting global record
-- v_header_rec := Ont_Header_Def_Hdlr.g_record;

IF l_debug_level > 0 THEN
   oe_debug_pub.add('GEIIPL_ONT_DEFAULT_PKG: Enter GET_LINE_TYPE');
END IF;

v_line_rec := Ont_Line_Def_Hdlr.g_record;
BEGIN
  SELECT attribute3
  INTO v_line_type
  FROM mtl_system_items_b
  WHERE INVENTORY_ITEM_ID = v_line_rec.INVENTORY_ITEM_ID
  AND organization_id = v_line_rec.SHIP_FROM_ORG_ID;
EXCEPTION WHEN NO_DATA_FOUND THEN
  v_line_type := NULL;
END;

IF l_debug_level > 0 THEN
  oe_debug_pub.add('GET_LINE_TYPE: v_line_type: '||v_line_type);
END IF;

RETURN(v_line_type);

END get_line_type;



Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms