1: PACKAGE BODY arw_cmreq_cover AS
2: /* $Header: ARWCMRQB.pls 120.49 2011/09/22 02:31:50 chuansha ship $ */
3:
4:
5: PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
6:
7: FUNCTION ar_request_cm(
8: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
9: p_line_credits_flag IN ra_cm_requests.line_credits_flag%type,
53: l_max_seq number;
54:
55: l_url ra_cm_requests.url%TYPE;
56: l_status varchar2(255);
57: l_profile_value fnd_profile_option_values.profile_option_value%TYPE;
58: /*Bug 5481525 variables to hold status of CM creation*/
59: l_credit_memo_id number;
60: l_result VARCHAR2(10);
61: l_threshold NUMBER;
587: END IF;
588: return('-1');
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
820: /* 5041175 - obsoleting ar_transaction_pub and associated
821: routines. Replaced with inline sql logic to fetch
822: batch source */
823: /*6010707 As per doc when using AME the batch source name can be null*/
824: IF NOT (nvl(fnd_profile.value('AR_USE_OAM_IN_CMWF'),'N') = 'Y' and p_batch_source_name is NULL ) THEN
825: select batch_source_id
826: into l_batch_source_id
827: from ra_batch_sources
828: where name = p_batch_source_name