1 package EGO_PARTY_PUB AUTHID CURRENT_USER AS
2 /*$Header: EGOPRTYS.pls 120.1 2006/04/12 04:23:56 srajapar noship $ */
3
4 --------------------------------------------------------------------------
5 -- START: Record Types for reference from HZ_PARTY_PUB --
6 --------------------------------------------------------------------------
7
8 G_MISS_CONTENT_SOURCE_TYPE VARCHAR2(60) := 'USER_ENTERED';
9
10 TYPE party_rec_type IS RECORD(
11 party_id NUMBER,
12 party_number VARCHAR2(30),
13 validated_flag VARCHAR2(1),
14 orig_system_reference VARCHAR2(240),
15 status VARCHAR2(1),
16 category_code VARCHAR2(30),
17 salutation VARCHAR2(60),
18 attribute_category VARCHAR2(30),
19 attribute1 VARCHAR2(150),
20 attribute2 VARCHAR2(150),
21 attribute3 VARCHAR2(150),
22 attribute4 VARCHAR2(150),
23 attribute5 VARCHAR2(150),
24 attribute6 VARCHAR2(150),
25 attribute7 VARCHAR2(150),
26 attribute8 VARCHAR2(150),
27 attribute9 VARCHAR2(150),
28 attribute10 VARCHAR2(150),
29 attribute11 VARCHAR2(150),
30 attribute12 VARCHAR2(150),
31 attribute13 VARCHAR2(150),
32 attribute14 VARCHAR2(150),
33 attribute15 VARCHAR2(150),
34 attribute16 VARCHAR2(150),
35 attribute17 VARCHAR2(150),
36 attribute18 VARCHAR2(150),
37 attribute19 VARCHAR2(150),
38 attribute20 VARCHAR2(150),
39 attribute21 VARCHAR2(150),
40 attribute22 VARCHAR2(150),
41 attribute23 VARCHAR2(150),
42 attribute24 VARCHAR2(150)
43 );
44
45 g_miss_party_rec PARTY_REC_TYPE;
46
47
48 TYPE group_rec_type IS RECORD(
49 group_name VARCHAR2(255),
50 group_type VARCHAR2(30),
51 created_by_module VARCHAR2(150),
52 application_id NUMBER,
53 wh_update_date DATE,
54 party_rec PARTY_REC_TYPE := g_miss_party_rec
55 );
56
57 G_MISS_GROUP_REC GROUP_REC_TYPE;
58
59 TYPE relationship_rec_type IS RECORD(
60 relationship_id NUMBER,
61 subject_id NUMBER,
62 subject_type VARCHAR2(30),
63 subject_table_name VARCHAR2(30),
64 object_id NUMBER,
65 object_type VARCHAR2(30),
66 object_table_name VARCHAR2(30),
67 relationship_code VARCHAR2(30),
68 relationship_type VARCHAR2(30),
69 comments VARCHAR2(240),
70 start_date DATE,
71 end_date DATE,
72 status VARCHAR2(1),
73 content_source_type VARCHAR2(30),
74 attribute_category VARCHAR2(30),
75 attribute1 VARCHAR2(150),
76 attribute2 VARCHAR2(150),
77 attribute3 VARCHAR2(150),
78 attribute4 VARCHAR2(150),
79 attribute5 VARCHAR2(150),
80 attribute6 VARCHAR2(150),
81 attribute7 VARCHAR2(150),
82 attribute8 VARCHAR2(150),
83 attribute9 VARCHAR2(150),
84 attribute10 VARCHAR2(150),
85 attribute11 VARCHAR2(150),
86 attribute12 VARCHAR2(150),
87 attribute13 VARCHAR2(150),
88 attribute14 VARCHAR2(150),
89 attribute15 VARCHAR2(150),
90 attribute16 VARCHAR2(150),
91 attribute17 VARCHAR2(150),
92 attribute18 VARCHAR2(150),
93 attribute19 VARCHAR2(150),
94 attribute20 VARCHAR2(150),
95 created_by_module VARCHAR2(150),
96 application_id NUMBER,
97 party_rec PARTY_REC_TYPE,
98 additional_information1 VARCHAR2(150),
99 additional_information2 VARCHAR2(150),
100 additional_information3 VARCHAR2(150),
101 additional_information4 VARCHAR2(150),
102 additional_information5 VARCHAR2(150),
103 additional_information6 VARCHAR2(150),
104 additional_information7 VARCHAR2(150),
105 additional_information8 VARCHAR2(150),
106 additional_information9 VARCHAR2(150),
107 additional_information10 VARCHAR2(150),
108 additional_information11 VARCHAR2(150),
109 additional_information12 VARCHAR2(150),
110 additional_information13 VARCHAR2(150),
111 additional_information14 VARCHAR2(150),
112 additional_information15 VARCHAR2(150),
113 additional_information16 VARCHAR2(150),
114 additional_information17 VARCHAR2(150),
115 additional_information18 VARCHAR2(150),
116 additional_information19 VARCHAR2(150),
117 additional_information20 VARCHAR2(150),
118 additional_information21 VARCHAR2(150),
119 additional_information22 VARCHAR2(150),
120 additional_information23 VARCHAR2(150),
121 additional_information24 VARCHAR2(150),
122 additional_information25 VARCHAR2(150),
123 additional_information26 VARCHAR2(150),
124 additional_information27 VARCHAR2(150),
125 additional_information28 VARCHAR2(150),
126 additional_information29 VARCHAR2(150),
127 additional_information30 VARCHAR2(150),
128 percentage_ownership NUMBER
129 );
130
131 G_MISS_PARTY_REL_REC RELATIONSHIP_REC_TYPE;
132
133 --------------------------------------------------------------------------
134 -- END: Record Types for reference from HZ_PARTY_PUB --
135 --------------------------------------------------------------------------
136
137 --------------------------------------------------------------------------
138 -- START: Record Types for reference from HZ_CONTACT_POINT --
139 --------------------------------------------------------------------------
140 TYPE contact_point_rec_type IS RECORD (
141 contact_point_id NUMBER,
142 contact_point_type VARCHAR2(30),
143 status VARCHAR2(30),
144 owner_table_name VARCHAR2(30),
145 owner_table_id NUMBER,
146 primary_flag VARCHAR2(1),
147 orig_system_reference VARCHAR2(240),
148 content_source_type VARCHAR2(30) := HZ_PARTY_V2PUB.G_MISS_CONTENT_SOURCE_TYPE,
149 attribute_category VARCHAR2(30),
150 attribute1 VARCHAR2(150),
151 attribute2 VARCHAR2(150),
152 attribute3 VARCHAR2(150),
153 attribute4 VARCHAR2(150),
154 attribute5 VARCHAR2(150),
155 attribute6 VARCHAR2(150),
156 attribute7 VARCHAR2(150),
157 attribute8 VARCHAR2(150),
158 attribute9 VARCHAR2(150),
159 attribute10 VARCHAR2(150),
160 attribute11 VARCHAR2(150),
161 attribute12 VARCHAR2(150),
162 attribute13 VARCHAR2(150),
163 attribute14 VARCHAR2(150),
164 attribute15 VARCHAR2(150),
165 attribute16 VARCHAR2(150),
166 attribute17 VARCHAR2(150),
167 attribute18 VARCHAR2(150),
168 attribute19 VARCHAR2(150),
169 attribute20 VARCHAR2(150),
170 contact_point_purpose VARCHAR2(30),
171 primary_by_purpose VARCHAR2(1),
172 created_by_module VARCHAR2(150),
173 application_id NUMBER
174 );
175
176 TYPE edi_rec_type IS RECORD (
177 edi_transaction_handling VARCHAR2(25),
178 edi_id_number VARCHAR2(30),
179 edi_payment_method VARCHAR2(30),
180 edi_payment_format VARCHAR2(30),
181 edi_remittance_method VARCHAR2(30),
182 edi_remittance_instruction VARCHAR2(30),
183 edi_tp_header_id NUMBER,
184 edi_ece_tp_location_code VARCHAR2(40)
185 );
186
187 G_MISS_EDI_REC EDI_REC_TYPE;
188
189 TYPE email_rec_type IS RECORD (
190 email_format VARCHAR2(30),
191 email_address VARCHAR2(2000)
192 );
193
194 G_MISS_EMAIL_REC EMAIL_REC_TYPE;
195
196 TYPE phone_rec_type IS RECORD (
197 phone_calling_calendar VARCHAR2(30),
198 last_contact_dt_time DATE,
199 timezone_id NUMBER,
200 phone_area_code VARCHAR2(10),
201 phone_country_code VARCHAR2(10),
202 phone_number VARCHAR2(40),
203 phone_extension VARCHAR2(20),
204 phone_line_type VARCHAR2(30),
205 raw_phone_number VARCHAR2(60)
206 );
207
208 G_MISS_PHONE_REC PHONE_REC_TYPE;
209
210 TYPE telex_rec_type IS RECORD (
211 telex_number VARCHAR2(50)
212 );
213
214 G_MISS_TELEX_REC TELEX_REC_TYPE;
215
216 TYPE web_rec_type IS RECORD (
217 web_type VARCHAR2(60),
218 url VARCHAR2(2000)
219 );
220
221 G_MISS_WEB_REC WEB_REC_TYPE;
222
223 HZ_FAIL_EXCEPTION EXCEPTION;
224
225 OWNER_TABLE_NAME CONSTANT VARCHAR2(30) := 'HZ_PARTIES';
226 PRIMARY_FLAG CONSTANT VARCHAR2(1) := 'Y';
227 CONTENT_SOURCE_TYPE CONSTANT VARCHAR2(30) := 'USER_ENTERED';
228 APPLICATION_ID CONSTANT NUMBER := 431;
229 CREATED_BY_MODULE CONSTANT VARCHAR2(30) := 'EGO';
230 OBJECT_VERSION_NUMBER CONSTANT NUMBER := 0;
231 ACTIVE_STATUS CONSTANT VARCHAR2(1) := 'A';
232
233 --------------------------------------------------------------------------
234 -- END: Record Types for reference from HZ_CONTACT_POINT --
235 --------------------------------------------------------------------------
236
237 ----------------------------------------------------------------------------
238 -- 0. Get_Application_id
239 ----------------------------------------------------------------------------
240 FUNCTION get_application_id RETURN NUMBER;
241 ------------------------------------------------------------------------
242 -- Start of comments
243 -- API name : GET_APPLICATION_ID
244 -- TYPE : Public
245 -- Pre-reqs : None
246 -- FUNCTION : Returns the application id of Engineering Groups
247 -- If no application id is found, returns -1
248 --
249 -- Parameters:
250 -- IN : NONE
251 --
252 -- OUT : NONE
253 --
254 -- Version: Current Version 1.0
255 -- Previous Version : None
256 -- Notes :
257 --
258 -- END OF comments
259 ------------------------------------------------------------------------
260
261
262 ----------------------------------------------------------------------------
263 -- 1. Create_Group
264 ----------------------------------------------------------------------------
265 PROCEDURE create_group (
266 p_api_version IN NUMBER,
267 p_init_msg_list IN VARCHAR2,
268 p_commit IN VARCHAR2,
269 p_group_name IN VARCHAR2,
270 p_group_type IN VARCHAR2,
271 p_description IN VARCHAR2,
272 p_email_address IN VARCHAR2,
273 p_creator_person_id IN NUMBER,
274 x_return_status OUT NOCOPY VARCHAR2,
275 x_msg_count OUT NOCOPY NUMBER,
276 x_msg_data OUT NOCOPY VARCHAR2,
277 x_group_id OUT NOCOPY NUMBER
278 );
279 ------------------------------------------------------------------------
280 -- Start of comments
281 -- API name : Create_Group
282 -- TYPE : Public
283 -- Pre-reqs : None
284 -- FUNCTION : Create a People Group.
285 -- If this operation fails then the category is not
286 -- created and error code is returned.
287 --
288 -- Parameters:
289 -- IN : p_api_version IN NUMBER (required)
290 -- API Version of this procedure
291 -- p_init_msg_level IN VARCHAR2 (optional)
292 -- DEFAULT = FND_API.G_FALSE
293 -- Indicates whether the message stack needs to be cleared
294 -- p_commit IN VARCHAR2 (optional)
295 -- DEFAULT = FND_API.G_FALSE
296 -- Indicates whether the data should be committed
297 -- p_group_name IN VARCHAR2 (required)
298 -- Group name for the Group being created, updateable
299 -- p_group_type IN VARCHAR2 (required)
300 -- Group type - 'GROUP' for current purposes, non-updateable
301 -- This value is stored in HZ_PARTIES.party_name
302 -- The row created in HZ_PARTIES also has PARTY_TYPE = 'GROUP'
303 -- p_description IN VARCHAR2 (optional)
304 -- Group description, updateable
305 -- p_email_address IN VARCHAR2 (optional)
306 -- Email address of the group, updateable
307 -- This value is inserted into hz_contact_points
308 -- The value is also stored in HZ_PARTIES (through API)
309 -- p_create_person_id IN NUMBER (required)
310 -- creator of the group.
311 -- this is used to create membership
312 --
313 -- OUT : x_return_status OUT NUMBER
314 -- Result of all the operations
315 -- FND_API.G_RET_STS_SUCCESS if success
316 -- FND_API.G_RET_STS_ERROR if error
317 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
318 -- x_msg_count OUT NUMBER,
319 -- number of messages in the message list
320 -- x_msg_data OUT VARCHAR2,
321 -- if number of messages is 1, then this parameter
322 -- contains the message itself
323 -- x_group_id OUT NUMBER
324 -- new Group_Id that has been created.
325 --
326 --
327 -- Version: Current Version 1.0
328 -- Previous Version : None
329 -- Notes :
330 --
331 -- END OF comments
332 ------------------------------------------------------------------------
333
334
335 ----------------------------------------------------------------------------
336 -- 2. Update_Group
337 ----------------------------------------------------------------------------
338 procedure Update_Group (
339 p_api_version IN NUMBER,
340 p_init_msg_list IN VARCHAR2,
341 p_commit IN VARCHAR2,
342 p_group_id IN NUMBER,
343 p_group_name IN VARCHAR2,
344 p_description IN VARCHAR2,
345 p_email_address IN VARCHAR2,
346 -- p_owner_person_id IN NUMBER,
347 p_object_version_no_group IN OUT NOCOPY NUMBER,
348 -- p_object_version_no_owner_rel IN OUT NOCOPY NUMBER,
349 x_return_status OUT NOCOPY VARCHAR2,
350 x_msg_count OUT NOCOPY NUMBER,
351 x_msg_data OUT NOCOPY VARCHAR2
352 );
353 ------------------------------------------------------------------------
354 -- Start of comments
355 -- API name : Update_Group
356 -- TYPE : Public
357 -- Pre-reqs : Group should have been created
358 -- FUNCTION : Update a Group.
359 -- Looks for the following relationships
360 -- If the Group Owner has changed
361 -- update the owner relationship record
362 -- If the new Group Owner is not a member
363 -- create a new member record
364 -- If this operation fails then the category is not
365 -- updated and error code is returned.
366 --
367 -- Parameters:
368 -- IN : p_api_version IN NUMBER (required)
369 -- API Version of this procedure
370 -- p_init_msg_level IN VARCHAR2 (optional)
371 -- DEFAULT = FND_API.G_FALSE
372 -- Indicates whether the message stack needs to be cleared
373 -- p_commit IN VARCHAR2 (optional)
374 -- DEFAULT = FND_API.G_FALSE
375 -- Indicates whether the data should be committed
376 -- p_group_id IN NUMBER (required)
377 -- Group Id for the Group to be Updated
378 -- p_description IN VARCHAR2 (optional)
379 -- Group description to be implemented
380 -- p_contact_point_id IN NUMBER (required)
381 -- As the contact point needs to be updated
382 -- p_email_address IN VARCHAR2 (optional)
383 -- Email address that needs to be made effective
384 -- p_owner_person_id IN NUMBER (required)
385 -- Owner of the group
386 --
390 -- p_object_version_no_rel IN OUT NUMBER (required)
387 -- IN OUT: p_object_version_no_group IN OUT NUMBER (required)
388 -- the version of group when the record is queried
389 -- the new version is returned after successful update
391 -- the version of relation when the record is queried
392 -- the new version is returned after successful update
393 -- p_object_version_no_contact IN OUT NUMBER (required)
394 -- the version of contact point when the record is queried
395 -- the new version is returned after successful update
396 --
397 -- OUT : x_return_status OUT NUMBER
398 -- Result of all the operations
399 -- FND_API.G_RET_STS_SUCCESS if success
400 -- FND_API.G_RET_STS_ERROR if error
401 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
402 -- x_msg_count OUT NUMBER,
403 -- number of messages in the message list
404 -- x_msg_data OUT VARCHAR2,
405 -- if number of messages is 1, then this parameter
406 -- contains the message itself
407 --
408 --
409 -- Version: Current Version 1.0
410 -- Previous Version : None
411 -- Notes :
412 --
413 -- END OF comments
414 ------------------------------------------------------------------------
415
416
417 ----------------------------------------------------------------------------
418 -- 3. Delete_Group
419 ----------------------------------------------------------------------------
420 procedure delete_group (
421 p_api_version IN NUMBER,
422 p_init_msg_list IN VARCHAR2,
423 p_commit IN VARCHAR2,
424 p_group_id IN NUMBER,
425 p_object_version_no_group IN OUT NOCOPY NUMBER,
426 x_return_status OUT NOCOPY VARCHAR2,
427 x_msg_count OUT NOCOPY NUMBER,
428 x_msg_data OUT NOCOPY VARCHAR2
429 );
430 ------------------------------------------------------------------------
431 -- Start of comments
432 -- API name : Delete_Group
433 -- TYPE : Public
434 -- Pre-reqs : None
435 -- FUNCTION : Delete a Group.
436 --
437 -- Parameters:
438 -- IN : p_api_version IN NUMBER (required)
439 -- API Version of this procedure
440 -- p_init_msg_level IN VARCHAR2 (optional)
441 -- DEFAULT = FND_API.G_FALSE
442 -- Indicates whether the message stack needs to be cleared
443 -- p_commit IN VARCHAR2 (optional)
444 -- DEFAULT = FND_API.G_FALSE
445 -- Indicates whether the data should be committed
446 -- p_group_id IN NUMBER (required)
447 -- Group Id for the Group to be Deleted
448 --
449 -- IN OUT: p_object_version_number IN OUT NUMBER (required)
450 -- version number of the record to be Deleted
451 --
452 -- OUT : x_return_status OUT NUMBER
453 -- Result of all the operations
454 -- FND_API.G_RET_STS_SUCCESS if success
455 -- FND_API.G_RET_STS_ERROR if error
456 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
457 -- x_msg_count OUT NUMBER,
458 -- number of messages in the message list
459 -- x_msg_data OUT VARCHAR2,
460 -- if number of messages is 1, then this parameter
461 -- contains the message itself
462 --
463 --
464 -- Version: Current Version 1.0
465 -- Previous Version : None
466 -- Notes :
467 --
468 -- END OF comments
469 ------------------------------------------------------------------------
470
471
472 ----------------------------------------------------------------------------
473 -- 4. Add_Group_Member
474 ----------------------------------------------------------------------------
475 procedure add_group_member (
476 p_api_version IN NUMBER,
477 p_init_msg_list IN VARCHAR2,
478 p_commit IN VARCHAR2,
479 p_member_id IN NUMBER,
480 p_group_id IN NUMBER,
481 p_start_date IN DATE,
482 p_end_date IN DATE,
483 x_return_status OUT NOCOPY VARCHAR2,
484 x_msg_count OUT NOCOPY NUMBER,
485 x_msg_data OUT NOCOPY VARCHAR2,
486 x_relationship_id OUT NOCOPY NUMBER
487 );
488 ------------------------------------------------------------------------
489 -- Start of comments
490 -- API name : Add_Group_Member
491 -- TYPE : Public
492 -- Pre-reqs : Group Exists and the current person is not an already
493 -- existing member of the group
494 -- FUNCTION : Add a member to a Group.
495 -- A member that could be added is a Group itself
496 -- (or) a Person (or) Both
497 --
498 -- If this operation fails then the category is not
499 -- created and error code is returned.
500 --
501 -- Parameters:
502 -- IN : p_api_version IN NUMBER (required)
503 -- API Version of this procedure
504 -- p_init_msg_level IN VARCHAR2 (optional)
505 -- DEFAULT = FND_API.G_FALSE
506 -- Indicates whether the message stack needs to be cleared
510 -- p_group_id IN NUMBER (required)
507 -- p_commit IN VARCHAR2 (optional)
508 -- DEFAULT = FND_API.G_FALSE
509 -- Indicates whether the data should be committed
511 -- Group Id for which the member is added.
512 -- p_member_id IN NUMBER (required)
513 -- Member Id which should be added to the group.
514 -- p_start_date IN DATE (optional)
515 -- To indicate the effective date of the relationship
516 -- p_end_date IN DATE (optional)
517 -- To indicate the end date of the relationship
518 --
519 -- OUT : x_return_status OUT NUMBER
520 -- Result of all the operations
521 -- FND_API.G_RET_STS_SUCCESS if success
522 -- FND_API.G_RET_STS_ERROR if error
523 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
524 -- x_msg_count OUT NUMBER
525 -- number of messages in the message list
526 -- x_msg_data OUT VARCHAR2
527 -- if number of messages is 1, then this parameter
528 -- contains the message itself
529 -- x_relationship_id OUT NUMBER
530 -- Relationship_Id created between Group AND member
531 -- These valuee is stored at
532 -- hz_relationships.PARTY_RELATIONSHIP_ID
533 --
534 --
535 -- Version: Current Version 1.0
536 -- Previous Version : None
537 -- Notes :
538 --
539 -- END OF comments
540 ------------------------------------------------------------------------
541
542 ----------------------------------------------------------------------------
543 -- 5. Remove_Group_Member
544 ----------------------------------------------------------------------------
545 procedure remove_group_member (
546 p_api_version IN NUMBER,
547 p_init_msg_list IN VARCHAR2,
548 p_commit IN VARCHAR2,
549 p_relationship_id IN NUMBER,
550 p_object_version_no_rel IN OUT NOCOPY NUMBER,
551 x_return_status OUT NOCOPY VARCHAR2,
552 x_msg_count OUT NOCOPY NUMBER,
553 x_msg_data OUT NOCOPY VARCHAR2
554 );
555 ------------------------------------------------------------------------
556 -- Start of comments
557 -- API name : Remove_Group_Member
558 -- TYPE : Public
559 -- Pre-reqs : Group Exists and the current person is an already
560 -- existing member of the group
561 -- FUNCTION : Remove member from the Group
562 -- The status of the record is made 'I', Inactive
563 --
564 -- Parameters:
565 -- IN : p_api_version IN NUMBER (required)
566 -- API Version of this procedure
567 -- p_init_msg_level IN VARCHAR2 (optional)
568 -- DEFAULT = FND_API.G_FALSE
569 -- Indicates whether the message stack needs to be cleared
570 -- p_commit IN VARCHAR2 (optional)
571 -- DEFAULT = FND_API.G_FALSE
572 -- Indicates whether the data should be committed
573 -- p_relationship_id IN NUMBER (required
574 -- Relationship_Id that has been created between Group_id.
575 -- and the Member_Id which needs to be deleted (which is
576 -- eventually deleted from hz_relationships)
577 --
578 -- IN OUT: p_object_version_no_rel IN OUT NUMBER (required)
579 -- the version of group when the record is queried
580 -- the new version is returned after successful update
581 --
582 -- OUT : x_return_status OUT NUMBER
583 -- Result of all the operations
584 -- FND_API.G_RET_STS_SUCCESS if success
585 -- FND_API.G_RET_STS_ERROR if error
586 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
587 -- x_msg_count OUT NUMBER
588 -- number of messages in the message list
589 -- x_msg_data OUT VARCHAR2
590 -- if number of messages is 1, then this parameter
591 -- contains the message itself
592 -- x_relationship_id OUT NUMBER
593 -- Relationship_Id created between Group AND member
594 -- These valuee is stored at
595 -- hz_relationships.PARTY_RELATIONSHIP_ID
596 --
597 --
598 -- Version: Current Version 1.0
599 -- Previous Version : None
600 -- Notes :
601 --
602 -- END OF comments
603 ------------------------------------------------------------------------
604
605 -------------------------------------------------------------------------
606 -- 6. Get_Email_Address (party_id can be person / group Id)
607 ----------------------------------------------------------------------------
608 procedure Get_Email_Address (
609 p_api_version IN NUMBER,
610 p_init_msg_list IN VARCHAR2,
611 p_commit IN VARCHAR2,
612 p_party_id IN NUMBER,
613 x_return_status OUT NOCOPY VARCHAR2,
614 x_msg_count OUT NOCOPY NUMBER,
615 x_msg_data OUT NOCOPY VARCHAR2,
616 x_email_address OUT NOCOPY VARCHAR2
617 );
618
619 ------------------------------------------------------------------------
623 -- Pre-reqs : An existing Group
620 -- Start of comments
621 -- API name : Get_Email_Address
622 -- TYPE : Public
624 -- FUNCTION : Returns the email addresses of all the members of the group
625 -- if group_id is passed. If person_id is passed, then
626 -- email address of the person is returned back.
627 --
628 -- Parameters:
629 -- IN : p_api_version IN NUMBER (required)
630 -- API Version of this procedure
631 -- p_init_msg_level IN VARCHAR2 (optional)
632 -- DEFAULT = FND_API.G_FALSE
633 -- Indicates whether the message stack needs to be cleared
634 -- p_commit IN VARCHAR2 (optional)
635 -- DEFAULT = FND_API.G_FALSE
636 -- Indicates whether the data should be committed
637 -- p_group_id IN NUMBER (required)
638 -- The group for which the email address list is required
639 --
640 -- OUT : x_return_status OUT NUMBER
641 -- Result of all the operations
642 -- FND_API.G_RET_STS_SUCCESS if success
643 -- FND_API.G_RET_STS_ERROR if error
644 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
645 -- x_msg_count OUT NUMBER
646 -- number of messages in the message list
647 -- x_msg_data OUT VARCHAR2
648 -- if number of messages is 1, then this parameter
649 -- contains the message itself
650 -- x_email_address OUT VARCHAR2
651 -- Contains the email address of all the members
652 --
653 -- Version: Current Version 1.0
654 -- Previous Version : None
655 -- Notes :
656 --
657 -- END OF comments
658 ------------------------------------------------------------------------
659
660 ----------------------------------------------------------------------------
661 -- 7. Create_Code_Assignment
662 ----------------------------------------------------------------------------
663 PROCEDURE create_code_assignment (
664 p_api_version IN NUMBER,
665 p_init_msg_list IN VARCHAR2,
666 p_commit IN VARCHAR2,
667 p_party_id IN NUMBER,
668 p_category IN VARCHAR2,
669 p_code IN VARCHAR2,
670 x_msg_count OUT NOCOPY NUMBER,
671 x_return_status OUT NOCOPY VARCHAR2,
672 x_msg_data OUT NOCOPY VARCHAR2,
673 x_assignment_id OUT NOCOPY NUMBER
674 );
675 ------------------------------------------------------------------------
676 -- Start of comments
677 -- API name : create_code_assignment
678 -- TYPE : Public
679 -- Pre-reqs : The class category, p_category, the class code, p_code, and
680 -- the person, p_party_id exists.
681 -- FUNCTION : Assigns the hz_code_assignment p_category, p_code to the party_id
682 --
683 -- Parameters:
684 -- IN : p_api_version IN NUMBER (required)
685 -- API Version of this procedure
686 -- p_init_msg_level IN VARCHAR2 (optional)
687 -- DEFAULT = FND_API.G_FALSE
688 -- Indicates whether the message stack needs to be cleared
689 -- p_commit IN VARCHAR2 (optional)
690 -- DEFAULT = FND_API.G_FALSE
691 -- Indicates whether the data should be committed
692 -- p_relationship_id IN NUMBER (required
693 -- Relationship_Id that has been created between Group_id.
694 -- and the Member_Id which needs to be deleted (which is
695 -- eventually deleted from hz_relationships)
696 --
697 -- IN OUT: p_object_version_no_rel IN OUT NUMBER (required)
698 -- the version of group when the record is queried
699 -- the new version is returned after successful update
700 --
701 -- OUT : x_return_status OUT NUMBER
702 -- Result of all the operations
703 -- FND_API.G_RET_STS_SUCCESS if success
704 -- FND_API.G_RET_STS_ERROR if error
705 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
706 -- x_msg_count OUT NUMBER
707 -- number of messages in the message list
708 -- x_msg_data OUT VARCHAR2
709 -- if number of messages is 1, then this parameter
710 -- contains the message itself
711 -- x_relationship_id OUT NUMBER
712 -- Relationship_Id created between Group AND member
713 -- These valuee is stored at
714 -- hz_relationships.PARTY_RELATIONSHIP_ID
715 --
716 --
717 -- Version: Current Version 1.0
718 -- Previous Version : None
719 -- Notes :
720 --
721 -- END OF comments
722 ------------------------------------------------------------------------
723
724 ----------------------------------------------------------------------------
725 -- 8. Update_Code_Assignment
726 ----------------------------------------------------------------------------
727 PROCEDURE update_code_assignment (
728 p_api_version IN NUMBER,
729 p_init_msg_list IN VARCHAR2,
730 p_commit IN VARCHAR2,
731 p_party_id IN NUMBER,
732 p_category IN VARCHAR2,
733 p_code IN VARCHAR2,
734 x_return_status OUT NOCOPY VARCHAR2,
735 x_msg_count OUT NOCOPY NUMBER,
736 x_msg_data OUT NOCOPY VARCHAR2
737 );
738 ------------------------------------------------------------------------
739 -- Start of comments
740 -- API name : create_code_assignment
741 -- TYPE : Public
742 -- Pre-reqs : The class category, p_category, the class code, p_code, and
743 -- the person, p_party_id exists.
744 -- FUNCTION : Assigns the hz_code_assignment p_category, p_code to the party_id
745 --
746 -- Parameters:
747 -- IN : p_api_version IN NUMBER (required)
748 -- API Version of this procedure
749 -- p_init_msg_level IN VARCHAR2 (optional)
750 -- DEFAULT = FND_API.G_FALSE
751 -- Indicates whether the message stack needs to be cleared
752 -- p_commit IN VARCHAR2 (optional)
753 -- DEFAULT = FND_API.G_FALSE
754 -- Indicates whether the data should be committed
755 -- p_relationship_id IN NUMBER (required
756 -- Relationship_Id that has been created between Group_id.
757 -- and the Member_Id which needs to be deleted (which is
758 -- eventually deleted from hz_relationships)
759 --
760 -- IN OUT: p_object_version_no_rel IN OUT NUMBER (required)
761 -- the version of group when the record is queried
762 -- the new version is returned after successful update
763 --
764 -- OUT : x_return_status OUT NUMBER
765 -- Result of all the operations
766 -- FND_API.G_RET_STS_SUCCESS if success
767 -- FND_API.G_RET_STS_ERROR if error
768 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error
769 -- x_msg_count OUT NUMBER
770 -- number of messages in the message list
771 -- x_msg_data OUT VARCHAR2
772 -- if number of messages is 1, then this parameter
773 -- contains the message itself
774 -- x_relationship_id OUT NUMBER
775 -- Relationship_Id created between Group AND member
776 -- These valuee is stored at
777 -- hz_relationships.PARTY_RELATIONSHIP_ID
778 --
779 --
780 -- Version: Current Version 1.0
781 -- Previous Version : None
782 -- Notes :
783 --
784 -- END OF comments
785
786
787 ------------------------------------------------------------------------
788 -- 9. Set-up Company relationship for internal people
789 ------------------------------------------------------------------------
790 PROCEDURE setup_enterprise_user(p_company_id IN NUMBER
791 ,x_return_status OUT NOCOPY VARCHAR2
792 ,x_msg_count OUT NOCOPY NUMBER
793 ,x_msg_data OUT NOCOPY VARCHAR2
794 );
795 ------------------------------------------------------------------------
796 -- Start of comments
797 -- API name : setup_enterprise_user
798 -- TYPE : Public
799 -- Parameters:
800 -- IN :
801 -- p_company_id NUMBER (required)
802 -- Company for which grant is being created
803 -- OUT :
804 -- x_return_status
805 -- x_msg_count
806 -- x_msg_data
807 -- Standard out parameters for status
808 ------------------------------------------------------------------------
809
810 ------------------------------------------------------------------------
811 -- 10. Concurrent Program to setup enterprise users
812 ------------------------------------------------------------------------
813 PROCEDURE setup_enterprise_user_CP
814 (x_errbuff OUT NOCOPY VARCHAR2
815 ,x_retcode OUT NOCOPY VARCHAR2
816 );
817 ------------------------------------------------------------------------
818 -- Start of comments
819 -- API name : setup_enterprise_user
820 -- TYPE : PRIVATE
821 -- Version :
822 -- Current : 1.0
823 -- Previous : None
824 -- Notes :
825 -- This is the concurrent program to setup the users
826 -- This concurrent program will be called whenever user exists
827 -- without having their default organization set.
828 -- END OF comments
829 ------------------------------------------------------------------------
830 END EGO_PARTY_PUB;