DBA Data[Home] [Help]

APPS.ARP_AUTO_RULE dependencies on AR_PERIODS

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

319: | PUBLIC PROCEDURE |
320: | refresh |
321: | |
322: | DESCRIPTION |
323: | Updates ar_periods and ar_period_types tables with latest changes in |
324: | gl_periods table. |
325: | |
326: | PARAMETERS |
327: | INPUT |

Line 353: SAVEPOINT AR_PERIODS_1;

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

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

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

Line 408: FROM ar_periods ap

404: arp_standard.debug('Deleting redundent ar_periods: ');
405: END IF;
406:
407: DELETE
408: FROM ar_periods ap
409: WHERE
410: NOT EXISTS
411: (
412: SELECT NULL

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

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

Line 424: UPDATE ar_periods ap

420: arp_standard.debug('row(s) deleted: ' || TO_CHAR(sql%rowcount));
421: arp_standard.debug('Updating start, end dates in ar_periods: ');
422: END IF;
423:
424: UPDATE ar_periods ap
425: SET
426: (period_type, start_date, end_date) =
427: (
428: SELECT period_type, start_date, end_date

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

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

Line 453: INTO ar_periods

449: arp_standard.debug('Inserting into ar_periods: ');
450: END IF;
451:
452: INSERT
453: INTO ar_periods
454: (period_set_name , period_type, start_date, end_date,
455: new_period_num, period_name
456: )
457: (SELECT

Line 468: FROM ar_periods ap

464: gp.adjustment_period_flag = 'N'
465: AND NOT EXISTS
466: (
467: SELECT NULL
468: FROM ar_periods ap
469: WHERE gp.period_name = ap.period_name
470: AND gp.period_set_name = ap.period_set_name
471: )
472: );

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

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

Line 479: UPDATE ar_periods p1

475: arp_standard.debug('row(s) inserted: ' || TO_CHAR(sql%rowcount));
476: arp_standard.debug('Updating period sequence number in ar_periods: ');
477: END IF;
478:
479: UPDATE ar_periods p1
480: SET
481: new_period_num =
482: (
483: SELECT COUNT(*)

Line 484: FROM ar_periods p2

480: SET
481: new_period_num =
482: (
483: SELECT COUNT(*)
484: FROM ar_periods p2
485: WHERE p1.period_type = p2.period_type
486: AND p1.period_set_name = p2.period_set_name
487: AND p1.start_date >= p2.start_date
488: )

Line 493: FROM AR_PERIODS p2

489: WHERE
490: new_period_num <>
491: (
492: SELECT COUNT(*)
493: FROM AR_PERIODS p2
494: WHERE p1.period_type = p2.period_type
495: AND p1.period_set_name = p2.period_set_name
496: AND p1.start_date >= p2.start_date
497: );

Line 512: ROLLBACK TO SAVEPOINT AR_PERIODS_1;

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