[Home] [Help]
PACKAGE BODY: APPS.GL_SUMMARY_TEMPLATES_PKG
Source
1 PACKAGE BODY GL_SUMMARY_TEMPLATES_PKG AS
2 /* $Header: gliactpb.pls 120.5 2005/07/11 05:22:34 agovil ship $ */
3
4
5 --
6 -- PUBLIC FUNCTIONS
7 --
8
9 FUNCTION is_funds_check_not_none (
10 x_ledger_id NUMBER ) RETURN BOOLEAN IS
11
12 CURSOR c_not_fc IS
13 SELECT 'found'
14 FROM GL_SUMMARY_TEMPLATES st
15 WHERE st.ledger_id = x_ledger_id
16 AND EXISTS (SELECT 'found'
17 FROM GL_SUMMARY_BC_OPTIONS sb
18 WHERE st.template_id = sb.template_id);
19
20 dummy VARCHAR2(100);
21
22 BEGIN
23
24 OPEN c_not_fc;
25 FETCH c_not_fc INTO dummy;
26
27 IF c_not_fc%FOUND THEN
28 CLOSE c_not_fc;
29 RETURN( TRUE );
30 ELSE
31 CLOSE c_not_fc;
32 RETURN( FALSE );
33 END IF;
34
35 CLOSE c_not_fc;
36
37 EXCEPTION
38 WHEN app_exceptions.application_exception THEN
39 RAISE;
40 WHEN OTHERS THEN
41 fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
42 fnd_message.set_token('PROCEDURE',
43 'GL_SUMMARY_TEMPLATES_PKG.is_funds_check_not_none');
44 RAISE;
45
46 END is_funds_check_not_none;
47
48
49
50 PROCEDURE check_unique_name(
51 X_rowid VARCHAR2,
52 X_ledger_id NUMBER,
53 X_template_name VARCHAR2)
54 IS
55 X_name NUMBER := 0;
56 BEGIN
57
58 SELECT 1
59 INTO X_name
60 FROM GL_SUMMARY_TEMPLATES st
61 WHERE ((X_rowid is NULL) OR (X_rowid <> st.rowid))
62 AND X_ledger_id = st.ledger_id
63 AND X_template_name = st.template_name;
64
65 IF (X_name = 1) THEN
66 fnd_message.set_name('SQLGL','GL_DUP_TEMPLATE_NAME');
67 app_exception.raise_exception;
68 END IF;
69
70 EXCEPTION
71 WHEN NO_DATA_FOUND THEN
72 RETURN;
73
74 END check_unique_name;
75
76
77 FUNCTION check_unique_template(
78 X_rowid VARCHAR2,
79 X_ledger_id NUMBER,
80 X_segment1_type VARCHAR2,
81 X_segment2_type VARCHAR2,
82 X_segment3_type VARCHAR2,
83 X_segment4_type VARCHAR2,
84 X_segment5_type VARCHAR2,
85 X_segment6_type VARCHAR2,
86 X_segment7_type VARCHAR2,
87 X_segment8_type VARCHAR2,
88 X_segment9_type VARCHAR2,
89 X_segment10_type VARCHAR2,
90 X_segment11_type VARCHAR2,
91 X_segment12_type VARCHAR2,
92 X_segment13_type VARCHAR2,
93 X_segment14_type VARCHAR2,
94 X_segment15_type VARCHAR2,
95 X_segment16_type VARCHAR2,
96 X_segment17_type VARCHAR2,
97 X_segment18_type VARCHAR2,
98 X_segment19_type VARCHAR2,
99 X_segment20_type VARCHAR2,
100 X_segment21_type VARCHAR2,
101 X_segment22_type VARCHAR2,
102 X_segment23_type VARCHAR2,
103 X_segment24_type VARCHAR2,
104 X_segment25_type VARCHAR2,
105 X_segment26_type VARCHAR2,
106 X_segment27_type VARCHAR2,
107 X_segment28_type VARCHAR2,
108 X_segment29_type VARCHAR2,
109 X_segment30_type VARCHAR2) RETURN BOOLEAN IS
110
111 X_template NUMBER :=0;
112
113 BEGIN
114
115 SELECT 1
116 INTO X_template
117 FROM GL_SUMMARY_TEMPLATES st
118 WHERE ((X_rowid is NULL) OR (X_rowid <> st.rowid))
119 AND X_ledger_id = st.ledger_id
120 AND nvl(X_segment1_type,'*') = nvl(st.segment1_type,'*')
121 AND nvl(X_segment2_type,'*') = nvl(st.segment2_type,'*')
122 AND nvl(X_segment3_type,'*') = nvl(st.segment3_type,'*')
123 AND nvl(X_segment4_type,'*') = nvl(st.segment4_type,'*')
124 AND nvl(X_segment5_type,'*') = nvl(st.segment5_type,'*')
125 AND nvl(X_segment6_type,'*') = nvl(st.segment6_type,'*')
126 AND nvl(X_segment7_type,'*') = nvl(st.segment7_type,'*')
127 AND nvl(X_segment8_type,'*') = nvl(st.segment8_type,'*')
128 AND nvl(X_segment9_type,'*') = nvl(st.segment9_type,'*')
129 AND nvl(X_segment10_type,'*') = nvl(st.segment10_type,'*')
130 AND nvl(X_segment11_type,'*') = nvl(st.segment11_type,'*')
131 AND nvl(X_segment12_type,'*') = nvl(st.segment12_type,'*')
132 AND nvl(X_segment13_type,'*') = nvl(st.segment13_type,'*')
133 AND nvl(X_segment14_type,'*') = nvl(st.segment14_type,'*')
134 AND nvl(X_segment15_type,'*') = nvl(st.segment15_type,'*')
135 AND nvl(X_segment16_type,'*') = nvl(st.segment16_type,'*')
136 AND nvl(X_segment17_type,'*') = nvl(st.segment17_type,'*')
137 AND nvl(X_segment18_type,'*') = nvl(st.segment18_type,'*')
138 AND nvl(X_segment19_type,'*') = nvl(st.segment19_type,'*')
139 AND nvl(X_segment20_type,'*') = nvl(st.segment20_type,'*')
140 AND nvl(X_segment21_type,'*') = nvl(st.segment21_type,'*')
141 AND nvl(X_segment22_type,'*') = nvl(st.segment22_type,'*')
142 AND nvl(X_segment23_type,'*') = nvl(st.segment23_type,'*')
143 AND nvl(X_segment24_type,'*') = nvl(st.segment24_type,'*')
144 AND nvl(X_segment25_type,'*') = nvl(st.segment25_type,'*')
145 AND nvl(X_segment26_type,'*') = nvl(st.segment26_type,'*')
146 AND nvl(X_segment27_type,'*') = nvl(st.segment27_type,'*')
147 AND nvl(X_segment28_type,'*') = nvl(st.segment28_type,'*')
148 AND nvl(X_segment29_type,'*') = nvl(st.segment29_type,'*')
149 AND nvl(X_segment30_type,'*') = nvl(st.segment30_type,'*');
150
151 IF (X_template = 1) THEN
152 RETURN(TRUE);
153 ELSE /* the template is not a duplicate */
154 RETURN(FALSE);
155 END IF;
156
157 EXCEPTION
158 WHEN NO_DATA_FOUND THEN
159 RETURN(FALSE);
160 WHEN OTHERS THEN
161 fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
162 fnd_message.set_token('PROCEDURE',
163 'GL_SUMMARY_TEMPLATES_PKG.check_unique_template');
164 RAISE;
165
166 END check_unique_template;
167
168
169 FUNCTION get_unique_id RETURN NUMBER IS
170 CURSOR c_getid IS
171 SELECT GL_SUMMARY_TEMPLATES_S.NEXTVAL
172 FROM dual;
173 id NUMBER;
174
175 BEGIN
176 OPEN c_getid;
177 FETCH c_getid INTO id;
178
179 IF c_getid%FOUND THEN
180 CLOSE c_getid;
181 RETURN( id );
182 ELSE
183 CLOSE c_getid;
184 fnd_message.set_name('SQLGL', 'GL_ERROR_GETTING_UNIQUE_ID');
185 fnd_message.set_token('SEQUENCE', 'GL_SUMMARY_TEMPLATES_S');
186 app_exception.raise_exception;
187 END IF;
188
189 EXCEPTION
190 WHEN APP_EXCEPTION.application_exception THEN
191 RAISE;
192 WHEN OTHERS THEN
193 fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
194 fnd_message.set_token('PROCEDURE',
195 'gl_summary_templates_pkg.get_unique_id');
196 RAISE;
197 END get_unique_id;
198
199 PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
200 X_Template_Name VARCHAR2,
201 X_Start_Actuals_Period_Name VARCHAR2,
202 X_Description VARCHAR2,
203 X_Account_Category_Code VARCHAR2,
204 X_Template_Id NUMBER,
205 X_Ledger_Id NUMBER,
206 X_Status VARCHAR2,
207 X_Last_Update_Date DATE,
208 X_Last_Updated_by NUMBER,
209 X_Concatenated_Description VARCHAR2,
210 X_Max_Code_Combination_Id NUMBER,
211 X_Created_By NUMBER,
212 X_Creation_Date DATE,
213 X_Last_Update_Login NUMBER,
214 X_Segment1_Type VARCHAR2,
215 X_Segment2_Type VARCHAR2,
216 X_Segment3_Type VARCHAR2,
217 X_Segment4_Type VARCHAR2,
218 X_Segment5_Type VARCHAR2,
219 X_Segment6_Type VARCHAR2,
220 X_Segment7_Type VARCHAR2,
221 X_Segment8_Type VARCHAR2,
222 X_Segment9_Type VARCHAR2,
223 X_Segment10_Type VARCHAR2,
224 X_Segment11_Type VARCHAR2,
225 X_Segment12_Type VARCHAR2,
226 X_Segment13_Type VARCHAR2,
227 X_Segment14_Type VARCHAR2,
228 X_Segment15_Type VARCHAR2,
229 X_Segment16_Type VARCHAR2,
230 X_Segment17_Type VARCHAR2,
231 X_Segment18_Type VARCHAR2,
232 X_Segment19_Type VARCHAR2,
233 X_Segment20_Type VARCHAR2,
234 X_Segment21_Type VARCHAR2,
235 X_Segment22_Type VARCHAR2,
236 X_Segment23_Type VARCHAR2,
237 X_Segment24_Type VARCHAR2,
238 X_Segment25_Type VARCHAR2,
239 X_Segment26_Type VARCHAR2,
240 X_Segment27_Type VARCHAR2,
241 X_Segment28_Type VARCHAR2,
242 X_Segment29_Type VARCHAR2,
243 X_Segment30_Type VARCHAR2,
244 X_Attribute1 VARCHAR2,
245 X_Attribute2 VARCHAR2,
246 X_Attribute3 VARCHAR2,
247 X_Attribute4 VARCHAR2,
248 X_Attribute5 VARCHAR2,
249 X_Attribute6 VARCHAR2,
250 X_Attribute7 VARCHAR2,
251 X_Attribute8 VARCHAR2,
252 X_Context VARCHAR2
253 ) IS
254 CURSOR C IS SELECT rowid FROM GL_SUMMARY_TEMPLATES
255 WHERE template_id = X_Template_Id;
256 BEGIN
257 INSERT INTO GL_SUMMARY_TEMPLATES(
258 template_id,
259 ledger_id,
260 status,
261 last_update_date,
262 last_updated_by,
263 template_name,
264 concatenated_description,
265 account_category_code,
266 max_code_combination_id,
267 start_actuals_period_name,
268 created_by,
269 creation_date,
270 last_update_login,
271 segment1_type,
272 segment2_type,
273 segment3_type,
274 segment4_type,
275 segment5_type,
276 segment6_type,
277 segment7_type,
278 segment8_type,
279 segment9_type,
280 segment10_type,
281 segment11_type,
282 segment12_type,
283 segment13_type,
284 segment14_type,
285 segment15_type,
286 segment16_type,
287 segment17_type,
288 segment18_type,
289 segment19_type,
290 segment20_type,
291 segment21_type,
292 segment22_type,
293 segment23_type,
294 segment24_type,
295 segment25_type,
296 segment26_type,
297 segment27_type,
298 segment28_type,
299 segment29_type,
300 segment30_type,
301 description,
302 attribute1,
303 attribute2,
304 attribute3,
305 attribute4,
306 attribute5,
307 attribute6,
308 attribute7,
309 attribute8,
310 context)
311 VALUES (
312 X_Template_Id,
313 X_Ledger_id,
314 X_Status,
315 X_Last_Update_Date,
316 X_Last_Updated_By,
317 X_Template_Name,
318 X_Concatenated_Description,
319 X_Account_Category_Code,
320 X_Max_Code_Combination_Id,
321 X_Start_Actuals_Period_Name,
322 X_Created_By,
323 X_Creation_Date,
324 X_Last_Update_Login,
325 X_Segment1_Type,
326 X_Segment2_Type,
327 X_Segment3_Type,
328 X_Segment4_Type,
329 X_Segment5_Type,
330 X_Segment6_Type,
331 X_Segment7_Type,
332 X_Segment8_Type,
333 X_Segment9_Type,
334 X_Segment10_Type,
335 X_Segment11_Type,
336 X_Segment12_Type,
337 X_Segment13_Type,
338 X_Segment14_Type,
339 X_Segment15_Type,
340 X_Segment16_Type,
341 X_Segment17_Type,
342 X_Segment18_Type,
343 X_Segment19_Type,
344 X_Segment20_Type,
345 X_Segment21_Type,
346 X_Segment22_Type,
347 X_Segment23_Type,
348 X_Segment24_Type,
349 X_Segment25_Type,
350 X_Segment26_Type,
351 X_Segment27_Type,
352 X_Segment28_Type,
353 X_Segment29_Type,
354 X_Segment30_Type,
355 X_Description,
356 X_Attribute1,
357 X_Attribute2,
358 X_Attribute3,
359 X_Attribute4,
360 X_Attribute5,
361 X_Attribute6,
362 X_Attribute7,
363 X_Attribute8,
364 X_Context);
365
366 OPEN C;
367 FETCH C INTO X_Rowid;
368 if (C%NOTFOUND) then
369 CLOSE C;
370 RAISE NO_DATA_FOUND;
371 end if;
372 CLOSE C;
373 END Insert_Row;
374
375
376 PROCEDURE Lock_Row(X_Rowid VARCHAR2,
377 X_Template_Name VARCHAR2,
378 X_Start_Actuals_Period_Name VARCHAR2,
379 X_Description VARCHAR2,
380 X_Account_Category_Code VARCHAR2,
381 X_Template_Id NUMBER,
382 X_Ledger_Id NUMBER,
383 X_Status VARCHAR2,
384 X_Last_Update_Date DATE,
385 X_Last_Updated_by NUMBER,
386 X_Concatenated_Description VARCHAR2,
387 X_Max_Code_Combination_Id NUMBER,
388 X_Created_By NUMBER,
389 X_Creation_Date DATE,
390 X_Last_Update_Login NUMBER,
391 X_Segment1_Type VARCHAR2,
392 X_Segment2_Type VARCHAR2,
393 X_Segment3_Type VARCHAR2,
394 X_Segment4_Type VARCHAR2,
395 X_Segment5_Type VARCHAR2,
396 X_Segment6_Type VARCHAR2,
397 X_Segment7_Type VARCHAR2,
398 X_Segment8_Type VARCHAR2,
399 X_Segment9_Type VARCHAR2,
400 X_Segment10_Type VARCHAR2,
401 X_Segment11_Type VARCHAR2,
402 X_Segment12_Type VARCHAR2,
403 X_Segment13_Type VARCHAR2,
404 X_Segment14_Type VARCHAR2,
405 X_Segment15_Type VARCHAR2,
406 X_Segment16_Type VARCHAR2,
407 X_Segment17_Type VARCHAR2,
408 X_Segment18_Type VARCHAR2,
409 X_Segment19_Type VARCHAR2,
410 X_Segment20_Type VARCHAR2,
411 X_Segment21_Type VARCHAR2,
412 X_Segment22_Type VARCHAR2,
413 X_Segment23_Type VARCHAR2,
414 X_Segment24_Type VARCHAR2,
415 X_Segment25_Type VARCHAR2,
416 X_Segment26_Type VARCHAR2,
417 X_Segment27_Type VARCHAR2,
418 X_Segment28_Type VARCHAR2,
419 X_Segment29_Type VARCHAR2,
420 X_Segment30_Type VARCHAR2,
421 X_Attribute1 VARCHAR2,
422 X_Attribute2 VARCHAR2,
423 X_Attribute3 VARCHAR2,
424 X_Attribute4 VARCHAR2,
425 X_Attribute5 VARCHAR2,
426 X_Attribute6 VARCHAR2,
427 X_Attribute7 VARCHAR2,
428 X_Attribute8 VARCHAR2,
429 X_Context VARCHAR2
430 ) IS
431 CURSOR C IS
432 SELECT *
433 FROM GL_SUMMARY_TEMPLATES
434 WHERE rowid = X_Rowid
435 FOR UPDATE of Ledger_Id NOWAIT;
436 Recinfo C%ROWTYPE;
437 BEGIN
438 OPEN C;
439 FETCH C INTO Recinfo;
440 if (C%NOTFOUND) then
441 CLOSE C;
442 RAISE NO_DATA_FOUND;
443 end if;
444 CLOSE C;
445 if(
446 ( (Recinfo.template_id = X_Template_Id)
447 OR ( (Recinfo.template_id IS NULL)
448 AND (X_Template_Id IS NULL)))
449 AND ( (Recinfo.ledger_id = X_Ledger_ID)
450 OR ( (Recinfo.ledger_id IS NULL)
451 AND (X_Ledger_Id IS NULL)))
452 AND ( (Recinfo.status = X_Status)
453 OR ( (Recinfo.status IS NULL)
454 AND (X_Status IS NULL)))
455 AND ( (Recinfo.last_update_date = X_Last_Update_Date)
456 OR ( (Recinfo.last_update_date IS NULL)
457 AND (X_Last_Update_Date IS NULL)))
458 AND ( (Recinfo.last_updated_by = X_Last_Updated_By)
459 OR ( (Recinfo.last_updated_by IS NULL)
460 AND (X_Last_Updated_By IS NULL)))
461 AND ( (Recinfo.template_name = X_Template_Name)
462 OR ( (Recinfo.template_name IS NULL)
463 AND (X_Template_Name IS NULL)))
464 AND ( (Recinfo.concatenated_description = X_Concatenated_Description)
465 OR ( (Recinfo.concatenated_description IS NULL)
466 AND (X_Concatenated_Description IS NULL)))
467 AND ( (Recinfo.account_category_code = X_Account_Category_Code)
468 OR ( (Recinfo.account_category_code IS NULL)
469 AND (X_Account_Category_Code IS NULL)))
470 AND ( (Recinfo.max_code_combination_id = X_Max_Code_Combination_Id)
471 OR ( (Recinfo.max_code_combination_id IS NULL)
472 AND (X_Max_Code_Combination_Id IS NULL)))
473 AND ( (Recinfo.start_actuals_period_name = X_Start_Actuals_Period_Name)
474 OR ( (Recinfo.start_actuals_period_name IS NULL)
475 AND (X_Start_Actuals_Period_Name IS NULL)))
476 AND ( (Recinfo.created_by = X_Created_By)
477 OR ( (Recinfo.created_by IS NULL)
478 AND (X_Created_By IS NULL)))
479 AND ( (Recinfo.creation_date = X_Creation_Date)
480 OR ( (Recinfo.creation_date IS NULL)
481 AND (X_Creation_Date IS NULL)))
482 AND ( (Recinfo.last_update_login = X_Last_Update_Login)
483 OR ( (Recinfo.last_update_login IS NULL)
487 AND (X_Segment1_Type IS NULL)))
484 AND (X_Last_Update_Login IS NULL)))
485 AND ( (Recinfo.segment1_type = X_Segment1_Type)
486 OR ( (Recinfo.segment1_type IS NULL)
488 AND ( (Recinfo.segment2_type = X_Segment2_Type)
489 OR ( (Recinfo.segment2_type IS NULL)
490 AND (X_Segment2_Type IS NULL)))
491 AND ( (Recinfo.segment3_type = X_Segment3_Type)
492 OR ( (Recinfo.segment3_type IS NULL)
493 AND (X_Segment3_Type IS NULL)))
494 AND ( (Recinfo.segment4_type = X_Segment4_Type)
495 OR ( (Recinfo.segment4_type IS NULL)
496 AND (X_Segment4_Type IS NULL)))
497 AND ( (Recinfo.segment5_type = X_Segment5_Type)
498 OR ( (Recinfo.segment5_type IS NULL)
499 AND (X_Segment5_Type IS NULL)))
500 AND ( (Recinfo.segment6_type = X_Segment6_Type)
501 OR ( (Recinfo.segment6_type IS NULL)
502 AND (X_Segment6_Type IS NULL)))
503 AND ( (Recinfo.segment7_type = X_Segment7_Type)
504 OR ( (Recinfo.segment7_type IS NULL)
505 AND (X_Segment7_Type IS NULL)))
506 AND ( (Recinfo.segment8_type = X_Segment8_Type)
507 OR ( (Recinfo.segment8_type IS NULL)
508 AND (X_Segment8_Type IS NULL)))
509 AND ( (Recinfo.segment9_type = X_Segment9_Type)
510 OR ( (Recinfo.segment9_type IS NULL)
511 AND (X_Segment9_Type IS NULL)))
512 AND ( (Recinfo.segment10_type = X_Segment10_Type)
513 OR ( (Recinfo.segment10_type IS NULL)
514 AND (X_Segment10_Type IS NULL)))
515 AND ( (Recinfo.segment11_type = X_Segment11_Type)
516 OR ( (Recinfo.segment11_type IS NULL)
517 AND (X_Segment11_Type IS NULL)))
518 AND ( (Recinfo.segment12_type = X_Segment12_Type)
519 OR ( (Recinfo.segment12_type IS NULL)
520 AND (X_Segment12_Type IS NULL)))
521 AND ( (Recinfo.segment13_type = X_Segment13_Type)
522 OR ( (Recinfo.segment13_type IS NULL)
523 AND (X_Segment13_Type IS NULL)))
524 AND ( (Recinfo.segment14_type = X_Segment14_Type)
525 OR ( (Recinfo.segment14_type IS NULL)
526 AND (X_Segment14_Type IS NULL)))
527 AND ( (Recinfo.segment15_type = X_Segment15_Type)
528 OR ( (Recinfo.segment15_type IS NULL)
529 AND (X_Segment15_Type IS NULL)))
530 AND ( (Recinfo.segment16_type = X_Segment16_Type)
531 OR ( (Recinfo.segment16_type IS NULL)
532 AND (X_Segment16_Type IS NULL)))
533 AND ( (Recinfo.segment17_type = X_Segment17_Type)
534 OR ( (Recinfo.segment17_type IS NULL)
535 AND (X_Segment17_Type IS NULL)))
536 AND ( (Recinfo.segment18_type = X_Segment18_Type)
537 OR ( (Recinfo.segment18_type IS NULL)
538 AND (X_Segment18_Type IS NULL)))
539 AND ( (Recinfo.segment19_type = X_Segment19_Type)
540 OR ( (Recinfo.segment19_type IS NULL)
541 AND (X_Segment19_Type IS NULL)))
542 AND ( (Recinfo.segment20_type = X_Segment20_Type)
543 OR ( (Recinfo.segment20_type IS NULL)
544 AND (X_Segment20_Type IS NULL)))
545 AND ( (Recinfo.segment21_type = X_Segment21_Type)
546 OR ( (Recinfo.segment21_type IS NULL)
547 AND (X_Segment21_Type IS NULL)))
548 AND ( (Recinfo.segment22_type = X_Segment22_Type)
549 OR ( (Recinfo.segment22_type IS NULL)
550 AND (X_Segment22_Type IS NULL)))
551 AND ( (Recinfo.segment23_type = X_Segment23_Type)
552 OR ( (Recinfo.segment23_type IS NULL)
553 AND (X_Segment23_Type IS NULL)))
554 AND ( (Recinfo.segment24_type = X_Segment24_Type)
555 OR ( (Recinfo.segment24_type IS NULL)
556 AND (X_Segment24_Type IS NULL)))
557 AND ( (Recinfo.segment25_type = X_Segment25_Type)
558 OR ( (Recinfo.segment25_type IS NULL)
559 AND (X_Segment25_Type IS NULL)))
560 AND ( (Recinfo.segment26_type = X_Segment26_Type)
561 OR ( (Recinfo.segment26_type IS NULL)
562 AND (X_Segment26_Type IS NULL)))
563 AND ( (Recinfo.segment27_type = X_Segment27_Type)
564 OR ( (Recinfo.segment27_type IS NULL)
565 AND (X_Segment27_Type IS NULL)))
566 AND ( (Recinfo.segment28_type = X_Segment28_Type)
567 OR ( (Recinfo.segment28_type IS NULL)
568 AND (X_Segment28_Type IS NULL)))
569 AND ( (Recinfo.segment29_type = X_Segment29_Type)
570 OR ( (Recinfo.segment29_type IS NULL)
571 AND (X_Segment29_Type IS NULL)))
572 AND ( (Recinfo.segment30_type = X_Segment30_Type)
573 OR ( (Recinfo.segment30_type IS NULL)
574 AND (X_Segment30_Type IS NULL)))
575 AND ( (Recinfo.description = X_Description)
576 OR ( (Recinfo.description IS NULL)
577 AND (X_Description IS NULL)))
578 AND ( (Recinfo.attribute1 = X_Attribute1)
579 OR ( (Recinfo.attribute1 IS NULL)
580 AND (X_Attribute1 IS NULL)))
581 AND ( (Recinfo.attribute2 = X_Attribute2)
582 OR ( (Recinfo.attribute2 IS NULL)
583 AND (X_Attribute2 IS NULL)))
587 AND ( (Recinfo.attribute4 = X_Attribute4)
584 AND ( (Recinfo.attribute3 = X_Attribute3)
585 OR ( (Recinfo.attribute3 IS NULL)
586 AND (X_Attribute3 IS NULL)))
588 OR ( (Recinfo.attribute4 IS NULL)
589 AND (X_Attribute4 IS NULL)))
590 AND ( (Recinfo.attribute5 = X_Attribute5)
591 OR ( (Recinfo.attribute5 IS NULL)
592 AND (X_Attribute5 IS NULL)))
593 AND ( (Recinfo.attribute6 = X_Attribute6)
594 OR ( (Recinfo.attribute6 IS NULL)
595 AND (X_Attribute6 IS NULL)))
596 AND ( (Recinfo.attribute7 = X_Attribute7)
597 OR ( (Recinfo.attribute7 IS NULL)
598 AND (X_Attribute7 IS NULL)))
599 AND ( (Recinfo.attribute8 = X_Attribute8)
600 OR ( (Recinfo.attribute8 IS NULL)
601 AND (X_Attribute8 IS NULL)))
602 AND ( (Recinfo.context = X_Context)
603 OR ( (Recinfo.context IS NULL)
604 AND (X_Context IS NULL)))
605 ) then
606 return;
607 else
608 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
609 APP_EXCEPTION.RAISE_EXCEPTION;
610 end if;
611 END Lock_Row;
612
613 PROCEDURE Update_Row(X_Rowid VARCHAR2,
614 X_Template_Name VARCHAR2,
615 X_Start_Actuals_Period_Name VARCHAR2,
616 X_Description VARCHAR2,
617 X_Account_Category_Code VARCHAR2,
618 X_Template_Id NUMBER,
619 X_Ledger_Id NUMBER,
620 X_Status VARCHAR2,
621 X_Last_Update_Date DATE,
622 X_Last_Updated_by NUMBER,
623 X_Concatenated_Description VARCHAR2,
624 X_Max_Code_Combination_Id NUMBER,
625 X_Created_By NUMBER,
626 X_Creation_Date DATE,
627 X_Last_Update_Login NUMBER,
628 X_Segment1_Type VARCHAR2,
629 X_Segment2_Type VARCHAR2,
630 X_Segment3_Type VARCHAR2,
631 X_Segment4_Type VARCHAR2,
632 X_Segment5_Type VARCHAR2,
633 X_Segment6_Type VARCHAR2,
634 X_Segment7_Type VARCHAR2,
635 X_Segment8_Type VARCHAR2,
636 X_Segment9_Type VARCHAR2,
637 X_Segment10_Type VARCHAR2,
638 X_Segment11_Type VARCHAR2,
639 X_Segment12_Type VARCHAR2,
640 X_Segment13_Type VARCHAR2,
641 X_Segment14_Type VARCHAR2,
642 X_Segment15_Type VARCHAR2,
643 X_Segment16_Type VARCHAR2,
644 X_Segment17_Type VARCHAR2,
645 X_Segment18_Type VARCHAR2,
646 X_Segment19_Type VARCHAR2,
647 X_Segment20_Type VARCHAR2,
648 X_Segment21_Type VARCHAR2,
649 X_Segment22_Type VARCHAR2,
650 X_Segment23_Type VARCHAR2,
651 X_Segment24_Type VARCHAR2,
652 X_Segment25_Type VARCHAR2,
653 X_Segment26_Type VARCHAR2,
654 X_Segment27_Type VARCHAR2,
655 X_Segment28_Type VARCHAR2,
656 X_Segment29_Type VARCHAR2,
657 X_Segment30_Type VARCHAR2,
658 X_Attribute1 VARCHAR2,
659 X_Attribute2 VARCHAR2,
660 X_Attribute3 VARCHAR2,
661 X_Attribute4 VARCHAR2,
662 X_Attribute5 VARCHAR2,
663 X_Attribute6 VARCHAR2,
664 X_Attribute7 VARCHAR2,
665 X_Attribute8 VARCHAR2,
666 X_Context VARCHAR2
667 ) IS
668
669 BEGIN
670 UPDATE GL_SUMMARY_TEMPLATES
671 SET
672 template_id = X_Template_Id,
673 ledger_id = X_Ledger_id,
674 status = X_Status,
675 last_update_date = X_Last_Update_Date,
676 last_updated_by = X_Last_Updated_By,
677 template_name = X_Template_Name,
678 concatenated_description = X_Concatenated_Description,
679 account_category_code = X_Account_Category_Code,
680 max_code_combination_id = X_Max_Code_Combination_Id,
681 start_actuals_period_name = X_Start_Actuals_Period_Name,
682 created_by = X_Created_By,
683 creation_date = X_Creation_Date,
684 last_update_login = X_Last_Update_Login,
685 segment1_type = X_Segment1_Type,
686 segment2_type = X_Segment2_Type,
687 segment3_type = X_Segment3_Type,
688 segment4_type = X_Segment4_Type,
689 segment5_type = X_Segment5_Type,
690 segment6_type = X_Segment6_Type,
691 segment7_type = X_Segment7_Type,
692 segment8_type = X_Segment8_Type,
693 segment9_type = X_Segment9_Type,
694 segment10_type = X_Segment10_Type,
695 segment11_type = X_Segment11_Type,
696 segment12_type = X_Segment12_Type,
697 segment13_type = X_Segment13_Type,
698 segment14_type = X_Segment14_Type,
699 segment15_type = X_Segment15_Type,
700 segment16_type = X_Segment16_Type,
701 segment17_type = X_Segment17_Type,
702 segment18_type = X_Segment18_Type,
703 segment19_type = X_Segment19_Type,
704 segment20_type = X_Segment20_Type,
705 segment21_type = X_Segment21_Type,
706 segment22_type = X_Segment22_Type,
707 segment23_type = X_Segment23_Type,
708 segment24_type = X_Segment24_Type,
709 segment25_type = X_Segment25_Type,
710 segment26_type = X_Segment26_Type,
711 segment27_type = X_Segment27_Type,
712 segment28_type = X_Segment28_Type,
713 segment29_type = X_Segment29_Type,
714 segment30_type = X_Segment30_Type,
715 description = X_Description,
716 attribute1 = X_Attribute1,
717 attribute2 = X_Attribute2,
718 attribute3 = X_Attribute3,
719 attribute4 = X_Attribute4,
720 attribute5 = X_Attribute5,
721 attribute6 = X_Attribute6,
722 attribute7 = X_Attribute7,
723 attribute8 = X_Attribute8,
724 context = X_Context
725 WHERE rowid = X_Rowid;
726 if(SQL%NOTFOUND) then
727 RAISE NO_DATA_FOUND;
728 end if;
729 END Update_Row;
730
731
732 END GL_SUMMARY_TEMPLATES_PKG;