1 PACKAGE INV_LOT_API_PKG
2 /* $Header: INVVLTPS.pls 120.0 2005/05/25 05:25:00 appldev noship $ */
3 AS
4
5 g_ret_sts_success CONSTANT VARCHAR2(1) := 'S';
6 g_ret_sts_error CONSTANT VARCHAR2(1) := 'E';
7 g_ret_sts_unexp_error CONSTANT VARCHAR2(1) := 'U';
8 g_miss_num CONSTANT NUMBER := 9.99e125;
9 g_miss_char CONSTANT VARCHAR2(1) := CHR(0);
10 g_miss_date CONSTANT DATE := TO_DATE('1', 'j');
11 osfm_form_no_validate CONSTANT NUMBER := 1;
12 osfm_open_interface CONSTANT NUMBER := 2;
13 osfm_form_validate CONSTANT NUMBER := 3;
14 inv CONSTANT NUMBER := 4;
15 G_WMS_INSTALLED VARCHAR2(10);
16
17 /*Exception definitions */
18 g_exc_error EXCEPTION;
19 g_exc_unexpected_error EXCEPTION;
20
21 /*Local variable for stoRing the INV:DEBUG TRACE profile value */
22 g_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
23
24
25
26 -- This procedure populates the parent and child lot records and
27 -- returns them to the Create_Inv_Lot procedure.
28 PROCEDURE Populate_Lot_Records (
29 x_return_status OUT NOCOPY VARCHAR2
30 , x_msg_count OUT NOCOPY NUMBER
31 , x_msg_data OUT NOCOPY VARCHAR2
32 , x_child_lot_rec OUT NOCOPY MTL_LOT_NUMBERS%ROWTYPE
33 , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
34 , p_copy_lot_attribute_flag IN VARCHAR2
35 , p_source IN NUMBER
36 , p_api_version IN NUMBER
37 , p_init_msg_list IN VARCHAR2
38 , p_commit IN VARCHAR2
39 );
40
41 -- This procedure populates the grade code, origination type, expiration date,
42 -- retest date, expiration action code, expiration action date,hold date and
43 -- maturity date based on the values from mtl_system_items for a given
44 -- organization and inventory item id.
45 PROCEDURE Set_Msi_Default_Attr (
46 p_lot_rec IN OUT NOCOPY mtl_lot_numbers%ROWTYPE
47 , x_return_status OUT NOCOPY VARCHAR2
48 , x_msg_count OUT NOCOPY NUMBER
49 , x_msg_data OUT NOCOPY VARCHAR2
50 ) ;
51
52 -- This procedure performs the validations on the lot and defaults the missing attributes
53 -- as per the logic existing in the earlier create_inv_lot procedure.It returns the populate
54 -- lot record.
55 PROCEDURE Validate_Lot_Attributes(
56 x_return_status OUT NOCOPY VARCHAR2
57 , x_msg_count OUT NOCOPY NUMBER
58 , x_msg_data OUT NOCOPY VARCHAR2
59 , x_lot_rec IN OUT NOCOPY Mtl_Lot_Numbers%ROWTYPE
60 , p_source IN NUMBER
61 ) ;
62
63 -- This procedure validates the OMP related attributes like validations for parent lot , origination
64 -- type, grade code, expiration action date/code, retest date, maturity date , hold date.
65 PROCEDURE Validate_Additional_Attr(
66 x_return_status OUT NOCOPY VARCHAR2
67 , x_msg_count OUT NOCOPY NUMBER
68 , x_msg_data OUT NOCOPY VARCHAR2
69 , p_inventory_item_id IN NUMBER
70 , p_organization_id IN NUMBER
71 , p_lot_number IN VARCHAR2
72 , p_source IN NUMBER
73 , p_grade_code IN VARCHAR2
74 , p_retest_date IN DATE
75 , p_maturity_date IN DATE
76 , p_parent_lot_number IN VARCHAR2
77 , p_origination_date IN DATE
78 , p_origination_type IN NUMBER
79 , p_expiration_action_code IN VARCHAR2
80 , p_expiration_action_date IN DATE
81 , p_expiration_date IN DATE
82 , p_hold_date IN DATE
83 ) ;
84
85
86 PROCEDURE Delete_Lot(
87 x_return_status OUT NOCOPY VARCHAR2
88 , x_msg_count OUT NOCOPY NUMBER
89 , x_msg_data OUT NOCOPY VARCHAR2
90 , p_inventory_item_id IN NUMBER
91 , p_organization_id IN NUMBER
92 , p_lot_number IN VARCHAR2
93 ) ;
94
95 /** INVCONV ANTHIYAG 04-Nov-2004 Start **/
96 -- This Function would be used to check whether the lot number passed
97 -- exists in the database or not. As this uses Pragma Autonomous_transaction
98 -- it would check for the lots existing prior to the uncommitted transactions
99
100 FUNCTION Check_Existing_Lot_Db
101 (
102 p_org_id IN NUMBER
103 ,p_inventory_item_id IN NUMBER
104 ,p_lot_number IN VARCHAR2
105 ) RETURN BOOLEAN;
106
107 /** INVCONV ANTHIYAG 04-Nov-2004 End **/
108
109 END INV_LOT_API_PKG ;