1 PACKAGE HZ_PARTY_SITE_BO_PUB AUTHID CURRENT_USER AS
2 /*$Header: ARHBPSBS.pls 120.10 2006/09/22 00:43:05 acng noship $ */
3 /*#
4 * Party Site Business Object API
5 * Public API that allows users to manage Party Site business objects in the Trading Community Architecture.
6 * Several operations are supported, including the creation and update of the business object.
7 *
8 * @rep:scope public
9 * @rep:product HZ
10 * @rep:lifecycle active
11 * @rep:category BUSINESS_ENTITY HZ_ADDRESS
12 * @rep:displayname Party Site Business Object API
13 * @rep:doccd 120hztig.pdf Party Site Business Object API, Oracle Trading Community Architecture Technical Implementation Guide
14 */
15
16 -- PROCEDURE create_party_site_bo
17 --
18 -- DESCRIPTION
19 -- Create a party site business object.
20 --
21 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
22 --
23 -- ARGUMENTS
24 -- IN:
25 -- p_init_msg_list Initialize message stack if it is set to
26 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
27 -- p_validate_bo_flag If it is set to FND_API.G_TRUE, validate
28 -- the completeness of business object.
29 -- p_party_site_obj Party site business object.
30 -- p_created_by_module Created by module.
31 -- IN/OUT:
32 -- px_parent_id Parent record ID.
33 -- px_parent_os Parent orig system.
34 -- px_parent_osr Parent orig system reference.
35 -- px_parent_obj_type Parent object type.
36 -- OUT:
37 -- x_return_status Return status after the call. The status can
38 -- be fnd_api.g_ret_sts_success (success),
39 -- fnd_api.g_ret_sts_error (error),
40 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
41 -- x_msg_count Number of messages in message stack.
42 -- x_msg_data Message text if x_msg_count is 1.
43 -- x_party_site_id Party Site ID.
44 -- x_party_site_os Party Site orig system.
45 -- x_party_site_osr Party Site orig system reference.
46 --
47 -- NOTES
48 --
49 -- MODIFICATION HISTORY
50 --
51 -- 14-DEC-2004 Arnold Ng Created.
52 --
53
54 PROCEDURE create_party_site_bo(
55 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
56 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
57 p_party_site_obj IN HZ_PARTY_SITE_BO,
58 p_created_by_module IN VARCHAR2,
59 x_return_status OUT NOCOPY VARCHAR2,
60 x_msg_count OUT NOCOPY NUMBER,
61 x_msg_data OUT NOCOPY VARCHAR2,
62 x_party_site_id OUT NOCOPY NUMBER,
63 x_party_site_os OUT NOCOPY VARCHAR2,
64 x_party_site_osr OUT NOCOPY VARCHAR2,
65 px_parent_id IN OUT NOCOPY NUMBER,
66 px_parent_os IN OUT NOCOPY VARCHAR2,
67 px_parent_osr IN OUT NOCOPY VARCHAR2,
68 px_parent_obj_type IN OUT NOCOPY VARCHAR2
69 );
70
71 /*#
72 * Create Party Site Business Object (create_party_site_bo)
73 * Creates a Party Site business object. You pass object data to the procedure, packaged within an object type
74 * defined specifically for the API. The object type is HZ_PARTY_SITE_BO for the Party Site business object.
75 * In addition to the object's business object attributes, the object type also includes lower-level embedded
76 * child entities or objects that can be simultaneously created.
77 *
78 * @param p_return_obj_flag Indicates if the created object is to be returned to the caller as an output parameter. Default value: false
79 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness. Default value: true
80 * @param p_party_site_obj The Party Site business object to be created in its entirety
81 * @param p_created_by_module The module creating this business object. Must be a valid created_by_module value
82 * @param p_obj_source The source of this business object
83 * @param x_return_status Return status after the call
84 * @param x_return_obj The Party Site business object that was created, returned as an output parameter
85 * @param x_messages Messages returned from the creation of the business object
86 * @param x_party_site_id TCA identifier for the Party Site business object
87 * @param x_party_site_os Party Site original system name
88 * @param x_party_site_osr Party Site original system reference
89 * @param px_parent_id TCA identifier for parent object. Either this parameter or both the px_parent_os and px_parent_osr parameters must be given
90 * @param px_parent_os Parent object original system name
91 * @param px_parent_osr Parent object original system reference
92 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
93 * @rep:scope public
94 * @rep:lifecycle active
95 * @rep:displayname Create Party Site Business Object
96 * @rep:doccd 120hztig.pdf Create Party Site Business Object, Oracle Trading Community Architecture Technical Implementation Guide
97 */
98 PROCEDURE create_party_site_bo(
99 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
100 p_party_site_obj IN HZ_PARTY_SITE_BO,
101 p_created_by_module IN VARCHAR2,
102 p_obj_source IN VARCHAR2 := null,
103 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
104 x_return_status OUT NOCOPY VARCHAR2,
105 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
106 x_return_obj OUT NOCOPY HZ_PARTY_SITE_BO,
107 x_party_site_id OUT NOCOPY NUMBER,
108 x_party_site_os OUT NOCOPY VARCHAR2,
109 x_party_site_osr OUT NOCOPY VARCHAR2,
110 px_parent_id IN OUT NOCOPY NUMBER,
111 px_parent_os IN OUT NOCOPY VARCHAR2,
112 px_parent_osr IN OUT NOCOPY VARCHAR2,
113 px_parent_obj_type IN OUT NOCOPY VARCHAR2
114 );
115
116 -- PROCEDURE update_party_site_bo
117 --
118 -- DESCRIPTION
119 -- Update a party site business object.
120 --
121 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
122 --
123 -- ARGUMENTS
124 -- IN:
125 -- p_init_msg_list Initialize message stack if it is set to
126 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
127 -- p_party_site_obj Party site business object.
128 -- p_created_by_module Created by module.
129 -- OUT:
130 -- x_return_status Return status after the call. The status can
131 -- be fnd_api.g_ret_sts_success (success),
132 -- fnd_api.g_ret_sts_error (error),
133 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
134 -- x_msg_count Number of messages in message stack.
135 -- x_msg_data Message text if x_msg_count is 1.
136 -- x_party_site_id Party Site ID.
137 -- x_party_site_os Party Site orig system.
138 -- x_party_site_osr Party Site orig system reference.
139 --
140 -- NOTES
141 --
142 -- MODIFICATION HISTORY
143 --
144 -- 14-DEC-2004 Arnold Ng Created.
145 --
146
147 PROCEDURE update_party_site_bo(
148 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
149 p_party_site_obj IN HZ_PARTY_SITE_BO,
150 p_created_by_module IN VARCHAR2,
151 x_return_status OUT NOCOPY VARCHAR2,
152 x_msg_count OUT NOCOPY NUMBER,
153 x_msg_data OUT NOCOPY VARCHAR2,
154 x_party_site_id OUT NOCOPY NUMBER,
155 x_party_site_os OUT NOCOPY VARCHAR2,
156 x_party_site_osr OUT NOCOPY VARCHAR2
157 );
158
159 /*#
160 * Update Party Site Business Object (update_party_site_bo)
161 * Updates a Party Site business object. You pass any modified object data to the procedure, packaged within an
162 * object type defined specifically for the API. The object type is HZ_PARTY_SITE_BO for the Party Site business object.
163 * In addition to the object's business object attributes, the object type also includes embedded child business entities
164 * or objects that can be simultaneously created or updated.
165 *
166 * @param p_return_obj_flag Indicates if the updated object is to be returned to the caller as an output parameter. Default value: false
167 * @param p_party_site_obj The Party Site business object to be updated
168 * @param p_created_by_module The module updating this business object
169 * @param p_obj_source The source of this business object
170 * @param x_return_status Return status after the call
171 * @param x_return_obj The Party Site business object that was updated, returned as an output parameter
172 * @param x_messages Messages returned from the update of the business object
173 * @param x_party_site_id TCA identifier for the Party Site business object
174 * @param x_party_site_os Party Site original system name
175 * @param x_party_site_osr Party Site original system reference
176 * @rep:scope public
177 * @rep:lifecycle active
178 * @rep:displayname Update Party Site Business Object
179 * @rep:doccd 120hztig.pdf Update Party Site Business Object, Oracle Trading Community Architecture Technical Implementation Guide
180 */
181 PROCEDURE update_party_site_bo(
182 p_party_site_obj IN HZ_PARTY_SITE_BO,
183 p_created_by_module IN VARCHAR2,
184 p_obj_source IN VARCHAR2 := null,
185 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
186 x_return_status OUT NOCOPY VARCHAR2,
187 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
188 x_return_obj OUT NOCOPY HZ_PARTY_SITE_BO,
189 x_party_site_id OUT NOCOPY NUMBER,
190 x_party_site_os OUT NOCOPY VARCHAR2,
191 x_party_site_osr OUT NOCOPY VARCHAR2
192 );
193
194 -- PROCEDURE save_party_site_bo
195 --
196 -- DESCRIPTION
197 -- Create or update a party site business object.
198 --
199 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
200 --
201 -- ARGUMENTS
202 -- IN:
203 -- p_init_msg_list Initialize message stack if it is set to
204 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
205 -- p_party_site_obj Party site business object.
206 -- p_created_by_module Created by module.
207 -- IN/OUT:
208 -- px_parent_id Parent record ID.
209 -- px_parent_os Parent orig system.
210 -- px_parent_osr Parent orig system reference.
211 -- px_parent_obj_type Parent object type.
212 -- OUT:
213 -- x_return_status Return status after the call. The status can
214 -- be fnd_api.g_ret_sts_success (success),
215 -- fnd_api.g_ret_sts_error (error),
216 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
217 -- x_msg_count Number of messages in message stack.
218 -- x_msg_data Message text if x_msg_count is 1.
219 -- x_party_site_id Party Site ID.
220 -- x_party_site_os Party Site orig system.
221 -- x_party_site_osr Party Site orig system reference.
222 --
223 -- NOTES
224 --
225 -- MODIFICATION HISTORY
226 --
227 -- 14-DEC-2004 Arnold Ng Created.
228 --
229
230 PROCEDURE save_party_site_bo(
231 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
232 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
233 p_party_site_obj IN HZ_PARTY_SITE_BO,
234 p_created_by_module IN VARCHAR2,
235 x_return_status OUT NOCOPY VARCHAR2,
236 x_msg_count OUT NOCOPY NUMBER,
237 x_msg_data OUT NOCOPY VARCHAR2,
238 x_party_site_id OUT NOCOPY NUMBER,
239 x_party_site_os OUT NOCOPY VARCHAR2,
240 x_party_site_osr OUT NOCOPY VARCHAR2,
241 px_parent_id IN OUT NOCOPY NUMBER,
242 px_parent_os IN OUT NOCOPY VARCHAR2,
243 px_parent_osr IN OUT NOCOPY VARCHAR2,
244 px_parent_obj_type IN OUT NOCOPY VARCHAR2
245 );
246
247 /*#
248 * Save Party Site Business Object (save_party_site_bo)
249 * Saves a Party Site business object. You pass new or modified object data to the procedure, packaged within an
250 * object type defined specifically for the API. The API then determines if the object exists in TCA, based upon
251 * the provided identification information, and creates or updates the object. The object type is HZ_PARTY_SITE_BO
252 * for the Party Site business object. For either case, the object type that you provide will be processed as if
253 * the respective API procedure is being called (create_party_site_bo or update_party_site_bo). Please see those
254 * procedures for more details. In addition to the object's business object attributes, the object type also includes
255 * embedded child business entities or objects that can be simultaneously created or updated.
256 *
257 * @param p_return_obj_flag Indicates if the saved object is to be returned to the caller as an output parameter. Default value: false
258 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness if it is being created
259 * @param p_party_site_obj The Party Site business object to be saved
260 * @param p_created_by_module The module saving this business object
261 * @param p_obj_source The source of this business object
262 * @param x_return_status Return status after the call
263 * @param x_return_obj The Party Site business object that was saved, returned as an output parameter
264 * @param x_messages Messages returned from the save of the business object
265 * @param x_party_site_id TCA identifier for the Party Site business object
266 * @param x_party_site_os Party Site original system name
267 * @param x_party_site_osr Party Site original system reference
268 * @param px_parent_id TCA identifier for parent object. Either this parameter, or both the px_parent_os and px_parent_osr parameters, must be given
269 * @param px_parent_os Parent object original system name
270 * @param px_parent_osr Parent object original system reference
271 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
272 * @rep:scope public
273 * @rep:lifecycle active
274 * @rep:displayname Save Party Site Business Object
275 * @rep:doccd 120hztig.pdf Save Party Site Business Object, Oracle Trading Community Architecture Technical Implementation Guide
276 */
277 PROCEDURE save_party_site_bo(
278 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
279 p_party_site_obj IN HZ_PARTY_SITE_BO,
280 p_created_by_module IN VARCHAR2,
281 p_obj_source IN VARCHAR2 := null,
282 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
283 x_return_status OUT NOCOPY VARCHAR2,
284 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
285 x_return_obj OUT NOCOPY HZ_PARTY_SITE_BO,
286 x_party_site_id OUT NOCOPY NUMBER,
287 x_party_site_os OUT NOCOPY VARCHAR2,
288 x_party_site_osr OUT NOCOPY VARCHAR2,
289 px_parent_id IN OUT NOCOPY NUMBER,
290 px_parent_os IN OUT NOCOPY VARCHAR2,
291 px_parent_osr IN OUT NOCOPY VARCHAR2,
292 px_parent_obj_type IN OUT NOCOPY VARCHAR2
293 );
294
295 --------------------------------------
296 --
297 -- PROCEDURE get_party_site_bo
298 --
299 -- DESCRIPTION
300 -- Get a logical party site.
301 --
302 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
303 --
304 -- ARGUMENTS
305 -- IN:
306 -- p_init_msg_list Initialize message stack if it is set to FND_API.G_TRUE. Default is FND_API.G_FALSE.
307 -- p_party_id party ID.
308 -- p_party_site_id party site ID. If this id is not passed in, multiple site objects will be returned.
309 -- p_party_site_os party site orig system.
310 -- p_party_site_osr party site orig system reference.
311 --
312 -- OUT:
313 -- x_party_site_objs Logical party site records.
314 -- x_return_status Return status after the call. The status can
315 -- be fnd_api.g_ret_sts_success (success),
316 -- fnd_api.g_ret_sts_error (error),
317 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
321 -- NOTES
318 -- x_msg_count Number of messages in message stack.
319 -- x_msg_data Message text if x_msg_count is 1.
320 --
322 --
323 -- MODIFICATION HISTORY
324 --
325 --
326 -- 1-JUNE-2005 AWU Created.
327 --
328
329 /*
330 The Get party site API Procedure is a retrieval service that returns a full party site business object.
331 The user identifies a particular party site business object using the TCA identifier and/or
332 the object Source System information. Upon proper validation of the object,
333 the full party site business object is returned. The object consists of all data included within
334 the party site business object, at all embedded levels. This includes the set of all data stored
335 in the TCA tables for each embedded entity.
336
337 To retrieve the appropriate embedded business objects within the party site business object,
338 the Get procedure calls the equivalent procedure for the following embedded objects:
339
340 Embedded BO Mandatory Multiple Logical API Procedure Comments
341 Phone N Y get_phone_bos
342 Telex N Y get_telex_bos
343 Email N Y get_email_bos
344 Web N Y get_web_bos
345
346 To retrieve the appropriate embedded entities within the party site business object,
347 the Get procedure returns all records for the particular party site from these TCA entity tables:
348
349 Embedded TCA Entity Mandatory Multiple TCA Table Entities
350
351 Location Y N HZ_LOCATIONS
352 Party Site Y N HZ_PARTY_SITES
353 Party Site Use N Y HZ_PARTY_SITE_USES
354 Contact Preference N Y HZ_CONTACT_PREFERENCES
355 */
356
357
358 PROCEDURE get_party_site_bo (
359 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
360 p_party_site_id IN NUMBER,
361 p_party_site_os IN VARCHAR2,
362 p_party_site_osr IN VARCHAR2,
363 x_party_site_obj OUT NOCOPY HZ_PARTY_SITE_BO,
364 x_return_status OUT NOCOPY VARCHAR2,
365 x_msg_count OUT NOCOPY NUMBER,
366 x_msg_data OUT NOCOPY VARCHAR2
367 );
368
369 /*#
370 * Get Party Site Business Object (get_party_site_bo)
371 * Extracts a particular Party Site business object from TCA. You pass the object's identification information to the
372 * procedure, and the procedure returns the identified business object as it exists in TCA.
373 *
374 * @param p_party_site_id TCA identifier for the Party Site business object
375 * @param p_party_site_os Party Site original system name
376 * @param p_party_site_osr Party Site original system reference
377 * @param x_party_site_obj The retrieved Party Site business object
378 * @param x_return_status Return status after the call
379 * @param x_messages Messages returned from the retrieval of the business object
380 * @rep:scope public
381 * @rep:lifecycle active
382 * @rep:displayname Get Party Site Business Object
383 * @rep:doccd 120hztig.pdf Get Party Site Business Object, Oracle Trading Community Architecture Technical Implementation Guide
384 */
385 PROCEDURE get_party_site_bo (
386 p_party_site_id IN NUMBER,
387 p_party_site_os IN VARCHAR2,
388 p_party_site_osr IN VARCHAR2,
389 x_party_site_obj OUT NOCOPY HZ_PARTY_SITE_BO,
390 x_return_status OUT NOCOPY VARCHAR2,
391 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL
392 );
393
394 PROCEDURE do_create_party_site_bo(
395 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
396 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
397 p_party_site_obj IN OUT NOCOPY HZ_PARTY_SITE_BO,
398 p_created_by_module IN VARCHAR2,
399 p_obj_source IN VARCHAR2 := null,
400 x_return_status OUT NOCOPY VARCHAR2,
401 x_msg_count OUT NOCOPY NUMBER,
402 x_msg_data OUT NOCOPY VARCHAR2,
403 x_party_site_id OUT NOCOPY NUMBER,
404 x_party_site_os OUT NOCOPY VARCHAR2,
405 x_party_site_osr OUT NOCOPY VARCHAR2,
406 px_parent_id IN OUT NOCOPY NUMBER,
407 px_parent_os IN OUT NOCOPY VARCHAR2,
408 px_parent_osr IN OUT NOCOPY VARCHAR2,
409 px_parent_obj_type IN OUT NOCOPY VARCHAR2
410 );
411
412 -- PRIVATE PROCEDURE do_update_party_site_bo
413 PROCEDURE do_update_party_site_bo(
414 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
415 p_party_site_obj IN OUT NOCOPY HZ_PARTY_SITE_BO,
416 p_created_by_module IN VARCHAR2,
417 p_obj_source IN VARCHAR2 := null,
418 x_return_status OUT NOCOPY VARCHAR2,
419 x_msg_count OUT NOCOPY NUMBER,
420 x_msg_data OUT NOCOPY VARCHAR2,
421 x_party_site_id OUT NOCOPY NUMBER,
422 x_party_site_os OUT NOCOPY VARCHAR2,
423 x_party_site_osr OUT NOCOPY VARCHAR2,
424 p_parent_os IN VARCHAR2
425 );
426
427 -- PRIVATE PROCEDURE do_save_party_site_bo
428 PROCEDURE do_save_party_site_bo(
429 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
430 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
431 p_party_site_obj IN OUT NOCOPY HZ_PARTY_SITE_BO,
432 p_created_by_module IN VARCHAR2,
433 p_obj_source IN VARCHAR2 := null,
434 x_return_status OUT NOCOPY VARCHAR2,
435 x_msg_count OUT NOCOPY NUMBER,
436 x_msg_data OUT NOCOPY VARCHAR2,
437 x_party_site_id OUT NOCOPY NUMBER,
438 x_party_site_os OUT NOCOPY VARCHAR2,
439 x_party_site_osr OUT NOCOPY VARCHAR2,
440 px_parent_id IN OUT NOCOPY NUMBER,
441 px_parent_os IN OUT NOCOPY VARCHAR2,
442 px_parent_osr IN OUT NOCOPY VARCHAR2,
443 px_parent_obj_type IN OUT NOCOPY VARCHAR2
444 );
445
446 END HZ_PARTY_SITE_BO_PUB;