DBA Data[Home] [Help]

PACKAGE: APPS.INV_RESERVATIONS_INTERFACE

Source


1 PACKAGE INV_RESERVATIONS_INTERFACE AUTHID CURRENT_USER as
2 /* $Header: INVRSV5S.pls 120.0 2005/05/25 06:29:29 appldev noship $ */
3 /*#
4  * This package contains programs to process reservation
5  * requests residing in MTL_RESERVATIONS_INTERFACE table.
6  * @rep:scope public
7  * @rep:product INV
8  * @rep:displayname Material Reservation Interface
9  * @rep:lifecycle active
10  * @rep:compatibility S
11  * @rep:category BUSINESS_ENTITY INV_RESERVATION
12  */
13 /*
14 ** ===========================================================================
15 ** Procedure:
16 **	rsv_interface_manager
17 **
18 ** Description:
19 ** 	rsv interface manager processes reservations requests in
20 ** background.
21 ** 	Applications in need of reservations processing such as
22 ** Create Reservations, Update Reservations, Delete Reservations and
23 ** Transfer Reservations can write their specific requests with details such
24 ** as item, organization, demand, supply, inventory controls and quantity
25 ** information into MTL_RESERVATIONS_INTERFACE table.
26 **	rsv interface manager thru another program, rsv
27 ** batch processor, processes records from MTL_RESERVATIONS_INTERFACE table
28 ** into MTL_RESERVATIONS table, one or more reservation batch id(s) at a time.
29 ** A reservation batch id consists of one or more reservations processing
30 ** requests in MTL_RESERVATIONS_INTERFACE table. Processing includes data
31 ** validation, executions of appropriate reservation APIs, thereby writing
32 ** into MTL_RESERVATIONS table and finally deleting successfuly processed
33 ** records from MTL_RESERVATIONS_INTERFACE table.
34 **
35 ** Input Parameters:
36 **	p_api_version_number
37 **		 parameter to compare API version
38 **      p_init_msg_lst
39 **		flag indicating if message list should be initialized
40 **
41 **      p_form_mode
42 **		'Y','y' - called from form;
43 **              'N','n' - not called from form;
44 **
45 ** Output Parameters:
46 **     	x_errbuf
47 **		mandatory concurrent program parameter
48 ** 	x_retcode
49 **		mandatory concurrent program parameter
50 **
51 ** Tables Used:
52 ** 	MTL_RESERVATIONS_INTERFACE for Read and Update.
53 ** ===========================================================================
54 */
55 /*#
56  * rsv interface manager processes reservations requests in the background. rsv interface manager through another program, rsv
57  * batch processor, processes records from MTL_RESERVATIONS_INTERFACE table into MTL_RESERVATIONS table
58  * @param x_errbuf mandatory concurrent program parameter. Contains the error message from the error stack.
59  * @param x_retcode mandatory concurrent program parameter. Returns the error code; 0-Success, 1-Warning, 2-Error.
60  * @param p_api_version_number  API version number (current version is 1.0)
61  * @param p_init_msg_lst Whether initialize the error message list or not. Should be fnd_api.g_false or fnd_api.g_true
62  * @param p_form_mode Indicates whether this program is called from the form or not. 'Y' is from the form & 'N is not through the form
63  * @rep:scope public
64  * @rep:lifecycle active
65  * @rep:displayname Reservation Interface Manger
66  */
67 PROCEDURE rsv_interface_manager(
68   x_errbuf             OUT NOCOPY VARCHAR2
69 , x_retcode            OUT NOCOPY NUMBER
70 , p_api_version_number IN  NUMBER   DEFAULT 1.0
71 , p_init_msg_lst       IN  VARCHAR2 DEFAULT fnd_api.g_false
72 , p_form_mode          IN  VARCHAR2 DEFAULT 'N');
73 
74 /*
75 ** ===========================================================================
76 ** Procedure:
77 **	rsv_interface_batch_processor
78 **
79 ** Description:
80 ** 	Applications in need of reservations processing such as
81 ** Create Reservations, Update Reservations, Delete Reservations and
82 ** Transfer Reservations can write their specific requests with details such
83 ** as item, organization, demand, supply, inventory controls and quantity
84 ** information into MTL_RESERVATIONS_INTERFACE table.
85 **	rsv interface batch processor, processes records from
86 ** MTL_RESERVATIONS_INTERFACE table into MTL_RESERVATIONS table, one or more
87 ** reservation batch id(s) at a time. A reservation batch id consists of one
88 ** or more reservations processing requests in MTL_RESERVATIONS_INTERFACE table.
89 ** A reservations request in MTL_RESERVATIONS_INTERFACE table is uniquely
90 ** determined by a reservations interface id.
91 **	rsv interface batch processor in turn calls another program,
92 ** rsv interface line processor repetitively, passing each time a
93 ** reservations interafce id under the current reservations batch id.
94 ** reservations interface line processor performs the actual reservations
95 ** processing.
96 ** 	rsv interface batch processor deletes successfully processed
97 ** rows from MTL_RESERVATIONS_INTERFACE table.
98 **
99 ** Input Parameters:
100 **  	p_api_version_number
101 **		parameter to compare API version
102 ** 	p_init_msg_lst
103 **		flag indicating if message list should be initialized
104 **	p_reservation_batches
105 **        	reservation batch ids stringed together and separated by
106 **              delimiter.Eg: 163:716:987:
107 **      p_process_mode
108 **		1 = Online 2 = Concurrent 3 = Background
109 **      p_partial_batch_processing_flag
110 **		1 - If a line in reservation batch fails, continue
111 **		2 - If a line in reservation batch fails, exit
112 **      p_commit_flag
113 ** 		'Y','y'      - Commit
114 **              not('Y','y') - Do not commit
115 **
116 **      p_form_mode
117 **		'Y','y' - called from form;
118 **              'N','n' - not called from form;
119 **
120 ** Output Parameters:
121 ** 	x_return_status
122 **		return status indicating success, error, unexpected error
123 ** 	x_msg_count
124 **		number of messages in message list
125 ** 	x_msg_data
126 **		if the number of messages in message list is 1, contains
127 **		message text.
128 **
129 ** Tables Used:
130 ** 	MTL_RESERVATIONS_INTERFACE for Read, Update and Delete.
131 ** ===========================================================================
132 */
133 
134 PROCEDURE rsv_interface_batch_processor (
135   p_api_version_number          IN  NUMBER
136 , p_init_msg_lst                IN  VARCHAR2 DEFAULT fnd_api.g_false
137 , p_reservation_batches	        IN  VARCHAR2
138 , p_process_mode		IN  NUMBER   DEFAULT 1
139 , p_partial_batch_process_flag  IN  NUMBER   DEFAULT 1
140 , p_commit_flag			IN  VARCHAR2 DEFAULT 'Y'
141 , p_form_mode                   IN  VARCHAR2 DEFAULT 'N'
142 , x_return_status               OUT NOCOPY VARCHAR2
143 , x_msg_count                   OUT NOCOPY NUMBER
144 , x_msg_data                    OUT NOCOPY VARCHAR2);
145 
146 /*
147 ** ===========================================================================
148 ** Procedure:
149 **	rsv_interface_line_processor
150 **
151 ** Description:
152 ** 	Applications in need of reservations processing such as
153 ** Create Reservations, Update Reservations, Delete Reservations and
154 ** Transfer Reservations can write their specific requests with details such
155 ** as item, organization, demand, supply, inventory controls and quantity
156 ** information into MTL_RESERVATIONS_INTERFACE table.
157 ** 	rsv interface line processor processes the reservations
158 ** request line in MTL_RESERVATIONS_INTERFACE, pointed by a given
159 ** reservations interface id. Processing includes data validation and
160 ** performing the requested reservation function by executing the appropriate
161 ** reservations API.
162 **
163 ** Input Parameters:
164 **  	p_api_version_number
165 **		parameter to compare API version
166 ** 	p_init_msg_lst
167 **		flag indicating if message list should be initialized
168 **	p_reservation interface id
169 **		identifies reservations request line in
170 **		MTL_RESERVATIONS_INTERFACE table.
171 **      p_form_mode
172 **		'Y','y' - called from form;
173 **              'N','n' - not called from form;
174 **
175 ** Output Parameters:
176 **	x_error_code
177 **		error code
178 ** 	x_error_text
179 **		error explanation text
180 ** 	x_return_status
181 **		return status indicating success, error, unexpected error
182 ** 	x_msg_count
183 **		number of messages in message list
184 ** 	x_msg_data
185 **		if the number of messages in message list is 1, contains
186 **		message text
187 **
188 ** Tables Used:
189 ** 	MTL_RESERVATIONS_INTERFACE for Read and Update.
190 ** ===========================================================================
191 */
192 
193 PROCEDURE rsv_interface_line_processor (
194   p_api_version_number        IN  NUMBER
195 , p_init_msg_lst              IN  VARCHAR2 DEFAULT fnd_api.g_false
196 , p_reservation_interface_id  IN  NUMBER
197 , p_form_mode                 IN  VARCHAR2 DEFAULT 'N'
198 , x_error_code		      OUT NOCOPY NUMBER
199 , x_error_text                OUT NOCOPY VARCHAR2
200 , x_return_status             OUT NOCOPY VARCHAR2
201 , x_msg_count                 OUT NOCOPY NUMBER
202 , x_msg_data                  OUT NOCOPY VARCHAR2);
203 
204 /*
205 ** ===========================================================================
206 ** Procedure:
207 **	print_error
208 **
209 ** Description:
210 ** 	Writes message text in log files.
211 **
212 ** Input Parameters:
213 **	p_msg_count
214 **
215 ** Output Parameters:
216 **	None
217 **
218 ** Tables Used:
219 ** 	None
220 **
221 ** ===========================================================================
222 */
223 
224 PROCEDURE print_error(p_msg_count IN NUMBER);
225 
226 END INV_RESERVATIONS_INTERFACE;