1 PACKAGE wms_putaway_suggestions AUTHID CURRENT_USER AS
2 /* $Header: WMSPRGES.pls 120.3.12020000.1 2012/06/26 08:44:13 appldev ship $ */
3 --
4 /*===========================================================================+
5 | Procedure: |
6 | conc_pre_generate |
7 | |
8 | Description: |
9 | This is a wrapper API that calls WMS_PUTAWAY_SUGGESTIONS.PRE_GENERATE |
10 | API. It has the necessary parameters required for being a concurrent |
11 | program. |
12 | |
13 | Input Parameters: |
14 | p_organization_id |
15 | Mandatory parameter. Organization where putaway suggestions have |
16 | to be pre-generated. |
17 | p_lpn_id |
18 | Optional parameter. LPN for which suggestions have to be created. |
19 | |
20 | Output Parameters: |
21 | x_retcode |
22 | Standard Concurrent program parameter - Normal, Warning, Error. |
23 | x_errorbuf |
24 | Standard Concurrent program parameter - Holds error message. |
25 | |
26 | API Used: |
27 | PRE_GENERATE API to generate the putaway suggestions. |
28 +===========================================================================*/
29
30 --Return values for x_retcode(standard for concurrent programs)
31
32 RETCODE_SUCCESS CONSTANT VARCHAR2(1) := '0';
33 RETCODE_WARNING CONSTANT VARCHAR2(1) := '1';
34 RETCODE_ERROR CONSTANT VARCHAR2(1) := '2';
35
36 PROCEDURE conc_pre_generate(
37 x_errorbuf OUT NOCOPY VARCHAR2,
38 x_retcode OUT NOCOPY VARCHAR2,
39 p_organization_id IN NUMBER,
40 p_lpn_id IN NUMBER,
41 p_is_srs_call IN VARCHAR2 DEFAULT NULL
42 );
43
44 -- Procedure called by receiving. The procedure submits a request to start
45 --the concurrent program
46
47 PROCEDURE start_pregenerate_program
48 (p_org_id IN NUMBER,
49 p_lpn_id IN NUMBER,
50 x_return_status OUT NOCOPY VARCHAR2,
51 x_msg_count OUT NOCOPY NUMBER,
52 x_msg_data OUT NOCOPY VARCHAR2
53 );
54
55
56 --
57 /*===========================================================================+
58 | Procedure: |
59 | pre_generate |
60 | |
61 | Description: |
62 | This API polls receipts table for receipts yet to be put away and |
63 | create suggestions for their put away. |
64 | |
65 | Input Parameters: |
66 | p_from_conc_pgm |
67 | Mandatory parameter. Default 'Y'. Indicates if the caller is |
68 | concurrent program or otherwise. This is needed to know if |
69 | messages have to be logged in a file. |
70 | p_commit |
71 | Mandatory parameter. Default 'Y'. Indicates if commit has to |
72 | happen. |
73 | p_organization_id |
74 | Mandatory parameter. Organization where putaway suggestions have |
75 | to be pre-generated. |
76 | p_lpn_id |
77 | Optional parameter. LPN for which suggestions have to be created. |
78 | |
79 | Output Parameters: |
80 | x_return_status |
81 | Standard API return status - Success, Error, Unexpected Error. |
82 | x_msg_count |
83 | Number of messages in the message queue |
84 | x_msg_data |
85 | If the number of messages in the message queue is one, |
86 | x_msg_data has the message text. |
87 | x_partial_success |
88 | Indicates if one or more lpns errored out. |
89 | x_lpn_line_error_tbl |
90 | Plsql table to hold the errored out lpn_id and line ids. |
91 | |
92 | Tables Used: |
93 | 1. mtl_txn_request_headers |
94 | 2. mtl_txn_request_lines |
95 +===========================================================================*/
96 --lpn_tbl and line_tbl are plsql tables to hold the errored lpn_id, line_id
97
98 /* Start of fix for bug # 4964866 */
99
100 /*-- Bug# 4178478: Fix Begin
101 TYPE l_lpn_table_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
102 -- Bug# 4178478: Fix End */
103
104 TYPE mmtt_type_rec is RECORD
105 (
106 lpn_id NUMBER
107 , organization_id NUMBER
108 , subinventory_code VARCHAR2(10)
109 , locator_id NUMBER
110 , backorder_delivery_detail_id NUMBER -- for bug8775458
111 );
112
113 TYPE mmtt_table_type IS TABLE OF mmtt_type_rec INDEX BY BINARY_INTEGER;
114
115 /* End of fix for bug # 4964866 */
116
117 TYPE lpn_line_rec IS RECORD (
118 lpn_id NUMBER,
119 line_id NUMBER);
120 TYPE lpn_line_error_tbl IS TABLE OF lpn_line_rec INDEX BY BINARY_INTEGER;
121
122 PROCEDURE pre_generate(
123 x_return_status OUT NOCOPY VARCHAR2,
124 x_msg_count OUT NOCOPY NUMBER,
125 x_msg_data OUT NOCOPY VARCHAR2,
126 x_partial_success OUT NOCOPY VARCHAR2,
127 x_lpn_line_error_tbl OUT NOCOPY lpn_line_error_tbl,
128 p_from_conc_pgm IN VARCHAR2,
129 p_commit IN VARCHAR2,
130 p_organization_id IN NUMBER,
131 p_lpn_id IN NUMBER,
132 p_is_srs_call IN VARCHAR2 DEFAULT NULL
133 );
134
135 PROCEDURE cleanup_suggestions
136 (p_org_id IN NUMBER,
137 p_lpn_id IN NUMBER,
138 x_return_status OUT NOCOPY VARCHAR2,
139 x_msg_count OUT NOCOPY NUMBER,
140 x_msg_data OUT NOCOPY VARCHAR2,
141 p_move_order_line_id IN NUMBER DEFAULT NULL --added for ATF_J2
142 );
143
144 /*===========================================================================+
145 | Procedure: |
146 | print_message |
147 | |
148 | Description: |
149 | Writes message text in log files. |
150 | |
151 | Input Parameters: |
152 | None |
153 | |
154 | Output Parameters: |
155 | None |
156 | |
157 | Tables Used: |
158 | None |
159 +===========================================================================*/
160
161 PROCEDURE print_message(dummy IN VARCHAR2 DEFAULT NULL);
162
163 END wms_putaway_suggestions;