1 PACKAGE HZ_CUST_ACCT_BO_PUB AUTHID CURRENT_USER AS
2 /*$Header: ARHBCABS.pls 120.8 2008/02/06 09:45:36 vsegu ship $ */
3 /*#
4 * Customer Account Business Object API
5 * Public API that allows users to manage Customer Account 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_CUSTOMER_ACCOUNT
12 * @rep:displayname Customer Account Business Object API
13 * @rep:doccd 120hztig.pdf Customer Account Business Object API, Oracle Trading Community Architecture Technical Implementation Guide
14 */
15
16 -- PROCEDURE create_cust_acct_bo
17 --
18 -- DESCRIPTION
19 -- Create customer account 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_cust_acct_obj_ Customer account object.
30 -- p_created_by_module Created by module.
31 -- IN OUT:
32 -- px_parent_acct_id Parent id.
33 -- px_parent_acct_os Parent original system.
34 -- px_parent_acct_osr Parent original 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_cust_acct_id Customer Account ID.
44 -- x_cust_acct_os Customer Account orig system.
45 -- x_cust_acct_osr Customer Account orig system reference.
46 --
47 -- NOTES
48 --
49 -- MODIFICATION HISTORY
50 --
51 -- 14-DEC-2004 Arnold Ng Created.
52
53 PROCEDURE create_cust_acct_bo(
54 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
55 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
56 p_cust_acct_obj IN HZ_CUST_ACCT_BO,
57 p_created_by_module IN VARCHAR2,
58 x_return_status OUT NOCOPY VARCHAR2,
59 x_msg_count OUT NOCOPY NUMBER,
60 x_msg_data OUT NOCOPY VARCHAR2,
61 x_cust_acct_id OUT NOCOPY NUMBER,
62 x_cust_acct_os OUT NOCOPY VARCHAR2,
63 x_cust_acct_osr OUT NOCOPY VARCHAR2,
64 px_parent_id IN OUT NOCOPY NUMBER,
65 px_parent_os IN OUT NOCOPY VARCHAR2,
66 px_parent_osr IN OUT NOCOPY VARCHAR2,
67 px_parent_obj_type IN OUT NOCOPY VARCHAR2
68 );
69
70 /*#
71 * Create Customer Account Business Object (create_cust_acct_bo)
72 * Creates a Customer Account business object. You pass object data to the procedure, packaged within an object type
73 * defined specifically for the API. The object type is HZ_CUST_ACCT_BO for the Customer Account business object.
74 * In addition to the object's business object attributes, the object type also includes lower-level embedded child
75 * entities or objects that can be simultaneously created.
76 *
77 * @param p_return_obj_flag Indicates if the created object is to be returned to the caller as an output parameter. Default value: false
78 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness. Default value: true
79 * @param p_cust_acct_obj The Customer Account business object to be created in its entirety
80 * @param p_created_by_module The module creating this business object. Must be a valid created_by_module value
81 * @param p_obj_source The source of this business object
82 * @param x_return_status Return status after the call
83 * @param x_return_obj The Customer Account business object that was created, returned as an output parameter
84 * @param x_messages Messages returned from the creation of the business object
85 * @param x_cust_acct_id TCA identifier for the Customer Account business object
86 * @param x_cust_acct_os Customer Account original system name
87 * @param x_cust_acct_osr Customer Account original system reference
88 * @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
89 * @param px_parent_os Parent object original system name
90 * @param px_parent_osr Parent object original system reference
91 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
92 * @rep:scope public
93 * @rep:lifecycle active
94 * @rep:displayname Create Customer Account Business Object
95 * @rep:doccd 120hztig.pdf Create Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
96 */
97 PROCEDURE create_cust_acct_bo(
98 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
99 p_cust_acct_obj IN HZ_CUST_ACCT_BO,
100 p_created_by_module IN VARCHAR2,
101 p_obj_source IN VARCHAR2 := null,
102 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
103 x_return_status OUT NOCOPY VARCHAR2,
104 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
105 x_return_obj OUT NOCOPY HZ_CUST_ACCT_BO,
106 x_cust_acct_id OUT NOCOPY NUMBER,
107 x_cust_acct_os OUT NOCOPY VARCHAR2,
108 x_cust_acct_osr OUT NOCOPY VARCHAR2,
109 px_parent_id IN OUT NOCOPY NUMBER,
110 px_parent_os IN OUT NOCOPY VARCHAR2,
111 px_parent_osr IN OUT NOCOPY VARCHAR2,
112 px_parent_obj_type IN OUT NOCOPY VARCHAR2
113 );
114
115 -- PROCEDURE update_cust_acct_bo
116 --
117 -- DESCRIPTION
118 -- Update customer account business object.
119 --
120 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
121 --
122 -- ARGUMENTS
123 -- IN:
124 -- p_init_msg_list Initialize message stack if it is set to
125 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
126 -- p_cust_acct_obj_ Customer account object.
127 -- p_created_by_module Created by module.
128 -- OUT:
129 -- x_return_status Return status after the call. The status can
130 -- be fnd_api.g_ret_sts_success (success),
131 -- fnd_api.g_ret_sts_error (error),
132 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
133 -- x_msg_count Number of messages in message stack.
134 -- x_msg_data Message text if x_msg_count is 1.
135 -- x_cust_acct_id Customer Account ID.
136 -- x_cust_acct_os Customer Account orig system.
137 -- x_cust_acct_osr Customer Account orig system reference.
138 --
139 -- NOTES
140 --
141 -- MODIFICATION HISTORY
142 --
143 -- 14-DEC-2004 Arnold Ng Created.
144
145 PROCEDURE update_cust_acct_bo(
146 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
147 p_cust_acct_obj IN HZ_CUST_ACCT_BO,
148 p_created_by_module IN VARCHAR2,
149 x_return_status OUT NOCOPY VARCHAR2,
150 x_msg_count OUT NOCOPY NUMBER,
151 x_msg_data OUT NOCOPY VARCHAR2,
152 x_cust_acct_id OUT NOCOPY NUMBER,
153 x_cust_acct_os OUT NOCOPY VARCHAR2,
154 x_cust_acct_osr OUT NOCOPY VARCHAR2
155 );
156
157 /*#
158 * Update Customer Account Business Object (update_cust_acct_bo)
159 * Updates a Customer Account business object. You pass any modified object data to the procedure, packaged within an
160 * object type defined specifically for the API. The object type is HZ_CUST_ACCT_BO for the Customer Account business
161 * object. In addition to the object's business object attributes, the object type also includes embedded child business
162 * entities or objects that can be simultaneously created or updated.
163 *
164 * @param p_return_obj_flag Indicates if the updated object is to be returned to the caller as an output parameter. Default value: false
165 * @param p_cust_acct_obj The Customer Account business object to be updated
166 * @param p_created_by_module The module updating this business object
167 * @param p_obj_source The source of this business object
168 * @param x_return_status Return status after the call
169 * @param x_return_obj The Customer Account business object that was updated, returned as an output parameter
170 * @param x_messages Messages returned from the update of the business object
171 * @param x_cust_acct_id TCA identifier for the Customer Account business object
172 * @param x_cust_acct_os Customer Account original system name
173 * @param x_cust_acct_osr Customer Account original system reference
174 * @rep:scope public
175 * @rep:lifecycle active
176 * @rep:displayname Update Customer Account Business Object
177 * @rep:doccd 120hztig.pdf Update Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
178 */
179 PROCEDURE update_cust_acct_bo(
180 p_cust_acct_obj IN HZ_CUST_ACCT_BO,
181 p_created_by_module IN VARCHAR2,
182 p_obj_source IN VARCHAR2 := null,
183 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
184 x_return_status OUT NOCOPY VARCHAR2,
185 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
186 x_return_obj OUT NOCOPY HZ_CUST_ACCT_BO,
187 x_cust_acct_id OUT NOCOPY NUMBER,
188 x_cust_acct_os OUT NOCOPY VARCHAR2,
189 x_cust_acct_osr OUT NOCOPY VARCHAR2
190 );
191
192 -- PROCEDURE save_cust_acct_bo
193 --
194 -- DESCRIPTION
195 -- Create or update customer account business object.
196 --
197 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
198 --
199 -- ARGUMENTS
200 -- IN:
201 -- p_init_msg_list Initialize message stack if it is set to
202 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
203 -- p_validate_bo_flag If it is set to FND_API.G_TRUE, validate
204 -- the completeness of business object.
205 -- p_cust_acct_obj_ Customer account object.
206 -- p_created_by_module Created by module.
207 -- IN OUT:
208 -- px_parent_acct_id Parent id.
209 -- px_parent_acct_os Parent original system.
210 -- px_parent_acct_osr Parent original 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_cust_acct_id Customer Account ID.
220 -- x_cust_acct_os Customer Account orig system.
221 -- x_cust_acct_osr Customer Account orig system reference.
222 --
223 -- NOTES
224 --
225 -- MODIFICATION HISTORY
226 --
227 -- 14-DEC-2004 Arnold Ng Created.
228
229 PROCEDURE save_cust_acct_bo(
230 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
231 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
232 p_cust_acct_obj IN HZ_CUST_ACCT_BO,
233 p_created_by_module IN VARCHAR2,
234 x_return_status OUT NOCOPY VARCHAR2,
235 x_msg_count OUT NOCOPY NUMBER,
236 x_msg_data OUT NOCOPY VARCHAR2,
237 x_cust_acct_id OUT NOCOPY NUMBER,
238 x_cust_acct_os OUT NOCOPY VARCHAR2,
239 x_cust_acct_osr OUT NOCOPY VARCHAR2,
240 px_parent_id IN OUT NOCOPY NUMBER,
241 px_parent_os IN OUT NOCOPY VARCHAR2,
242 px_parent_osr IN OUT NOCOPY VARCHAR2,
243 px_parent_obj_type IN OUT NOCOPY VARCHAR2
244 );
245
246 /*#
247 * Save Customer Account Business Object (save_cust_acct_bo)
248 * Saves a Customer Account business object. You pass new or modified object data to the procedure, packaged within
249 * an object type defined specifically for the API. The API then determines if the object exists in TCA, based upon
250 * the provided identification information, and creates or updates the object. The object type is HZ_CUST_ACCT_BO
251 * for the Customer Account business object. For either case, the object type that you provide will be processed as if
252 * the respective API procedure is being called (create_cust_acct_bo or update_cust_acct_bo). Please see those procedures
253 * for more details. In addition to the object's business object attributes, the object type also includes embedded
254 * child business entities or objects that can be simultaneously created or updated.
255 *
256 * @param p_return_obj_flag Indicates if the saved object is to be returned to the caller as an output parameter. Default value: false
257 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness if it is being created
258 * @param p_cust_acct_obj The Customer Account business object to be saved
259 * @param p_created_by_module The module saving this business object
260 * @param p_obj_source The source of this business object
261 * @param x_return_status Return status after the call
262 * @param x_return_obj The Customer Account business object that was saved, returned as an output parameter
263 * @param x_messages Messages returned from the save of the business object
264 * @param x_cust_acct_id TCA identifier for the Customer Account business object
265 * @param x_cust_acct_os Customer Account original system name
266 * @param x_cust_acct_osr Customer Account original system reference
267 * @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
268 * @param px_parent_os Parent object original system name
269 * @param px_parent_osr Parent object original system reference
270 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
271 * @rep:scope public
272 * @rep:lifecycle active
273 * @rep:displayname Save Customer Account Business Object
274 * @rep:doccd 120hztig.pdf Save Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
275 */
276 PROCEDURE save_cust_acct_bo(
277 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
278 p_cust_acct_obj IN HZ_CUST_ACCT_BO,
279 p_created_by_module IN VARCHAR2,
280 p_obj_source IN VARCHAR2 := null,
281 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
282 x_return_status OUT NOCOPY VARCHAR2,
283 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
284 x_return_obj OUT NOCOPY HZ_CUST_ACCT_BO,
285 x_cust_acct_id OUT NOCOPY NUMBER,
286 x_cust_acct_os OUT NOCOPY VARCHAR2,
287 x_cust_acct_osr OUT NOCOPY VARCHAR2,
288 px_parent_id IN OUT NOCOPY NUMBER,
289 px_parent_os IN OUT NOCOPY VARCHAR2,
290 px_parent_osr IN OUT NOCOPY VARCHAR2,
291 px_parent_obj_type IN OUT NOCOPY VARCHAR2
292 );
293
294 --------------------------------------
295 --
296 -- PROCEDURE get_cust_acct_bo
297 --
298 -- DESCRIPTION
299 -- Get a logical customer account.
300 --
301 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
302 --
303 -- ARGUMENTS
304 -- IN:
305 -- p_init_msg_list Initialize message stack if it is set to
306 -- p_cust_acct_id customer account ID.
307 -- p_parent_id Parent Id.
308 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
309 -- OUT:
310 -- x_cust_acct_obj Logical customer account record.
311 -- x_return_status Return status after the call. The status can
312 -- be fnd_api.g_ret_sts_success (success),
313 -- fnd_api.g_ret_sts_error (error),
317 --
314 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
315 -- x_msg_count Number of messages in message stack.
316 -- x_msg_data Message text if x_msg_count is 1.
318 -- NOTES
319 --
320 -- MODIFICATION HISTORY
321 --
322 --
323 -- 8-JUN-2005 AWU Created.
324 --
325
326 /*
327
328 The Get customer account API Procedure is a retrieval service that returns full customer account business objects.
329 The user identifies a particular Organization Contact business object using the TCA identifier and/or the object's
330 Source System information. Upon proper validation of the object, the full Organization Contact business object is returned.
331 The object consists of all data included within the Organization Contact business object, at all embedded levels.
332 This includes the set of all data stored in the TCA tables for each embedded entity.
333
334
335 Embedded BO Mandatory Multiple Logical API Procedure Comments
336 Customer Account Site N Y get_cust_acct_site_bo
337 Customer Account Contact N Y get_cust_acct_contact_bo
338 Customer Profile Y N Business Structure. Included entities:
339 HZ_CUSTOMER_PROFILES, HZ_CUST_PROFILE_AMTS
340
341 To retrieve the appropriate embedded entities within the 'Organization Contact' business object, the Get procedure returns all records for the particular contact from these TCA entity tables.
342
343 Embedded TCA Entity Mandatory Multiple TCA Table Entities
344
345 Customer Account Y N HZ_CUST_ACCOUNTS
346 Account Relationship N Y HZ_CUST_ACCT_RELATE
347 Bank Account Use N Y Owned by Payments team
348 Payment Method N N Owned by AR team
349
350 */
351
352
353
354 PROCEDURE get_cust_acct_bo(
355 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
356 p_cust_acct_id IN NUMBER,
357 p_cust_acct_os IN VARCHAR2,
358 p_cust_acct_osr IN VARCHAR2,
359 x_cust_acct_obj OUT NOCOPY HZ_CUST_ACCT_BO,
360 x_return_status OUT NOCOPY VARCHAR2,
361 x_msg_count OUT NOCOPY NUMBER,
362 x_msg_data OUT NOCOPY VARCHAR2
363 );
364
365 /*#
366 * Get Customer Account Business Object (get_cust_acct_bo)
367 * Extracts a particular Customer Account business object from TCA. You pass the object's identification information
368 * to the procedure, and the procedure returns the identified business object as it exists in TCA.
369 *
370 * @param p_cust_acct_id TCA identifier for the Customer Account business object
371 * @param p_cust_acct_os Customer Account original system name
372 * @param p_cust_acct_osr Customer Account original system reference
373 * @param x_cust_acct_obj The retrieved Customer Account business object
374 * @param x_return_status Return status after the call
375 * @param x_messages Messages returned from the retrieval of the business object
376 * @rep:scope public
377 * @rep:lifecycle active
378 * @rep:displayname Get Customer Account Business Object
379 * @rep:doccd 120hztig.pdf Get Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
380 */
381 PROCEDURE get_cust_acct_bo(
382 p_cust_acct_id IN NUMBER,
383 p_cust_acct_os IN VARCHAR2,
384 p_cust_acct_osr IN VARCHAR2,
385 x_cust_acct_obj OUT NOCOPY HZ_CUST_ACCT_BO,
386 x_return_status OUT NOCOPY VARCHAR2,
387 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL
388 );
389
390 PROCEDURE do_create_cust_acct_bo(
391 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
392 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
393 p_cust_acct_obj IN OUT NOCOPY HZ_CUST_ACCT_BO,
394 p_created_by_module IN VARCHAR2,
395 p_obj_source IN VARCHAR2 := null,
396 x_return_status OUT NOCOPY VARCHAR2,
397 x_msg_count OUT NOCOPY NUMBER,
398 x_msg_data OUT NOCOPY VARCHAR2,
399 x_cust_acct_id OUT NOCOPY NUMBER,
400 x_cust_acct_os OUT NOCOPY VARCHAR2,
401 x_cust_acct_osr OUT NOCOPY VARCHAR2,
402 px_parent_id IN OUT NOCOPY NUMBER,
403 px_parent_os IN OUT NOCOPY VARCHAR2,
404 px_parent_osr IN OUT NOCOPY VARCHAR2,
405 px_parent_obj_type IN OUT NOCOPY VARCHAR2
406 );
407
408 PROCEDURE do_update_cust_acct_bo(
409 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
410 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
411 p_cust_acct_obj IN OUT NOCOPY HZ_CUST_ACCT_BO,
412 p_created_by_module IN VARCHAR2,
413 p_obj_source IN VARCHAR2 := null,
414 x_return_status OUT NOCOPY VARCHAR2,
415 x_msg_count OUT NOCOPY NUMBER,
416 x_msg_data OUT NOCOPY VARCHAR2,
417 x_cust_acct_id OUT NOCOPY NUMBER,
418 x_cust_acct_os OUT NOCOPY VARCHAR2,
419 x_cust_acct_osr OUT NOCOPY VARCHAR2,
420 p_parent_os IN VARCHAR2
421 );
422
423 PROCEDURE do_save_cust_acct_bo(
424 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
425 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
429 x_return_status OUT NOCOPY VARCHAR2,
426 p_cust_acct_obj IN OUT NOCOPY HZ_CUST_ACCT_BO,
427 p_created_by_module IN VARCHAR2,
428 p_obj_source IN VARCHAR2 := null,
430 x_msg_count OUT NOCOPY NUMBER,
431 x_msg_data OUT NOCOPY VARCHAR2,
432 x_cust_acct_id OUT NOCOPY NUMBER,
433 x_cust_acct_os OUT NOCOPY VARCHAR2,
434 x_cust_acct_osr OUT NOCOPY VARCHAR2,
435 px_parent_id IN OUT NOCOPY NUMBER,
436 px_parent_os IN OUT NOCOPY VARCHAR2,
437 px_parent_osr IN OUT NOCOPY VARCHAR2,
438 px_parent_obj_type IN OUT NOCOPY VARCHAR2
439 );
440
441 -- PROCEDURE create_cust_acct_v2_bo
442 --
443 -- DESCRIPTION
444 -- Create customer account business object.
445 --
446 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
447 --
448 -- ARGUMENTS
449 -- IN:
450 -- p_init_msg_list Initialize message stack if it is set to
451 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
452 -- p_validate_bo_flag If it is set to FND_API.G_TRUE, validate
453 -- the completeness of business object.
454 -- p_cust_acct_v2_obj Customer account object.
455 -- p_created_by_module Created by module.
456 -- IN OUT:
457 -- px_parent_acct_id Parent id.
458 -- px_parent_acct_os Parent original system.
459 -- px_parent_acct_osr Parent original system reference.
460 -- px_parent_obj_type Parent object type.
461 -- OUT:
462 -- x_return_status Return status after the call. The status can
463 -- be fnd_api.g_ret_sts_success (success),
464 -- fnd_api.g_ret_sts_error (error),
465 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
466 -- x_msg_count Number of messages in message stack.
467 -- x_messages Messages in Message stack
468 -- x_cust_acct_id Customer Account ID.
469 -- x_cust_acct_os Customer Account orig system.
470 -- x_cust_acct_osr Customer Account orig system reference.
471 --
472 -- NOTES
473 --
474 -- MODIFICATION HISTORY
475 --
476 -- 1-FEB-2008 vsegu Created.
477
478 /*#
479 * Create Customer Account Business Object (create_cust_acct_v2_bo)
480 * Creates a Customer Account business object. You pass object data to the procedure, packaged within an object type
481 * defined specifically for the API. The object type is HZ_CUST_ACCT_V2_BO for the Customer Account business object.
482 * In addition to the object's business object attributes, the object type also includes lower-level embedded child
483 * entities or objects that can be simultaneously created.
484 *
485 * @param p_return_obj_flag Indicates if the created object is to be returned to the caller as an output parameter. Default value: false
486 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness. Default value: true
487 * @param p_cust_acct_v2_obj The Customer Account business object to be created in its entirety
488 * @param p_created_by_module The module creating this business object. Must be a valid created_by_module value
489 * @param p_obj_source The source of this business object
490 * @param x_return_status Return status after the call
491 * @param x_return_obj The Customer Account business object that was created, returned as an output parameter
492 * @param x_messages Messages returned from the creation of the business object
493 * @param x_cust_acct_id TCA identifier for the Customer Account business object
494 * @param x_cust_acct_os Customer Account original system name
495 * @param x_cust_acct_osr Customer Account original system reference
496 * @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
497 * @param px_parent_os Parent object original system name
498 * @param px_parent_osr Parent object original system reference
499 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
500 * @rep:scope public
501 * @rep:lifecycle active
502 * @rep:displayname Create Customer Account Business Object
503 * @rep:doccd 120hztig.pdf Create Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
504 */
505 PROCEDURE create_cust_acct_v2_bo(
506 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
507 p_cust_acct_v2_obj IN HZ_CUST_ACCT_V2_BO,
508 p_created_by_module IN VARCHAR2,
509 p_obj_source IN VARCHAR2 := null,
510 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
511 x_return_status OUT NOCOPY VARCHAR2,
512 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
513 x_return_obj OUT NOCOPY HZ_CUST_ACCT_V2_BO,
514 x_cust_acct_id OUT NOCOPY NUMBER,
515 x_cust_acct_os OUT NOCOPY VARCHAR2,
516 x_cust_acct_osr OUT NOCOPY VARCHAR2,
517 px_parent_id IN OUT NOCOPY NUMBER,
518 px_parent_os IN OUT NOCOPY VARCHAR2,
519 px_parent_osr IN OUT NOCOPY VARCHAR2,
520 px_parent_obj_type IN OUT NOCOPY VARCHAR2
521 );
522
523 -- PROCEDURE update_cust_acct_v2_bo
524 --
525 -- DESCRIPTION
526 -- Update customer account business object.
530 -- ARGUMENTS
527 --
528 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
529 --
531 -- IN:
532 -- p_init_msg_list Initialize message stack if it is set to
533 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
534 -- p_cust_acct_v2_obj Customer account object.
535 -- p_created_by_module Created by module.
536 -- OUT:
537 -- x_return_status Return status after the call. The status can
538 -- be fnd_api.g_ret_sts_success (success),
539 -- fnd_api.g_ret_sts_error (error),
540 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
541 -- x_msg_count Number of messages in message stack.
542 -- x_messages Messages in Message stack
543 -- x_cust_acct_id Customer Account ID.
544 -- x_cust_acct_os Customer Account orig system.
545 -- x_cust_acct_osr Customer Account orig system reference.
546 --
547 -- NOTES
548 --
549 -- MODIFICATION HISTORY
550 --
551 -- 14-DEC-2004 Arnold Ng Created.
552
553 /*#
554 * Update Customer Account Business Object (update_cust_acct_v2_bo)
555 * Updates a Customer Account business object. You pass any modified object data to the procedure, packaged within an
556 * object type defined specifically for the API. The object type is HZ_CUST_ACCT_V2_BO for the Customer Account business
557 * object. In addition to the object's business object attributes, the object type also includes embedded child business
558 * entities or objects that can be simultaneously created or updated.
559 *
560 * @param p_return_obj_flag Indicates if the updated object is to be returned to the caller as an output parameter. Default value: false
561 * @param p_cust_acct_v2_obj The Customer Account business object to be updated
562 * @param p_created_by_module The module updating this business object
563 * @param p_obj_source The source of this business object
564 * @param x_return_status Return status after the call
565 * @param x_return_obj The Customer Account business object that was updated, returned as an output parameter
566 * @param x_messages Messages returned from the update of the business object
567 * @param x_cust_acct_id TCA identifier for the Customer Account business object
568 * @param x_cust_acct_os Customer Account original system name
569 * @param x_cust_acct_osr Customer Account original system reference
570 * @rep:scope public
571 * @rep:lifecycle active
572 * @rep:displayname Update Customer Account Business Object
573 * @rep:doccd 120hztig.pdf Update Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
574 */
575 PROCEDURE update_cust_acct_v2_bo(
576 p_cust_acct_v2_obj IN HZ_CUST_ACCT_V2_BO,
577 p_created_by_module IN VARCHAR2,
578 p_obj_source IN VARCHAR2 := null,
579 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
580 x_return_status OUT NOCOPY VARCHAR2,
581 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
582 x_return_obj OUT NOCOPY HZ_CUST_ACCT_V2_BO,
583 x_cust_acct_id OUT NOCOPY NUMBER,
584 x_cust_acct_os OUT NOCOPY VARCHAR2,
585 x_cust_acct_osr OUT NOCOPY VARCHAR2
586 );
587
588 -- PROCEDURE save_cust_acct_v2_bo
589 --
590 -- DESCRIPTION
591 -- Create or update customer account business object.
592 --
593 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
594 --
595 -- ARGUMENTS
596 -- IN:
597 -- p_init_msg_list Initialize message stack if it is set to
598 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
599 -- p_validate_bo_flag If it is set to FND_API.G_TRUE, validate
600 -- the completeness of business object.
601 -- p_cust_acct_v2_obj Customer account object.
602 -- p_created_by_module Created by module.
603 -- IN OUT:
604 -- px_parent_acct_id Parent id.
605 -- px_parent_acct_os Parent original system.
606 -- px_parent_acct_osr Parent original system reference.
607 -- px_parent_obj_type Parent object type.
608 -- OUT:
609 -- x_return_status Return status after the call. The status can
610 -- be fnd_api.g_ret_sts_success (success),
611 -- fnd_api.g_ret_sts_error (error),
612 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
613 -- x_msg_count Number of messages in message stack.
614 -- x_messages Messages in Message stack
615 -- x_cust_acct_id Customer Account ID.
616 -- x_cust_acct_os Customer Account orig system.
617 -- x_cust_acct_osr Customer Account orig system reference.
618 --
619 -- NOTES
620 --
621 -- MODIFICATION HISTORY
622 --
623 -- 1-FEB-2008 vsegu Created.
624
625 /*#
626 * Save Customer Account Business Object (save_cust_acct_v2_bo)
627 * Saves a Customer Account business object. You pass new or modified object data to the procedure, packaged within
628 * an object type defined specifically for the API. The API then determines if the object exists in TCA, based upon
629 * the provided identification information, and creates or updates the object. The object type is HZ_CUST_ACCT_V2_BO
630 * for the Customer Account business object. For either case, the object type that you provide will be processed as if
634 *
631 * the respective API procedure is being called (create_cust_acct_v2_bo or update_cust_acct_v2_bo). Please see those procedures
632 * for more details. In addition to the object's business object attributes, the object type also includes embedded
633 * child business entities or objects that can be simultaneously created or updated.
635 * @param p_return_obj_flag Indicates if the saved object is to be returned to the caller as an output parameter. Default value: false
636 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness if it is being created
637 * @param p_cust_acct_v2_obj The Customer Account business object to be saved
638 * @param p_created_by_module The module saving this business object
639 * @param p_obj_source The source of this business object
640 * @param x_return_status Return status after the call
641 * @param x_return_obj The Customer Account business object that was saved, returned as an output parameter
642 * @param x_messages Messages returned from the save of the business object
643 * @param x_cust_acct_id TCA identifier for the Customer Account business object
644 * @param x_cust_acct_os Customer Account original system name
645 * @param x_cust_acct_osr Customer Account original system reference
646 * @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
647 * @param px_parent_os Parent object original system name
648 * @param px_parent_osr Parent object original system reference
649 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
650 * @rep:scope public
651 * @rep:lifecycle active
652 * @rep:displayname Save Customer Account Business Object
653 * @rep:doccd 120hztig.pdf Save Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
654 */
655 PROCEDURE save_cust_acct_v2_bo(
656 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
657 p_cust_acct_v2_obj IN HZ_CUST_ACCT_V2_BO,
658 p_created_by_module IN VARCHAR2,
659 p_obj_source IN VARCHAR2 := null,
660 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
661 x_return_status OUT NOCOPY VARCHAR2,
662 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
663 x_return_obj OUT NOCOPY HZ_CUST_ACCT_V2_BO,
664 x_cust_acct_id OUT NOCOPY NUMBER,
665 x_cust_acct_os OUT NOCOPY VARCHAR2,
666 x_cust_acct_osr OUT NOCOPY VARCHAR2,
667 px_parent_id IN OUT NOCOPY NUMBER,
668 px_parent_os IN OUT NOCOPY VARCHAR2,
669 px_parent_osr IN OUT NOCOPY VARCHAR2,
670 px_parent_obj_type IN OUT NOCOPY VARCHAR2
671 );
672
673 --------------------------------------
674 --
675 -- PROCEDURE get_cust_acct_v2_bo
676 --
677 -- DESCRIPTION
678 -- Get a logical customer account.
679 --
680 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
681 --
682 -- ARGUMENTS
683 -- IN:
684 -- p_init_msg_list Initialize message stack if it is set to
685 -- p_cust_acct_id customer account ID.
686 -- p_parent_id Parent Id.
687 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
688 -- OUT:
689 -- x_cust_acct_v2_obj Logical customer account record.
690 -- x_return_status Return status after the call. The status can
691 -- be fnd_api.g_ret_sts_success (success),
692 -- fnd_api.g_ret_sts_error (error),
693 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
694 -- x_msg_count Number of messages in message stack.
695 -- x_msg_data Message text if x_msg_count is 1.
696 --
697 -- NOTES
698 --
699 -- MODIFICATION HISTORY
700 --
701 --
702 -- 1-FEB-2008 VSEGU Created.
703 --
704
705 /*
706
707 The Get customer account API Procedure is a retrieval service that returns full customer account business objects.
708 The user identifies a particular Organization Contact business object using the TCA identifier and/or the object's
709 Source System information. Upon proper validation of the object, the full Organization Contact business object is returned.
710 The object consists of all data included within the Organization Contact business object, at all embedded levels.
711 This includes the set of all data stored in the TCA tables for each embedded entity.
712
713
714 Embedded BO Mandatory Multiple Logical API Procedure Comments
715 Customer Account Site N Y get_cust_acct_site_v2_bo
716 Customer Account Contact N Y get_cust_acct_contact_bo
717 Customer Profile Y N Business Structure. Included entities:
718 HZ_CUSTOMER_PROFILES, HZ_CUST_PROFILE_AMTS
719
720 To retrieve the appropriate embedded entities within the 'Organization Contact' business object, the Get procedure returns all records for the particular contact from these TCA entity tables.
721
722 Embedded TCA Entity Mandatory Multiple TCA Table Entities
723
724 Customer Account Y N HZ_CUST_ACCOUNTS
725 Account Relationship N Y HZ_CUST_ACCT_RELATE
726 Bank Account Use N Y Owned by Payments team
727 Payment Method N N Owned by AR team
728
729 */
730
731
732
733 PROCEDURE get_cust_acct_v2_bo(
734 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
735 p_cust_acct_id IN NUMBER,
739 x_return_status OUT NOCOPY VARCHAR2,
736 p_cust_acct_os IN VARCHAR2,
737 p_cust_acct_osr IN VARCHAR2,
738 x_cust_acct_v2_obj OUT NOCOPY HZ_CUST_ACCT_V2_BO,
740 x_msg_count OUT NOCOPY NUMBER,
741 x_msg_data OUT NOCOPY VARCHAR2
742 );
743
744 /*#
745 * Get Customer Account Business Object (get_cust_acct_v2_bo)
746 * Extracts a particular Customer Account business object from TCA. You pass the object's identification information
747 * to the procedure, and the procedure returns the identified business object as it exists in TCA.
748 *
749 * @param p_cust_acct_id TCA identifier for the Customer Account business object
750 * @param p_cust_acct_os Customer Account original system name
751 * @param p_cust_acct_osr Customer Account original system reference
752 * @param x_cust_acct_v2_obj The retrieved Customer Account business object
753 * @param x_return_status Return status after the call
754 * @param x_messages Messages returned from the retrieval of the business object
755 * @rep:scope public
756 * @rep:lifecycle active
757 * @rep:displayname Get Customer Account Business Object
758 * @rep:doccd 120hztig.pdf Get Customer Account Business Object, Oracle Trading Community Architecture Technical Implementation Guide
759 */
760 PROCEDURE get_cust_acct_v2_bo(
761 p_cust_acct_id IN NUMBER,
762 p_cust_acct_os IN VARCHAR2,
763 p_cust_acct_osr IN VARCHAR2,
764 x_cust_acct_v2_obj OUT NOCOPY HZ_CUST_ACCT_V2_BO,
765 x_return_status OUT NOCOPY VARCHAR2,
766 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL
767 );
768
769 PROCEDURE do_create_cust_acct_v2_bo(
770 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
771 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
772 p_cust_acct_v2_obj IN OUT NOCOPY HZ_CUST_ACCT_V2_BO,
773 p_created_by_module IN VARCHAR2,
774 p_obj_source IN VARCHAR2 := null,
775 x_return_status OUT NOCOPY VARCHAR2,
776 x_msg_count OUT NOCOPY NUMBER,
777 x_msg_data OUT NOCOPY VARCHAR2,
778 x_cust_acct_id OUT NOCOPY NUMBER,
779 x_cust_acct_os OUT NOCOPY VARCHAR2,
780 x_cust_acct_osr OUT NOCOPY VARCHAR2,
781 px_parent_id IN OUT NOCOPY NUMBER,
782 px_parent_os IN OUT NOCOPY VARCHAR2,
783 px_parent_osr IN OUT NOCOPY VARCHAR2,
784 px_parent_obj_type IN OUT NOCOPY VARCHAR2
785 );
786
787 PROCEDURE do_update_cust_acct_v2_bo(
788 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
789 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
790 p_cust_acct_v2_obj IN OUT NOCOPY HZ_CUST_ACCT_V2_BO,
791 p_created_by_module IN VARCHAR2,
792 p_obj_source IN VARCHAR2 := null,
793 x_return_status OUT NOCOPY VARCHAR2,
794 x_msg_count OUT NOCOPY NUMBER,
795 x_msg_data OUT NOCOPY VARCHAR2,
796 x_cust_acct_id OUT NOCOPY NUMBER,
797 x_cust_acct_os OUT NOCOPY VARCHAR2,
798 x_cust_acct_osr OUT NOCOPY VARCHAR2,
799 p_parent_os IN VARCHAR2
800 );
801
802 PROCEDURE do_save_cust_acct_v2_bo(
803 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
804 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
805 p_cust_acct_v2_obj IN OUT NOCOPY HZ_CUST_ACCT_V2_BO,
806 p_created_by_module IN VARCHAR2,
807 p_obj_source IN VARCHAR2 := null,
808 x_return_status OUT NOCOPY VARCHAR2,
809 x_msg_count OUT NOCOPY NUMBER,
810 x_msg_data OUT NOCOPY VARCHAR2,
811 x_cust_acct_id OUT NOCOPY NUMBER,
812 x_cust_acct_os OUT NOCOPY VARCHAR2,
813 x_cust_acct_osr OUT NOCOPY VARCHAR2,
814 px_parent_id IN OUT NOCOPY NUMBER,
815 px_parent_os IN OUT NOCOPY VARCHAR2,
816 px_parent_osr IN OUT NOCOPY VARCHAR2,
817 px_parent_obj_type IN OUT NOCOPY VARCHAR2
818 );
819
820
821 END HZ_CUST_ACCT_BO_PUB;