1 PACKAGE HZ_EXTRACT_ORGANIZATION_BO_PVT AS
2 /*$Header: ARHEPOVS.pls 120.1.12000000.2 2007/02/23 20:54:05 awu ship $ */
3 /*
4 * This package contains the private APIs for logical organization.
5 * @rep:scope private
6 * @rep:product HZ
7 * @rep:displayname Organization
8 * @rep:category BUSINESS_ENTITY HZ_PARTIES
9 * @rep:lifecycle active
10 * @rep:doccd 115hztig.pdf Organization Get APIs
11 */
12
13 --------------------------------------
14 --
15 -- PROCEDURE get_organization_bo
16 --
17 -- DESCRIPTION
18 -- Get a logical organization.
19 --
20 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
21 --
22 -- ARGUMENTS
23 -- IN:
24 -- p_init_msg_list Initialize message stack if it is set to
25 -- p_organization_id Organization ID.
26 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
27 -- OUT:
28 -- x_organization_obj Logical organization record.
29 -- x_return_status Return status after the call. The status can
30 -- be fnd_api.g_ret_sts_success (success),
31 -- fnd_api.g_ret_sts_error (error),
32 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
33 -- x_msg_count Number of messages in message stack.
34 -- x_msg_data Message text if x_msg_count is 1.
35 --
36 -- NOTES
37 --
38 -- MODIFICATION HISTORY
39 --
40 --
41 -- 06-JUN-2005 AWU Created.
42 --
43
44 /*
45 The Get Organization API Procedure is a retrieval service that returns a full Organization business object.
46 The user identifies a particular Organization business object using the TCA identifier and/or
47 the object Source System information. Upon proper validation of the object,
48 the full Organization business object is returned. The object consists of all data included within
49 the Organization business object, at all embedded levels. This includes the set of all data stored
50 in the TCA tables for each embedded entity.
51
52 To retrieve the appropriate embedded business objects within the Organization business object,
53 the Get procedure calls the equivalent procedure for the following embedded objects:
54
55 Embedded BO Mandatory Multiple Logical API Procedure Comments
56 Org Contact N Y get_contact_bo
57 Party Site N Y get_party_site_bo
58 Phone N Y get_phone_bo
59 Telex N Y get_telex_bo
60 Email N Y get_email_bo
61 Web N Y get_web_bo
62 EDI N Y get_edi_bo
63 EFT N Y get_eft_bo
64 Financial Report N Y Business Structure. Included entities: HZ_FINANCIAL_REPORTS, HZ_FINANCIAL_NUMBERS
65
66
67 To retrieve the appropriate embedded entities within the Organization business object,
68 the Get procedure returns all records for the particular organization from these TCA entity tables:
69
70 Embedded TCA Entity Mandatory Multiple TCA Table Entities
71
72 Party, Org Profile Y N HZ_PARTIES, HZ_ORGANIZATION_PROFILES
73 Org Preference N Y HZ_PARTY_PREFERENCES
74 Relationship N Y HZ_RELATIONSHIPS
75 Classification N Y HZ_CODE_ASSIGNMENTS
76 Credit Rating N Y HZ_CREDIT_RATINGS
77 Certification N Y HZ_CERTIFICATIONS
78 Financial Profile N Y HZ_FINANCIAL_PROFILE
79
80 */
81
82
83 PROCEDURE get_organization_bo(
84 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
85 p_organization_id IN NUMBER,
86 p_action_type IN VARCHAR2 := NULL,
87 x_organization_obj OUT NOCOPY HZ_ORGANIZATION_BO,
88 x_return_status OUT NOCOPY VARCHAR2,
89 x_msg_count OUT NOCOPY NUMBER,
90 x_msg_data OUT NOCOPY VARCHAR2
91 );
92
93 --------------------------------------
94 --
95 -- PROCEDURE get_organizations_created
96 --
97 -- DESCRIPTION
98 --The caller provides an identifier for the Organizations created business event and
99 --the procedure returns database objects of the type HZ_ORGANIZATION_BO for all of
100 --the Organization business objects from the business event.
101
102 --
103 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
104 --
105 -- ARGUMENTS
106 -- IN:
107 -- p_init_msg_list Initialize message stack if it is set to
108 -- p_event_id BES Event identifier.
109 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
110 -- OUT:
111 -- x_organization_objs One or more created logical organization.
112 -- x_return_status Return status after the call. The status can
113 -- be fnd_api.g_ret_sts_success (success),
114 -- fnd_api.g_ret_sts_error (error),
115 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
116 -- x_msg_count Number of messages in message stack.
117 -- x_msg_data Message text if x_msg_count is 1.
118 --
119 -- NOTES
120 --
121 -- MODIFICATION HISTORY
122 --
123 -- 06-JUN-2005 AWU Created.
124 --
125
126
127
128 /*
129 The Get Organizations Created procedure is a service to retrieve all of the Organization business objects
130 whose creations have been captured by a logical business event. Each Organizations Created
131 business event signifies that one or more Organization business objects have been created.
132 The caller provides an identifier for the Organizations Created business event and the procedure
133 returns all of the Organization business objects from the business event. For each business object
134 creation captured in the business event, the procedure calls the generic Get operation:
135 HZ_ORGANIZATION_BO_PVT.get_organization_bo
136
137 Gathering all of the returned business objects from those API calls, the procedure packages
138 them in a table structure and returns them to the caller.
139 */
140
141
142 PROCEDURE get_organizations_created(
143 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
144 p_event_id IN NUMBER,
145 x_organization_objs OUT NOCOPY HZ_ORGANIZATION_BO_TBL,
146 x_return_status OUT NOCOPY VARCHAR2,
147 x_msg_count OUT NOCOPY NUMBER,
148 x_msg_data OUT NOCOPY VARCHAR2
149 );
150
151
152
153 --------------------------------------
154 --
155 -- PROCEDURE get_organizations_updated
156 --
157 -- DESCRIPTION
158 --The caller provides an identifier for the Organizations update business event and
159 --the procedure returns database objects of the type HZ_ORGANIZATION_BO for all of
160 --the Organization business objects from the business event.
161
162 --
163 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
164 --
165 -- ARGUMENTS
166 -- IN:
167 -- p_init_msg_list Initialize message stack if it is set to
168 -- p_event_id BES Event identifier.
169 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
170 -- OUT:
171 -- x_organization_objs One or more created logical organization.
172 -- x_return_status Return status after the call. The status can
173 -- be fnd_api.g_ret_sts_success (success),
174 -- fnd_api.g_ret_sts_error (error),
175 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
176 -- x_msg_count Number of messages in message stack.
177 -- x_msg_data Message text if x_msg_count is 1.
178 --
179 -- NOTES
180 --
181 -- MODIFICATION HISTORY
182 --
183 -- 06-JUN-2005 AWU Created.
184 --
185
186
187
188 /*
189 The Get Organizations Updated procedure is a service to retrieve all of the Organization business objects whose updates
190 have been captured by the logical business event. Each Organizations Updated business event signifies that one or more
191 Organization business objects have been updated.
192 The caller provides an identifier for the Organizations Update business event and the procedure returns database objects
193 of the type HZ_ORGANIZATION_BO for all of the Organization business objects from the business event.
194 Gathering all of the returned database objects from those API calls, the procedure packages them in a table structure
195 and returns them to the caller.
196 */
197
198 PROCEDURE get_organizations_updated(
199 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
200 p_event_id IN NUMBER,
201 x_organization_objs OUT NOCOPY HZ_ORGANIZATION_BO_TBL,
202 x_return_status OUT NOCOPY VARCHAR2,
203 x_msg_count OUT NOCOPY NUMBER,
204 x_msg_data OUT NOCOPY VARCHAR2
205 );
206
207
208 --------------------------------------
209 --
210 -- PROCEDURE get_organization_updated
211 --
212 -- DESCRIPTION
213 --The caller provides an identifier for the Organizations update business event and organization id
214 --the procedure returns one database object of the type HZ_ORGANIZATION_BO
215 --
216 -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
217 --
218 -- ARGUMENTS
219 -- IN:
220 -- p_init_msg_list Initialize message stack if it is set to
221 -- p_event_id BES Event identifier.
222 -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
223 -- OUT:
224 -- x_organization_objs One or more created logical organization.
225 -- x_return_status Return status after the call. The status can
226 -- be fnd_api.g_ret_sts_success (success),
227 -- fnd_api.g_ret_sts_error (error),
228 -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
229 -- x_msg_count Number of messages in message stack.
230 -- x_msg_data Message text if x_msg_count is 1.
231 --
232 -- NOTES
233 --
234 -- MODIFICATION HISTORY
235 --
236 -- 06-JUN-2005 AWU Created.
237 --
238
239 PROCEDURE get_organization_updated(
240 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
241 p_event_id IN NUMBER,
242 p_organization_id IN NUMBER,
243 x_organization_obj OUT NOCOPY HZ_ORGANIZATION_BO,
244 x_return_status OUT NOCOPY VARCHAR2,
245 x_msg_count OUT NOCOPY NUMBER,
246 x_msg_data OUT NOCOPY VARCHAR2
247 );
248
249 -- called by set_org_cust_action_type
250 procedure set_org_bo_action_type(p_event_id IN NUMBER,
251 p_root_id IN NUMBER,
252 px_org_obj IN OUT NOCOPY HZ_ORGANIZATION_BO,
253 x_return_status OUT NOCOPY VARCHAR2);
254
255
256 END HZ_EXTRACT_ORGANIZATION_BO_PVT;