1 PACKAGE HZ_CUST_ACCT_CONTACT_BO_PUB AUTHID CURRENT_USER AS
2 /*$Header: ARHBCRBS.pls 120.7 2006/09/21 17:59:01 acng noship $ */
3 /*#
4 * Customer Account Contact Business Object API
5 * Public API that allows users to manage Customer Account Contact 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_ACCOUNT_CONTACT
12 * @rep:displayname Customer Account Contact Business Object API
13 * @rep:doccd 120hztig.pdf Customer Account Contact Business Object API, Oracle Trading Community Architecture Technical Implementation Guide
14 */
15
16 -- PROCEDURE create_cust_acct_contact_bo
17 --
18 -- DESCRIPTION
19 -- Create customer account contact 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_contact_obj Customer account contact object.
30 -- p_created_by_module Created by module.
31 -- IN OUT:
32 -- px_parent_id Parent id
33 -- px_parent_os Parent os
34 -- px_parent_osr Parent osr
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_contact_id Customer Account Contact ID.
44 -- x_cust_acct_contact_os Customer Account Contact orig system.
45 -- x_cust_acct_contact_osr Customer Account Contact orig system reference.
46 --
47 -- NOTES
48 --
49 -- MODIFICATION HISTORY
50 --
51 -- 14-DEC-2004 Arnold Ng Created.
52 --
53
54 PROCEDURE create_cust_acct_contact_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_cust_acct_contact_obj IN HZ_CUST_ACCT_CONTACT_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_cust_acct_contact_id OUT NOCOPY NUMBER,
63 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
64 x_cust_acct_contact_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 Customer Account Contact Business Object (create_cust_acct_contact_bo)
73 * Creates a Customer Account Contact business object. You pass object data to the procedure, packaged within an object
74 * type defined specifically for the API. The object type is HZ_CUST_ACCT_CONTACT_BO for the Customer Account Contact
75 * business object. In addition to the object's business object attributes, the object type also includes lower-level
76 * embedded 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_cust_acct_contact_obj The Customer Account Contact 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 Customer Account Contact 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_cust_acct_contact_id TCA identifier for the Customer Account Contact business object
87 * @param x_cust_acct_contact_os Customer Account Contact original system name
88 * @param x_cust_acct_contact_osr Customer Account Contact 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 Customer Account Contact Business Object
96 * @rep:doccd 120hztig.pdf Create Customer Account Contact Business Object, Oracle Trading Community Architecture Technical Implementation Guide
97 */
98 PROCEDURE create_cust_acct_contact_bo(
99 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
100 p_cust_acct_contact_obj IN HZ_CUST_ACCT_CONTACT_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_CUST_ACCT_CONTACT_BO,
107 x_cust_acct_contact_id OUT NOCOPY NUMBER,
108 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
109 x_cust_acct_contact_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_cust_acct_contact_bo
117 --
118 -- DESCRIPTION
119 -- Update customer account contact 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_cust_acct_contact_obj Customer account contact 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_cust_acct_contact_id Customer Account Contact ID.
137 -- x_cust_acct_contact_os Customer Account Contact orig system.
138 -- x_cust_acct_contact_osr Customer Account Contact orig system reference.
139 --
140 -- NOTES
141 --
142 -- MODIFICATION HISTORY
143 --
144 -- 14-DEC-2004 Arnold Ng Created.
145 --
146
147 PROCEDURE update_cust_acct_contact_bo(
148 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
149 p_cust_acct_contact_obj IN HZ_CUST_ACCT_CONTACT_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_cust_acct_contact_id OUT NOCOPY NUMBER,
155 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
156 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2
157 );
158
159 /*#
160 * Update Customer Account Contact Business Object (update_cust_acct_contact_bo)
161 * Updates a Customer Account Contact business object. You pass any modified object data to the procedure, packaged within
162 * an object type defined specifically for the API. The object type is HZ_CUST_ACCT_CONTACT_BO for the Customer Account
163 * Contact business object. In addition to the object's business object attributes, the object type also includes embedded
164 * child business entities 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_cust_acct_contact_obj The Customer Account Contact 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 Customer Account Contact 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_cust_acct_contact_id TCA identifier for the Customer Account Contact business object
174 * @param x_cust_acct_contact_os Customer Account Contact original system name
175 * @param x_cust_acct_contact_osr Customer Account Contact original system reference
176 * @rep:scope public
177 * @rep:lifecycle active
178 * @rep:displayname Update Customer Account Contact Business Object
179 * @rep:doccd 120hztig.pdf Update Customer Account Contact Business Object, Oracle Trading Community Architecture Technical Implementation Guide
180 */
181 PROCEDURE update_cust_acct_contact_bo(
182 p_cust_acct_contact_obj IN HZ_CUST_ACCT_CONTACT_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_CUST_ACCT_CONTACT_BO,
189 x_cust_acct_contact_id OUT NOCOPY NUMBER,
190 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
191 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2
192 );
193
194 -- PROCEDURE save_cust_acct_contact_bo
195 --
196 -- DESCRIPTION
197 -- Create or update customer account contact 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_validate_bo_flag If it is set to FND_API.G_TRUE, validate
206 -- the completeness of business object.
207 -- p_cust_acct_contact_obj Customer account contact object.
208 -- p_created_by_module Created by module.
209 -- IN OUT:
210 -- px_parent_id Parent id
211 -- px_parent_os Parent os
212 -- px_parent_osr Parent osr
213 -- px_parent_obj_type Parent object type
214 -- OUT:
215 -- x_return_status Return status after the call. The status can
216 -- be fnd_api.g_ret_sts_success (success),
217 -- fnd_api.g_ret_sts_error (error),
218 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
219 -- x_msg_count Number of messages in message stack.
220 -- x_msg_data Message text if x_msg_count is 1.
221 -- x_cust_acct_contact_id Customer Account Contact ID.
222 -- x_cust_acct_contact_os Customer Account Contact orig system.
223 -- x_cust_acct_contact_osr Customer Account Contact orig system reference.
224 --
225 -- NOTES
226 --
227 -- MODIFICATION HISTORY
228 --
229 -- 14-DEC-2004 Arnold Ng Created.
230 --
231
232 PROCEDURE save_cust_acct_contact_bo(
233 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
234 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
235 p_cust_acct_contact_obj IN HZ_CUST_ACCT_CONTACT_BO,
236 p_created_by_module IN VARCHAR2,
237 x_return_status OUT NOCOPY VARCHAR2,
238 x_msg_count OUT NOCOPY NUMBER,
239 x_msg_data OUT NOCOPY VARCHAR2,
240 x_cust_acct_contact_id OUT NOCOPY NUMBER,
241 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
242 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2,
243 px_parent_id IN OUT NOCOPY NUMBER,
244 px_parent_os IN OUT NOCOPY VARCHAR2,
245 px_parent_osr IN OUT NOCOPY VARCHAR2,
246 px_parent_obj_type IN OUT NOCOPY VARCHAR2
247 );
248
249 /*#
250 * Save Customer Account Contact Business Object (save_cust_acct_contact_bo)
251 * Saves a Customer Account Contact business object. You pass new or modified object data to the procedure, packaged within
252 * an object type defined specifically for the API. The API then determines if the object exists in TCA, based upon the
253 * provided identification information, and creates or updates the object. The object type is HZ_CUST_ACCT_CONTACT_BO for
254 * the Customer Account Contact business object. For either case, the object type that you provide will be processed as if
255 * the respective API procedure is being called (create_cust_acct_contact_bo or update_cust_acct_contact_bo). Please see
256 * those procedures for more details. In addition to the object's business object attributes, the object type also includes
257 * embedded child business entities or objects that can be simultaneously created or updated.
258 *
259 * @param p_return_obj_flag Indicates if the saved object is to be returned to the caller as an output parameter. Default value: false
260 * @param p_validate_bo_flag Indicates if the passed business object is to be validated for completeness if it is being created
261 * @param p_cust_acct_contact_obj The Customer Account Contact business object to be saved
262 * @param p_created_by_module The module saving this business object
263 * @param p_obj_source The source of this business object
264 * @param x_return_status Return status after the call
265 * @param x_return_obj The Customer Account Contact business object that was saved, returned as an output parameter
266 * @param x_messages Messages returned from the save of the business object
267 * @param x_cust_acct_contact_id TCA identifier for the Customer Account Contact business object
268 * @param x_cust_acct_contact_os Customer Account Contact original system name
269 * @param x_cust_acct_contact_osr Customer Account Contact original system reference
270 * @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
271 * @param px_parent_os Parent object original system name
272 * @param px_parent_osr Parent object original system reference
273 * @param px_parent_obj_type Parent object type. Validated against HZ_BUSINESS_OBJECTS lookup type
274 * @rep:scope public
275 * @rep:lifecycle active
276 * @rep:displayname Save Customer Account Contact Business Object
277 * @rep:doccd 120hztig.pdf Save Customer Account Contact Business Object, Oracle Trading Community Architecture Technical Implementation Guide
278 */
279 PROCEDURE save_cust_acct_contact_bo(
280 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
281 p_cust_acct_contact_obj IN HZ_CUST_ACCT_CONTACT_BO,
282 p_created_by_module IN VARCHAR2,
283 p_obj_source IN VARCHAR2 := null,
284 p_return_obj_flag IN VARCHAR2 := fnd_api.g_true,
285 x_return_status OUT NOCOPY VARCHAR2,
286 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL,
287 x_return_obj OUT NOCOPY HZ_CUST_ACCT_CONTACT_BO,
288 x_cust_acct_contact_id OUT NOCOPY NUMBER,
289 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
293 px_parent_osr IN OUT NOCOPY VARCHAR2,
290 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2,
291 px_parent_id IN OUT NOCOPY NUMBER,
292 px_parent_os IN OUT NOCOPY VARCHAR2,
294 px_parent_obj_type IN OUT NOCOPY VARCHAR2
295 );
296
297 --------------------------------------
298 --
299 -- PROCEDURE get_cust_acct_contact_bos
300 --
301 -- DESCRIPTION
302 -- Get logical customer account contacts.
303 --
304 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
305 --
306 -- ARGUMENTS
307 -- IN:
308 -- p_init_msg_list Initialize message stack if it is set to
309 -- p_parent_id parent id.
310 -- p_cust_acct_contact_id customer account contact ID.
311 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
312 -- OUT:
313 -- x_cust_acct_contact_objs Logical customer account contact 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).
318 -- x_msg_count Number of messages in message stack.
319 -- x_msg_data Message text if x_msg_count is 1.
320 --
321 -- NOTES
322 --
323 -- MODIFICATION HISTORY
324 --
325 --
326 -- 8-JUN-2005 AWU Created.
327 --
328
329 /*
330
331 The Get customer account contact API Procedure is a retrieval service that returns a full customer account contact business object.
332 The user identifies a particular Organization Contact business object using the TCA identifier and/or the object's Source System
333 information. Upon proper validation of the object, the full Organization Contact business object is returned.
334 The object consists of all data included within the Organization Contact business object, at all embedded levels. This includes the
335 set of all data stored in the TCA tables for each embedded entity.
336
337
338 Embedded BO Mandatory Multiple Logical API Procedure Comments
339
340 Org Contact Y N get_org_contact_bo
341
342
343 To retrieve the appropriate embedded entities within the 'Customer Account Contact' business object, the Get procedure returns all
344 records for the particular contact from these TCA entity tables.
345
346 Embedded TCA Entity Mandatory Multiple TCA Table Entities
347
348 Customer Account Role N N HZ_CUST_ACCOUNT_ROLES
349 Role Responsibility N Y HZ_ROLE_RESPONSIBILITY
350
351 */
352
353 PROCEDURE get_cust_acct_contact_bo (
354 p_init_msg_list IN VARCHAR2:=FND_API.G_FALSE,
355 p_cust_acct_contact_id IN NUMBER,
356 p_cust_acct_contact_os IN VARCHAR2,
357 p_cust_acct_contact_osr IN VARCHAR2,
358 x_cust_acct_contact_obj OUT NOCOPY HZ_CUST_ACCT_CONTACT_BO,
359 x_return_status OUT NOCOPY VARCHAR2,
360 x_msg_count OUT NOCOPY NUMBER,
361 x_msg_data OUT NOCOPY VARCHAR2
362 );
363
364 /*#
365 * Get Customer Account Contact Business Object (get_cust_acct_contact_bo)
366 * Extracts a particular Customer Account Contact business object from TCA. You pass the object's identification information
367 * to the procedure, and the procedure returns the identified business object as it exists in TCA.
368 *
369 * @param p_cust_acct_contact_id TCA identifier for the Customer Account Contact business object
370 * @param p_cust_acct_contact_os Customer Account Contact original system name
371 * @param p_cust_acct_contact_osr Customer Account Contact original system reference
372 * @param x_cust_acct_contact_obj The retrieved Customer Account Contact business object
373 * @param x_return_status Return status after the call
374 * @param x_messages Messages returned from the retrieval of the business object
375 * @rep:scope public
376 * @rep:lifecycle active
377 * @rep:displayname Get Customer Account Contact Business Object
378 * @rep:doccd 120hztig.pdf Get Customer Account Contact Business Object, Oracle Trading Community Architecture Technical Implementation Guide
379 */
380 PROCEDURE get_cust_acct_contact_bo (
381 p_cust_acct_contact_id IN NUMBER,
382 p_cust_acct_contact_os IN VARCHAR2,
383 p_cust_acct_contact_osr IN VARCHAR2,
384 x_cust_acct_contact_obj OUT NOCOPY HZ_CUST_ACCT_CONTACT_BO,
385 x_return_status OUT NOCOPY VARCHAR2,
386 x_messages OUT NOCOPY HZ_MESSAGE_OBJ_TBL
387 );
388
389 PROCEDURE do_create_cac_bo(
390 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
391 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
392 p_cust_acct_contact_obj IN OUT NOCOPY HZ_CUST_ACCT_CONTACT_BO,
393 p_created_by_module IN VARCHAR2,
394 p_obj_source IN VARCHAR2 := null,
395 x_return_status OUT NOCOPY VARCHAR2,
396 x_msg_count OUT NOCOPY NUMBER,
397 x_msg_data OUT NOCOPY VARCHAR2,
398 x_cust_acct_contact_id OUT NOCOPY NUMBER,
399 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
400 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2,
401 px_parent_id IN OUT NOCOPY NUMBER,
402 px_parent_os IN OUT NOCOPY VARCHAR2,
403 px_parent_osr IN OUT NOCOPY VARCHAR2,
404 px_parent_obj_type IN OUT NOCOPY VARCHAR2
405 );
406
407 PROCEDURE do_update_cac_bo(
408 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
409 p_cust_acct_contact_obj IN OUT NOCOPY HZ_CUST_ACCT_CONTACT_BO,
410 p_created_by_module IN VARCHAR2,
411 p_obj_source IN VARCHAR2 := null,
412 x_return_status OUT NOCOPY VARCHAR2,
413 x_msg_count OUT NOCOPY NUMBER,
414 x_msg_data OUT NOCOPY VARCHAR2,
415 x_cust_acct_contact_id OUT NOCOPY NUMBER,
416 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
417 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2,
418 p_parent_os IN VARCHAR2
419 );
420
421 PROCEDURE do_save_cac_bo(
422 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
423 p_validate_bo_flag IN VARCHAR2 := fnd_api.g_true,
424 p_cust_acct_contact_obj IN OUT NOCOPY HZ_CUST_ACCT_CONTACT_BO,
425 p_created_by_module IN VARCHAR2,
426 p_obj_source IN VARCHAR2 := null,
427 x_return_status OUT NOCOPY VARCHAR2,
428 x_msg_count OUT NOCOPY NUMBER,
429 x_msg_data OUT NOCOPY VARCHAR2,
430 x_cust_acct_contact_id OUT NOCOPY NUMBER,
431 x_cust_acct_contact_os OUT NOCOPY VARCHAR2,
432 x_cust_acct_contact_osr OUT NOCOPY VARCHAR2,
433 px_parent_id IN OUT NOCOPY NUMBER,
434 px_parent_os IN OUT NOCOPY VARCHAR2,
435 px_parent_osr IN OUT NOCOPY VARCHAR2,
436 px_parent_obj_type IN OUT NOCOPY VARCHAR2
437 );
438
439 END HZ_CUST_ACCT_CONTACT_BO_PUB;