[Home] [Help]
PACKAGE BODY: APPS.FUN_NET_AGREEMENTS_PKG
Source
1 PACKAGE BODY FUN_NET_AGREEMENTS_PKG AS
2 /* $Header: funntagb.pls 120.0 2005/12/09 08:31:09 vgadde noship $ */
3
4 PROCEDURE Insert_Row (
5 x_agreement_id IN OUT NOCOPY NUMBER,
6 x_object_version_number IN NUMBER,
7 x_agreement_name IN VARCHAR2,
8 x_partner_reference IN VARCHAR2,
9 x_agreement_start_date IN DATE,
10 x_agreement_end_date IN DATE,
11 x_in_process_flag IN VARCHAR2,
12 x_sel_rec_past_due_txns_flag IN VARCHAR2,
13 x_days_past_due IN NUMBER,
14 x_net_currency_rule_code IN VARCHAR2,
15 x_net_order_rule_code IN VARCHAR2,
16 x_net_balance_rule_code IN VARCHAR2,
17 x_shikyu_rule_code IN VARCHAR2,
18 x_bank_account_id IN NUMBER,
19 x_net_currency_code IN VARCHAR2,
20 x_approver_name IN VARCHAR2,
21 x_non_response_action_code IN VARCHAR2,
22 x_org_id IN NUMBER,
23 x_attribute_category IN VARCHAR2,
24 x_attribute1 IN VARCHAR2,
25 x_attribute2 IN VARCHAR2,
26 x_attribute3 IN VARCHAR2,
27 x_attribute4 IN VARCHAR2,
28 x_attribute5 IN VARCHAR2,
29 x_attribute6 IN VARCHAR2,
30 x_attribute7 IN VARCHAR2,
31 x_attribute8 IN VARCHAR2,
32 x_attribute9 IN VARCHAR2,
33 x_attribute10 IN VARCHAR2,
34 x_attribute11 IN VARCHAR2,
35 x_attribute12 IN VARCHAR2,
36 x_attribute13 IN VARCHAR2,
37 x_attribute14 IN VARCHAR2,
38 x_attribute15 IN VARCHAR2,
39 x_attribute16 IN VARCHAR2,
40 x_attribute17 IN VARCHAR2,
41 x_attribute18 IN VARCHAR2,
42 x_attribute19 IN VARCHAR2,
43 x_attribute20 IN VARCHAR2
44 ) IS
45
46 l_agreement_id fun_net_agreements_all.agreement_id%TYPE;
47 BEGIN
48
49 IF x_agreement_id IS NULL THEN
50 SELECT fun_net_agreements_s.NEXTVAL INTO l_agreement_id FROM DUAL;
51 x_agreement_id := l_agreement_id;
52 ELSE
53 l_agreement_id := x_agreement_id;
54 END IF;
55
56 INSERT INTO fun_net_agreements (
57 agreement_id,
58 object_version_number,
59 agreement_name,
60 partner_reference,
61 agreement_start_date,
62 agreement_end_date,
63 in_process_flag,
64 sel_rec_past_due_txns_flag,
65 days_past_due,
66 net_currency_rule_code,
67 net_order_rule_code,
68 net_balance_rule_code,
69 shikyu_rule_code,
70 bank_account_id,
71 net_currency_code,
72 approver_name,
73 non_response_action_code,
74 org_id,
75 attribute_category,
76 attribute1,
77 attribute2,
78 attribute3,
79 attribute4,
80 attribute5,
81 attribute6,
82 attribute7,
83 attribute8,
84 attribute9,
85 attribute10,
86 attribute11,
87 attribute12,
88 attribute13,
89 attribute14,
90 attribute15,
91 attribute16,
92 attribute17,
93 attribute18,
94 attribute19,
95 attribute20,
96 created_by,
97 creation_date,
98 last_update_login,
99 last_update_date,
100 last_updated_by
101 )
102 VALUES (
103 l_agreement_id,
104 x_object_version_number,
105 x_agreement_name,
106 x_partner_reference,
107 x_agreement_start_date,
108 x_agreement_end_date,
109 x_in_process_flag,
110 x_sel_rec_past_due_txns_flag,
111 x_days_past_due,
112 x_net_currency_rule_code,
113 x_net_order_rule_code,
114 x_net_balance_rule_code,
115 x_shikyu_rule_code,
116 x_bank_account_id,
117 x_net_currency_code,
118 x_approver_name,
119 x_non_response_action_code,
120 x_org_id,
121 x_attribute_category,
122 x_attribute1,
123 x_attribute2,
124 x_attribute3,
125 x_attribute4,
126 x_attribute5,
127 x_attribute6,
128 x_attribute7,
129 x_attribute8,
130 x_attribute9,
131 x_attribute10,
132 x_attribute11,
133 x_attribute12,
134 x_attribute13,
135 x_attribute14,
136 x_attribute15,
137 x_attribute16,
138 x_attribute17,
139 x_attribute18,
140 x_attribute19,
141 x_attribute20,
142 NVL(FND_GLOBAL.user_id,-1),
143 SYSDATE,
144 DECODE(FND_GLOBAL.conc_login_id,null,FND_GLOBAL.login_id,-1,FND_GLOBAL.login_id,FND_GLOBAL.conc_login_id),
145 SYSDATE,
146 NVL(FND_GLOBAL.user_id,-1)
147 );
148
149 IF ( SQL%NOTFOUND ) THEN
150 RAISE NO_DATA_FOUND;
151 END IF;
152
153 END Insert_Row;
154
155
156 PROCEDURE Update_Row (
157 x_agreement_id IN NUMBER,
158 x_object_version_number IN NUMBER,
159 x_agreement_name IN VARCHAR2,
160 x_partner_reference IN VARCHAR2,
161 x_agreement_start_date IN DATE,
162 x_agreement_end_date IN DATE,
163 x_in_process_flag IN VARCHAR2,
164 x_sel_rec_past_due_txns_flag IN VARCHAR2,
165 x_days_past_due IN NUMBER,
166 x_net_currency_rule_code IN VARCHAR2,
167 x_net_order_rule_code IN VARCHAR2,
168 x_net_balance_rule_code IN VARCHAR2,
169 x_shikyu_rule_code IN VARCHAR2,
170 x_bank_account_id IN NUMBER,
171 x_net_currency_code IN VARCHAR2,
172 x_approver_name IN VARCHAR2,
173 x_non_response_action_code IN VARCHAR2,
174 x_org_id IN NUMBER,
175 x_attribute_category IN VARCHAR2,
176 x_attribute1 IN VARCHAR2,
177 x_attribute2 IN VARCHAR2,
178 x_attribute3 IN VARCHAR2,
179 x_attribute4 IN VARCHAR2,
180 x_attribute5 IN VARCHAR2,
181 x_attribute6 IN VARCHAR2,
182 x_attribute7 IN VARCHAR2,
183 x_attribute8 IN VARCHAR2,
184 x_attribute9 IN VARCHAR2,
185 x_attribute10 IN VARCHAR2,
186 x_attribute11 IN VARCHAR2,
187 x_attribute12 IN VARCHAR2,
188 x_attribute13 IN VARCHAR2,
189 x_attribute14 IN VARCHAR2,
190 x_attribute15 IN VARCHAR2,
191 x_attribute16 IN VARCHAR2,
192 x_attribute17 IN VARCHAR2,
193 x_attribute18 IN VARCHAR2,
194 x_attribute19 IN VARCHAR2,
195 x_attribute20 IN VARCHAR2
196 ) IS
197
198 BEGIN
199
200 UPDATE fun_net_agreements SET
201 agreement_id = x_agreement_id,
202 object_version_number = x_object_version_number,
203 agreement_name = x_agreement_name,
204 partner_reference = x_partner_reference,
205 agreement_start_date = x_agreement_start_date,
206 agreement_end_date = x_agreement_end_date,
207 in_process_flag = x_in_process_flag,
208 sel_rec_past_due_txns_flag = x_sel_rec_past_due_txns_flag,
209 days_past_due = x_days_past_due,
210 net_currency_rule_code = x_net_currency_rule_code,
211 net_order_rule_code = x_net_order_rule_code,
212 net_balance_rule_code = x_net_balance_rule_code,
213 shikyu_rule_code = x_shikyu_rule_code,
214 bank_account_id = x_bank_account_id,
215 net_currency_code = x_net_currency_code,
216 approver_name = x_approver_name,
217 non_response_action_code = x_non_response_action_code,
218 org_id = x_org_id,
219 attribute_category = x_attribute_category,
220 attribute1 = x_attribute1,
221 attribute2 = x_attribute2,
222 attribute3 = x_attribute3,
223 attribute4 = x_attribute4,
224 attribute5 = x_attribute5,
225 attribute6 = x_attribute6,
226 attribute7 = x_attribute7,
227 attribute8 = x_attribute8,
228 attribute9 = x_attribute9,
229 attribute10 = x_attribute10,
230 attribute11 = x_attribute11,
231 attribute12 = x_attribute12,
232 attribute13 = x_attribute13,
233 attribute14 = x_attribute14,
234 attribute15 = x_attribute15,
235 attribute16 = x_attribute16,
236 attribute17 = x_attribute17,
237 attribute18 = x_attribute18,
238 attribute19 = x_attribute19,
239 attribute20 = x_attribute20,
240 last_update_login = DECODE(FND_GLOBAL.conc_login_id,null,FND_GLOBAL.login_id,-1,FND_GLOBAL.login_id,FND_GLOBAL.conc_login_id),
241 last_update_date = SYSDATE,
242 last_updated_by = NVL(FND_GLOBAL.user_id,-1)
243 WHERE agreement_id = x_agreement_id;
244
245 IF ( SQL%NOTFOUND ) THEN
246 RAISE NO_DATA_FOUND;
247 END IF;
248
249 END Update_Row;
250
251 PROCEDURE Update_Row (
252 x_agreement_id IN NUMBER,
253 x_in_process_flag IN VARCHAR2) IS
254 PRAGMA AUTONOMOUS_TRANSACTION;
255 BEGIN
256 UPDATE fun_net_agreements
257 SET in_process_flag = x_in_process_flag
258 WHERE agreement_id = x_agreement_id;
259
260 IF SQL%FOUND THEN
261 COMMIT;
262 ELSE
263 ROLLBACK;
264 END IF;
265 END Update_Row;
266
267 PROCEDURE Select_Row (
268 x_agreement_id IN OUT NOCOPY NUMBER,
269 x_object_version_number IN OUT NOCOPY NUMBER,
270 x_agreement_name IN OUT NOCOPY VARCHAR2,
271 x_partner_reference IN OUT NOCOPY VARCHAR2,
272 x_agreement_start_date IN OUT NOCOPY DATE,
273 x_agreement_end_date IN OUT NOCOPY DATE,
274 x_in_process_flag IN OUT NOCOPY VARCHAR2,
275 x_sel_rec_past_due_txns_flag IN OUT NOCOPY VARCHAR2,
276 x_days_past_due IN OUT NOCOPY NUMBER,
277 x_net_currency_rule_code IN OUT NOCOPY VARCHAR2,
278 x_net_order_rule_code IN OUT NOCOPY VARCHAR2,
279 x_net_balance_rule_code IN OUT NOCOPY VARCHAR2,
280 x_shikyu_rule_code IN OUT NOCOPY VARCHAR2,
281 x_bank_account_id IN OUT NOCOPY NUMBER,
282 x_net_currency_code IN OUT NOCOPY VARCHAR2,
283 x_approver_name IN OUT NOCOPY VARCHAR2,
284 x_non_response_action_code IN OUT NOCOPY VARCHAR2,
285 x_org_id IN OUT NOCOPY NUMBER,
286 x_attribute_category IN OUT NOCOPY VARCHAR2,
287 x_attribute1 IN OUT NOCOPY VARCHAR2,
288 x_attribute2 IN OUT NOCOPY VARCHAR2,
289 x_attribute3 IN OUT NOCOPY VARCHAR2,
290 x_attribute4 IN OUT NOCOPY VARCHAR2,
291 x_attribute5 IN OUT NOCOPY VARCHAR2,
292 x_attribute6 IN OUT NOCOPY VARCHAR2,
293 x_attribute7 IN OUT NOCOPY VARCHAR2,
294 x_attribute8 IN OUT NOCOPY VARCHAR2,
295 x_attribute9 IN OUT NOCOPY VARCHAR2,
296 x_attribute10 IN OUT NOCOPY VARCHAR2,
297 x_attribute11 IN OUT NOCOPY VARCHAR2,
298 x_attribute12 IN OUT NOCOPY VARCHAR2,
299 x_attribute13 IN OUT NOCOPY VARCHAR2,
300 x_attribute14 IN OUT NOCOPY VARCHAR2,
301 x_attribute15 IN OUT NOCOPY VARCHAR2,
302 x_attribute16 IN OUT NOCOPY VARCHAR2,
303 x_attribute17 IN OUT NOCOPY VARCHAR2,
304 x_attribute18 IN OUT NOCOPY VARCHAR2,
305 x_attribute19 IN OUT NOCOPY VARCHAR2,
306 x_attribute20 IN OUT NOCOPY VARCHAR2
307 ) IS
308
309 BEGIN
310
311 SELECT
312 agreement_id,
313 object_version_number,
314 agreement_name,
315 partner_reference,
316 agreement_start_date,
317 agreement_end_date,
318 in_process_flag,
319 sel_rec_past_due_txns_flag,
320 days_past_due,
321 net_currency_rule_code,
322 net_order_rule_code,
323 net_balance_rule_code,
324 shikyu_rule_code,
325 bank_account_id,
326 net_currency_code,
327 approver_name,
328 non_response_action_code,
329 org_id,
330 attribute_category,
331 attribute1,
332 attribute2,
333 attribute3,
334 attribute4,
335 attribute5,
336 attribute6,
337 attribute7,
338 attribute8,
339 attribute9,
340 attribute10,
341 attribute11,
342 attribute12,
343 attribute13,
344 attribute14,
345 attribute15,
346 attribute16,
347 attribute17,
348 attribute18,
349 attribute19,
350 attribute20
351 INTO
355 x_partner_reference,
352 x_agreement_id,
353 x_object_version_number,
354 x_agreement_name,
356 x_agreement_start_date,
357 x_agreement_end_date,
358 x_in_process_flag,
359 x_sel_rec_past_due_txns_flag,
360 x_days_past_due,
361 x_net_currency_rule_code,
362 x_net_order_rule_code,
363 x_net_balance_rule_code,
364 x_shikyu_rule_code,
365 x_bank_account_id,
366 x_net_currency_code,
367 x_approver_name,
368 x_non_response_action_code,
369 x_org_id,
370 x_attribute_category,
371 x_attribute1,
372 x_attribute2,
373 x_attribute3,
374 x_attribute4,
375 x_attribute5,
376 x_attribute6,
377 x_attribute7,
378 x_attribute8,
379 x_attribute9,
380 x_attribute10,
381 x_attribute11,
382 x_attribute12,
383 x_attribute13,
384 x_attribute14,
385 x_attribute15,
386 x_attribute16,
387 x_attribute17,
388 x_attribute18,
389 x_attribute19,
390 x_attribute20
391 FROM fun_net_agreements
392 WHERE agreement_id = x_agreement_id;
393
394 IF ( SQL%NOTFOUND ) THEN
395 RAISE NO_DATA_FOUND;
396 END IF;
397
398 END Select_Row;
399
400
401 PROCEDURE Delete_Row (
402 x_agreement_id IN NUMBER
403 ) IS
404
405 BEGIN
406
407 DELETE fun_net_agreements
408 WHERE agreement_id = x_agreement_id;
409
410 IF ( SQL%NOTFOUND ) THEN
411 RAISE NO_DATA_FOUND;
412 END IF;
413
414 END Delete_Row;
415
416
417 END FUN_NET_AGREEMENTS_PKG;