DBA Data[Home] [Help]

PACKAGE: APPS.WSH_SUPPLIER_PARTY

Source


1 PACKAGE WSH_SUPPLIER_PARTY AUTHID CURRENT_USER as
2 /*$Header: WSHSUPRS.pls 120.2.12010000.1 2008/07/29 06:18:55 appldev ship $ */
3 
4 -- Start of comments
5 -- API name : Process_Address
6 -- Type     : Public
7 -- Pre-reqs : None.
8 -- Procedure : API to Create/Update address line information of Supplier Address book. Api does.
9 --            1.Validate the action code.
10 --            2.Check if Address information is already exists for Shipping Code
11 --              and Supplier.
12 --            3.If address information is exist,validate that action code
13 --              should not be insert 'I'. Than call api Update_address to update
14 --              address information.
15 --            4.If address information is not exists ,validate that
16 --              action code should not be update 'U'. Than call api
17 --              Create_address to update address information.
18 --
19 -- Parameters :
20 -- IN:
21 --      p_in_param      IN  Hold additional parameter as passed by UI.
22 --      p_Address       IN  Hold Supplier Address book record as passed by UI
23 -- OUT:
24 --      x_success_tbl   OUT NOCOPY List of Success messages passed back to UI for display.
25 --      x_error_tbl     OUT NOCOPY List of Error messages passed back to UI for display.
26 --      x_return_status OUT NOCOPY Standard to output api status.
27 -- End of comments
28 PROCEDURE Process_Address(
29 	p_in_param		IN 	WSH_ROUTING_REQUEST.In_param_Rec_Type,
30         p_Address      		IN	WSH_ROUTING_REQUEST.Address_rec_type,
31         x_success_tbl  		IN OUT NOCOPY WSH_FILE_MSG_TABLE,
32         x_error_tbl  		IN OUT NOCOPY WSH_ROUTING_REQUEST.tbl_var2000,
33         x_return_status		IN OUT NOCOPY varchar2);
34 
35 
36 -- Start of comments
37 -- API name : Create_Address
38 -- Type     : Public
39 -- Pre-reqs : None.
40 -- Procedure : API to create address information. Api does
41 --            1.Create location and party site.
42 --            2.Validate location.
43 --            3.Create Party Site Uses.
44 --            4.Create contact information.
45 -- Parameters :
46 -- IN:
47 --        p_location_code               IN      Location Code.
48 --        P_party_id                    IN      Party Id.
49 --        P_address1                    IN      Address1.
50 --        P_address2                    IN      Address2.
51 --        P_address3                    IN      Address3.
52 --        P_address4                    IN      Address4.
53 --        P_city                        IN      City.
54 --        P_postal_code                 IN      Postal Code.
55 --        P_state                       IN      State.
56 --        P_Province                    IN      Province.
57 --        P_county                      IN      County.
58 --        p_country                     IN      Country.
59 --        p_shipper_name                IN      Shipper Name
60 --        p_phone                       IN      Phone Number.
61 --        p_email                       IN      Email Address.
62 -- OUT:
63 --      x_location_id                   OUT NOCOPY Location id create.
64 --      x_party_site_id                 OUT NOCOPY Party Site id created.
65 --      x_return_status OUT NOCOPY      OUT NOCOPY Standard to output api status.
66 -- End of comments
67 PROCEDURE Create_Address(
68         P_vendor_id                     IN      number,
69         P_party_id                     IN      number,
70         P_location_code                 IN      varchar2,
71         P_address1                      IN      varchar2,
72         P_address2                      IN      varchar2,
73         P_address3                      IN      varchar2,
74         P_address4                      IN      varchar2,
75         P_city                          IN      varchar2,
76         P_postal_code                   IN      varchar2,
77         P_state                         IN      varchar2,
78         P_Province                      IN      varchar2,
79         P_county                        IN      varchar2,
80         p_country                       IN      varchar2,
81         p_shipper_name                  IN      varchar2,
82         p_phone                         IN      varchar2,
83         p_email                         IN      varchar2,
84         x_location_id                   OUT NOCOPY number,
85         x_party_site_id                 OUT NOCOPY number,
86         x_return_status                 OUT NOCOPY varchar2);
87 
88 
89 -- Start of comments
90 -- API name : Update_Address
91 -- Type     : Public
92 -- Pre-reqs : None.
93 -- Procedure : API to update address information. This wrapper api
94 --             calls api to update location and contact information.
95 -- Parameters :
96 -- IN:
97 --        p_location_code               IN      Location Code.
98 --        P_party_id                    IN      Party Id.
99 --        P_address1                    IN      Address1.
100 --        P_address2                    IN      Address2.
101 --        P_address3                    IN      Address3.
102 --        P_address4                    IN      Address4.
103 --        P_city                        IN      City.
104 --        P_postal_code                 IN      Postal Code.
105 --        P_state                       IN      State.
106 --        P_Province                    IN      Province.
107 --        P_county                      IN      County.
108 --        p_country                     IN      Country.
109 --        p_shipper_name                IN      Shipper Name
110 --        p_phone                       IN      Phone Number.
111 --        p_email                       IN      Email Address.
112 -- OUT:
113 --      x_return_status OUT NOCOPY      Standard to output api status.
114 -- End of comments
115 PROCEDURE Update_Address(
116         P_location_id                   IN      number,
117         P_party_id                     IN      number,
118         P_party_site_id                 IN      number,
119         P_address1                      IN      varchar2,
120         P_address2                      IN      varchar2,
121         P_address3                      IN      varchar2,
122         P_address4                      IN      varchar2,
123         P_city                          IN      varchar2,
124         P_postal_code                   IN      varchar2,
125         P_state                         IN      varchar2,
126         P_Province                      IN      varchar2,
127         P_county                        IN      varchar2,
128         p_country                       IN      varchar2,
129         p_shipper_name                  IN      varchar2,
130         p_phone                         IN      varchar2,
131         p_email                         IN      varchar2,
132         x_return_status                 OUT NOCOPY varchar2);
133 
134 
135 -- Start of comments
136 -- API name : Validate_Supplier
137 -- Type     : Public
138 -- Pre-reqs : None.
139 -- Procedure: API to Create/Validate Supplier. Api does
140 --            1. Check for mandatory parameters.
141 --            2. Validate the ISP user.
142 --            3. Validate Vendor.
143 --            4. Check for Party exist for vendor, if not create one.
144 -- Parameters :
145 -- IN:
146 --      p_in_param              IN  Type WSH_ROUTING_REQUEST.In_param_Rec_Type,use p_in_param.caller to get the caller.
147 --      P_supplier_name         IN  Supplier Name.
148 -- OUT:
149 --      x_vendor_id           vendor id.
150 --      x_party_id            Party Id.
151 --      x_return_status       Standard to output api status.
152 -- End of comments
153 PROCEDURE Validate_Supplier(
154         p_in_param                      IN      WSH_ROUTING_REQUEST.In_param_Rec_Type,
155         P_supplier_name                 IN      varchar2,
156         x_vendor_id                     OUT NOCOPY number,
157         x_party_id                      OUT NOCOPY number,
158         x_return_status                 OUT NOCOPY varchar2);
159 
160 
161 -- Start of comments
162 -- API name : VENDOR_PARTY_EXISTS
163 -- Type     : Public
164 -- Pre-reqs : None.
165 -- Procedure: API to find Party for a Vendor. Based on input vendor_id check
166 --            for existing party in hz_relationships.
167 -- Parameters :
168 -- IN:
169 --      p_vendor_id           Vendor Id
170 -- OUT:
171 --      x_party_id            Party Id
172 --      RETURN Y/N
173 -- End of comments
174 FUNCTION VENDOR_PARTY_EXISTS(
175     p_vendor_id IN NUMBER,
176     x_party_id  OUT NOCOPY NUMBER) RETURN VARCHAR2;
177 
178 
179 -- Start of comments
180 -- API name : create_vendor_party
181 -- Type     : Public
182 -- Pre-reqs : None.
183 -- Procedure : API to create Creates a TCA party of type Organization from a PO_VENDOR,if the party doesn't already exist.
184 --
185 -- Parameters :
186 -- IN:
187 --      Vendor_id       IN  PK for the Vendor from which the party is being created.
188 --      p_file_fields   IN  Hold Supplier Address book record as passed by UI
189 -- OUT:
190 --    Return_status:  Indicates outcome of function:
191 --       S:  Successful, party was created and committed
192 --       E:  Some validation failed, the party was not created
193 -- End of comments
194 FUNCTION create_vendor_party(
195     p_vendor_id IN NUMBER,
196     x_return_status OUT NOCOPY VARCHAR2) RETURN NUMBER;
197 
198 
199 -- Start of comments
200 -- API name : Create_Hz_Party_site
201 -- Type     : Public
202 -- Pre-reqs : None.
203 -- Procedure : API to create Hz Party Site for Party and Location. Api does
204 --           1.Check for mandatory field for creating Party sites.
205 --           2.Calls api HZ_PARTY_SITE_V2PUB.Create_Party_Site for creating Party sites.
206 -- Parameters :
207 -- IN:
208 --        P_party_id                    IN      Party Id.
209 --        P_location_id                 IN      Location id.
210 --        P_location_code               IN      Location Code.
211 -- OUT:
212 --        x_party_site_id OUT NOCOPY      Party Site Id.
213 --        x_return_status OUT NOCOPY      Standard to output api status.
214 -- End of comments
215 PROCEDURE Create_HZ_Party_Site(
216         P_party_id              IN      NUMBER,
217         P_location_id           IN      NUMBER,
218         P_location_code         IN      VARCHAR2,
219         x_party_site_id         OUT NOCOPY NUMBER,
220         x_return_status         OUT NOCOPY VARCHAR2);
221 
222 
223 -- Start of comments
224 -- API name : Process_HZ_contact
225 -- Type     : Public
226 -- Pre-reqs : None.
227 -- Procedure: API to Process Hz Contact for party site. Api first check if
228 --            contact information is already exists for party and party site. If
229 --            exist then update the information else create new contact.
230 -- Parameters :
231 -- IN:
232 --        P_party_id                      IN Party Id.
233 --        P_party_site_id                 IN Party Site Id.
234 --        P_person_name                   IN Person Name.
235 --        P_phone                         IN Phone Number.
236 --        P_email                         IN Email.
237 -- OUT:
238 --      x_return_status OUT NOCOPY      Standard to output api status.
239 -- End of comments
240 PROCEDURE Process_HZ_contact(
241   P_PARTY_ID              IN     NUMBER,
242   P_PARTY_SITE_ID         IN     NUMBER,
243   P_PERSON_NAME           IN     VARCHAR2,
244   P_phone           IN     VARCHAR2,
245   P_EMAIL            IN     VARCHAR2,
246   x_return_status       OUT NOCOPY VARCHAR2 );
247 
248 
249 
250 -- Start of comments
251 -- API name : Create_Hz_Party_site_Uses
252 -- Type     : Public
253 -- Pre-reqs : None.
254 -- Procedure : API to create Hz Party Site uses for Party Site and Uses Type.
255 --             (a) First check if party site uses exist in TCA
256 --             (b) If not, create it
257 --             (c) Return the party_site_use_id.
258 -- Parameters :
259 -- IN:
260 --      P_party_site_id      IN  Party Site Id.
261 --      P_site_use_type      IN  Site uses type.
262 -- OUT:
263 --      x_party_site_use_id OUT NOCOPY      Party site use Id created.
264 --      x_return_status     OUT NOCOPY      Standard to output api status.
265 -- End of comments
266 PROCEDURE Create_HZ_Party_Site_uses(
267         P_party_site_id         IN      NUMBER,
268         P_site_use_type         IN      VARCHAR2,
269         x_party_site_use_id     OUT NOCOPY NUMBER,
270         x_return_status         OUT NOCOPY VARCHAR2);
271 
272 
273 END WSH_SUPPLIER_PARTY;