DBA Data[Home] [Help]

APPS.ARP_AUTO_RULE dependencies on AR_PERIODS

Line 327: | Updates ar_periods and ar_period_types tables with latest changes in |

323: | PUBLIC PROCEDURE |
324: | refresh |
325: | |
326: | DESCRIPTION |
327: | Updates ar_periods and ar_period_types tables with latest changes in |
328: | gl_periods table. |
329: | |
330: | PARAMETERS |
331: | INPUT |

Line 357: SAVEPOINT AR_PERIODS_1;

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;
358:
359: IF PG_DEBUG in ('Y', 'C') THEN
360: arp_standard.debug('Updating ar_period_types: ');
361: END IF;

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 412: FROM ar_periods ap

408: arp_standard.debug('Deleting redundent ar_periods: ');
409: END IF;
410:
411: DELETE
412: FROM ar_periods ap
413: WHERE
414: NOT EXISTS
415: (
416: SELECT NULL

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 428: UPDATE ar_periods ap

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
430: (period_type, start_date, end_date) =
431: (
432: SELECT period_type, start_date, end_date

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 457: INTO ar_periods

453: arp_standard.debug('Inserting into ar_periods: ');
454: END IF;
455:
456: INSERT
457: INTO ar_periods
458: (period_set_name , period_type, start_date, end_date,
459: new_period_num, period_name
460: )
461: (SELECT

Line 472: FROM ar_periods ap

468: gp.adjustment_period_flag = 'N'
469: AND NOT EXISTS
470: (
471: SELECT NULL
472: FROM ar_periods ap
473: WHERE gp.period_name = ap.period_name
474: AND gp.period_set_name = ap.period_set_name
475: )
476: );

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 483: UPDATE ar_periods p1

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
485: new_period_num =
486: (
487: SELECT COUNT(*)

Line 488: FROM ar_periods p2

484: SET
485: new_period_num =
486: (
487: SELECT COUNT(*)
488: FROM ar_periods p2
489: WHERE p1.period_type = p2.period_type
490: AND p1.period_set_name = p2.period_set_name
491: AND p1.start_date >= p2.start_date
492: )

Line 497: FROM AR_PERIODS p2

493: WHERE
494: new_period_num <>
495: (
496: SELECT COUNT(*)
497: FROM AR_PERIODS p2
498: WHERE p1.period_type = p2.period_type
499: AND p1.period_set_name = p2.period_set_name
500: AND p1.start_date >= p2.start_date
501: );

Line 516: ROLLBACK TO SAVEPOINT AR_PERIODS_1;

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;
518:
519: END refresh;
520: