1 PACKAGE user_pkg_lot AS
2 /* $Header: INVUDLGS.pls 120.1.12010000.2 2008/07/29 12:55:23 ptkumar ship $ */
3 /*#
4 * The user defined lot generation procedures allow a user to create a lot
5 * in the system using the lot number generation logic defined by a user (and not by Oracle).
6 * @rep:scope public
7 * @rep:product INV
8 * @rep:lifecycle active
9 * @rep:displayname User Defined Lot Generation API
10 * @rep:category BUSINESS_ENTITY INV_LOT
11 */
12 /*#
13 * Use this procedure to define the logic to be used by the system
14 * when generating the lot numbers. This procedure is invoked by the
15 * system while generating a new lot number, if the lot generation
16 * level is set as "User Defined" for a particular organization.
17 * The user needs to fill in the logic for generating lot number in
18 * the stub provided and apply the package to the database.
19 * @ param p_org_id Organization Id is passed as input in this variable
20 * @ paraminfo {@rep:required}
21 * @ param p_inventory_item_id Inventory Item Id is passed as input in this variable
22 * @ paraminfo {@rep:required}
23 * @ param p_transaction_date Transaction Date is passed as input in this variable
24 * @ paraminfo {@rep:required}
25 * @ param p_revision Revision of the item is passed as input in this variable
26 * @ paraminfo {@rep:required}
27 * @ param p_subinventory_code Subinventory Code where the lot number will reside is passed as input in this variable
28 * @ paraminfo {@rep:required}
29 * @ param p_locator_id Locator Id is passed as input in this variable
30 * @ paraminfo {@rep:required}
31 * @ param p_transaction_Type_id Transaction Type Id is passed as input in this variable
32 * @ paraminfo {@rep:required}
33 * @ param p_transaction_Action_id Transaction Action Id is passed as input in this variable
34 * @ paraminfo {@rep:required}
35 * @ param p_transaction_source_type_id Transaction Source Type is passed as input in this variable
36 * @ paraminfo {@rep:required}
37 * @ param p_lot_number Lot number to be generated is passed as input in this variable
38 * @ paraminfo {@rep:required}
39 * @ param x_return_status Return status indicating success or failure.
40 * @ paraminfo {@rep:required}
41 * @return The new Lot Number generated.
42 * @rep:scope public
43 * @rep:lifecycle active
44 * @rep:displayname Generate User Defined Lot Number
45 */
46 -- OPM Convergence - added parent_lot_number
47
48 FUNCTION generate_lot_number(p_org_id IN NUMBER,
49 p_inventory_item_id IN NUMBER,
50 p_transaction_date IN DATE,
51 p_revision IN VARCHAR2,
52 p_subinventory_code IN VARCHAR2,
53 p_locator_id IN NUMBER,
54 p_transaction_type_id IN NUMBER,
55 p_transaction_action_id IN NUMBER,
56 p_transaction_source_type_id IN NUMBER,
57 p_lot_number IN VARCHAR2,
58 p_parent_lot_number IN VARCHAR2,
59 x_return_status OUT NOCOPY VARCHAR2)
60 RETURN VARCHAR2;
61
62 /* Bug6836808
63 * Use this Function To Allow or Disallow
64 * Creation of New Lots Depending on some user logic,
65 * The user can write his own piece of code for the function
66 * to return TRUE or FALSE.
67 */
68
69 FUNCTION Allow_New_Lots( p_transaction_type_id IN NUMBER
70 )
71 RETURN BOOLEAN;
72
73 END user_pkg_lot;
74
75