1 PACKAGE IGC_CC_OPN_UPD_GET_LNK_PUB AS
2 /* $Header: IGCOUGLS.pls 120.8.12000000.4 2007/10/24 06:52:08 smannava ship $ */
3 /*#
4 * Contract Commitment Operations API allows the user to update, create,
5 * obtain, and link contract commitments from an external source.
6 * @rep:scope public
7 * @rep:product IGI
8 * @rep:lifecycle active
9 * @rep:displayname Contract Commitment Operations API
10 * @rep:ihelp igi/@iopenapiappx#iopenapiappx Contract Commitment Open API, Oracle Public Sector International Help
11 * @rep:compatibility S
12 * @rep:category BUSINESS_ENTITY IGC_CONTRACT_COMMITMENT
13 */
14 -- Definition of the CC Header record for CC OPEN API process
15
16 TYPE cc_header_rec_type IS RECORD (org_id igc_cc_headers.org_id%TYPE,
17 cc_type igc_cc_headers.cc_type%TYPE,
18 cc_ref_num igc_cc_headers.cc_ref_num%TYPE,
19 cc_num igc_cc_headers.cc_num%TYPE,
20 parent_header_id igc_cc_headers.parent_header_id%TYPE,
21 vendor_id igc_cc_headers.vendor_id%TYPE,
22 vendor_site_id igc_cc_headers.vendor_site_id%TYPE,
23 vendor_contact_id igc_cc_headers.vendor_contact_id%TYPE,
24 term_id igc_cc_headers.term_id%TYPE,
25 location_id igc_cc_headers.location_id%TYPE,
26 set_of_books_id igc_cc_headers.set_of_books_id%TYPE,
27 cc_desc igc_cc_headers.cc_desc%TYPE,
28 cc_start_date igc_cc_headers.cc_start_date%TYPE,
29 cc_end_date igc_cc_headers.cc_end_date%TYPE,
30 cc_owner_user_id igc_cc_headers.cc_owner_user_id%TYPE,
31 cc_preparer_user_id igc_cc_headers.cc_preparer_user_id%TYPE,
32 currency_code igc_cc_headers.currency_code%TYPE,
33 conversion_type igc_cc_headers.conversion_type%TYPE,
34 conversion_date igc_cc_headers.conversion_date%TYPE,
35 conversion_rate igc_cc_headers.conversion_rate%TYPE,
36 last_update_date igc_cc_headers.last_update_date%TYPE,
37 last_updated_by igc_cc_headers.last_updated_by%TYPE,
38 last_update_login igc_cc_headers.last_update_login%TYPE,
39 created_by igc_cc_headers.created_by%TYPE,
40 creation_date igc_cc_headers.creation_date%TYPE,
41 context igc_cc_headers.context%TYPE,
42 attribute1 igc_cc_headers.attribute1%TYPE,
43 attribute2 igc_cc_headers.attribute2%TYPE,
44 attribute3 igc_cc_headers.attribute3%TYPE,
45 attribute4 igc_cc_headers.attribute4%TYPE,
46 attribute5 igc_cc_headers.attribute5%TYPE,
47 attribute6 igc_cc_headers.attribute6%TYPE,
48 attribute7 igc_cc_headers.attribute7%TYPE,
49 attribute8 igc_cc_headers.attribute8%TYPE,
50 attribute9 igc_cc_headers.attribute9%TYPE,
51 attribute10 igc_cc_headers.attribute10%TYPE,
52 attribute11 igc_cc_headers.attribute11%TYPE,
53 attribute12 igc_cc_headers.attribute12%TYPE,
54 attribute13 igc_cc_headers.attribute13%TYPE,
55 attribute14 igc_cc_headers.attribute14%TYPE,
56 attribute15 igc_cc_headers.attribute15%TYPE,
57 cc_guarantee_flag igc_cc_headers.cc_guarantee_flag%TYPE
58 );
59
60 -- Main program which selects all the records from Header PL-SQL table
61 -- and calls other programs for processing
62 /*#
63 * This API selects all records from the Header PL-SQL table
64 * and calls other programs for processing.
65 * @param p_api_version API Version
66 * @rep:paraminfo {@rep:required}
67 * @param p_init_msg_list TRUE should be passed if the Message List is to be
68 * initialized
69 * @param p_commit If it is set to TRUE it commits work
70 * @param p_validation_level To determine which validation steps should be executed
71 * and which steps should be skipped. Defaults to FULL Validation
72 * @param p_cc_header_rec Contract Commitment Header Record
73 * @rep:paraminfo {@rep:required}
74 * @param x_return_status Reports the API overall return status as Success, Error or
75 * Unexpected
76 * @param x_msg_count Number of messages in the API message list
77 * @param x_msg_data The message in an encoded format
78 * @rep:scope public
79 * @rep:lifecycle active
80 * @rep:displayname Create Contract Commitment
81 * @rep:ihelp igi/@copenapitblx#copenapitblx Create API Parameters
82 * @rep:compatibility S
83 */
84 PROCEDURE CC_Open_API_Main (
85 p_api_version IN NUMBER,
86 p_init_msg_list IN VARCHAR2,
87 p_commit IN VARCHAR2,
88 p_validation_level IN NUMBER,
89 p_cc_header_rec IN CC_HEADER_REC_TYPE,
90 x_return_status OUT NOCOPY VARCHAR2,
91 x_msg_count OUT NOCOPY NUMBER,
92 x_msg_data OUT NOCOPY VARCHAR2
93 );
94
95 -- To perform commitment action from an external system on a particular contract commitment.
96
97 /*#
98 * This API updates standard and release contract commitment types in an external system and
99 * updates the control status of the associated contract commitment.
100 * @param p_api_version API Version
101 * @rep:paraminfo {@rep:required}
102 * @param p_init_msg_list TRUE should be passed if the Message List is to be
103 * initialized
104 * @param p_commit If it is set to TRUE it commits work
105 * @param p_validation_level To determine which validation steps should be executed
106 * and which steps should be skipped. Defaults to FULL Validation
107 * @param p_cc_num Contract Number
108 * @rep:paraminfo {@rep:required}
109 * @param p_set_of_books_id Set Of Books Id
110 * @rep:paraminfo {@rep:required}
111 * @param p_org_id Organization Id
112 * @rep:paraminfo {@rep:required}
113 * @param p_action_code Valid Actions are Close(CL), On Hold(OH), Open(OP) and Release
114 * Hold(RH)
115 * @rep:paraminfo {@rep:required}
116 * @param p_last_updated_by Last Updated User of Headers
117 * @rep:paraminfo {@rep:required}
118 * @param p_last_update_login Last Updated Login Of Headers
119 * @rep:paraminfo {@rep:required}
120 * @param x_return_status Reports the API overall return status as Success, Error or
121 * Unexpected
122 * @param x_msg_count Number of messages in the API message list
123 * @param x_msg_data The message in an encoded format
124 * @rep:scope public
125 * @rep:lifecycle active
126 * @rep:displayname Update Contract Commitment
127 * @rep:ihelp igi/@copenapiupdtparx#copenapiupdtparx Update API Parameters
128 * @rep:compatibility S
129 */
130 PROCEDURE CC_Update_Control_Status_API (
131 p_api_version IN NUMBER,
132 p_init_msg_list IN VARCHAR2 ,
133 p_commit IN VARCHAR2,
134 p_validation_level IN NUMBER,
135 p_cc_num IN igc_cc_headers.cc_num%TYPE,
136 p_set_of_books_id IN igc_cc_headers.set_of_books_id%TYPE,
137 p_org_id IN igc_cc_headers.org_id%TYPE,
138 p_action_code IN fnd_lookups.lookup_code%TYPE,
139 p_last_updated_by IN igc_cc_headers.last_updated_by%TYPE,
140 p_last_update_login IN igc_cc_headers.last_update_login%TYPE,
141 x_return_status OUT NOCOPY VARCHAR2,
142 x_msg_count OUT NOCOPY NUMBER,
143 x_msg_data OUT NOCOPY VARCHAR2
144 );
145
146 -- Checks if a contract corresponding to the contract reference number exists in
147 -- Oracle Contract Commitment.
148
149 /*#
150 * This API retrieves the external reference number associated with a contract commitment in Contract Commitment.
151 * If the API returns the external reference number, it can be modified. If an external reference number does not exist,
152 * users can enter one.
153 * @param p_api_version API Version
154 * @rep:paraminfo {@rep:required}
155 * @param p_init_msg_list TRUE should be passed if the Message List is to be
156 * initialized
157 * @param p_commit If it is set to TRUE it commits work
158 * @param p_validation_level To determine which validation steps should be executed
159 * and which steps should be skipped. Defaults to FULL Validation
160 * @param p_cc_num Contract Number
161 * @rep:paraminfo {@rep:required}
162 * @param p_org_id Organization Id
163 * @rep:paraminfo {@rep:required}
164 * @param p_set_of_books_id Set Of Books Id
165 * @rep:paraminfo {@rep:required}
166 * @param x_cc_header_id CC Header Id
167 * @param x_cc_ref_num Reference Number
168 * @param x_return_status Reports the API overall return status as Success, Error or
169 * Unexpected
170 * @param x_msg_count Number of messages in the API message list
171 * @param x_msg_data The message in an encoded format
172 * @rep:scope public
173 * @rep:lifecycle active
174 * @rep:displayname Check Duplicate Contract Commitment
175 * @rep:ihelp igi/@copenapiselpar#copenapiselpar Select API Parameters
176 * @rep:compatibility S
177 */
178 PROCEDURE CC_Get_API (
179 p_api_version IN NUMBER,
180 p_init_msg_list IN VARCHAR2,
181 p_commit IN VARCHAR2,
182 p_validation_level IN NUMBER,
186 x_cc_header_id OUT NOCOPY igc_cc_headers.cc_header_id%TYPE,
183 p_cc_num IN igc_cc_headers.cc_num%TYPE,
184 p_org_id IN igc_cc_headers.org_id%TYPE,
185 p_set_of_books_id IN igc_cc_headers.set_of_books_id%TYPE,
187 x_cc_ref_num OUT NOCOPY igc_cc_headers.cc_ref_num%TYPE,
188 x_return_status OUT NOCOPY VARCHAR2,
189 x_msg_count OUT NOCOPY NUMBER,
190 x_msg_data OUT NOCOPY VARCHAR2
191 );
192
193 -- Links a contract from an external system with a contract in oracle contract commitment.
194
195 /*#
196 * This API links a contract commitment with an external contract. It is used when a contract commitment
197 * exists in Contract Commitment and users want to link it to a contract in an external system.
198 * @param p_api_version API Version
199 * @rep:paraminfo {@rep:required}
200 * @param p_init_msg_list TRUE should be passed if the Message List is to be
201 * initialized
202 * @param p_commit If it is set to TRUE it commits work
203 * @param p_validation_level To determine which validation steps should be executed
204 * and which steps should be skipped. Defaults to FULL Validation
205 * @param p_cc_ref_num Contract Reference Number
206 * @rep:paraminfo {@rep:required}
207 * @param p_org_id Organization Id
208 * @rep:paraminfo {@rep:required}
209 * @param p_set_of_books_id Set Of Books Id
210 * @rep:paraminfo {@rep:required}
211 * @param p_cc_num Contract Number
212 * @rep:paraminfo {@rep:required}
213 * @param x_return_status Reports the API overall return status as Success, Error or
214 * Unexpected
215 * @param x_msg_count Number of messages in the API message list
216 * @param x_msg_data The message in an encoded format
217 * @rep:scope public
218 * @rep:lifecycle active
219 * @rep:displayname Link Contract Commitment
220 * @rep:ihelp igi/@copenapilnkpar#copenapilnkpar Link API Parameters
221 * @rep:compatibility S
222 */
223 PROCEDURE CC_Link_API (
224 p_api_version IN NUMBER,
225 p_init_msg_list IN VARCHAR2,
226 p_commit IN VARCHAR2,
227 p_validation_level IN NUMBER,
228 p_cc_ref_num IN igc_cc_headers.cc_ref_num%TYPE,
229 p_org_id IN igc_cc_headers.org_id%TYPE,
230 p_set_of_books_id IN igc_cc_headers.set_of_books_id%TYPE,
231 p_cc_num IN igc_cc_headers.cc_num%TYPE,
232 x_return_status OUT NOCOPY VARCHAR2,
233 x_msg_count OUT NOCOPY NUMBER,
234 x_msg_data OUT NOCOPY VARCHAR2
235 );
236
237
238 /* This API is introduced from r12 for MOAC uptake. It validates org_id and sets ORG context. This should be called once before starting of any of Create,Update,Select, Link processes to intialize MOAC,validate ORG ID and to sets ORG Context */
239 PROCEDURE Set_Global_Info
240 (p_api_version_number IN NUMBER,
241 p_responsibility_id IN NUMBER,
242 p_user_id IN NUMBER,
243 p_resp_appl_id IN NUMBER,
244 p_operating_unit_id IN NUMBER,
245 x_return_status OUT NOCOPY VARCHAR2,
246 x_msg_count OUT NOCOPY NUMBER,
247 x_msg_data OUT NOCOPY VARCHAR2
248
249 );
250
251 /* This function is used to determine and get valid operating unit where Contract Commitment is enabled.
252 -- Returns ORG_ID if valid and CC is enabled or retruns NULL if invalid or CC is not enabled */
253 FUNCTION GET_VALID_OU
254 ( p_org_id hr_operating_units.organization_id%TYPE DEFAULT NULL , p_product_code VARCHAR2 )
255 RETURN NUMBER;
256 END IGC_CC_OPN_UPD_GET_LNK_PUB;