1 PACKAGE FLM_AUTO_REPLENISHMENT AS
2 /* $Header: FLMCPARS.pls 120.1 2005/06/02 18:18:15 appldev $ */
3
4 /****************************************************************************
5 * Constants *
6 ****************************************************************************/
7 /* Kanban Card Supply Status Constants */
8 G_Supply_Status_New CONSTANT NUMBER := 1;
9 G_Supply_Status_Full CONSTANT NUMBER := 2;
10 G_Supply_Status_Wait CONSTANT NUMBER := 3;
11 G_Supply_Status_Empty CONSTANT NUMBER := 4;
12 G_Supply_Status_InProcess CONSTANT NUMBER := 5;
13 G_Supply_Status_InTransit CONSTANT NUMBER := 6;
14 G_Supply_Status_Exception CONSTANT NUMBER := 7;
15
16 /* Kanban Card Types Constants */
17 G_Card_Type_Replenishable CONSTANT NUMBER := 1;
18 G_Card_Type_NonReplenishable CONSTANT NUMBER := 2;
19
20 /* Kanban Card Status Constants */
21 G_Card_Status_Active CONSTANT NUMBER := 1;
22 G_Card_Status_Hold CONSTANT NUMBER := 2;
23 G_Card_Status_Cancel CONSTANT NUMBER := 3;
24
25 /* Wip Supply Type Constants */
26 G_Supply_Type_Push CONSTANT NUMBER := 1;
27 G_Supply_Type_Assembly_Pull CONSTANT NUMBER := 2;
28 G_Supply_Type_Operation_Pull CONSTANT NUMBER := 3;
29 G_Supply_Type_Bulk CONSTANT NUMBER := 4;
30 G_Supply_Type_Supplier CONSTANT NUMBER := 5;
31 G_Supply_Type_Phantom CONSTANT NUMBER := 6;
32
33 /* Release Time Fence Code Constants */
34 G_Release_Time_Kanban_Item CONSTANT NUMBER := 6; /* Kanban Item (Do Not Release) */
35
36 /* Error Constants */
37 G_Error_Create_Cards CONSTANT NUMBER := 1;
38 G_Error_Replenish_Cards CONSTANT NUMBER := 2;
39
40 /***************************************************************************
41 * Types *
42 ***************************************************************************/
43 /* Modified for Lot Based Material Support.
44 Added basis_type and qty_per_lot */
45 Type comp_rec is record
46 (item_id NUMBER,
47 usage NUMBER,
48 line_id NUMBER,
49 operation_seq_num NUMBER,
50 line_op_seq_id NUMBER,
51 pull_sequence_id NUMBER,
52 schedule_number VARCHAR2(30),
53 basis_type NUMBER,
54 qty_per_lot NUMBER);
55
56 TYPE comp_list is table of comp_rec index by BINARY_INTEGER;
57
58 TYPE Pull_Sequence_Id_Tbl_Type IS TABLE OF MTL_KANBAN_PULL_SEQUENCES.PULL_SEQUENCE_ID%TYPE
59 INDEX BY BINARY_INTEGER;
60
61 TYPE Kanban_Card_Id_Tbl_Type IS TABLE OF MTL_KANBAN_CARDS.KANBAN_CARD_ID%TYPE
62 INDEX BY BINARY_INTEGER;
63
64 /***************************************************************************
65 * Public Functions *
66 ***************************************************************************/
67
68
69 /***************************************************************************
70 * Public Procedures *
71 ***************************************************************************/
72
73 /************************************************************************
74 * PROCEDURE Create_And_Replenish_Cards *
75 * This is the procedure which is called by the Concurrent Request *
76 * The Input parameters for this procedure are : *
77 * p_organization_id - Organization Identifier *
78 * p_min_line_code - From Line Identifier *
79 * p_max_line_code - To Line Identifier *
80 * - To find flow schedules which are on lines *
81 between From and To Lines identifier *
82 * p_completion_date - Completion Date of Flow Schedules *
83 * - To find flow schedules which have scheduled *
84 * completion date less than the given date *
85 * greater than the sysdate *
86 * p_build_sequence - Build Sequence of Flow Schedules *
87 * - To find flow schedules which have build *
88 * sequence less than or equal to the given *
89 * build sequence and if this parameter is null*
90 * then find all flow schedules which have not *
91 * not build sequence *
92 * p_print_card - Print Kanban Cards Option (Yes/No) *
93 ************************************************************************/
94 PROCEDURE Create_And_Replenish_Cards(
95 o_error_code OUT NOCOPY NUMBER,
96 o_error_msg OUT NOCOPY VARCHAR2,
97 p_organization_id IN NUMBER,
98 p_min_line_code IN VARCHAR2,
99 p_max_line_code IN VARCHAR2,
100 p_completion_date IN VARCHAR2,
101 p_build_sequence IN NUMBER,
102 p_print_card IN VARCHAR2);
103
104 END FLM_AUTO_REPLENISHMENT;