DBA Data[Home] [Help]

PACKAGE: APPS.WMS_ENGINE_PVT

Source


1 package WMS_Engine_PVT as
2 /* $Header: WMSVPPES.pls 120.5.12010000.1 2008/07/28 18:38:00 appldev ship $ */
3 -- File        : WMSVPPES.pls
4 -- Content     : WMS_Engine_PVT package specification
5 -- Description : wms rules engine private API's
6 -- Notes       :
7 -- Modified    : 30/10/98 ckuenzel created
8 --               02/08/99 mzeckzer changed
9 
10 
11 --changed by jcearley on 11/22/99 from nested table to table indexed
12 -- by binary integer.  was causing error in insert_detail_temp_records
13 TYPE g_number_tbl_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
14 
15 -- Static values used for p_simulation_mode parameter
16 g_full_simulation            NUMBER := 0;
17 g_pick_strategy_mode         NUMBER := 1;
18 g_pick_rule_mode             NUMBER := 2;
19 g_put_strategy_mode          NUMBER := 3;
20 g_put_rule_mode              NUMBER := 4;
21 g_pick_full_mode             NUMBER := 5;
22 g_available_inventory        NUMBER := 10;
23 g_put_full_mode              NUMBER := 20;
24 g_no_simulation              NUMBER := -1;
25 
26 g_mo_quantity                NUMBER ;
27 g_Is_xdock                   BOOLEAN;
28 --
29 -- API name  : Create_Suggestions
30 -- Type      : Private
31 -- Function  : Creates pick / put away suggestions according to provided
32 --             transaction or reservation input parameters and set up master
33 --             data.
34 -- Notes
35 --   1. Integration with reservations
36 --      If table p_reservations passed by the calling is not empty, the
37 --      engine will detailing based on a combination of the info in the
38 --      move order line (the record that represents detailing request),
39 --      and the info in p_reservations. For example, a sales order line
40 --      can have two reservations, one for revision A in quantity of 10,
41 --      and one for revision B in quantity of 5, and the line quantity
42 --      can be 15; so when the pick release api calls the engine
43 --      p_reservations will have two records of the reservations. So
44 --      if the move order line based on the sales order line does not
45 --      specify a revision, the engine will merge the information from
46 --      move order line and p_reservations to create the input for
47 --      detailing as two records, one for revision A, and one for revision
48 --      B. Please see documentation for the pick release API for more
49 --      details.
50 --
51 --  2.  Serial Number Detailing in Picking
52 --      Currently the serial number detailing is quite simple. If the caller
53 --      gives a range (start, and end) serial numbers in the move order line
54 --      and pass p_suggest_serial as fnd_api.true, the engine will filter
55 --      the locations found from a rule, and suggest unused serial numbers
56 --      in the locator. If p_suggest_serial is passed as fnd_api.g_false
57 --      (default), the engine will not give serial numbers in the output.
58 --
59 -- Input Parameters
60 --   p_api_version_number   standard input parameter
61 --   p_init_msg_lst         standard input parameter
62 --   p_commit               standard input parameter
63 --   p_validation_level     standard input parameter
64 --   p_transaction_temp_id  equals to the move order line id
65 --                          for the detailing request
66 --   p_reservations         reservations for the demand source
67 --                          as the transaction source
68 --                          in the move order line.
69 --   p_suggest_serial       whether or not the engine should suggest
70 --                          serial numbers in the detailing
71 --   p_simulation_mode	    indicates whether engine is being called
72 -- 			    from the simulation forms or not, and
73 --			    whether the simulation is on the rule
74 --			    or the strategy; if simulating the entire
75 --			    rules engine run, then set = 0;
76 --   p_simulation_id	    If simulation_mode = 1, this should be
77 --			    the strategy_id to simulate
78 --			    IF simulation mode = 2, this should be
79 --			    the id of the rule to simulate
80 --   p_quick_pick_flag      in   varchar2 default 'N'  The other value is 'Y'
81 --                          'Y' is passed in patchset 'J' onwards for Inventory Moves
82 --                           when the lpn_request_context is 1
83 --
84 -- Output Parameters
85 --   x_return_status        standard output parameters
86 --   x_msg_count            standard output parameters
87 --   x_msg_data             standard output parameters
88 --
89 -- Version     :  Current version 1.0
90 PROCEDURE create_suggestions
91   (p_api_version           IN  NUMBER,
92    p_init_msg_list         IN  VARCHAR2 DEFAULT fnd_api.g_false,
93    p_commit                IN  VARCHAR2 DEFAULT fnd_api.g_false,
94    p_validation_level      IN  NUMBER DEFAULT fnd_api.g_valid_level_none,
95    x_return_status         OUT NOCOPY VARCHAR2,
96    x_msg_count             OUT NOCOPY NUMBER,
97    x_msg_data              OUT NOCOPY VARCHAR2,
98    p_transaction_temp_id   IN  NUMBER,
99    p_reservations          IN  inv_reservation_global.mtl_reservation_tbl_type,
100    p_suggest_serial        IN  VARCHAR2 DEFAULT fnd_api.g_false,
101    p_simulation_mode	   IN  NUMBER DEFAULT -1,
102    p_simulation_id	   IN  NUMBER DEFAULT NULL,
103    p_plan_tasks            IN  BOOLEAN DEFAULT FALSE,
104    p_quick_pick_flag       IN   VARCHAR2 DEFAULT 'N'
105    );
106 
107 
108 --Global variable.  If the move order type is Pick Wave, then
109 --pick detailing can pick from the destination sub/locator, and this
110 --is set to 1. Set in this package, but used in WMS_RULE_PVT.apply
111 g_dest_sub_pick_allowed NUMBER;
112 
113 --Global variable for locator code of from_sub, to_sub, and item
114 --Bug #3051649 /Grao : Org locator control
115 --Set in this package, but used in wms_rule_pvt.apply for determining
116 --if from sub/loc = to sub/loc.
117 
118 g_org_loc_control NUMBER;
119 g_sub_loc_control NUMBER;
120 g_item_loc_control NUMBER;
121 
122 --Global variables used for debug trace
123 g_trace_header_id NUMBER;
124 g_business_object_id NUMBER;
125 
126 --Bug 2400549
127 --these values are used in wms_rule_pvt.Apply
128 g_move_order_type NUMBER;
129 g_transaction_action_id NUMBER;
130 
131 --bug 2589499
132 --this value used in wms_rule_pvt.Apply
133 g_reservable_putaway_sub_only BOOLEAN;
134 
135 --bug 2778814
136 --this value used in wms_rule_pvt.Apply
137 g_serial_number_control_code NUMBER;
138 
139 -- LG convergence add
140 G_inventory_availability_tbl    wms_search_order_globals_pvt.pre_suggestions_record_tbl;
141 -- END of LG convergence add
142 
143 -- patchset 'J' : to populate more meaningful error messages during inventory moves and Rules Simulator
144 -- This global variable would be updated from WMS_ENGINE_PVT.create_suggestions, WMS_STRATEGY_PVT.APPLY(),
145 --  and WMS_RULES_PVT.APPLY() and WMS_RULES_PVT,QUICK_PICK().
146 -- At the end of the create suggestion call, the contents of this variable would be pushed to message stack.
147 -- This message would be retrived from Rules Simulator and Putaway drop /load  pages.
148 
149 
150  g_sugg_failure_message  VARCHAR2(4000);
151 --
152 
153 END wms_engine_pvt;