76: ORDER BY terms_sequence_number ;
77:
78: BEGIN
79: IF PG_DEBUG in ('Y', 'C') THEN
80: arp_util.debug('arw_cmreq_cover.ar_request_cm(+)' );
81: END IF;
82:
83: /*---------------------+
84: | Set the Org Context |
581: where request_id = l_request_id;
582:
583: if l_status is not null then
584: IF PG_DEBUG in ('Y', 'C') THEN
585: arp_util.debug('error encountered in arw_cmreq_cover.ar_autocreate_cm, return -1');
586: arp_util.debug('arw_cmreq_cover.ar_request_cm(-)');
587: END IF;
588: return('-1');
589: end if;
582:
583: if l_status is not null then
584: IF PG_DEBUG in ('Y', 'C') THEN
585: arp_util.debug('error encountered in arw_cmreq_cover.ar_autocreate_cm, return -1');
586: arp_util.debug('arw_cmreq_cover.ar_request_cm(-)');
587: END IF;
588: return('-1');
589: end if;
590: ELSE
589: end if;
590: ELSE
591: fnd_profile.get('AR_USE_OAM_IN_CMWF', l_profile_value);
592: IF PG_DEBUG in ('Y', 'C') THEN
593: arp_util.debug('arw_cmreq_cover.ar_request_cm(-)' || l_profile_value);
594: END IF;
595: IF (l_profile_value = 'Y') Then
596: BEGIN
597: l_threshold := WF_ENGINE.threshold;
612:
613: END IF;
614:
615: IF PG_DEBUG in ('Y', 'C') THEN
616: arp_util.debug('arw_cmreq_cover.ar_request_cm(-)');
617: END IF;
618: RETURN l_request_id;
619:
620: EXCEPTION
697:
698: BEGIN
699:
700: IF PG_DEBUG in ('Y', 'C') THEN
701: arp_util.debug('arw_cmreq_cover.ar_autocreate_cm(+)');
702: arp_util.debug( 'in parameters are : ');
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
698: BEGIN
699:
700: IF PG_DEBUG in ('Y', 'C') THEN
701: arp_util.debug('arw_cmreq_cover.ar_autocreate_cm(+)');
702: arp_util.debug( 'in parameters are : ');
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
706: arp_util.debug( 'p_credit_method_installments = ' || p_credit_method_installments);
699:
700: IF PG_DEBUG in ('Y', 'C') THEN
701: arp_util.debug('arw_cmreq_cover.ar_autocreate_cm(+)');
702: arp_util.debug( 'in parameters are : ');
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
706: arp_util.debug( 'p_credit_method_installments = ' || p_credit_method_installments);
707: arp_util.debug( 'p_passed_gl_date = ' || p_passed_gl_date); /*Bug 9536019*/
700: IF PG_DEBUG in ('Y', 'C') THEN
701: arp_util.debug('arw_cmreq_cover.ar_autocreate_cm(+)');
702: arp_util.debug( 'in parameters are : ');
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
706: arp_util.debug( 'p_credit_method_installments = ' || p_credit_method_installments);
707: arp_util.debug( 'p_passed_gl_date = ' || p_passed_gl_date); /*Bug 9536019*/
708: END IF;
701: arp_util.debug('arw_cmreq_cover.ar_autocreate_cm(+)');
702: arp_util.debug( 'in parameters are : ');
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
706: arp_util.debug( 'p_credit_method_installments = ' || p_credit_method_installments);
707: arp_util.debug( 'p_passed_gl_date = ' || p_passed_gl_date); /*Bug 9536019*/
708: END IF;
709:
702: arp_util.debug( 'in parameters are : ');
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
706: arp_util.debug( 'p_credit_method_installments = ' || p_credit_method_installments);
707: arp_util.debug( 'p_passed_gl_date = ' || p_passed_gl_date); /*Bug 9536019*/
708: END IF;
709:
710: /* 5885313 - Initialize cached values in pls packages */
703: arp_util.debug( 'p_request_id = ' || to_char(p_request_id));
704: arp_util.debug( 'p_batch_source_name = ' || p_batch_source_name);
705: arp_util.debug( 'p_credit_method_rules = ' || p_credit_method_rules);
706: arp_util.debug( 'p_credit_method_installments = ' || p_credit_method_installments);
707: arp_util.debug( 'p_passed_gl_date = ' || p_passed_gl_date); /*Bug 9536019*/
708: END IF;
709:
710: /* 5885313 - Initialize cached values in pls packages */
711: arp_global.init_global(mo_global.GET_CURRENT_ORG_ID);
786: where request_id = p_request_id;
787:
788: /* Bug 8832584 */
789: IF PG_DEBUG in ('Y', 'C') THEN
790: arp_util.debug('Responsibility Id stored in ra_cm_requests table : ' || l_responsibility_id);
791: END IF;
792:
793: IF l_responsibility_id IS NOT NULL THEN
794:
792:
793: IF l_responsibility_id IS NOT NULL THEN
794:
795: IF PG_DEBUG in ('Y', 'C') THEN
796: arp_util.debug('Setting responsibility Id by calling FND routine.');
797: END IF;
798:
799: fnd_global.apps_initialize( user_id => FND_GLOBAL.USER_ID,
800: resp_id => l_responsibility_id,
1209: END IF;
1210:
1211:
1212: IF PG_DEBUG in ('Y', 'C') THEN
1213: arp_util.debug( 'arw_cmreq_cover.get_cm_defaults(-)');
1214: END IF;
1215:
1216: EXCEPTION
1217: WHEN OTHERS THEN