DBA Data[Home] [Help]

APPS.ARP_AUTO_RULE dependencies on STANDARD

Line 87: arp_standard.debug('arp_auto_rule.assign_glp_index()+ ' ||

83:
84: FUNCTION assign_glp_index RETURN NUMBER IS
85: error_message FND_NEW_MESSAGES.MESSAGE_TEXT%TYPE; -- bug 4194220
86: BEGIN
87: arp_standard.debug('arp_auto_rule.assign_glp_index()+ ' ||
88: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
89:
90: /* Set glp_index_start to the period having MIN GL date for the trx. */
91:

Line 121: arp_standard.debug('glp table index start = '||glp_index_start||', end = '||glp_index_end);

117: THEN
118: glp_index_end := g_rows;
119: END IF;
120:
121: arp_standard.debug('glp table index start = '||glp_index_start||', end = '||glp_index_end);
122:
123: /* bug 3477990 */
124: FOR i IN glp_index_start..glp_index_end
125: LOOP

Line 133: arp_standard.debug('Cannot process this transaction...');

129: AND
130: gl_bump_t(i-1) IS NULL
131: THEN
132: error_message := FND_MESSAGE.GET_STRING('AR','AR_RAXTRX-1783');
133: arp_standard.debug('Cannot process this transaction...');
134: arp_standard.debug('Closed or closed pending period exists at ' || i || 'with start date ' ||
135: TO_CHAR( gl_start_t( i) , 'DD-MON-YY HH:MI:SS'));
136: arp_standard.debug(error_message);
137:

Line 134: arp_standard.debug('Closed or closed pending period exists at ' || i || 'with start date ' ||

130: gl_bump_t(i-1) IS NULL
131: THEN
132: error_message := FND_MESSAGE.GET_STRING('AR','AR_RAXTRX-1783');
133: arp_standard.debug('Cannot process this transaction...');
134: arp_standard.debug('Closed or closed pending period exists at ' || i || 'with start date ' ||
135: TO_CHAR( gl_start_t( i) , 'DD-MON-YY HH:MI:SS'));
136: arp_standard.debug(error_message);
137:
138: RETURN -1;

Line 136: arp_standard.debug(error_message);

132: error_message := FND_MESSAGE.GET_STRING('AR','AR_RAXTRX-1783');
133: arp_standard.debug('Cannot process this transaction...');
134: arp_standard.debug('Closed or closed pending period exists at ' || i || 'with start date ' ||
135: TO_CHAR( gl_start_t( i) , 'DD-MON-YY HH:MI:SS'));
136: arp_standard.debug(error_message);
137:
138: RETURN -1;
139: END IF;
140: END IF;

Line 144: arp_standard.debug('arp_auto_rule.assign_glp_index()- ' ||

140: END IF;
141: END LOOP;
142:
143: RETURN 0;
144: arp_standard.debug('arp_auto_rule.assign_glp_index()- ' ||
145: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
146:
147: END assign_glp_index;
148:

Line 173: arp_standard.debug('arp_auto_rule.assign_glp_rec()+ ' ||

169: +-------------------------------------------------------------------------*/
170: PROCEDURE assign_glp_rec IS
171:
172: BEGIN
173: arp_standard.debug('arp_auto_rule.assign_glp_rec()+ ' ||
174: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
175:
176: /* Set glp_index_rec to the period having REC record's gl date */
177:

Line 189: arp_standard.debug('glp table index rec = '||glp_index_rec);

185: END IF;
186:
187: END LOOP;
188:
189: arp_standard.debug('glp table index rec = '||glp_index_rec);
190:
191: arp_standard.debug('arp_auto_rule.assign_glp_rec()- ' ||
192: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
193:

Line 191: arp_standard.debug('arp_auto_rule.assign_glp_rec()- ' ||

187: END LOOP;
188:
189: arp_standard.debug('glp table index rec = '||glp_index_rec);
190:
191: arp_standard.debug('arp_auto_rule.assign_glp_rec()- ' ||
192: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
193:
194: END assign_glp_rec;
195:

Line 261: arp_standard.debug('arp_auto_rule.populate_glp_table()+ ' ||

257: last_good_date DATE;
258:
259: BEGIN
260: IF PG_DEBUG in ('Y', 'C') THEN
261: arp_standard.debug('arp_auto_rule.populate_glp_table()+ ' ||
262: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
263: arp_standard.debug('Populating gl_period_statuses table.');
264: END IF;
265:

Line 263: arp_standard.debug('Populating gl_period_statuses table.');

259: BEGIN
260: IF PG_DEBUG in ('Y', 'C') THEN
261: arp_standard.debug('arp_auto_rule.populate_glp_table()+ ' ||
262: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
263: arp_standard.debug('Populating gl_period_statuses table.');
264: END IF;
265:
266: /* Bug 2133254 - only call this the first time in for a given SOB */
267: /* Bug 3879222 - moved this logic inside the procedure */

Line 270: sob_id <> arp_standard.sysparm.set_of_books_id)

266: /* Bug 2133254 - only call this the first time in for a given SOB */
267: /* Bug 3879222 - moved this logic inside the procedure */
268: /* NOTE: sob_id is a global that gets set the first time it executes */
269: IF (sob_id is null OR
270: sob_id <> arp_standard.sysparm.set_of_books_id)
271: THEN
272: IF PG_DEBUG in ('Y', 'C') THEN
273: arp_standard.debug( 'glp tables need to be built' ||
274: ' sob_id: ' || sob_id);

Line 273: arp_standard.debug( 'glp tables need to be built' ||

269: IF (sob_id is null OR
270: sob_id <> arp_standard.sysparm.set_of_books_id)
271: THEN
272: IF PG_DEBUG in ('Y', 'C') THEN
273: arp_standard.debug( 'glp tables need to be built' ||
274: ' sob_id: ' || sob_id);
275: END IF;
276:
277: sob_id := arp_standard.sysparm.set_of_books_id;

Line 277: sob_id := arp_standard.sysparm.set_of_books_id;

273: arp_standard.debug( 'glp tables need to be built' ||
274: ' sob_id: ' || sob_id);
275: END IF;
276:
277: sob_id := arp_standard.sysparm.set_of_books_id;
278:
279: /* Original logic starts here */
280: g_rows := 0;
281:

Line 289: arp_standard.debug('Row ['|| g_rows ||']: Start Dt <' ||

285: gl_start_t(g_rows) := gl_period_rec.start_date;
286: gl_end_t(g_rows) := gl_period_rec.end_date;
287: gl_status_t(g_rows) := gl_period_rec.closing_status;
288: IF PG_DEBUG in ('Y', 'C') THEN
289: arp_standard.debug('Row ['|| g_rows ||']: Start Dt <' ||
290: gl_period_rec.start_date || '> End Date <' || gl_period_rec.end_date
291: || '> Status <' || gl_period_rec.closing_status || '>');
292: END IF;
293:

Line 317: arp_standard.debug('arp_auto_rule.populate_glp_table()- ');

313:
314: END IF; /* end of call-once case */
315:
316: IF PG_DEBUG in ('Y', 'C') THEN
317: arp_standard.debug('arp_auto_rule.populate_glp_table()- ');
318: END IF;
319:
320: END populate_glp_table;
321:

Line 353: arp_standard.debug( 'arp_auto_rule.refresh()+ ' ||

349: Retcode OUT NOCOPY VARCHAR2) IS
350: BEGIN
351:
352: IF PG_DEBUG in ('Y', 'C') THEN
353: arp_standard.debug( 'arp_auto_rule.refresh()+ ' ||
354: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
355: END IF;
356:
357: SAVEPOINT AR_PERIODS_1;

Line 360: arp_standard.debug('Updating ar_period_types: ');

356:
357: SAVEPOINT AR_PERIODS_1;
358:
359: IF PG_DEBUG in ('Y', 'C') THEN
360: arp_standard.debug('Updating ar_period_types: ');
361: END IF;
362:
363: UPDATE ar_period_types apt
364: SET

Line 382: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));

378: AND g.adjustment_period_flag = 'N'
379: );
380:
381: IF PG_DEBUG in ('Y', 'C') THEN
382: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
383: arp_standard.debug('Inserting into ar_period_types: ');
384: END IF;
385:
386: INSERT

Line 383: arp_standard.debug('Inserting into ar_period_types: ');

379: );
380:
381: IF PG_DEBUG in ('Y', 'C') THEN
382: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
383: arp_standard.debug('Inserting into ar_period_types: ');
384: END IF;
385:
386: INSERT
387: INTO ar_period_types

Line 407: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));

403: GROUP BY period_type
404: );
405:
406: IF PG_DEBUG in ('Y', 'C') THEN
407: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
408: arp_standard.debug('Deleting redundent ar_periods: ');
409: END IF;
410:
411: DELETE

Line 408: arp_standard.debug('Deleting redundent ar_periods: ');

404: );
405:
406: IF PG_DEBUG in ('Y', 'C') THEN
407: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
408: arp_standard.debug('Deleting redundent ar_periods: ');
409: END IF;
410:
411: DELETE
412: FROM ar_periods ap

Line 424: arp_standard.debug('row(s) deleted: ' || TO_CHAR(sql%rowcount));

420: AND gp.adjustment_period_flag = 'N'
421: );
422:
423: IF PG_DEBUG in ('Y', 'C') THEN
424: arp_standard.debug('row(s) deleted: ' || TO_CHAR(sql%rowcount));
425: arp_standard.debug('Updating start, end dates in ar_periods: ');
426: END IF;
427:
428: UPDATE ar_periods ap

Line 425: arp_standard.debug('Updating start, end dates in ar_periods: ');

421: );
422:
423: IF PG_DEBUG in ('Y', 'C') THEN
424: arp_standard.debug('row(s) deleted: ' || TO_CHAR(sql%rowcount));
425: arp_standard.debug('Updating start, end dates in ar_periods: ');
426: END IF;
427:
428: UPDATE ar_periods ap
429: SET

Line 452: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));

448: )
449: );
450:
451: IF PG_DEBUG in ('Y', 'C') THEN
452: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
453: arp_standard.debug('Inserting into ar_periods: ');
454: END IF;
455:
456: INSERT

Line 453: arp_standard.debug('Inserting into ar_periods: ');

449: );
450:
451: IF PG_DEBUG in ('Y', 'C') THEN
452: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
453: arp_standard.debug('Inserting into ar_periods: ');
454: END IF;
455:
456: INSERT
457: INTO ar_periods

Line 479: arp_standard.debug('row(s) inserted: ' || TO_CHAR(sql%rowcount));

475: )
476: );
477:
478: IF PG_DEBUG in ('Y', 'C') THEN
479: arp_standard.debug('row(s) inserted: ' || TO_CHAR(sql%rowcount));
480: arp_standard.debug('Updating period sequence number in ar_periods: ');
481: END IF;
482:
483: UPDATE ar_periods p1

