1 PACKAGE flm_routing AUTHID CURRENT_USER AS
2 /* $Header: FLMRTGDS.pls 115.6 2004/07/27 23:19:00 ksuleman noship $ */
3
4 TYPE item_tbl_type IS TABLE OF NUMBER
5 INDEX BY BINARY_INTEGER;
6
7 TYPE item_rtg_type IS RECORD (
8 item_id NUMBER,
9 routing_designator BOM_ALTERNATE_DESIGNATORS.ALTERNATE_DESIGNATOR_CODE%TYPE);
10
11 TYPE item_rtg_tbl_type IS TABLE OF item_rtg_type
12 INDEX BY BINARY_INTEGER;
13
14 g_item_tbl item_tbl_type;
15 g_tbl_index NUMBER;
16
17 /********************************************************
18 * PROCEDURE: retrieve_items *
19 * *
20 * This procedure returns a list of items which *
21 * fulfill the filtering criteria passed in. *
22 * *
23 * Input: *
24 * - i_org_id: The organization id of the items. *
25 * - i_from_item: The inventory item name of the *
26 * lower item. *
27 * - i_to_item: The inventory item name of the *
28 * higher item. *
29 * The retrieved item must be between the lower *
30 * and higher item. *
31 * - i_product_family_id: The product family id of *
32 * the items. *
33 * - i_category_set_id: The category set *
34 * - i_category_id: Category id inside the *
35 * category set. *
36 * - i_planner_code: The planner code of the items.*
37 * - Added for enhancement #2647023 *
38 * - i_alternate_routing_designator: The retrieved *
39 * item should not have a routing existing *
40 * with the same item-alternate combination. *
41 * Output: *
42 * - o_item_tbl: The returning list of item ids *
43 * - o_return_code: The status of the execution *
44 * 0: Success *
45 * 1: Failed *
46 * Note: This procedure is designed for retrieving *
47 * assembly items to copy primary routing to. To *
48 * ensure performance, we will filter out all items *
49 * which are not qualified for this, e.g., items *
50 * which are not BOM enabled, or items which already *
51 * have primary routing. *
52 ********************************************************/
53
54 PROCEDURE retrieve_items (
55 i_org_id IN NUMBER,
56 i_from_item IN VARCHAR2,
57 i_to_item IN VARCHAR2,
58 i_product_family_id IN NUMBER,
59 i_category_set_id IN NUMBER,
60 i_category_id IN NUMBER,
61 i_planner_code IN VARCHAR2,
62 i_alternate_routing_designator IN VARCHAR2,
63 o_item_tbl OUT NOCOPY item_tbl_type,
64 o_return_code OUT NOCOPY NUMBER);
65
66
67
68 /********************************************************
69 * PROCEDURE: retrieve_option_items *
70 * *
71 * This procedure returns a list of option classes *
72 * under a model bom which fulfill the filtering *
73 * criteria passed in. *
74 * This will return all the levels of OC's. Loop nodes *
75 * will be skipped. *
76 * *
77 * Input: *
78 * - i_org_id: The organization id of the items. *
79 * - i_from_item: The inventory item name of the *
80 * lower item. *
81 * - i_to_item: The inventory item name of the *
82 * higher item. *
83 * The retrieved item must be between the lower *
84 * and higher item. *
85 * - i_product_family_id: The product family id of *
86 * the items. *
87 * - i_category_set_id: The category set *
88 * - i_category_id: Category id inside the *
89 * category set. *
90 * - i_planner_code: The planner code of the items.*
91 * - Added for enhancement #2647023 *
92 * - i_alternate_routing_designator: The retrieved *
93 * item should not have a routing existing *
94 * with the same item-alternate combination. *
95 * Output: *
96 * - o_item_tbl: The returning list of item ids *
97 * - o_return_code: The status of the execution *
98 * 0: Success *
99 * 1: Failed *
100 ********************************************************/
101
102 PROCEDURE retrieve_option_items (
103 i_org_id IN NUMBER,
104 i_from_item IN VARCHAR2,
105 i_to_item IN VARCHAR2,
106 i_product_family_id IN NUMBER,
107 i_category_set_id IN NUMBER,
108 i_category_id IN NUMBER,
109 i_planner_code IN VARCHAR2,
110 i_alternate_routing_designator IN VARCHAR2,
111 i_assembly_item_id IN NUMBER,
112 i_alt_designator IN VARCHAR2,
113 o_item_tbl OUT NOCOPY item_tbl_type,
114 o_return_code OUT NOCOPY NUMBER);
115
116 PROCEDURE retrieve_mass_change_items (
117 i_org_id IN NUMBER,
118 i_line_id IN NUMBER,
119 i_from_item IN VARCHAR2,
120 i_to_item IN VARCHAR2,
121 i_product_family_id IN NUMBER,
122 i_category_set_id IN NUMBER,
123 i_category_id IN NUMBER,
124 i_planner_code IN VARCHAR2,
125 i_alt_desig_code IN VARCHAR2,
126 i_alt_desig_check IN NUMBER,
127 i_item_type_pf IN NUMBER,
128 o_item_tbl OUT NOCOPY item_rtg_tbl_type,
129 o_return_code OUT NOCOPY NUMBER);
130
131 END flm_routing;