[Home] [Help]
PACKAGE BODY: APPS.JL_AR_AUTOINV_MASTER_PKG
Source
1 package body JL_AR_AUTOINV_MASTER_PKG as
2 /* $Header: jlarramb.pls 120.5.12010000.2 2008/12/15 18:44:40 vspuli ship $ */
3
4 PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
5
6 PROCEDURE submit_request (
7 errbuf OUT NOCOPY varchar2,
8 retcode OUT NOCOPY number,
9 p_num_of_instances IN varchar2 ,
10 p_organization in varchar2, -- Bug#7642995
11 p_batch_source_id IN ra_batch_sources.batch_source_id%TYPE,
12 p_batch_source_name IN varchar2 ,
13 p_default_date IN varchar2 ,
14 p_trans_flexfield IN varchar2 ,
15 p_trans_type IN ra_cust_trx_types.name%TYPE ,
16 p_low_bill_to_cust_num IN hz_cust_accounts.account_number%TYPE ,
17 p_high_bill_to_cust_num IN hz_cust_accounts.account_number%TYPE ,
18 p_low_bill_to_cust_name IN hz_parties.party_name%TYPE ,
19 p_high_bill_to_cust_name IN hz_parties.party_name%TYPE ,
20 p_low_gl_date IN VARCHAR2,
21 p_high_gl_date IN VARCHAR2,
22 p_low_ship_date IN VARCHAR2,
23 p_high_ship_date IN VARCHAR2,
24 p_low_trans_number IN ra_interface_lines.trx_number%TYPE,
25 p_high_trans_number IN ra_interface_lines.trx_number%TYPE ,
26 p_low_sales_order_num IN ra_interface_lines.sales_order%TYPE ,
27 p_high_sales_order_num IN ra_interface_lines.sales_order%TYPE,
28 p_low_invoice_date IN VARCHAR2,
29 p_high_invoice_date IN VARCHAR2,
30 p_low_ship_to_cust_num IN hz_cust_accounts.account_number%TYPE ,
31 p_high_ship_to_cust_num IN hz_cust_accounts.account_number%TYPE ,
32 p_low_ship_to_cust_name IN hz_parties.party_name%TYPE ,
33 p_high_ship_to_cust_name IN hz_parties.party_name%TYPE,
34 p_base_due_date_on_trx_date IN fnd_lookups.meaning%TYPE ,
35 p_due_date_adj_days IN number ) IS
36
37 X_req_id NUMBER(38);
38 call_status BOOLEAN;
39 rphase VARCHAR2(30);
40 rstatus VARCHAR2(30);
41 dphase VARCHAR2(30);
42 dstatus VARCHAR2(30);
43 message VARCHAR2(240);
44 l_org_id NUMBER := null;
45
46 BEGIN
47
48 IF PG_DEBUG in ('Y', 'C') THEN
49 arp_standard.debug('submit_request: ' || 'JL Submitting Autoinvoice');
50 END IF;
51 -- Bug#7642995 Start
52 if p_organization <> '-99' then
53 FND_REQUEST.SET_ORG_ID(p_organization);
54 end if;
55 -- Bug#7642995 End
56
57 X_req_id := FND_REQUEST.SUBMIT_REQUEST(
58 'AR' ,
59 'RAXMTR',
60 'Autoinvoice Master Program',
61 SYSDATE ,
62 FALSE,
63 p_num_of_instances,
64 p_organization, -- Bug#7642995
65 p_batch_source_id ,
66 p_batch_source_name ,
67 p_default_date ,
68 p_trans_flexfield ,
69 p_trans_type ,
70 p_low_bill_to_cust_num ,
71 p_high_bill_to_cust_num ,
72 p_low_bill_to_cust_name ,
73 p_high_bill_to_cust_name ,
74 p_low_gl_date ,
75 p_high_gl_date ,
76 p_low_ship_date ,
77 p_high_ship_date ,
78 p_low_trans_number ,
79 p_high_trans_number ,
80 p_low_sales_order_num ,
81 p_high_sales_order_num ,
82 p_low_invoice_date ,
83 p_high_invoice_date ,
84 p_low_ship_to_cust_num ,
85 p_high_ship_to_cust_num ,
86 p_low_ship_to_cust_name ,
87 p_high_ship_to_cust_name ,
88 p_base_due_date_on_trx_date ,
89 p_due_date_adj_days);
90
91 END SUBMIT_REQUEST;
92
93 END JL_AR_AUTOINV_MASTER_PKG;