DBA Data[Home] [Help]

PACKAGE: APPS.AMS_LIST_IMPORT_PUB

Source


1 PACKAGE AMS_List_Import_PUB AUTHID CURRENT_USER AS
2 /* $Header: amspimls.pls 115.13 2003/12/23 18:19:35 usingh ship $ */
3 
4 -----------------------------------------------------------
5 -- PACKAGE
6 --   AMS_List_Import_PUB
7 --
8 -- PURPOSE
9 --   This purpose of this program is to create organization,person
10 --   ,party relationship, org contacts, locations , party sites,
11 --   email and phone records for B2B or B2C type customer's
12 --
13 --      Call TCA API's to create the records in HZ schema.
14 --
15 --
16 --       For B2B creates the following  using TCA API's
17 --
18 --               1.     Create organization
19 --               2.     Create Person
20 --               3.     Create Party Relation
21 --               4.     Create Party for Party Relationship
22 --               5.     Create Org contact
23 --               6.     Create Location (if address is available)
24 --               7.     Create Party Site (if address  is available)
25 --               8.     Create Contact Points (if contact points are available)
26 --
27 --
28 --
29 --
30 --       For B2C creates the following  using TCA API's
31 --
32 --              1.      Create Person
33 --              2.      Create Location (if address is available)
34 --              3.      Create Party Site (if address  is available)
35 --              4.      Create Contact Points (if contact points are available)
36 --
37 -- PROCEDURE
38 --    Create_Customer
39 --
40 -- PURPOSE
41 --    Creates a new customer with other entities as mentioned above.
42 --
43 -- PARAMETERS
44 --    p_party_rec 	The New Record for party.
45 --    p_org_rec		The New Record for organization.
46 --    p_person_rec	The New Record for person.
47 --    p_location_rec	The New Record for location.
48 --    p_psite_rec	The New Record for party site.
49 --    p_cpoint_rec	The New Record for contact point.
50 --    p_email_rec	The New Record for email.
51 --    p_phone_rec	The New Record for phone.
52 --    p_ocon_rec	The New Record for org contact.
53 --    x_party_id	The party_id for the record.
54 --    x_new_party	The tells if the party is new.
55 
56 PROCEDURE Create_Customer
57 ( p_api_version              IN     NUMBER,
58   p_init_msg_list            IN     VARCHAR2  := FND_API.G_FALSE,
59   p_commit                   IN     VARCHAR2  := FND_API.G_FALSE,
60   p_validation_level         IN     NUMBER    := FND_API.g_valid_level_full,
61   x_return_status            OUT NOCOPY    VARCHAR2,
62   x_msg_count                OUT NOCOPY    NUMBER,
63   x_msg_data                 OUT NOCOPY    VARCHAR2,
64   p_party_id                 IN OUT NOCOPY NUMBER,
65   p_b2b_flag                 IN     VARCHAR2,
66   p_import_list_header_id    IN     NUMBER,
67   p_party_rec       	     IN	    hz_party_v2pub.party_rec_type,
68   p_org_rec                  IN     hz_party_v2pub.organization_rec_type,
69   p_person_rec               IN     hz_party_v2pub.person_rec_type,
70   p_location_rec             IN     hz_location_v2pub.location_rec_type,
71   p_psite_rec                IN     hz_party_site_v2pub.party_site_rec_type,
72   p_cpoint_rec               IN     hz_contact_point_v2pub.contact_point_rec_type,
73   p_email_rec                IN     hz_contact_point_v2pub.email_rec_type,
74   p_phone_rec                IN     hz_contact_point_v2pub.phone_rec_type,
75   p_fax_rec                  IN     hz_contact_point_v2pub.phone_rec_type,
76   p_ocon_rec                 IN     hz_party_contact_v2pub.org_contact_rec_type,
77   p_siteuse_rec              IN     hz_party_site_v2pub.party_site_use_rec_type,
78   p_web_rec                  IN     hz_contact_point_v2pub.web_rec_type,
79   x_new_party                OUT NOCOPY    VARCHAR2,
80   p_component_name           OUT NOCOPY    VARCHAR2,
81   l_import_source_line_id    IN  NUMBER default null,
82   p_org_email_rec            IN     hz_contact_point_v2pub.email_rec_type default null,
83   p_org_phone_rec            IN     hz_contact_point_v2pub.phone_rec_type default null,
84   p_org_location_rec         IN     hz_location_v2pub.location_rec_type   default null,
85   p_org_psite_rec            IN     hz_party_site_v2pub.party_site_rec_type default NULL,
86   p_language_rec             IN     HZ_PERSON_INFO_V2PUB.person_language_rec_type default NULL,
87   p_org_party_site_phone_rec IN     hz_contact_point_v2pub.phone_rec_type default null
88 );
89 
90 --
91 -- This progam updates the party for the rented list
92 --
93 PROCEDURE update_rented_list_party (
94   p_api_version              IN     NUMBER,
95   p_init_msg_list            IN     VARCHAR2  := FND_API.G_FALSE,
96   p_commit                   IN     VARCHAR2  := FND_API.G_FALSE,
97   p_validation_level         IN     NUMBER    := FND_API.g_valid_level_full,
98   x_return_status            OUT NOCOPY    VARCHAR2,
99   x_msg_count                OUT NOCOPY    NUMBER,
100   x_msg_data                 OUT NOCOPY    VARCHAR2,
101   p_party_id                 IN     NUMBER
102                      );
103 
104 
105 -- This program captures the erros.
106 --
107 procedure error_capture (
108   p_api_version              IN     NUMBER,
109   p_init_msg_list            IN     VARCHAR2  := FND_API.G_FALSE,
110   p_commit                   IN     VARCHAR2  := FND_API.G_FALSE,
111   p_validation_level         IN     NUMBER    := FND_API.g_valid_level_full,
112   x_return_status            OUT NOCOPY    VARCHAR2,
113   x_msg_count                OUT NOCOPY    NUMBER,
114   x_msg_data                 OUT NOCOPY    VARCHAR2,
115   p_import_list_header_id    IN     NUMBER,
116   p_import_source_line_id    IN     NUMBER,
117   p_imp_xml_element_id       IN     NUMBER,
118   p_imp_xml_attribute_id     IN     NUMBER,
119   p_component_name           IN     VARCHAR2 default null,
120   p_field_name               IN     VARCHAR2,
121   p_error_text               IN     VARCHAR2
122   );
123 
124 
125 --
126 -- for XML updates the success in the element table
127 --
128 PROCEDURE process_element_success (
129                                  p_import_list_header_id    IN    NUMBER,
130                                  p_xml_element_id IN NUMBER);
131 
132 --
133 -- for XML updates the duplicate in the element table
134 --
135 PROCEDURE process_element_duplicate (
136                                  p_import_list_header_id    IN    NUMBER,
137                                  p_xml_element_id IN NUMBER);
138 
139 
140 
141 
142 end AMS_List_Import_PUB;