DBA Data[Home] [Help]

PACKAGE: APPS.OE_DUAL_UOM_UTIL

Source


1 PACKAGE OE_DUAL_UOM_UTIL AUTHID CURRENT_USER AS
2 /* $Header: OEXUDUMS.pls 120.0.12020000.2 2013/01/11 01:12:20 gabhatia noship $ */
3 
4 
5 TYPE Inventory_Item_Rec_Type IS RECORD
6 (   Inventory_item_id     mtl_system_items.Inventory_item_id%TYPE ,
7     Org_id                mtl_system_items.organization_id%TYPE ,
8     primary_uom_code      mtl_system_items.primary_uom_code%TYPE ,
9     secondary_uom_code    mtl_system_items.secondary_uom_code%TYPE  ,
10     inventory_item_flag   mtl_system_items.inventory_item_flag%TYPE  ,
11     shippable_item_flag   mtl_system_items.shippable_item_flag%TYPE ,
12     reservable_type       mtl_system_items.reservable_type%TYPE ,
13     tracking_quantity_ind mtl_system_items.tracking_quantity_ind%TYPE  ,
14     ordered_uom_class     mtl_units_of_measure.uom_class%TYPE,
15     primary_uom_class     mtl_units_of_measure.uom_class%TYPE,
16     secondary_uom_class   mtl_units_of_measure.uom_class%TYPE,
17     wms_enabled_flag      VARCHAR2(1)
18 );
19 
20 
21 ------------------------------------------------------------------------------------------------------
22 ---------------------------------------------------------------------
23 -- Function get_fulfillment_eligible
24 --
25 -- API to determine whether fulfillment_base should be calculated or not for current line_id
26 -- IN parameters -
27 -- p_line_rec   : The function will take OE_Order_PUB.Line_Rec_Type record
28 --                containing line_id as input and return Boolean value Indicating, whether FB
29 --                on line should be calculated as per new functionality or not.
30 --                Boolean TRUE implies : Yes, calculate FB
31 --                Boolean FALSE implies : No, not eligible to calculate FB
32 -- OUT parameters -
33 -- p_inventory_item_rec :
34 -- A new record type structure Inventory_Item_Rec_Type is defined.
35 -- In get_fulfillment_eligible , we will query mtl_system_items to fetch property of a item,
36 -- we use thi swuery to fetch other required parameters like primary uom of item (to be used later in derive_fulfillment_base API).
37 ---------------------------------------------------------------------
38 
39 Function get_fulfillment_eligible
40             (   p_line_rec  IN OE_Order_PUB.Line_Rec_Type  ,
41                 p_inventory_item_rec OUT NOCOPY Inventory_Item_Rec_Type
42              ) RETURN BOOLEAN;
43 ------------------------------------------------------------------------------------------------------
44 
45 ---------------------------------------------------------------------
46 -- Function get_fulfillment_base
47 --
48 -- GROUP API to return value of fulfillment_base filed on a line.
49 -- IN parameters -
50 -- p_line_rec   : The function will take line_id as input, query oe_order_lines_all table and return value of fulfillment_base field.
51 ---------------------------------------------------------------------
52 Function get_fulfillment_base
53                (   p_line_id  IN NUMBER
54                 ) RETURN VARCHAR2;
55 ---------------------------------------------------------------------
56 
57 ---------------------------------------------------------------------
58 -- Function derive_fulfillment_base
59 --
60 --This api will be called from oe_line_util.pre_write procedure to fetch value for
61 --a new database column (fulfillment_base) on the order line to store the fulfillment
62 --BASE which can be Primary (P) or Secondary(S) or NULL. This column gets populated
63 --at the time of UOM Defaulting/Change as well as change of ITEM or WAREHOUSE or Return reference line
64 --(only when new profile OM: Default Fulfillment Base is set to YES)
65 --This API will also be called from OE_Bulk_Process_Line.Populate_Internal_Fields to populate fulfillment_base
66 --column from HVOP flow (for dual uom items only when new profile OM: Default Fulfillment Base is set to YES).
67 -- IN parameters -
68 -- p_line_rec   : The function will take OE_Order_PUB.Line_Rec_Type record contains line_id , org_id ,ship_from_org_id ,
69 --                inventory_item_id etc as input and return CHAR value (Null, 'P' or 'S') .
70 --                'P' implies : Primary
71 --                'S' implies : Secondary
72 --                 Null implies: line not eligible for FB field.
73 ---------------------------------------------------------------------
74 ------------------------------------------------------------------------------------------------------
75 ---It is PVT API as per FDD 3.1.3.3
76 
77 Function derive_fulfillment_base
78 (   p_line_rec                      IN OE_Order_PUB.Line_Rec_Type
79 ) RETURN varchar2;
80 
81 ------------------------------------------------------------------------------------------------------
82 ---------------------------------------------------------------------
83 -- PROCEDURE validate_fulfillment_base
84 --
85 --
86 --This api will be called from oe_line_util.apply_attribute_changes procedure when
87 -- FB on a line is changing form null/P to S or vice versa. The API will validate
88 -- if the change should be allowed on FB field...if not it will raise error
89 -- IN parameters -
90 -- p_line_rec   : The proeudre will for validation of fulfillment_base field from OE_Order_PUB.Line_Rec_Type
91 ---------------------------------------------------------------------
92 PROCEDURE validate_fulfillment_base
93 (   p_line_rec                    IN  OE_Order_PUB.Line_Rec_Type
94 );
95 
96 END OE_DUAL_UOM_UTIL;