[Home] [Help]
PACKAGE: APPS.HZ_CUST_ACCOUNT_SITE_V2PUB
Source
1 PACKAGE HZ_CUST_ACCOUNT_SITE_V2PUB AS
2 /*$Header: ARH2CSSS.pls 120.10 2006/08/17 10:16:59 idali ship $ */
3 /*#
4 * This package contains the public APIs for customer account sites and site uses.
5 * @rep:scope public
6 * @rep:product HZ
7 * @rep:displayname Customer Account Site
8 * @rep:category BUSINESS_ENTITY HZ_ADDRESS
9 * @rep:lifecycle active
10 * @rep:doccd 120hztig.pdf Customer Account Site APIs, Oracle Trading Community Architecture Technical Implementation Guide
11 */
12
13
14 --------------------------------------
15 -- declaration of record type
16 --------------------------------------
17
18 TYPE cust_acct_site_rec_type IS RECORD (
19 cust_acct_site_id NUMBER,
20 cust_account_id NUMBER,
21 party_site_id NUMBER,
22 attribute_category VARCHAR2(30),
23 attribute1 VARCHAR2(150),
24 attribute2 VARCHAR2(150),
25 attribute3 VARCHAR2(150),
26 attribute4 VARCHAR2(150),
27 attribute5 VARCHAR2(150),
28 attribute6 VARCHAR2(150),
29 attribute7 VARCHAR2(150),
30 attribute8 VARCHAR2(150),
31 attribute9 VARCHAR2(150),
32 attribute10 VARCHAR2(150),
33 attribute11 VARCHAR2(150),
34 attribute12 VARCHAR2(150),
35 attribute13 VARCHAR2(150),
36 attribute14 VARCHAR2(150),
37 attribute15 VARCHAR2(150),
38 attribute16 VARCHAR2(150),
39 attribute17 VARCHAR2(150),
40 attribute18 VARCHAR2(150),
41 attribute19 VARCHAR2(150),
42 attribute20 VARCHAR2(150),
43 global_attribute_category VARCHAR2(30),
44 global_attribute1 VARCHAR2(150),
45 global_attribute2 VARCHAR2(150),
46 global_attribute3 VARCHAR2(150),
47 global_attribute4 VARCHAR2(150),
48 global_attribute5 VARCHAR2(150),
49 global_attribute6 VARCHAR2(150),
50 global_attribute7 VARCHAR2(150),
51 global_attribute8 VARCHAR2(150),
52 global_attribute9 VARCHAR2(150),
53 global_attribute10 VARCHAR2(150),
54 global_attribute11 VARCHAR2(150),
55 global_attribute12 VARCHAR2(150),
56 global_attribute13 VARCHAR2(150),
57 global_attribute14 VARCHAR2(150),
58 global_attribute15 VARCHAR2(150),
59 global_attribute16 VARCHAR2(150),
60 global_attribute17 VARCHAR2(150),
61 global_attribute18 VARCHAR2(150),
62 global_attribute19 VARCHAR2(150),
63 global_attribute20 VARCHAR2(150),
64 orig_system_reference VARCHAR2(240),
65 orig_system VARCHAR2(30),
66 status VARCHAR2(1),
67 customer_category_code VARCHAR2(30),
68 language VARCHAR2(4),
69 key_account_flag VARCHAR2(1),
70 tp_header_id NUMBER,
71 ece_tp_location_code VARCHAR2(40),
72 primary_specialist_id NUMBER,
73 secondary_specialist_id NUMBER,
74 territory_id NUMBER,
75 territory VARCHAR2(30),
76 translated_customer_name VARCHAR2(50),
77 created_by_module VARCHAR2(150),
78 application_id NUMBER,
79 org_id NUMBER /* Bug 3456489 */
80 );
81
82 TYPE cust_site_use_rec_type IS RECORD (
83 site_use_id NUMBER,
84 cust_acct_site_id NUMBER,
85 site_use_code VARCHAR2(30),
86 primary_flag VARCHAR2(1),
87 status VARCHAR2(1),
88 location VARCHAR2(40),
89 contact_id NUMBER,
90 bill_to_site_use_id NUMBER,
91 orig_system_reference VARCHAR2(240),
92 orig_system VARCHAR2(30),
93 sic_code VARCHAR2(30),
94 payment_term_id NUMBER,
95 gsa_indicator VARCHAR2(1),
96 ship_partial VARCHAR2(1),
97 ship_via VARCHAR2(30),
98 fob_point VARCHAR2(30),
99 order_type_id NUMBER,
100 price_list_id NUMBER,
101 freight_term VARCHAR2(30),
102 warehouse_id NUMBER,
103 territory_id NUMBER,
104 attribute_category VARCHAR2(30),
105 attribute1 VARCHAR2(150),
106 attribute2 VARCHAR2(150),
107 attribute3 VARCHAR2(150),
108 attribute4 VARCHAR2(150),
109 attribute5 VARCHAR2(150),
110 attribute6 VARCHAR2(150),
111 attribute7 VARCHAR2(150),
112 attribute8 VARCHAR2(150),
113 attribute9 VARCHAR2(150),
114 attribute10 VARCHAR2(150),
115 tax_reference VARCHAR2(50),
116 sort_priority NUMBER,
117 tax_code VARCHAR2(50),
118 attribute11 VARCHAR2(150),
119 attribute12 VARCHAR2(150),
120 attribute13 VARCHAR2(150),
121 attribute14 VARCHAR2(150),
122 attribute15 VARCHAR2(150),
123 attribute16 VARCHAR2(150),
124 attribute17 VARCHAR2(150),
125 attribute18 VARCHAR2(150),
126 attribute19 VARCHAR2(150),
127 attribute20 VARCHAR2(150),
128 attribute21 VARCHAR2(150),
129 attribute22 VARCHAR2(150),
130 attribute23 VARCHAR2(150),
131 attribute24 VARCHAR2(150),
132 attribute25 VARCHAR2(150),
133 demand_class_code VARCHAR2(30),
134 tax_header_level_flag VARCHAR2(1),
135 tax_rounding_rule VARCHAR2(30),
136 global_attribute1 VARCHAR2(150),
137 global_attribute2 VARCHAR2(150),
138 global_attribute3 VARCHAR2(150),
139 global_attribute4 VARCHAR2(150),
140 global_attribute5 VARCHAR2(150),
141 global_attribute6 VARCHAR2(150),
142 global_attribute7 VARCHAR2(150),
143 global_attribute8 VARCHAR2(150),
144 global_attribute9 VARCHAR2(150),
145 global_attribute10 VARCHAR2(150),
146 global_attribute11 VARCHAR2(150),
147 global_attribute12 VARCHAR2(150),
148 global_attribute13 VARCHAR2(150),
149 global_attribute14 VARCHAR2(150),
150 global_attribute15 VARCHAR2(150),
151 global_attribute16 VARCHAR2(150),
152 global_attribute17 VARCHAR2(150),
153 global_attribute18 VARCHAR2(150),
154 global_attribute19 VARCHAR2(150),
155 global_attribute20 VARCHAR2(150),
156 global_attribute_category VARCHAR2(30),
157 primary_salesrep_id NUMBER,
158 finchrg_receivables_trx_id NUMBER,
159 dates_negative_tolerance NUMBER,
160 dates_positive_tolerance NUMBER,
161 date_type_preference VARCHAR2(20),
162 over_shipment_tolerance NUMBER,
163 under_shipment_tolerance NUMBER,
164 item_cross_ref_pref VARCHAR2(30),
165 over_return_tolerance NUMBER,
166 under_return_tolerance NUMBER,
167 ship_sets_include_lines_flag VARCHAR2(1),
168 arrivalsets_include_lines_flag VARCHAR2(1),
169 sched_date_push_flag VARCHAR2(1),
170 invoice_quantity_rule VARCHAR2(30),
171 pricing_event VARCHAR2(30),
172 gl_id_rec NUMBER,
173 gl_id_rev NUMBER,
174 gl_id_tax NUMBER,
175 gl_id_freight NUMBER,
176 gl_id_clearing NUMBER,
177 gl_id_unbilled NUMBER,
178 gl_id_unearned NUMBER,
179 gl_id_unpaid_rec NUMBER,
180 gl_id_remittance NUMBER,
181 gl_id_factor NUMBER,
182 tax_classification VARCHAR2(30),
183 created_by_module VARCHAR2(150),
184 application_id NUMBER,
185 org_id NUMBER /* Bug 3456489 */
186 );
187
188 --------------------------------------
189 -- declaration of public procedures and functions
190 --------------------------------------
191
192 /**
193 * PROCEDURE create_cust_acct_site
194 *
195 * DESCRIPTION
196 * Creates customer account site.
197 *
198 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
199 *
200 * ARGUMENTS
201 * IN:
202 * p_init_msg_list Initialize message stack if it is set to
203 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
204 * p_cust_acct_site_rec Customer account site record.
205 * IN/OUT:
206 * OUT:
207 * x_cust_acct_site_id Customer account site ID.
208 * x_return_status Return status after the call. The status can
209 * be FND_API.G_RET_STS_SUCCESS (success),
210 * FND_API.G_RET_STS_ERROR (error),
211 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
212 * x_msg_count Number of messages in message stack.
213 * x_msg_data Message text if x_msg_count is 1.
214 *
215 * NOTES
216 *
217 * MODIFICATION HISTORY
218 *
219 * 07-23-2001 Jianying Huang o Created.
220 *
221 */
222
223 /*#
224 * Use this routine to create a customer account site. This API creates records in the
225 * HZ_CUST_ACCT_SITES table. The API creates the customer account site using an existing
226 * customer account and an existing party site. If an orig_system_reference is passed in,
227 * then the API creates a record in the HZ_ORIG_SYS_REFERENCES table to store the mapping
228 * between the source system reference and the TCA primary key. If orig_system_reference
229 * is not passed in, then the default is UNKNOWN.
230 * @rep:scope public
231 * @rep:lifecycle active
232 * @rep:displayname Create Customer Account Site
233 * @rep:businessevent oracle.apps.ar.hz.CustAcctSite.create
234 * @rep:doccd 120hztig.pdf Customer Account Site APIs, Oracle Trading Community Architecture Technical Implementation Guide
235 */
236 PROCEDURE create_cust_acct_site (
237 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
238 p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE,
239 x_cust_acct_site_id OUT NOCOPY NUMBER,
240 x_return_status OUT NOCOPY VARCHAR2,
241 x_msg_count OUT NOCOPY NUMBER,
242 x_msg_data OUT NOCOPY VARCHAR2
243 );
244
245 /**
246 * PROCEDURE update_cust_acct_site
247 *
248 * DESCRIPTION
249 * Updates customer account site.
250 *
251 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
252 *
253 * ARGUMENTS
254 * IN:
255 * p_init_msg_list Initialize message stack if it is set to
256 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
257 * p_cust_acct_site_rec Customer account site record.
258 * IN/OUT:
259 * p_object_version_number Used for locking the being updated record.
260 * OUT:
261 * x_return_status Return status after the call. The status can
262 * be FND_API.G_RET_STS_SUCCESS (success),
263 * FND_API.G_RET_STS_ERROR (error),
264 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
265 * x_msg_count Number of messages in message stack.
266 * x_msg_data Message text if x_msg_count is 1.
267 *
268 * NOTES
269 *
270 * MODIFICATION HISTORY
271 *
272 * 07-23-2001 Jianying Huang o Created.
273 *
274 */
275
276 /*#
277 * Use this routine to update a customer account site. This API updates records in the
278 * HZ_CUST_ACCT_SITES table. If the primary key is not passed in, then get the primary key
279 * from the HZ_ORIG_SYS_REFERENCES table based on orig_system and orig_system_reference.
280 * Note: the orig_system and orig_system_reference must be unique and not null.
281 * @rep:scope public
282 * @rep:lifecycle active
283 * @rep:displayname Update Customer Account Site
284 * @rep:businessevent oracle.apps.ar.hz.CustAcctSite.update
285 * @rep:doccd 120hztig.pdf Customer Account Site APIs, Oracle Trading Community Architecture Technical Implementation Guide
286 */
287 PROCEDURE update_cust_acct_site (
291 x_return_status OUT NOCOPY VARCHAR2,
288 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
289 p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE,
290 p_object_version_number IN OUT NOCOPY NUMBER,
292 x_msg_count OUT NOCOPY NUMBER,
293 x_msg_data OUT NOCOPY VARCHAR2
294 );
295
296 /**
297 * PROCEDURE get_cust_acct_site_rec
298 *
299 * DESCRIPTION
300 * Gets customer account site record
301 *
302 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
303 *
304 * ARGUMENTS
305 * IN:
306 * p_init_msg_list Initialize message stack if it is set to
307 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
308 * p_cust_acct_site_id Customer account site id.
309 * IN/OUT:
310 * OUT:
311 * x_cust_acct_site_rec Returned customer account site record.
312 * x_return_status Return status after the call. The status can
313 * be FND_API.G_RET_STS_SUCCESS (success),
314 * FND_API.G_RET_STS_ERROR (error),
315 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
316 * x_msg_count Number of messages in message stack.
317 * x_msg_data Message text if x_msg_count is 1.
318 *
319 * NOTES
320 *
321 * MODIFICATION HISTORY
322 *
323 * 07-23-2001 Jianying Huang o Created.
324 *
325 */
326
327 PROCEDURE get_cust_acct_site_rec (
328 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
329 p_cust_acct_site_id IN NUMBER,
330 x_cust_acct_site_rec OUT NOCOPY CUST_ACCT_SITE_REC_TYPE,
331 x_return_status OUT NOCOPY VARCHAR2,
332 x_msg_count OUT NOCOPY NUMBER,
333 x_msg_data OUT NOCOPY VARCHAR2
334 );
335
336 /**
337 * PROCEDURE create_cust_site_use
338 *
339 * DESCRIPTION
340 * Creates customer account site use.
341 *
342 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
343 *
344 * ARGUMENTS
345 * IN:
346 * p_init_msg_list Initialize message stack if it is set to
347 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
348 * p_cust_site_use_rec Customer account site use record.
349 * p_customer_profile_rec Customer profile record. One customer account
350 * must have a customer profile.
351 * p_create_profile If it is set to FND_API.G_TRUE, API create customer
352 * profile based on the customer profile record passed
353 * in.
354 * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
355 * profile amounts by copying corresponding data
356 * from customer profile class amounts.
357 * IN/OUT:
358 * OUT:
359 * x_site_use_id Customer account site use ID.
360 * x_return_status Return status after the call. The status can
361 * be FND_API.G_RET_STS_SUCCESS (success),
362 * FND_API.G_RET_STS_ERROR (error),
363 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
364 * x_msg_count Number of messages in message stack.
365 * x_msg_data Message text if x_msg_count is 1.
366 *
367 * NOTES
368 *
369 * MODIFICATION HISTORY
370 *
371 * 07-23-2001 Jianying Huang o Created.
372 *
373 */
374
375 /*#
376 * Use this routine to create a customer account site use. This API creates records in the
377 * HZ_CUST_SITE_USES table. Additionally, you can use this routine to create profile
378 * information at site level by passing the proper value in p_create_profile. If an
379 * orig_system_reference is passed in, then the API creates a record in the
380 * HZ_ORIG_SYS_REFERENCES table to store the mapping between the source system reference
381 * and the TCA primary key. If orig_system_reference is not passed in, then the default is
382 * UNKNOWN.
383 * @rep:scope public
384 * @rep:lifecycle active
385 * @rep:displayname Create Customer Account Site Use
386 * @rep:businessevent oracle.apps.ar.hz.CustAcctSiteUse.create
387 * @rep:doccd 120hztig.pdf Customer Account Site APIs, Oracle Trading Community Architecture Technical Implementation Guide
388 */
389 PROCEDURE create_cust_site_use (
390 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
391 p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
392 p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
393 p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
394 p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
395 x_site_use_id OUT NOCOPY NUMBER,
396 x_return_status OUT NOCOPY VARCHAR2,
397 x_msg_count OUT NOCOPY NUMBER,
398 x_msg_data OUT NOCOPY VARCHAR2
402 * PROCEDURE update_cust_site_use
399 );
400
401 /**
403 *
404 * DESCRIPTION
405 * Updates customer account site use.
406 *
407 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
408 *
409 * ARGUMENTS
410 * IN:
411 * p_init_msg_list Initialize message stack if it is set to
412 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
413 * p_cust_site_use_rec Customer account site use record.
414 * IN/OUT:
415 * p_object_version_number Used for locking the being updated record.
416 * OUT:
417 * x_return_status Return status after the call. The status can
418 * be FND_API.G_RET_STS_SUCCESS (success),
419 * FND_API.G_RET_STS_ERROR (error),
420 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
421 * x_msg_count Number of messages in message stack.
422 * x_msg_data Message text if x_msg_count is 1.
423 *
424 * NOTES
425 *
426 * MODIFICATION HISTORY
427 *
428 * 07-23-2001 Jianying Huang o Created.
429 *
430 */
431
432 /*#
433 * Use this routine to update a customer account site use. This API updates records in the
434 * HZ_CUST_SITE_USES table. If the primary key is not passed in, then get the primary key
435 * from the HZ_ORIG_SYS_REFERENCES table based on orig_system and orig_system_reference.
436 * Note: orig_system and orig_system_reference must be unique and not null.
437 * @rep:scope public
438 * @rep:lifecycle active
439 * @rep:displayname Update Customer Account Site Use
440 * @rep:businessevent oracle.apps.ar.hz.CustAcctSiteUse.update
441 * @rep:doccd 120hztig.pdf Customer Account Site APIs, Oracle Trading Community Architecture Technical Implementation Guide
442 */
443 PROCEDURE update_cust_site_use (
444 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
445 p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
446 p_object_version_number IN OUT NOCOPY NUMBER,
447 x_return_status OUT NOCOPY VARCHAR2,
448 x_msg_count OUT NOCOPY NUMBER,
449 x_msg_data OUT NOCOPY VARCHAR2
450 );
451
452 /**
453 * PROCEDURE get_cust_site_use_rec
454 *
455 * DESCRIPTION
456 * Gets customer account site use record
457 *
458 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
459 *
460 * ARGUMENTS
461 * IN:
462 * p_init_msg_list Initialize message stack if it is set to
463 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
464 * p_cust_site_use_id Customer account site use id.
465 * IN/OUT:
466 * OUT:
467 * x_cust_site_use_rec Returned customer account site use record.
468 * x_customer_profile_rec Returned customer profile record.
469 * x_return_status Return status after the call. The status can
470 * be FND_API.G_RET_STS_SUCCESS (success),
471 * FND_API.G_RET_STS_ERROR (error),
472 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
473 * x_msg_count Number of messages in message stack.
474 * x_msg_data Message text if x_msg_count is 1.
475 *
476 * NOTES
477 *
478 * MODIFICATION HISTORY
479 *
480 * 07-23-2001 Jianying Huang o Created.
481 *
482 */
483
484 PROCEDURE get_cust_site_use_rec (
485 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
486 p_site_use_id IN NUMBER,
487 x_cust_site_use_rec OUT NOCOPY CUST_SITE_USE_REC_TYPE,
488 x_customer_profile_rec OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
489 x_return_status OUT NOCOPY VARCHAR2,
490 x_msg_count OUT NOCOPY NUMBER,
491 x_msg_data OUT NOCOPY VARCHAR2
492 );
493
494 END HZ_CUST_ACCOUNT_SITE_V2PUB;