1 PACKAGE inv_kanban_pkg AUTHID CURRENT_USER AS
2 /* $Header: INVKBAPS.pls 115.15 2004/02/09 05:36:07 kkoothan ship $ */
3
4 --This package is created to finish the kanban mobile transactions
5 -- including replenishment and inquiry
6
7
8 TYPE t_genref IS REF CURSOR;
9
10 FUNCTION status_check(from_status_id IN NUMBER, to_status IN NUMBER)
11 RETURN NUMBER;
12
13 PROCEDURE replenishcard
14 (x_message OUT NOCOPY VARCHAR2,
15 x_status OUT NOCOPY VARCHAR2,
16 p_org_id IN NUMBER,
17 p_kanban_card_number IN VARCHAR2,
18 p_lot_item_id IN NUMBER ,
19 p_lot_number IN VARCHAR2 ,
20 p_lot_item_revision IN VARCHAR2 ,
21 p_lot_subinventory_code IN VARCHAR2,
22 p_lot_location_id IN NUMBER ,
23 p_lot_quantity IN NUMBER,
24 p_replenish_quantity IN NUMBER );
25
26 FUNCTION getlocatorname(org_id IN NUMBER, locator_id IN NUMBER)
27 RETURN VARCHAR2;
28
29 FUNCTION getorgcode(p_org_id IN NUMBER)
30 RETURN VARCHAR2;
31
32 FUNCTION getsuppliersitename(supplier_site_id IN NUMBER)
33 RETURN VARCHAR2;
34
35 FUNCTION getdocmentnumber(v_document_header_id IN NUMBER, v_document_type_id IN NUMBER, v_document_detail_id IN NUMBER)
36 RETURN VARCHAR2;
37
38 PROCEDURE getreplenishinfo(
39 p_org_id IN NUMBER
40 , p_kanban_card_number IN VARCHAR2
41 , x_item OUT NOCOPY VARCHAR2
42 , x_item_description OUT NOCOPY VARCHAR2
43 , x_quantity OUT NOCOPY NUMBER
44 , x_zone OUT NOCOPY VARCHAR2
45 , x_project OUT NOCOPY VARCHAR2
46 , --PJM-WMS Integration
47 x_task OUT NOCOPY VARCHAR2
48 , --PJM-WMS Integration
49 x_locator OUT NOCOPY VARCHAR2
50 , x_supply_status OUT NOCOPY VARCHAR2
51 , x_source_type_id OUT NOCOPY NUMBER
52 , x_source_type OUT NOCOPY VARCHAR2
53 , x_source_org_id OUT NOCOPY NUMBER
54 , --PJM-WMS Integration
55 x_source_org OUT NOCOPY VARCHAR2
56 , x_source_zone OUT NOCOPY VARCHAR2
57 , x_source_project OUT NOCOPY VARCHAR2
58 , --PJM-WMS Integration
59 x_source_task OUT NOCOPY VARCHAR2
60 , --PJM-WMS Integration
61 x_source_locator OUT NOCOPY VARCHAR2
62 , x_wip_line OUT NOCOPY VARCHAR2
63 , x_supplier_name OUT NOCOPY VARCHAR2
64 , x_supplier_site OUT NOCOPY VARCHAR2
65 , x_item_id OUT NOCOPY NUMBER
66 , x_eligible_for_lbj OUT NOCOPY VARCHAR2
67 , x_bom_seq_id OUT NOCOPY NUMBER
68 , x_start_seq_num OUT NOCOPY NUMBER
69 , x_message OUT NOCOPY VARCHAR2
70 , x_status OUT NOCOPY VARCHAR2
71 );
72
73 PROCEDURE getsourcetypelov(x_kanban_ref OUT NOCOPY t_genref, p_source_type IN VARCHAR2);
74
75 PROCEDURE getsupplierlov(x_kanban_ref OUT NOCOPY t_genref, p_supplier_name IN VARCHAR2);
76
77 PROCEDURE getsuppliersitelov(x_kanban_ref OUT NOCOPY t_genref, p_supplier_site IN VARCHAR2, p_vendor_id IN NUMBER);
78
79 PROCEDURE getwiplinelov(x_kanban_ref OUT NOCOPY t_genref, p_organization_id IN NUMBER, p_wip_line IN VARCHAR2);
80
81 PROCEDURE getinquiryinfo(
82 x_kanban_ref OUT NOCOPY t_genref
83 , p_org_id IN NUMBER
84 , p_kanban_card_number IN VARCHAR2
85 , p_item_id IN NUMBER
86 , p_source_type_id IN NUMBER
87 , p_supplier IN VARCHAR2
88 , p_supplier_site IN VARCHAR2
89 , p_source_organization_id IN NUMBER
90 , p_source_sub IN VARCHAR2
91 , p_source_loc IN NUMBER
92 , p_wip_line_id IN NUMBER
93 , p_project_id IN NUMBER DEFAULT NULL
94 , p_task_id IN NUMBER DEFAULT NULL
95 );
96
97 /* VMI changes - Called from VendorSiteLOV though not used anymore*/
98 PROCEDURE get_vmi_vendor_site_lov(x_ref OUT NOCOPY t_genref, p_vendor_site_code IN VARCHAR2, p_vendor_id IN NUMBER);
99
100 /* Consignment Changes */
101 PROCEDURE get_vendor_lov(x_ref OUT NOCOPY t_genref, p_vendor VARCHAR2,p_vendor_site_id VARCHAR2 DEFAULT NULL);
102 --bug 2880891
103
104 PROCEDURE get_starting_lot_lov
105 (x_lot_num_lov OUT NOCOPY t_genref,
106 p_organization_id IN NUMBER,
107 p_assembly_item_id IN NUMBER,
108 p_bom_sequence_id IN NUMBER,
109 p_start_sequence_num IN VARCHAR2);
110
111 /** This procedure returns the details of the kanban card passed like
112 * Card Type, Card Status, Supply Status etc.,
113 * @param x_return_status Return Status
114 * @param x_msg_count Message Count
115 * @param x_msg_data Message Data
116 * @param x_card_type Kanban Card Type
117 * @param x_card_status Kanban Card Status
118 * @param x_supply_status Kanban Card Supply status
119 * @param x_status_check Kanban Card Supply status Check
120 * @param x_supply_status_meaning Kanban Card Supply status meaning
121 * @param p_organization_id Organization Id
122 * @param p_kanban_number Kanban Card Number
123 *
124 **/
125 PROCEDURE get_kanban_details(x_return_status OUT NOCOPY VARCHAR2
126 , x_msg_count OUT NOCOPY NUMBER
127 , x_msg_data OUT NOCOPY VARCHAR2
128 , x_card_type OUT NOCOPY NUMBER
129 , x_card_status OUT NOCOPY NUMBER
130 , x_supply_status OUT NOCOPY NUMBER
131 , x_status_check OUT NOCOPY NUMBER
132 , x_supply_status_meaning OUT NOCOPY VARCHAR2
133 , p_organization_id IN NUMBER
134 , p_kanban_number IN VARCHAR2);
135
136 /** This procedure returns the details of the kanban move order
137 * like Mo Line Id, MO Reference Type, MO Line Status etc., for the Kanban Card passed.
138 * @param x_return_status Return Status
139 * @param x_msg_count Message Count
140 * @param x_msg_data Message Data
141 * @param x_mo_line_id Kanban Move Order Line Id
142 * @param x_ref_type_code Move Order Reference Type
143 * @param x_mo_line_status_code Kanban Move Order Line Status
144 * @param x_mo_line_qty_diff (Kanban Move Order Line quantity delivered - Total Kanban Move Order Line quantity)
145 * @param p_organization_id Organization Id
146 * @param p_kanban_number Kanban Card Number
147 *
148 **/
149 PROCEDURE get_kanban_mo_details(x_return_status OUT NOCOPY VARCHAR2
150 , x_msg_count OUT NOCOPY NUMBER
151 , x_msg_data OUT NOCOPY VARCHAR2
152 , x_mo_line_id OUT NOCOPY NUMBER
153 , x_ref_type_code OUT NOCOPY NUMBER
154 , x_mo_line_status_code OUT NOCOPY NUMBER
155 , x_mo_line_qty_diff OUT NOCOPY NUMBER
156 , p_organization_id IN NUMBER
157 , p_kanban_number IN VARCHAR2);
158
159 END inv_kanban_pkg;
160