Line 480: arp_standard.debug('Updating period sequence number in ar_periods: ');

476: );
477:
478: IF PG_DEBUG in ('Y', 'C') THEN
479: arp_standard.debug('row(s) inserted: ' || TO_CHAR(sql%rowcount));
480: arp_standard.debug('Updating period sequence number in ar_periods: ');
481: END IF;
482:
483: UPDATE ar_periods p1
484: SET

Line 504: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));

500: AND p1.start_date >= p2.start_date
501: );
502:
503: IF PG_DEBUG in ('Y', 'C') THEN
504: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
505: arp_standard.debug( 'arp_auto_rule.refresh()- ' ||
506: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
507: END IF;
508:

Line 505: arp_standard.debug( 'arp_auto_rule.refresh()- ' ||

501: );
502:
503: IF PG_DEBUG in ('Y', 'C') THEN
504: arp_standard.debug('row(s) updated: ' || TO_CHAR(sql%rowcount));
505: arp_standard.debug( 'arp_auto_rule.refresh()- ' ||
506: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
507: END IF;
508:
509: EXCEPTION

Line 513: arp_standard.debug('Exception occured in: arp_auto_rule.refresh()');

509: EXCEPTION
510: WHEN OTHERS THEN
511:
512: IF PG_DEBUG in ('Y', 'C') THEN
513: arp_standard.debug('Exception occured in: arp_auto_rule.refresh()');
514: END IF;
515:
516: ROLLBACK TO SAVEPOINT AR_PERIODS_1;
517: RAISE;

Line 562: populate_glp_table(arp_standard.sysparm.set_of_books_id,

558: l_temp_index NUMBER;
559:
560: BEGIN
561: /* Populate the GL periods PL/SQL table. */
562: populate_glp_table(arp_standard.sysparm.set_of_books_id,
563: arp_standard.application_id);
564:
565: /* 3879222 - Added NVLs to accomodate external
566: calls to this routine. Also attempt to set

Line 563: arp_standard.application_id);

559:
560: BEGIN
561: /* Populate the GL periods PL/SQL table. */
562: populate_glp_table(arp_standard.sysparm.set_of_books_id,
563: arp_standard.application_id);
564:
565: /* 3879222 - Added NVLs to accomodate external
566: calls to this routine. Also attempt to set
567: a start index for subsequent calls */

Line 602: arp_standard.debug('ERROR: Unable to find period for ' || p_gl_date);

598:
599: /* NOTE: This only executes if the loop falls through without
600: finding a period for the passed date. It is a soft error
601: condition */
602: arp_standard.debug('ERROR: Unable to find period for ' || p_gl_date);
603:
604: FOR i IN 1..g_rows LOOP
605:
606: IF PG_DEBUG in ('Y', 'C') THEN

Line 607: arp_standard.debug(

603:
604: FOR i IN 1..g_rows LOOP
605:
606: IF PG_DEBUG in ('Y', 'C') THEN
607: arp_standard.debug(
608: 'index = '||i||', '||
609: TO_CHAR(gl_start_t(i), 'DD-MON-RRRR')||', '||
610: TO_CHAR(gl_end_t(i), 'DD-MON-RRRR')||', '||
611: gl_status_t(i)||', '||

Line 656: populate_glp_table(arp_standard.sysparm.set_of_books_id,

652:
653: BEGIN
654:
655: /* Populate the GL periods PL/SQL table. */
656: populate_glp_table(arp_standard.sysparm.set_of_books_id,
657: arp_standard.application_id);
658:
659: IF (gl_status_t(glp_index_rec) IN ('O', 'F', 'N') )
660: THEN

Line 657: arp_standard.application_id);

653: BEGIN
654:
655: /* Populate the GL periods PL/SQL table. */
656: populate_glp_table(arp_standard.sysparm.set_of_books_id,
657: arp_standard.application_id);
658:
659: IF (gl_status_t(glp_index_rec) IN ('O', 'F', 'N') )
660: THEN
661: RETURN( p_gl_date );

Line 727: l_standard_rules NUMBER;

723: /* bug 3477990 */
724: l_return_status NUMBER;
725:
726: /* 9560174 */
727: l_standard_rules NUMBER;
728: l_pprr_rules NUMBER;
729: l_max_rule_end_date DATE;
730: l_need_rev_rec VARCHAR2(1);
731: BEGIN

Line 734: arp_standard.debug( 'arp_auto_rule.create_assignments()+ ' ||

730: l_need_rev_rec VARCHAR2(1);
731: BEGIN
732:
733: IF PG_DEBUG in ('Y', 'C') THEN
734: arp_standard.debug( 'arp_auto_rule.create_assignments()+ ' ||
735: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
736: END IF;
737:
738: SELECT

Line 750: arp_standard.debug('rec date: ' ||

746: AND account_set_flag = 'Y'
747: AND customer_trx_id = p_trx_id ;
748:
749: IF PG_DEBUG in ('Y', 'C') THEN
750: arp_standard.debug('rec date: ' ||
751: TO_CHAR(rec_gl_date));
752: END IF;
753:
754: /* Bug 2143064 - Added ORDERED hint */

Line 768: arp_standard.debug('min date: ' ||

764: customer_trx_id = p_trx_id
765: AND period_set_name = p_period_set_name ;
766:
767: IF PG_DEBUG in ('Y', 'C') THEN
768: arp_standard.debug('min date: ' ||
769: TO_CHAR(min_gl_date) || ', max date: '||
770: TO_CHAR(max_gl_date));
771: END IF;
772:

Line 776: arp_standard.debug('Min/Max gl_dates are NULL!!. Check trx..');

772:
773: IF ( min_gl_date IS NULL OR max_gl_date IS NULL )
774: THEN
775: IF PG_DEBUG in ('Y', 'C') THEN
776: arp_standard.debug('Min/Max gl_dates are NULL!!. Check trx..');
777: END IF;
778: RETURN ( -2 );
779: END IF;
780:

Line 790: arp_standard.debug('before insert....');

786: END IF;
787:
788: assign_glp_rec;
789: IF PG_DEBUG in ('Y', 'C') THEN
790: arp_standard.debug('before insert....');
791: arp_standard.debug('g_rev_mgt_installed : ' ||g_rev_mgt_installed);
792: END IF;
793:
794: /* 9560174 - determine if A/ACC_DUR and/or PPRR rules exist and

Line 791: arp_standard.debug('g_rev_mgt_installed : ' ||g_rev_mgt_installed);

787:
788: assign_glp_rec;
789: IF PG_DEBUG in ('Y', 'C') THEN
790: arp_standard.debug('before insert....');
791: arp_standard.debug('g_rev_mgt_installed : ' ||g_rev_mgt_installed);
792: END IF;
793:
794: /* 9560174 - determine if A/ACC_DUR and/or PPRR rules exist and
795: execute the correct insert(s) accordingly. */

Line 801: INTO l_standard_rules,

797: SELECT sum(decode(substr(rl.type,1,1),'A',1,0)),
798: sum(decode(substr(rl.type,1,1),'P',1,0)),
799: NVL(min(gld.account_set_flag),'Y'),
800: max(tl.rule_end_date)
801: INTO l_standard_rules,
802: l_pprr_rules,
803: l_need_rev_rec,
804: l_max_rule_end_date
805: FROM ra_customer_trx_lines tl,

Line 818: arp_standard.debug('EXCEPTION: detection of standard/pprr rules failed.');

814: AND gld.latest_rec_flag (+) = 'Y';
815:
816: EXCEPTION
817: WHEN OTHERS THEN
818: arp_standard.debug('EXCEPTION: detection of standard/pprr rules failed.');
819: /* insure that both versions of the insert fire */
820: l_standard_rules := 1;
821: l_pprr_rules := 1;
822: END;

Line 820: l_standard_rules := 1;

816: EXCEPTION
817: WHEN OTHERS THEN
818: arp_standard.debug('EXCEPTION: detection of standard/pprr rules failed.');
819: /* insure that both versions of the insert fire */
820: l_standard_rules := 1;
821: l_pprr_rules := 1;
822: END;
823:
824: IF PG_DEBUG in ('Y','C')

Line 826: arp_standard.debug('A/ACC_DUR = ' || l_standard_rules);

822: END;
823:
824: IF PG_DEBUG in ('Y','C')
825: THEN
826: arp_standard.debug('A/ACC_DUR = ' || l_standard_rules);
827: arp_standard.debug('PPRR = ' || l_pprr_rules);
828: arp_standard.debug('need RR = ' || l_need_rev_rec);
829: END IF;
830:

Line 827: arp_standard.debug('PPRR = ' || l_pprr_rules);

823:
824: IF PG_DEBUG in ('Y','C')
825: THEN
826: arp_standard.debug('A/ACC_DUR = ' || l_standard_rules);
827: arp_standard.debug('PPRR = ' || l_pprr_rules);
828: arp_standard.debug('need RR = ' || l_need_rev_rec);
829: END IF;
830:
831: IF l_need_rev_rec = 'Y'

Line 828: arp_standard.debug('need RR = ' || l_need_rev_rec);

824: IF PG_DEBUG in ('Y','C')
825: THEN
826: arp_standard.debug('A/ACC_DUR = ' || l_standard_rules);
827: arp_standard.debug('PPRR = ' || l_pprr_rules);
828: arp_standard.debug('need RR = ' || l_need_rev_rec);
829: END IF;
830:
831: IF l_need_rev_rec = 'Y'
832: THEN

Line 835: IF l_standard_rules > 0

831: IF l_need_rev_rec = 'Y'
832: THEN
833:
834: /* if A/ACC_DUR rules */
835: IF l_standard_rules > 0
836: THEN
837:
838: INSERT INTO ra_cust_trx_line_gl_dist /* REV lines */
839: (

Line 868: arp_standard.sysparm.set_of_books_id, /* set_of_books_id */

864: SELECT /*+ ORDERED */
865: ass.customer_trx_line_id, /* customer_trx_line_id */
866: lines.customer_trx_id, /* customer_trx_id */
867: dist.code_combination_id, /* code_combination_id */
868: arp_standard.sysparm.set_of_books_id, /* set_of_books_id */
869: ass.account_class, /* account_class */
870: 'N', /* account_set_flag */
871: ROUND(
872: (DECODE(fc.minimum_accountable_unit,

Line 942: arp_standard.profile.request_id,

938: ), /* derived gl_date */
939: DECODE(dist.customer_trx_id, header.customer_trx_id,
940: dist.cust_trx_line_salesrep_id,
941: cmsrep.cust_trx_line_salesrep_id), /* cust_trx_line_salesrep_id */
942: arp_standard.profile.request_id,
943: arp_standard.application_id,
944: arp_standard.profile.program_id,
945: sysdate,
946: sysdate,

Line 943: arp_standard.application_id,

939: DECODE(dist.customer_trx_id, header.customer_trx_id,
940: dist.cust_trx_line_salesrep_id,
941: cmsrep.cust_trx_line_salesrep_id), /* cust_trx_line_salesrep_id */
942: arp_standard.profile.request_id,
943: arp_standard.application_id,
944: arp_standard.profile.program_id,
945: sysdate,
946: sysdate,
947: arp_standard.profile.user_id,

Line 944: arp_standard.profile.program_id,

940: dist.cust_trx_line_salesrep_id,
941: cmsrep.cust_trx_line_salesrep_id), /* cust_trx_line_salesrep_id */
942: arp_standard.profile.request_id,
943: arp_standard.application_id,
944: arp_standard.profile.program_id,
945: sysdate,
946: sysdate,
947: arp_standard.profile.user_id,
948: sysdate,

Line 947: arp_standard.profile.user_id,

943: arp_standard.application_id,
944: arp_standard.profile.program_id,
945: sysdate,
946: sysdate,
947: arp_standard.profile.user_id,
948: sysdate,
949: arp_standard.profile.user_id,
950: -3,
951: ass.gl_date, /* original_gl_date */

Line 949: arp_standard.profile.user_id,

945: sysdate,
946: sysdate,
947: arp_standard.profile.user_id,
948: sysdate,
949: arp_standard.profile.user_id,
950: -3,
951: ass.gl_date, /* original_gl_date */
952: ra_cust_trx_line_gl_dist_s.NEXTVAL, /* cust_trx_line_gl_dist_id */
953: header.org_id

Line 1033: arp_standard.debug('Revenue lines inserted (A/ACC_DUR rules): ' ||

1029:
1030: l_rows := sql%rowcount;
1031:
1032: IF PG_DEBUG in ('Y', 'C') THEN
1033: arp_standard.debug('Revenue lines inserted (A/ACC_DUR rules): ' ||
1034: l_rows);
1035: END IF;
1036: END IF; /* end of A/ACC_DUR rules */
1037:

Line 1051: WHERE B.SET_OF_BOOKS_ID = arp_standard.sysparm.set_of_books_id

1047: SELECT G.period_name
1048: INTO l_period_name
1049: FROM GL_PERIOD_STATUSES G,
1050: GL_SETS_OF_BOOKS B
1051: WHERE B.SET_OF_BOOKS_ID = arp_standard.sysparm.set_of_books_id
1052: AND G.SET_OF_BOOKS_ID = B.SET_OF_BOOKS_ID
1053: AND G.PERIOD_TYPE = B.ACCOUNTED_PERIOD_TYPE
1054: AND G.APPLICATION_ID = 222
1055: AND G.ADJUSTMENT_PERIOD_FLAG = 'N'

Line 1062: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments() - rule_end_date');

1058:
1059: EXCEPTION
1060: WHEN OTHERS THEN
1061: IF PG_DEBUG in ('Y', 'C') THEN
1062: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments() - rule_end_date');
1063: arp_standard.debug(SQLERRM);
1064: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||
1065: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1066: END IF;

Line 1063: arp_standard.debug(SQLERRM);

1059: EXCEPTION
1060: WHEN OTHERS THEN
1061: IF PG_DEBUG in ('Y', 'C') THEN
1062: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments() - rule_end_date');
1063: arp_standard.debug(SQLERRM);
1064: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||
1065: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1066: END IF;
1067:

Line 1064: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||

1060: WHEN OTHERS THEN
1061: IF PG_DEBUG in ('Y', 'C') THEN
1062: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments() - rule_end_date');
1063: arp_standard.debug(SQLERRM);
1064: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||
1065: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1066: END IF;
1067:
1068: return -2; --fail and reset indexes

Line 1102: arp_standard.sysparm.set_of_books_id, /* set_of_books_id */

1098: SELECT /*+ ORDERED */
1099: ass.customer_trx_line_id, /* customer_trx_line_id */
1100: lines.customer_trx_id, /* customer_trx_id */
1101: dist.code_combination_id, /* code_combination_id */
1102: arp_standard.sysparm.set_of_books_id, /* set_of_books_id */
1103: ass.account_class, /* account_class */
1104: 'N', /* account_set_flag */
1105: ROUND(
1106: (DECODE(fc.minimum_accountable_unit,

Line 1176: arp_standard.profile.request_id,

1172: ), /* derived gl_date */
1173: DECODE(dist.customer_trx_id, header.customer_trx_id,
1174: dist.cust_trx_line_salesrep_id,
1175: cmsrep.cust_trx_line_salesrep_id), /* cust_trx_line_salesrep_id */
1176: arp_standard.profile.request_id,
1177: arp_standard.application_id,
1178: arp_standard.profile.program_id,
1179: sysdate,
1180: sysdate,

Line 1177: arp_standard.application_id,

1173: DECODE(dist.customer_trx_id, header.customer_trx_id,
1174: dist.cust_trx_line_salesrep_id,
1175: cmsrep.cust_trx_line_salesrep_id), /* cust_trx_line_salesrep_id */
1176: arp_standard.profile.request_id,
1177: arp_standard.application_id,
1178: arp_standard.profile.program_id,
1179: sysdate,
1180: sysdate,
1181: arp_standard.profile.user_id,

Line 1178: arp_standard.profile.program_id,

1174: dist.cust_trx_line_salesrep_id,
1175: cmsrep.cust_trx_line_salesrep_id), /* cust_trx_line_salesrep_id */
1176: arp_standard.profile.request_id,
1177: arp_standard.application_id,
1178: arp_standard.profile.program_id,
1179: sysdate,
1180: sysdate,
1181: arp_standard.profile.user_id,
1182: sysdate,

Line 1181: arp_standard.profile.user_id,

1177: arp_standard.application_id,
1178: arp_standard.profile.program_id,
1179: sysdate,
1180: sysdate,
1181: arp_standard.profile.user_id,
1182: sysdate,
1183: arp_standard.profile.user_id,
1184: -3,
1185: ass.gl_date, /* original_gl_date */

Line 1183: arp_standard.profile.user_id,

1179: sysdate,
1180: sysdate,
1181: arp_standard.profile.user_id,
1182: sysdate,
1183: arp_standard.profile.user_id,
1184: -3,
1185: ass.gl_date, /* original_gl_date */
1186: ra_cust_trx_line_gl_dist_s.NEXTVAL, /* cust_trx_line_gl_dist_id */
1187: header.org_id

Line 1270: arp_standard.debug('Revenue lines inserted for PPRR rules: ' ||

1266: final return */
1267: l_rows1 := sql%rowcount;
1268:
1269: IF PG_DEBUG in ('Y', 'C') THEN
1270: arp_standard.debug('Revenue lines inserted for PPRR rules: ' ||
1271: l_rows1);
1272: END IF;
1273:
1274: END IF; /* end PPRR rules */

Line 1279: arp_standard.debug('Distributions already exist');

1275: ELSE
1276: /* dists already generated */
1277: IF PG_DEBUG in ('Y','C')
1278: THEN
1279: arp_standard.debug('Distributions already exist');
1280: END IF;
1281: END IF;
1282: l_rows := nvl(l_rows,0) + nvl(l_rows1,0);
1283:

Line 1285: arp_standard.debug('Revenue lines inserted total: ' ||

1281: END IF;
1282: l_rows := nvl(l_rows,0) + nvl(l_rows1,0);
1283:
1284: IF PG_DEBUG in ('Y', 'C') THEN
1285: arp_standard.debug('Revenue lines inserted total: ' ||
1286: l_rows);
1287: arp_standard.debug('arp_auto_rule.create_assignments()- ' ||
1288: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1289: END IF;

Line 1287: arp_standard.debug('arp_auto_rule.create_assignments()- ' ||

1283:
1284: IF PG_DEBUG in ('Y', 'C') THEN
1285: arp_standard.debug('Revenue lines inserted total: ' ||
1286: l_rows);
1287: arp_standard.debug('arp_auto_rule.create_assignments()- ' ||
1288: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1289: END IF;
1290:
1291: RETURN( l_rows);

Line 1297: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments()');

1293: EXCEPTION
1294: WHEN OTHERS THEN
1295:
1296: IF PG_DEBUG in ('Y', 'C') THEN
1297: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments()');
1298: arp_standard.debug(SQLERRM);
1299: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||
1300: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1301: END IF;

Line 1298: arp_standard.debug(SQLERRM);

1294: WHEN OTHERS THEN
1295:
1296: IF PG_DEBUG in ('Y', 'C') THEN
1297: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments()');
1298: arp_standard.debug(SQLERRM);
1299: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||
1300: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1301: END IF;
1302:

Line 1299: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||

1295:
1296: IF PG_DEBUG in ('Y', 'C') THEN
1297: arp_standard.debug('EXCEPTION: arp_auto_rule.create_assignments()');
1298: arp_standard.debug(SQLERRM);
1299: arp_standard.debug( 'arp_auto_rule.create_assignments()- ' ||
1300: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1301: END IF;
1302:
1303: RETURN( -1 );

Line 1361: arp_standard.debug( 'arp_auto_rule.create_other_receivable()+ ' ||

1357:
1358: BEGIN
1359:
1360: IF PG_DEBUG in ('Y', 'C') THEN
1361: arp_standard.debug( 'arp_auto_rule.create_other_receivable()+ ' ||
1362: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1363: END IF;
1364:
1365: INSERT INTO ra_cust_trx_line_gl_dist /* REC line */

Line 1394: arp_standard.sysparm.set_of_books_id,

1390: RULE hint and changed subquery join (below) */
1391: SELECT
1392: rec.customer_trx_id,
1393: rec.code_combination_id,
1394: arp_standard.sysparm.set_of_books_id,
1395: rec.account_class,
1396: 'N', /* account_set_flag */
1397: 'Y', /* latest_rec_flag */
1398: rec.percent,

Line 1405: arp_standard.profile.request_id,

1401: DECODE(rec.gl_date,
1402: NULL, NULL,
1403: assign_gl_rec(rec.gl_date)
1404: ), /* derived gl_date */
1405: arp_standard.profile.request_id,
1406: arp_standard.profile.user_id,
1407: sysdate,
1408: arp_standard.profile.user_id,
1409: sysdate,

Line 1406: arp_standard.profile.user_id,

1402: NULL, NULL,
1403: assign_gl_rec(rec.gl_date)
1404: ), /* derived gl_date */
1405: arp_standard.profile.request_id,
1406: arp_standard.profile.user_id,
1407: sysdate,
1408: arp_standard.profile.user_id,
1409: sysdate,
1410: arp_standard.application_id,

Line 1408: arp_standard.profile.user_id,

1404: ), /* derived gl_date */
1405: arp_standard.profile.request_id,
1406: arp_standard.profile.user_id,
1407: sysdate,
1408: arp_standard.profile.user_id,
1409: sysdate,
1410: arp_standard.application_id,
1411: arp_standard.profile.program_id,
1412: sysdate,

Line 1410: arp_standard.application_id,

1406: arp_standard.profile.user_id,
1407: sysdate,
1408: arp_standard.profile.user_id,
1409: sysdate,
1410: arp_standard.application_id,
1411: arp_standard.profile.program_id,
1412: sysdate,
1413: -3, /* posting_control_id */
1414: NVL(NVL(rec.original_gl_date, rec.gl_date), header.trx_date),

Line 1411: arp_standard.profile.program_id,

1407: sysdate,
1408: arp_standard.profile.user_id,
1409: sysdate,
1410: arp_standard.application_id,
1411: arp_standard.profile.program_id,
1412: sysdate,
1413: -3, /* posting_control_id */
1414: NVL(NVL(rec.original_gl_date, rec.gl_date), header.trx_date),
1415: ra_cust_trx_line_gl_dist_s.NEXTVAL,

Line 1442: arp_standard.debug('REC lines inserted: ' ||

1438: );
1439: l_rows := sql%rowcount;
1440:
1441: IF PG_DEBUG in ('Y', 'C') THEN
1442: arp_standard.debug('REC lines inserted: ' ||
1443: l_rows);
1444: END IF;
1445:
1446: IF PG_DEBUG in ('Y', 'C') THEN

Line 1447: arp_standard.debug( 'create_other_receivable(-)');

1443: l_rows);
1444: END IF;
1445:
1446: IF PG_DEBUG in ('Y', 'C') THEN
1447: arp_standard.debug( 'create_other_receivable(-)');
1448: END IF;
1449:
1450:
1451: /* Erase the latest_rec_flag of the receivable account set

Line 1462: last_updated_by = arp_standard.profile.user_id,

1458:
1459: UPDATE ra_cust_trx_line_gl_dist
1460: SET
1461: latest_rec_flag = 'N',
1462: last_updated_by = arp_standard.profile.user_id,
1463: last_update_date = sysdate
1464: WHERE
1465: account_set_flag = 'Y'
1466: AND account_class = 'REC'

Line 1486: arp_standard.debug('arp_auto_rule.create_other_receivable(): Change Payment Schedule Gl Date');

1482:
1483: /* bug 1947192 */
1484: FOR i IN c_update_ps(p_trx_id) LOOP
1485: IF PG_DEBUG in ('Y', 'C') THEN
1486: arp_standard.debug('arp_auto_rule.create_other_receivable(): Change Payment Schedule Gl Date');
1487: END IF;
1488: UPDATE ar_payment_schedules
1489: SET gl_date = i.gl_date ,
1490: last_updated_by = arp_standard.profile.user_id,

Line 1490: last_updated_by = arp_standard.profile.user_id,

1486: arp_standard.debug('arp_auto_rule.create_other_receivable(): Change Payment Schedule Gl Date');
1487: END IF;
1488: UPDATE ar_payment_schedules
1489: SET gl_date = i.gl_date ,
1490: last_updated_by = arp_standard.profile.user_id,
1491: last_update_date = sysdate
1492: WHERE payment_schedule_id = i.ps_id;
1493: END LOOP;
1494:

Line 1496: arp_standard.debug( 'arp_auto_rule.create_other_receivable()- ' ||

1492: WHERE payment_schedule_id = i.ps_id;
1493: END LOOP;
1494:
1495: IF PG_DEBUG in ('Y', 'C') THEN
1496: arp_standard.debug( 'arp_auto_rule.create_other_receivable()- ' ||
1497: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1498: END IF;
1499:
1500: RETURN( l_rows );

Line 1506: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_receivable()');

1502: EXCEPTION
1503: WHEN OTHERS THEN
1504:
1505: IF PG_DEBUG in ('Y', 'C') THEN
1506: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_receivable()');
1507: arp_standard.debug( SQLERRM);
1508: arp_standard.debug( 'arp_auto_rule.create_other_receivable()- ' ||
1509: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1510: END IF;

Line 1507: arp_standard.debug( SQLERRM);

1503: WHEN OTHERS THEN
1504:
1505: IF PG_DEBUG in ('Y', 'C') THEN
1506: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_receivable()');
1507: arp_standard.debug( SQLERRM);
1508: arp_standard.debug( 'arp_auto_rule.create_other_receivable()- ' ||
1509: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1510: END IF;
1511:

Line 1508: arp_standard.debug( 'arp_auto_rule.create_other_receivable()- ' ||

1504:
1505: IF PG_DEBUG in ('Y', 'C') THEN
1506: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_receivable()');
1507: arp_standard.debug( SQLERRM);
1508: arp_standard.debug( 'arp_auto_rule.create_other_receivable()- ' ||
1509: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1510: END IF;
1511:
1512: RETURN( -1 );

Line 1562: arp_standard.debug( 'arp_auto_rule.create_round()+ ' ||

1558:
1559: BEGIN
1560:
1561: IF PG_DEBUG in ('Y', 'C') THEN
1562: arp_standard.debug( 'arp_auto_rule.create_round()+ ' ||
1563: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1564: END IF;
1565:
1566:

Line 1595: arp_standard.sysparm.set_of_books_id,

1591: )
1592: SELECT
1593: rec.customer_trx_id,
1594: rec.code_combination_id,
1595: arp_standard.sysparm.set_of_books_id,
1596: rec.account_class,
1597: 'N', /* account_set_flag */
1598: null, /* latest_rec_flag */
1599: rec.percent,

Line 1603: arp_standard.profile.request_id,

1599: rec.percent,
1600: rec.amount,
1601: rec.acctd_amount,
1602: rrec.gl_date, /* 2172061 - now fetches date from REC row */
1603: arp_standard.profile.request_id,
1604: arp_standard.profile.user_id,
1605: sysdate,
1606: arp_standard.profile.user_id,
1607: sysdate,

Line 1604: arp_standard.profile.user_id,

1600: rec.amount,
1601: rec.acctd_amount,
1602: rrec.gl_date, /* 2172061 - now fetches date from REC row */
1603: arp_standard.profile.request_id,
1604: arp_standard.profile.user_id,
1605: sysdate,
1606: arp_standard.profile.user_id,
1607: sysdate,
1608: arp_standard.application_id,

Line 1606: arp_standard.profile.user_id,

1602: rrec.gl_date, /* 2172061 - now fetches date from REC row */
1603: arp_standard.profile.request_id,
1604: arp_standard.profile.user_id,
1605: sysdate,
1606: arp_standard.profile.user_id,
1607: sysdate,
1608: arp_standard.application_id,
1609: arp_standard.profile.program_id,
1610: sysdate,

Line 1608: arp_standard.application_id,

1604: arp_standard.profile.user_id,
1605: sysdate,
1606: arp_standard.profile.user_id,
1607: sysdate,
1608: arp_standard.application_id,
1609: arp_standard.profile.program_id,
1610: sysdate,
1611: -3, /* posting_control_id */
1612: NVL(NVL(rec.original_gl_date, rec.gl_date), header.trx_date),

Line 1609: arp_standard.profile.program_id,

1605: sysdate,
1606: arp_standard.profile.user_id,
1607: sysdate,
1608: arp_standard.application_id,
1609: arp_standard.profile.program_id,
1610: sysdate,
1611: -3, /* posting_control_id */
1612: NVL(NVL(rec.original_gl_date, rec.gl_date), header.trx_date),
1613: ra_cust_trx_line_gl_dist_s.nextval,

Line 1643: arp_standard.debug( 'ROUND lines inserted: ' ||

1639:
1640: l_rows := sql%rowcount;
1641:
1642: IF PG_DEBUG in ('Y', 'C') THEN
1643: arp_standard.debug( 'ROUND lines inserted: ' ||
1644: l_rows);
1645: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||
1646: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1647: END IF;

Line 1645: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||

1641:
1642: IF PG_DEBUG in ('Y', 'C') THEN
1643: arp_standard.debug( 'ROUND lines inserted: ' ||
1644: l_rows);
1645: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||
1646: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1647: END IF;
1648:
1649: RETURN( l_rows);

Line 1655: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_round()');

1651: EXCEPTION
1652: WHEN OTHERS THEN
1653:
1654: IF PG_DEBUG in ('Y', 'C') THEN
1655: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_round()');
1656: arp_standard.debug( SQLERRM);
1657: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||
1658: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1659: END IF;

Line 1656: arp_standard.debug( SQLERRM);

1652: WHEN OTHERS THEN
1653:
1654: IF PG_DEBUG in ('Y', 'C') THEN
1655: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_round()');
1656: arp_standard.debug( SQLERRM);
1657: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||
1658: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1659: END IF;
1660:

Line 1657: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||

1653:
1654: IF PG_DEBUG in ('Y', 'C') THEN
1655: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_round()');
1656: arp_standard.debug( SQLERRM);
1657: arp_standard.debug( 'arp_auto_rule.create_round()- ' ||
1658: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1659: END IF;
1660:
1661: RETURN( -1 );

Line 1740: arp_standard.debug( 'arp_auto_rule.create_other_plug()+ ' ||

1736:
1737: BEGIN
1738:
1739: IF PG_DEBUG in ('Y', 'C') THEN
1740: arp_standard.debug( 'arp_auto_rule.create_other_plug()+ ' ||
1741: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1742: arp_standard.debug(' use_inv_acctg = ' || g_use_inv_acctg);
1743: END IF;
1744:

Line 1742: arp_standard.debug(' use_inv_acctg = ' || g_use_inv_acctg);

1738:
1739: IF PG_DEBUG in ('Y', 'C') THEN
1740: arp_standard.debug( 'arp_auto_rule.create_other_plug()+ ' ||
1741: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
1742: arp_standard.debug(' use_inv_acctg = ' || g_use_inv_acctg);
1743: END IF;
1744:
1745: /* Bug 3550426 */
1746: SELECT cust_trx_type_id ,

Line 1755: arp_standard.debug(' prev ct id ' || l_prev_cust_trx_id);

1751: l_prev_cust_trx_id
1752: FROM ra_customer_trx
1753: WHERE customer_trx_id = p_trx_id;
1754:
1755: arp_standard.debug(' prev ct id ' || l_prev_cust_trx_id);
1756:
1757: l_ctt_type := arpt_sql_func_util.get_trx_type_details(l_ctt_id, 'TYPE') ;
1758: arp_standard.debug(' l_ctt_type ' || l_ctt_type);
1759:

Line 1758: arp_standard.debug(' l_ctt_type ' || l_ctt_type);

1754:
1755: arp_standard.debug(' prev ct id ' || l_prev_cust_trx_id);
1756:
1757: l_ctt_type := arpt_sql_func_util.get_trx_type_details(l_ctt_id, 'TYPE') ;
1758: arp_standard.debug(' l_ctt_type ' || l_ctt_type);
1759:
1760: IF l_ctt_type = 'CM' AND
1761: g_use_inv_acctg = 'Y'
1762: THEN

Line 1767: arp_standard.debug(' l_revrec_run_flag ' || l_revrec_run_flag);

1763: /* 5598773 - no reason to get the l_revrec_run_flag if
1764: use_inv_acctg is 'N' */
1765: l_revrec_run_flag := arpt_sql_func_util.get_revenue_recog_run_flag(l_prev_cust_trx_id,
1766: l_inv_rule_id);
1767: arp_standard.debug(' l_revrec_run_flag ' || l_revrec_run_flag);
1768: END IF;
1769:
1770: IF l_ctt_type in ('INV','DM') /*Bug 4547416*/
1771: OR

Line 1807: arp_standard.sysparm.set_of_books_id,

1803: SELECT
1804: lines.customer_trx_line_id,
1805: lines.customer_trx_id,
1806: psum.code_combination_id,
1807: arp_standard.sysparm.set_of_books_id,
1808: psum.account_class,
1809: 'N', /* account_set_flag */
1810: ROUND((DECODE(psum.account_class,
1811: 'SUSPENSE', (lines.extended_amount -

Line 1885: arp_standard.profile.request_id,

1881: ), /* derived gl_date */
1882: DECODE(psum.customer_trx_id, trx.customer_trx_id,
1883: psum.cust_trx_line_salesrep_id,
1884: cmsrep.cust_trx_line_salesrep_id), /* salescred ID */
1885: arp_standard.profile.request_id,
1886: arp_standard.profile.user_id,
1887: sysdate,
1888: arp_standard.profile.user_id,
1889: sysdate,

Line 1886: arp_standard.profile.user_id,

1882: DECODE(psum.customer_trx_id, trx.customer_trx_id,
1883: psum.cust_trx_line_salesrep_id,
1884: cmsrep.cust_trx_line_salesrep_id), /* salescred ID */
1885: arp_standard.profile.request_id,
1886: arp_standard.profile.user_id,
1887: sysdate,
1888: arp_standard.profile.user_id,
1889: sysdate,
1890: arp_standard.application_id,

Line 1888: arp_standard.profile.user_id,

1884: cmsrep.cust_trx_line_salesrep_id), /* salescred ID */
1885: arp_standard.profile.request_id,
1886: arp_standard.profile.user_id,
1887: sysdate,
1888: arp_standard.profile.user_id,
1889: sysdate,
1890: arp_standard.application_id,
1891: arp_standard.profile.program_id,
1892: sysdate,

Line 1890: arp_standard.application_id,

1886: arp_standard.profile.user_id,
1887: sysdate,
1888: arp_standard.profile.user_id,
1889: sysdate,
1890: arp_standard.application_id,
1891: arp_standard.profile.program_id,
1892: sysdate,
1893: -3, /* posting_control_id */
1894: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),

Line 1891: arp_standard.profile.program_id,

1887: sysdate,
1888: arp_standard.profile.user_id,
1889: sysdate,
1890: arp_standard.application_id,
1891: arp_standard.profile.program_id,
1892: sysdate,
1893: -3, /* posting_control_id */
1894: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),
1895: ra_cust_trx_line_gl_dist_s.NEXTVAL,

Line 2010: arp_standard.sysparm.set_of_books_id,

2006: SELECT
2007: lines.customer_trx_line_id,
2008: lines.customer_trx_id,
2009: psum.code_combination_id,
2010: arp_standard.sysparm.set_of_books_id,
2011: psum.account_class,
2012: 'N', /* account_set_flag */
2013: ROUND((DECODE(psum.account_class,
2014: 'SUSPENSE', (lines.extended_amount -

Line 2088: arp_standard.profile.request_id,

2084: ), /* derived gl_date */
2085: DECODE(psum.customer_trx_id, trx.customer_trx_id,
2086: psum.cust_trx_line_salesrep_id,
2087: cmsrep.cust_trx_line_salesrep_id), /* salescred ID */
2088: arp_standard.profile.request_id,
2089: arp_standard.profile.user_id,
2090: sysdate,
2091: arp_standard.profile.user_id,
2092: sysdate,

Line 2089: arp_standard.profile.user_id,

2085: DECODE(psum.customer_trx_id, trx.customer_trx_id,
2086: psum.cust_trx_line_salesrep_id,
2087: cmsrep.cust_trx_line_salesrep_id), /* salescred ID */
2088: arp_standard.profile.request_id,
2089: arp_standard.profile.user_id,
2090: sysdate,
2091: arp_standard.profile.user_id,
2092: sysdate,
2093: arp_standard.application_id,

Line 2091: arp_standard.profile.user_id,

2087: cmsrep.cust_trx_line_salesrep_id), /* salescred ID */
2088: arp_standard.profile.request_id,
2089: arp_standard.profile.user_id,
2090: sysdate,
2091: arp_standard.profile.user_id,
2092: sysdate,
2093: arp_standard.application_id,
2094: arp_standard.profile.program_id,
2095: sysdate,

Line 2093: arp_standard.application_id,

2089: arp_standard.profile.user_id,
2090: sysdate,
2091: arp_standard.profile.user_id,
2092: sysdate,
2093: arp_standard.application_id,
2094: arp_standard.profile.program_id,
2095: sysdate,
2096: -3, /* posting_control_id */
2097: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),

Line 2094: arp_standard.profile.program_id,

2090: sysdate,
2091: arp_standard.profile.user_id,
2092: sysdate,
2093: arp_standard.application_id,
2094: arp_standard.profile.program_id,
2095: sysdate,
2096: -3, /* posting_control_id */
2097: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),
2098: ra_cust_trx_line_gl_dist_s.NEXTVAL,

Line 2167: arp_standard.debug( 'Other plug lines inserted: ' ||

2163:
2164: END IF;
2165:
2166: IF PG_DEBUG in ('Y', 'C') THEN
2167: arp_standard.debug( 'Other plug lines inserted: ' ||
2168: l_rows);
2169: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2170: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2171: END IF;

Line 2169: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||

2165:
2166: IF PG_DEBUG in ('Y', 'C') THEN
2167: arp_standard.debug( 'Other plug lines inserted: ' ||
2168: l_rows);
2169: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2170: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2171: END IF;
2172:
2173: /*Bug 5450534 FP of bug 5260489*/

Line 2205: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');

2201:
2202: EXCEPTION
2203: WHEN NO_ROF_EXCEPTION THEN
2204: IF PG_DEBUG in ('Y', 'C') THEN
2205: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');
2206: arp_standard.debug( 'set_rec_offset_flag unable to set flag properly');
2207: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2208: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2209: END IF;

Line 2206: arp_standard.debug( 'set_rec_offset_flag unable to set flag properly');

2202: EXCEPTION
2203: WHEN NO_ROF_EXCEPTION THEN
2204: IF PG_DEBUG in ('Y', 'C') THEN
2205: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');
2206: arp_standard.debug( 'set_rec_offset_flag unable to set flag properly');
2207: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2208: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2209: END IF;
2210: RETURN( -1 );

Line 2207: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||

2203: WHEN NO_ROF_EXCEPTION THEN
2204: IF PG_DEBUG in ('Y', 'C') THEN
2205: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');
2206: arp_standard.debug( 'set_rec_offset_flag unable to set flag properly');
2207: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2208: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2209: END IF;
2210: RETURN( -1 );
2211: WHEN OTHERS THEN

Line 2214: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');

2210: RETURN( -1 );
2211: WHEN OTHERS THEN
2212:
2213: IF PG_DEBUG in ('Y', 'C') THEN
2214: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');
2215: arp_standard.debug( SQLERRM);
2216: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2217: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2218: END IF;

Line 2215: arp_standard.debug( SQLERRM);

2211: WHEN OTHERS THEN
2212:
2213: IF PG_DEBUG in ('Y', 'C') THEN
2214: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');
2215: arp_standard.debug( SQLERRM);
2216: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2217: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2218: END IF;
2219:

Line 2216: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||

2212:
2213: IF PG_DEBUG in ('Y', 'C') THEN
2214: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_plug()');
2215: arp_standard.debug( SQLERRM);
2216: arp_standard.debug( 'arp_auto_rule.create_other_plug()- ' ||
2217: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2218: END IF;
2219:
2220: RETURN( -1 );

Line 2262: arp_standard.debug( 'arp_auto_rule.create_other_tax()+ ' ||

2258:
2259: BEGIN
2260:
2261: IF PG_DEBUG in ('Y', 'C') THEN
2262: arp_standard.debug( 'arp_auto_rule.create_other_tax()+ ' ||
2263: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2264: END IF;
2265:
2266: /* 7131147 - ignore autorule_complete_flag on an

Line 2306: arp_standard.sysparm.set_of_books_id,

2302: SELECT
2303: tax_line.customer_trx_line_id,
2304: tax_line.customer_trx_id,
2305: tax.code_combination_id,
2306: arp_standard.sysparm.set_of_books_id,
2307: tax.account_class,
2308: 'N',
2309: tax.percent,
2310: DECODE(fc.minimum_accountable_unit,

Line 2346: arp_standard.profile.request_id,

2342: NULL, NULL,
2343: assign_gl_rec(rec.gl_date)
2344: ), /* derived gl_date */
2345: tax.cust_trx_line_salesrep_id,
2346: arp_standard.profile.request_id,
2347: arp_standard.profile.user_id,
2348: sysdate,
2349: arp_standard.profile.user_id,
2350: sysdate,

Line 2347: arp_standard.profile.user_id,

2343: assign_gl_rec(rec.gl_date)
2344: ), /* derived gl_date */
2345: tax.cust_trx_line_salesrep_id,
2346: arp_standard.profile.request_id,
2347: arp_standard.profile.user_id,
2348: sysdate,
2349: arp_standard.profile.user_id,
2350: sysdate,
2351: arp_standard.application_id,

Line 2349: arp_standard.profile.user_id,

2345: tax.cust_trx_line_salesrep_id,
2346: arp_standard.profile.request_id,
2347: arp_standard.profile.user_id,
2348: sysdate,
2349: arp_standard.profile.user_id,
2350: sysdate,
2351: arp_standard.application_id,
2352: arp_standard.profile.program_id,
2353: sysdate,

Line 2351: arp_standard.application_id,

2347: arp_standard.profile.user_id,
2348: sysdate,
2349: arp_standard.profile.user_id,
2350: sysdate,
2351: arp_standard.application_id,
2352: arp_standard.profile.program_id,
2353: sysdate,
2354: -3,
2355: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),

Line 2352: arp_standard.profile.program_id,

2348: sysdate,
2349: arp_standard.profile.user_id,
2350: sysdate,
2351: arp_standard.application_id,
2352: arp_standard.profile.program_id,
2353: sysdate,
2354: -3,
2355: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),
2356: ra_cust_trx_line_gl_dist_s.NEXTVAL,

Line 2416: arp_standard.debug( 'Tax lines inserted: ' ||

2412:
2413: l_rows := sql%rowcount;
2414:
2415: IF PG_DEBUG in ('Y', 'C') THEN
2416: arp_standard.debug( 'Tax lines inserted: ' ||
2417: l_rows);
2418: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||
2419: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2420: END IF;

Line 2418: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||

2414:
2415: IF PG_DEBUG in ('Y', 'C') THEN
2416: arp_standard.debug( 'Tax lines inserted: ' ||
2417: l_rows);
2418: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||
2419: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2420: END IF;
2421:
2422: RETURN( l_rows );

Line 2428: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_tax()');

2424: EXCEPTION
2425: WHEN OTHERS THEN
2426:
2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_tax()');
2429: arp_standard.debug( SQLERRM);
2430: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||
2431: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2432: END IF;

Line 2429: arp_standard.debug( SQLERRM);

2425: WHEN OTHERS THEN
2426:
2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_tax()');
2429: arp_standard.debug( SQLERRM);
2430: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||
2431: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2432: END IF;
2433:

Line 2430: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||

2426:
2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_tax()');
2429: arp_standard.debug( SQLERRM);
2430: arp_standard.debug( 'arp_auto_rule.create_other_tax()- ' ||
2431: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2432: END IF;
2433:
2434: RETURN( -1 );

Line 2474: arp_standard.debug( 'arp_auto_rule.create_other_freight()+ ' ||

2470:
2471: BEGIN
2472:
2473: IF PG_DEBUG in ('Y', 'C') THEN
2474: arp_standard.debug( 'arp_auto_rule.create_other_freight()+ ' ||
2475: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2476: END IF;
2477:
2478: INSERT INTO ra_cust_trx_line_gl_dist /* FREIGHT Lines */

Line 2508: arp_standard.sysparm.set_of_books_id,

2504: SELECT
2505: lines.customer_trx_line_id,
2506: lines.customer_trx_id,
2507: freight.code_combination_id,
2508: arp_standard.sysparm.set_of_books_id,
2509: freight.account_class,
2510: 'N',
2511: freight.percent,
2512: DECODE(fc.minimum_accountable_unit,

Line 2545: arp_standard.profile.request_id,

2541: p_bmau) *
2542: p_bmau), /* acctd_amount */
2543: rec.gl_date,
2544: freight.cust_trx_line_salesrep_id,
2545: arp_standard.profile.request_id,
2546: arp_standard.profile.user_id,
2547: sysdate,
2548: arp_standard.profile.user_id,
2549: sysdate,

Line 2546: arp_standard.profile.user_id,

2542: p_bmau), /* acctd_amount */
2543: rec.gl_date,
2544: freight.cust_trx_line_salesrep_id,
2545: arp_standard.profile.request_id,
2546: arp_standard.profile.user_id,
2547: sysdate,
2548: arp_standard.profile.user_id,
2549: sysdate,
2550: arp_standard.application_id,

Line 2548: arp_standard.profile.user_id,

2544: freight.cust_trx_line_salesrep_id,
2545: arp_standard.profile.request_id,
2546: arp_standard.profile.user_id,
2547: sysdate,
2548: arp_standard.profile.user_id,
2549: sysdate,
2550: arp_standard.application_id,
2551: arp_standard.profile.program_id,
2552: sysdate,

Line 2550: arp_standard.application_id,

2546: arp_standard.profile.user_id,
2547: sysdate,
2548: arp_standard.profile.user_id,
2549: sysdate,
2550: arp_standard.application_id,
2551: arp_standard.profile.program_id,
2552: sysdate,
2553: -3,
2554: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),

Line 2551: arp_standard.profile.program_id,

2547: sysdate,
2548: arp_standard.profile.user_id,
2549: sysdate,
2550: arp_standard.application_id,
2551: arp_standard.profile.program_id,
2552: sysdate,
2553: -3,
2554: NVL( NVL(rec.original_gl_date, rec.gl_date), trx.trx_date),
2555: ra_cust_trx_line_gl_dist_s.NEXTVAL,

Line 2618: arp_standard.debug( 'Freight lines inserted: ' ||

2614:
2615: l_rows := sql%rowcount;
2616:
2617: IF PG_DEBUG in ('Y', 'C') THEN
2618: arp_standard.debug( 'Freight lines inserted: ' ||
2619: l_rows);
2620: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||
2621: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2622: END IF;

Line 2620: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||

2616:
2617: IF PG_DEBUG in ('Y', 'C') THEN
2618: arp_standard.debug( 'Freight lines inserted: ' ||
2619: l_rows);
2620: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||
2621: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2622: END IF;
2623:
2624: RETURN( l_rows );

Line 2630: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_freight()');

2626: EXCEPTION
2627: WHEN OTHERS THEN
2628:
2629: IF PG_DEBUG in ('Y', 'C') THEN
2630: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_freight()');
2631: arp_standard.debug( SQLERRM);
2632: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||
2633: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2634: END IF;

Line 2631: arp_standard.debug( SQLERRM);

2627: WHEN OTHERS THEN
2628:
2629: IF PG_DEBUG in ('Y', 'C') THEN
2630: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_freight()');
2631: arp_standard.debug( SQLERRM);
2632: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||
2633: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2634: END IF;
2635:

Line 2632: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||

2628:
2629: IF PG_DEBUG in ('Y', 'C') THEN
2630: arp_standard.debug( 'EXCEPTION: arp_auto_rule.create_other_freight()');
2631: arp_standard.debug( SQLERRM);
2632: arp_standard.debug( 'arp_auto_rule.create_other_freight()- ' ||
2633: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2634: END IF;
2635:
2636: RETURN( -1 );

Line 2690: arp_standard.debug( 'arp_auto_rule.update_durations()+ ' ||

2686:
2687: BEGIN
2688: IF PG_DEBUG in ('Y', 'C') THEN
2689:
2690: arp_standard.debug( 'arp_auto_rule.update_durations()+ ' ||
2691: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2692: END IF;
2693:
2694: /* This statement needs to update the autorule_complete_flag

Line 2716: IF arp_standard.profile.request_id IS NOT NULL

2712: /* Bug 3416070/3403067 - Modified update to only be dependent on
2713: request_id when one is set. ARP_ALLOCATIONS_PKG calls this
2714: code without one. */
2715: /*4578927 suppressed the index on autorule_complete_flag*/
2716: IF arp_standard.profile.request_id IS NOT NULL
2717: THEN
2718: /* Existing logic - request_id is set */
2719:
2720: update ra_customer_trx_lines ul

Line 2725: last_updated_by = arp_standard.profile.user_id,

2721: set autorule_complete_flag = null,
2722: autorule_duration_processed =
2723: accounting_rule_duration,
2724: last_update_date = sysdate,
2725: last_updated_by = arp_standard.profile.user_id,
2726: program_application_id = arp_standard.application_id,
2727: program_update_date = sysdate,
2728: program_id = arp_standard.profile.program_id
2729: where customer_trx_id = p_trx_id

Line 2726: program_application_id = arp_standard.application_id,

2722: autorule_duration_processed =
2723: accounting_rule_duration,
2724: last_update_date = sysdate,
2725: last_updated_by = arp_standard.profile.user_id,
2726: program_application_id = arp_standard.application_id,
2727: program_update_date = sysdate,
2728: program_id = arp_standard.profile.program_id
2729: where customer_trx_id = p_trx_id
2730: and autorule_complete_flag||'' = 'N'

Line 2728: program_id = arp_standard.profile.program_id

2724: last_update_date = sysdate,
2725: last_updated_by = arp_standard.profile.user_id,
2726: program_application_id = arp_standard.application_id,
2727: program_update_date = sysdate,
2728: program_id = arp_standard.profile.program_id
2729: where customer_trx_id = p_trx_id
2730: and autorule_complete_flag||'' = 'N'
2731: and (exists (select 'at least one distribution'
2732: from ra_cust_trx_line_gl_dist gl

Line 2735: and gl.request_id = arp_standard.profile.request_id)

2731: and (exists (select 'at least one distribution'
2732: from ra_cust_trx_line_gl_dist gl
2733: where gl.customer_trx_line_id = ul.customer_trx_line_id
2734: and gl.account_set_flag = 'N'
2735: and gl.request_id = arp_standard.profile.request_id)
2736: or exists (select 'a distribution for a linked line'
2737: from ra_customer_trx_lines tl,
2738: ra_cust_trx_line_gl_dist tgl
2739: where tl.customer_trx_id = ul.customer_trx_id

Line 2743: and tgl.request_id = arp_standard.profile.request_id));

2739: where tl.customer_trx_id = ul.customer_trx_id
2740: and tl.link_to_cust_trx_line_id = ul.customer_trx_line_id
2741: and tgl.customer_trx_line_id = tl.customer_trx_line_id
2742: and tgl.account_set_flag = 'N'
2743: and tgl.request_id = arp_standard.profile.request_id));
2744:
2745: ELSE
2746: /* Request_id is not set */
2747: update ra_customer_trx_lines ul

Line 2752: last_updated_by = arp_standard.profile.user_id,

2748: set autorule_complete_flag = null,
2749: autorule_duration_processed =
2750: accounting_rule_duration,
2751: last_update_date = sysdate,
2752: last_updated_by = arp_standard.profile.user_id,
2753: program_application_id = arp_standard.application_id,
2754: program_update_date = sysdate,
2755: program_id = arp_standard.profile.program_id
2756: where customer_trx_id = p_trx_id

Line 2753: program_application_id = arp_standard.application_id,

2749: autorule_duration_processed =
2750: accounting_rule_duration,
2751: last_update_date = sysdate,
2752: last_updated_by = arp_standard.profile.user_id,
2753: program_application_id = arp_standard.application_id,
2754: program_update_date = sysdate,
2755: program_id = arp_standard.profile.program_id
2756: where customer_trx_id = p_trx_id
2757: and autorule_complete_flag||'' = 'N'

Line 2755: program_id = arp_standard.profile.program_id

2751: last_update_date = sysdate,
2752: last_updated_by = arp_standard.profile.user_id,
2753: program_application_id = arp_standard.application_id,
2754: program_update_date = sysdate,
2755: program_id = arp_standard.profile.program_id
2756: where customer_trx_id = p_trx_id
2757: and autorule_complete_flag||'' = 'N'
2758: and (exists (select 'at least one distribution'
2759: from ra_cust_trx_line_gl_dist gl

Line 2775: arp_standard.debug(' rows updated: ' ||

2771:
2772: l_rows := sql%rowcount;
2773:
2774: IF (PG_DEBUG = 'Y') THEN
2775: arp_standard.debug(' rows updated: ' ||
2776: l_rows);
2777:
2778: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||
2779: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS' || cr));

Line 2778: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||

2774: IF (PG_DEBUG = 'Y') THEN
2775: arp_standard.debug(' rows updated: ' ||
2776: l_rows);
2777:
2778: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||
2779: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS' || cr));
2780: END IF;
2781:
2782: RETURN( l_rows );

Line 2787: arp_standard.debug('EXCEPTION: arp_auto_rule.update_durations()');

2783:
2784: EXCEPTION
2785: WHEN OTHERS THEN
2786:
2787: arp_standard.debug('EXCEPTION: arp_auto_rule.update_durations()');
2788: arp_standard.debug(SQLERRM);
2789: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||
2790: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2791:

Line 2788: arp_standard.debug(SQLERRM);

2784: EXCEPTION
2785: WHEN OTHERS THEN
2786:
2787: arp_standard.debug('EXCEPTION: arp_auto_rule.update_durations()');
2788: arp_standard.debug(SQLERRM);
2789: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||
2790: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2791:
2792: RETURN( -1 );

Line 2789: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||

2785: WHEN OTHERS THEN
2786:
2787: arp_standard.debug('EXCEPTION: arp_auto_rule.update_durations()');
2788: arp_standard.debug(SQLERRM);
2789: arp_standard.debug( 'arp_auto_rule.update_durations()- ' ||
2790: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2791:
2792: RETURN( -1 );
2793:

Line 2965: arp_standard.enable_debug;

2961: BEGIN
2962:
2963: IF (p_debug = 'Y')
2964: THEN
2965: arp_standard.enable_debug;
2966: END IF;
2967:
2968: IF PG_DEBUG in ('Y', 'C') THEN
2969: arp_standard.debug( 'arp_auto_rule.create_distributions()+ ' ||

Line 2969: arp_standard.debug( 'arp_auto_rule.create_distributions()+ ' ||

2965: arp_standard.enable_debug;
2966: END IF;
2967:
2968: IF PG_DEBUG in ('Y', 'C') THEN
2969: arp_standard.debug( 'arp_auto_rule.create_distributions()+ ' ||
2970: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2971: arp_standard.debug( 'debug = '|| p_debug ||', commit = ' || p_commit);
2972: arp_standard.debug( 'round = ' || p_suppress_round || ', continue on error = ' ||
2973: p_continue_on_error);

Line 2971: arp_standard.debug( 'debug = '|| p_debug ||', commit = ' || p_commit);

2967:
2968: IF PG_DEBUG in ('Y', 'C') THEN
2969: arp_standard.debug( 'arp_auto_rule.create_distributions()+ ' ||
2970: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2971: arp_standard.debug( 'debug = '|| p_debug ||', commit = ' || p_commit);
2972: arp_standard.debug( 'round = ' || p_suppress_round || ', continue on error = ' ||
2973: p_continue_on_error);
2974: END IF;
2975:

Line 2972: arp_standard.debug( 'round = ' || p_suppress_round || ', continue on error = ' ||

2968: IF PG_DEBUG in ('Y', 'C') THEN
2969: arp_standard.debug( 'arp_auto_rule.create_distributions()+ ' ||
2970: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
2971: arp_standard.debug( 'debug = '|| p_debug ||', commit = ' || p_commit);
2972: arp_standard.debug( 'round = ' || p_suppress_round || ', continue on error = ' ||
2973: p_continue_on_error);
2974: END IF;
2975:
2976: -- 11i OE/OM change

Line 2981: arp_standard.debug( 'org_id = '|| to_char(org_id));

2977: -- fnd_profile.get( 'SO_ORGANIZATION_ID', org_id );
2978: oe_profile.get( 'SO_ORGANIZATION_ID', org_id );
2979:
2980: IF PG_DEBUG in ('Y', 'C') THEN
2981: arp_standard.debug( 'org_id = '|| to_char(org_id));
2982: END IF;
2983:
2984: stats.round := 0;
2985: stats.receivables := 0;

Line 2995: IF arp_standard.profile.request_id IS NULL

2991: /*-----------------------------------------------------------------------+
2992: | Validate each of the extended who columns |
2993: +-----------------------------------------------------------------------*/
2994:
2995: IF arp_standard.profile.request_id IS NULL
2996: THEN
2997: IF PG_DEBUG in ('Y', 'C') THEN
2998: arp_standard.debug('create_distributions(): NULL Request_id');
2999: END IF;

Line 2998: arp_standard.debug('create_distributions(): NULL Request_id');

2994:
2995: IF arp_standard.profile.request_id IS NULL
2996: THEN
2997: IF PG_DEBUG in ('Y', 'C') THEN
2998: arp_standard.debug('create_distributions(): NULL Request_id');
2999: END IF;
3000: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3001: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3002: 'PARAMETER', 'ARP_STANDARD.PROFILE.REQUEST_ID' );

Line 3000: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',

2996: THEN
2997: IF PG_DEBUG in ('Y', 'C') THEN
2998: arp_standard.debug('create_distributions(): NULL Request_id');
2999: END IF;
3000: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3001: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3002: 'PARAMETER', 'ARP_STANDARD.PROFILE.REQUEST_ID' );
3003: END IF;
3004:

Line 3002: 'PARAMETER', 'ARP_STANDARD.PROFILE.REQUEST_ID' );

2998: arp_standard.debug('create_distributions(): NULL Request_id');
2999: END IF;
3000: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3001: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3002: 'PARAMETER', 'ARP_STANDARD.PROFILE.REQUEST_ID' );
3003: END IF;
3004:
3005: IF arp_standard.profile.program_id IS NULL
3006: THEN

Line 3005: IF arp_standard.profile.program_id IS NULL

3001: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3002: 'PARAMETER', 'ARP_STANDARD.PROFILE.REQUEST_ID' );
3003: END IF;
3004:
3005: IF arp_standard.profile.program_id IS NULL
3006: THEN
3007: IF PG_DEBUG in ('Y', 'C') THEN
3008: arp_standard.debug('create_distributions(): NULL Program_id');
3009: END IF;

Line 3008: arp_standard.debug('create_distributions(): NULL Program_id');

3004:
3005: IF arp_standard.profile.program_id IS NULL
3006: THEN
3007: IF PG_DEBUG in ('Y', 'C') THEN
3008: arp_standard.debug('create_distributions(): NULL Program_id');
3009: END IF;
3010: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3011: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3012: 'PARAMETER', 'ARP_STANDARD.PROFILE.PROGRAM_ID' );

Line 3010: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',

3006: THEN
3007: IF PG_DEBUG in ('Y', 'C') THEN
3008: arp_standard.debug('create_distributions(): NULL Program_id');
3009: END IF;
3010: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3011: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3012: 'PARAMETER', 'ARP_STANDARD.PROFILE.PROGRAM_ID' );
3013: END IF;
3014:

Line 3012: 'PARAMETER', 'ARP_STANDARD.PROFILE.PROGRAM_ID' );

3008: arp_standard.debug('create_distributions(): NULL Program_id');
3009: END IF;
3010: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3011: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3012: 'PARAMETER', 'ARP_STANDARD.PROFILE.PROGRAM_ID' );
3013: END IF;
3014:
3015: IF arp_standard.profile.user_id IS NULL
3016: THEN

Line 3015: IF arp_standard.profile.user_id IS NULL

3011: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3012: 'PARAMETER', 'ARP_STANDARD.PROFILE.PROGRAM_ID' );
3013: END IF;
3014:
3015: IF arp_standard.profile.user_id IS NULL
3016: THEN
3017: IF PG_DEBUG in ('Y', 'C') THEN
3018: arp_standard.debug('create_distributions(): NULL User_id');
3019: END IF;

Line 3018: arp_standard.debug('create_distributions(): NULL User_id');

3014:
3015: IF arp_standard.profile.user_id IS NULL
3016: THEN
3017: IF PG_DEBUG in ('Y', 'C') THEN
3018: arp_standard.debug('create_distributions(): NULL User_id');
3019: END IF;
3020: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3021: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3022: 'PARAMETER', 'ARP_STANDARD.PROFILE.USER_ID' );

Line 3020: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',

3016: THEN
3017: IF PG_DEBUG in ('Y', 'C') THEN
3018: arp_standard.debug('create_distributions(): NULL User_id');
3019: END IF;
3020: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3021: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3022: 'PARAMETER', 'ARP_STANDARD.PROFILE.USER_ID' );
3023: END IF;
3024:

Line 3022: 'PARAMETER', 'ARP_STANDARD.PROFILE.USER_ID' );

3018: arp_standard.debug('create_distributions(): NULL User_id');
3019: END IF;
3020: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3021: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3022: 'PARAMETER', 'ARP_STANDARD.PROFILE.USER_ID' );
3023: END IF;
3024:
3025: IF arp_standard.application_id IS NULL
3026: THEN

Line 3025: IF arp_standard.application_id IS NULL

3021: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3022: 'PARAMETER', 'ARP_STANDARD.PROFILE.USER_ID' );
3023: END IF;
3024:
3025: IF arp_standard.application_id IS NULL
3026: THEN
3027: IF PG_DEBUG in ('Y', 'C') THEN
3028: arp_standard.debug('create_distributions(): NULL Program_app_id');
3029: END IF;

Line 3028: arp_standard.debug('create_distributions(): NULL Program_app_id');

3024:
3025: IF arp_standard.application_id IS NULL
3026: THEN
3027: IF PG_DEBUG in ('Y', 'C') THEN
3028: arp_standard.debug('create_distributions(): NULL Program_app_id');
3029: END IF;
3030: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3031: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3032: 'PARAMETER', 'ARP_STANDARD.APPLICATION_ID' );

Line 3030: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',

3026: THEN
3027: IF PG_DEBUG in ('Y', 'C') THEN
3028: arp_standard.debug('create_distributions(): NULL Program_app_id');
3029: END IF;
3030: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3031: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3032: 'PARAMETER', 'ARP_STANDARD.APPLICATION_ID' );
3033: END IF;
3034:

Line 3032: 'PARAMETER', 'ARP_STANDARD.APPLICATION_ID' );

3028: arp_standard.debug('create_distributions(): NULL Program_app_id');
3029: END IF;
3030: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3031: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3032: 'PARAMETER', 'ARP_STANDARD.APPLICATION_ID' );
3033: END IF;
3034:
3035: IF arp_standard.profile.last_update_login IS NULL
3036: THEN

Line 3035: IF arp_standard.profile.last_update_login IS NULL

3031: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3032: 'PARAMETER', 'ARP_STANDARD.APPLICATION_ID' );
3033: END IF;
3034:
3035: IF arp_standard.profile.last_update_login IS NULL
3036: THEN
3037: IF PG_DEBUG in ('Y', 'C') THEN
3038: arp_standard.debug('create_distributions(): NULL Last_update_login');
3039: END IF;

Line 3038: arp_standard.debug('create_distributions(): NULL Last_update_login');

3034:
3035: IF arp_standard.profile.last_update_login IS NULL
3036: THEN
3037: IF PG_DEBUG in ('Y', 'C') THEN
3038: arp_standard.debug('create_distributions(): NULL Last_update_login');
3039: END IF;
3040: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3041: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3042: 'PARAMETER', 'ARP_STANDARD.PROFILE.LAST_UPDATE_LOGIN' );

Line 3040: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',

3036: THEN
3037: IF PG_DEBUG in ('Y', 'C') THEN
3038: arp_standard.debug('create_distributions(): NULL Last_update_login');
3039: END IF;
3040: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3041: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3042: 'PARAMETER', 'ARP_STANDARD.PROFILE.LAST_UPDATE_LOGIN' );
3043: END IF;
3044:

Line 3042: 'PARAMETER', 'ARP_STANDARD.PROFILE.LAST_UPDATE_LOGIN' );

3038: arp_standard.debug('create_distributions(): NULL Last_update_login');
3039: END IF;
3040: arp_standard.fnd_message( 'AR_PP_NULL_PARAMETER',
3041: 'OBJECT', 'AUTO_RULE.CREATE_DISTRIBUTIONS',
3042: 'PARAMETER', 'ARP_STANDARD.PROFILE.LAST_UPDATE_LOGIN' );
3043: END IF;
3044:
3045: IF PG_DEBUG in ('Y', 'C') THEN
3046: arp_standard.debug('create_distributions(): Passed validation');

Line 3046: arp_standard.debug('create_distributions(): Passed validation');

3042: 'PARAMETER', 'ARP_STANDARD.PROFILE.LAST_UPDATE_LOGIN' );
3043: END IF;
3044:
3045: IF PG_DEBUG in ('Y', 'C') THEN
3046: arp_standard.debug('create_distributions(): Passed validation');
3047: END IF;
3048:
3049: /*---------------------------------------------------+
3050: | Get the period_set_name and currency information |

Line 3070: arp_standard.debug(

3066: gsb.set_of_books_id = asp.set_of_books_id
3067: AND fc.currency_code = gsb.currency_code;
3068:
3069: IF PG_DEBUG in ('Y', 'C') THEN
3070: arp_standard.debug(
3071: 'create_distributions(): '||
3072: ' Period Set: '|| period_set_name ||
3073: ' Base Precision: '|| base_precision ||
3074: ' Base Minimum Accountable Unit: ' ||

Line 3079: populate_glp_table(arp_standard.sysparm.set_of_books_id,

3075: NVL(base_min_acc_unit, 0));
3076: END IF;
3077:
3078: /* Populate the GL periods PL/SQL table. */
3079: populate_glp_table(arp_standard.sysparm.set_of_books_id,
3080: arp_standard.application_id);
3081:
3082: /* DEBUG INFO. */
3083: /* FOR i IN 1..rows LOOP

Line 3080: arp_standard.application_id);

3076: END IF;
3077:
3078: /* Populate the GL periods PL/SQL table. */
3079: populate_glp_table(arp_standard.sysparm.set_of_books_id,
3080: arp_standard.application_id);
3081:
3082: /* DEBUG INFO. */
3083: /* FOR i IN 1..rows LOOP
3084:

Line 3086: arp_standard.debug(

3082: /* DEBUG INFO. */
3083: /* FOR i IN 1..rows LOOP
3084:
3085: IF PG_DEBUG in ('Y', 'C') THEN
3086: arp_standard.debug(
3087: 'index = '||i||', '||
3088: TO_CHAR(gl_start_t(i), 'DD-MON-RRRR')||', '||
3089: TO_CHAR(gl_end_t(i), 'DD-MON-RRRR')||', '||
3090: gl_status_t(i)||', '||

Line 3104: arp_standard.debug('p_trx_id is NOT null, using subquery');

3100:
3101: IF (p_trx_id IS NOT NULL) THEN
3102: /* This is the modified logic using a sub-query - bug 2122202 */
3103: IF PG_DEBUG in ('Y', 'C') THEN
3104: arp_standard.debug('p_trx_id is NOT null, using subquery');
3105: END IF;
3106:
3107: OPEN c_trx;
3108: ELSE

Line 3111: arp_standard.debug('p_trx_id is null, using joined tables');

3107: OPEN c_trx;
3108: ELSE
3109: /* This is almost exactly like original select */
3110: IF PG_DEBUG in ('Y', 'C') THEN
3111: arp_standard.debug('p_trx_id is null, using joined tables');
3112: END IF;
3113:
3114: OPEN c_trx_no_id;
3115: END IF;

Line 3138: arp_standard.debug(

3134: FOR UPDATE OF customer_trx_id;
3135: END IF;
3136:
3137: IF PG_DEBUG in ('Y', 'C') THEN
3138: arp_standard.debug(
3139: 'Creating distributions for trx_number = '|| trx_num);
3140: END IF;
3141:
3142: /*------------------------------------------------------------------+

Line 3144: | and receivable accounts as well as standard distributions |

3140: END IF;
3141:
3142: /*------------------------------------------------------------------+
3143: | Generate new account distributions, building plug, tax, freight |
3144: | and receivable accounts as well as standard distributions |
3145: +------------------------------------------------------------------*/
3146:
3147: trx_dist_created := 0;
3148:

Line 3325: arp_standard.debug( 'trx_id = '|| trx_id ||

3321: IF ( trx_dist_created > 0 )
3322: THEN
3323:
3324: IF PG_DEBUG in ('Y', 'C') THEN
3325: arp_standard.debug( 'trx_id = '|| trx_id ||
3326: ', distributions created = '|| trx_dist_created);
3327: END IF;
3328:
3329: stats.durations := update_durations(trx_id);

Line 3372: arp_standard.debug('create_distributions(): '|| error_message);

3368:
3369: ROLLBACK TO SAVEPOINT AR_AUTORULE_1;
3370:
3371: IF PG_DEBUG in ('Y', 'C') THEN
3372: arp_standard.debug('create_distributions(): '|| error_message);
3373: END IF;
3374:
3375: /* Bug 2399504 - added handler for p_continue_on_error */
3376: IF (p_continue_on_error IS NULL) THEN

Line 3378: arp_standard.fnd_message( 'GENERIC_MESSAGE',

3374:
3375: /* Bug 2399504 - added handler for p_continue_on_error */
3376: IF (p_continue_on_error IS NULL) THEN
3377: /* This FND_MESSAGE call halts execution of program */
3378: arp_standard.fnd_message( 'GENERIC_MESSAGE',
3379: 'GENERIC_TEXT', error_message);
3380: RETURN( -1 );
3381: ELSE
3382: return_warning := TRUE;

Line 3389: arp_standard.debug(

3385:
3386: ELSE
3387:
3388: IF PG_DEBUG in ('Y', 'C') THEN
3389: arp_standard.debug(
3390: 'Rounding errors corrected for: '||
3391: num_round_err_corr || ' rows.');
3392: END IF;
3393:

Line 3398: arp_standard.debug( 'ROUNDING SUPPRESSED!');

3394: END IF; /* rounding */
3395:
3396: ELSE
3397: IF PG_DEBUG in ('Y', 'C') THEN
3398: arp_standard.debug( 'ROUNDING SUPPRESSED!');
3399: END IF;
3400: END IF;
3401:
3402: /* All the distributions are created, rounding done, so we can

Line 3417: arp_standard.debug( 'Error while stamping line level balance. Trx Id - '|| trx_id);

3413: x_msg_data => l_msg_data,
3414: p_from_llca => 'N');
3415:
3416: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3417: arp_standard.debug( 'Error while stamping line level balance. Trx Id - '|| trx_id);
3418: END IF;
3419: END IF;
3420:
3421: -- END 8478031

Line 3439: arp_standard.debug( 'Not calling create_events as this is an Autoinvoice session and for a Credit Memo.');

3435: END;
3436:
3437: IF g_autoinv AND l_invoice_class = 'CM' THEN
3438: IF PG_DEBUG in ('Y', 'C') THEN
3439: arp_standard.debug( 'Not calling create_events as this is an Autoinvoice session and for a Credit Memo.');
3440: END IF;
3441: ELSE
3442: l_xla_ev_rec.xla_from_doc_id := trx_id;
3443: l_xla_ev_rec.xla_to_doc_id := trx_id;

Line 3459: arp_standard.debug( 'trx_id = '|| trx_id ||

3455:
3456: ELSE
3457:
3458: IF PG_DEBUG in ('Y', 'C') THEN
3459: arp_standard.debug( 'trx_id = '|| trx_id ||
3460: ', distributions created = '|| trx_dist_created);
3461: END IF;
3462:
3463: END IF; /* if (trx_dist_created > 0) */

Line 3474: arp_standard.debug( 'create_distributions(): ' ||

3470:
3471: END LOOP; /* Cursor trx_id loop */
3472:
3473: IF PG_DEBUG in ('Y', 'C') THEN
3474: arp_standard.debug( 'create_distributions(): ' ||
3475: 'Total number of create_distributions created = '||
3476: TO_CHAR(NVL(sum_dist_created, 0)));
3477: END IF;
3478:

Line 3491: arp_standard.debug('Attempting to set WARNING return status');

3487: least one transaction that was processed by this (single thread)
3488: run. */
3489: IF (return_warning AND p_trx_id IS NULL)
3490: THEN
3491: arp_standard.debug('Attempting to set WARNING return status');
3492: error_message := FND_MESSAGE.GET_STRING('AR','ARBARL_WARN_BAD_TRX');
3493:
3494: IF (FND_CONCURRENT.SET_COMPLETION_STATUS('WARNING', error_message) = FALSE)
3495: THEN

Line 3496: arp_standard.debug('Unable to set WARNING return status');

3492: error_message := FND_MESSAGE.GET_STRING('AR','ARBARL_WARN_BAD_TRX');
3493:
3494: IF (FND_CONCURRENT.SET_COMPLETION_STATUS('WARNING', error_message) = FALSE)
3495: THEN
3496: arp_standard.debug('Unable to set WARNING return status');
3497: END IF;
3498: END IF;
3499:
3500: IF PG_DEBUG in ('Y', 'C') THEN

Line 3501: arp_standard.debug( 'arp_auto_rule.create_distributions()- ' ||

3497: END IF;
3498: END IF;
3499:
3500: IF PG_DEBUG in ('Y', 'C') THEN
3501: arp_standard.debug( 'arp_auto_rule.create_distributions()- ' ||
3502: TO_CHAR(sysdate, 'DD-MON-YY HH:MI:SS'));
3503: END IF;
3504:
3505: RETURN( NVL(sum_dist_created, 0) );