DBA Data[Home] [Help]

PACKAGE: APPS.GMF_AR_GET_INVOICE_LINES_ID

Source


1 PACKAGE GMF_AR_GET_INVOICE_LINES_ID AUTHID CURRENT_USER AS
2 /*       $Header: gmfinvss.pls 115.2 2002/11/11 00:39:59 rseshadr ship $ */
3 PROCEDURE get_invoice_lines_id
4 	(t_trx_type                 IN	OUT NOCOPY VARCHAR2,
5    	t_trx_type_name             IN	OUT NOCOPY VARCHAR2,
6 	t_invoice_number            IN 	OUT NOCOPY VARCHAR2,
7 	invoice_index               IN      NUMBER,
8    	t_line_id                   OUT     NOCOPY VARCHAR2,
9 	row_to_fetch                IN 	OUT NOCOPY NUMBER,
10 	error_status                OUT     NOCOPY NUMBER);
11 
12 CURSOR cur_get_inv_lines_id1(t_trx_type	VARCHAR2,
13 		t_trx_type_name	VARCHAR2, t_invoice_number VARCHAR2)IS
14 	SELECT DISTINCT
15 		h.trx_number,
16 		t.name,
17 		l.interface_line_attribute1
18 	FROM
19 		RA_CUSTOMER_TRX_ALL h, RA_CUSTOMER_TRX_LINES_ALL l,
20 		RA_CUST_TRX_TYPES_ALL t
21 	WHERE
22 		h.customer_trx_id = l.customer_trx_id  	and
23 		h.cust_trx_type_id = t.cust_trx_type_id and
24 		l.interface_line_context = 'GEMMS OP'  	and
25 		t.type = t_trx_type        		and
26 		t.name like t_trx_type_name
27 		order by h.trx_number;
28 
29 CURSOR cur_get_inv_lines_id2(t_trx_type	VARCHAR2,
30 		t_trx_type_name	VARCHAR2, t_invoice_number VARCHAR2)IS
31 	SELECT DISTINCT
32 		h.trx_number,
33 		t.name,
34 		l.interface_line_attribute1
35 	FROM
36 		RA_CUSTOMER_TRX_ALL h, RA_CUSTOMER_TRX_LINES_ALL l,
37 		RA_CUST_TRX_TYPES_ALL t
38 	WHERE
39 		h.customer_trx_id = l.customer_trx_id  	and
40 		h.cust_trx_type_id = t.cust_trx_type_id and
41 		l.interface_line_context = 'GEMMS OP'  	and
42 		t.type = t_trx_type        		and
43 		t.name like t_trx_type_name		and
44 		h.trx_number > t_invoice_number
45 		order by h.trx_number;
46 
47 CURSOR cur_get_inv_lines_id3(t_trx_type	VARCHAR2,
48 		t_trx_type_name	VARCHAR2, t_invoice_number VARCHAR2)IS
49 	SELECT DISTINCT
50 		h.trx_number,
51 		t.name,
52 		l.interface_line_attribute1
53 	FROM
54 		RA_CUSTOMER_TRX_ALL h, RA_CUSTOMER_TRX_LINES_ALL l,
55 		RA_CUST_TRX_TYPES_ALL t
56 	WHERE
57 		h.customer_trx_id = l.customer_trx_id  	and
58 		h.cust_trx_type_id = t.cust_trx_type_id and
59 		l.interface_line_context = 'GEMMS OP'  	and
60 		t.type = t_trx_type        		and
61 		t.name like t_trx_type_name		and
62 		h.trx_number < t_invoice_number
63 		order by h.trx_number;
64 
65 CURSOR cur_get_inv_lines_id4(t_trx_type	VARCHAR2,
66 		t_trx_type_name	VARCHAR2, t_invoice_number VARCHAR2)IS
67 	SELECT DISTINCT
68 		h.trx_number,
69 		t.name,
70 		l.interface_line_attribute1
71 	FROM
72 		RA_CUSTOMER_TRX_ALL h, RA_CUSTOMER_TRX_LINES_ALL l,
73 		RA_CUST_TRX_TYPES_ALL t
74 	WHERE
75 		h.customer_trx_id = l.customer_trx_id  	and
76 		h.cust_trx_type_id = t.cust_trx_type_id and
77 		l.interface_line_context = 'GEMMS OP'  	and
78 		t.type = t_trx_type        		and
79 		t.name like t_trx_type_name		and
80 		h.trx_number >= t_invoice_number
81 		order by h.trx_number;
82 
83 CURSOR cur_get_inv_lines_id5(t_trx_type	VARCHAR2,
84 		t_trx_type_name	VARCHAR2, t_invoice_number VARCHAR2)IS
85 	SELECT DISTINCT
86 		h.trx_number,
87 		t.name,
88 		l.interface_line_attribute1
89 	FROM
90 		RA_CUSTOMER_TRX_ALL h, RA_CUSTOMER_TRX_LINES_ALL l,
91 		RA_CUST_TRX_TYPES_ALL t
92 	WHERE
93 		h.customer_trx_id = l.customer_trx_id  	and
94 		h.cust_trx_type_id = t.cust_trx_type_id and
95 		l.interface_line_context = 'GEMMS OP'  	and
96 		t.type = t_trx_type        		and
97 		t.name like t_trx_type_name		and
98 		h.trx_number <= t_invoice_number
99 		order by h.trx_number;
100 
101 CURSOR cur_get_inv_lines_id6(t_trx_type	VARCHAR2,
102 		t_trx_type_name	VARCHAR2, t_invoice_number VARCHAR2)IS
103 	SELECT DISTINCT
104 		h.trx_number,
105 		t.name,
106 		l.interface_line_attribute1
107 	FROM
108 		RA_CUSTOMER_TRX_ALL h, RA_CUSTOMER_TRX_LINES_ALL l,
109 		RA_CUST_TRX_TYPES_ALL t
110 	WHERE
111 		h.customer_trx_id = l.customer_trx_id  	and
112 		h.cust_trx_type_id = t.cust_trx_type_id and
113 		l.interface_line_context = 'GEMMS OP'  	and
114 		t.type = t_trx_type        		and
115 		t.name like t_trx_type_name		and
116 		h.trx_number like t_invoice_number
117 		order by h.trx_number;
118 
119 END GMF_AR_GET_INVOICE_LINES_ID;