DBA Data[Home] [Help]

PACKAGE: APPS.GMF_VALIDATE_ACCOUNT

Source


1 PACKAGE gmf_validate_account AUTHID CURRENT_USER AS
2 /* $Header: gmfactvs.pls 115.2 2003/08/05 20:09:42 vchukkap noship $ */
3 
4   --
5   -- plsql table to store Acct Unit and Acct Number combination
6   --
7   TYPE acct_combination_TabType IS TABLE OF VARCHAR2(250) INDEX BY BINARY_INTEGER;
8 
9   --
10   -- plsql table to store error message returned from call to validate_segs FND call
11   --
12   TYPE error_messages_TabType IS TABLE OF VARCHAR2(250) INDEX BY BINARY_INTEGER;
13 
14   --
15   -- In case cross-validation procedure is called from form or concurrent program
16   -- this plsql record will be populated with all invalid combinations and error
17   -- messages
18   --
19   TYPE error_messages_RecType IS RECORD
20   (
21 	acct_combination	acct_combination_TabType,
22 	error_messages		error_messages_TabType
23   );
24   errors	error_messages_RecType;
25 
26   --
27   -- Main cross-validation procedure which performs Cross-Validation.
28   -- Will be called from SubLedger program and from next procedure which
29   -- in turn is called from form
30   --
31   PROCEDURE validate_segments
32   (
33 	p_co_code		IN		gl_plcy_mst.co_code%TYPE,
34 	p_acctg_unit_id		IN		gl_accu_mst.acctg_unit_id%TYPE,
35 	p_acct_id		IN		gl_acct_mst.acct_id%TYPE,
36 	p_acctg_unit_no		IN		gl_accu_mst.acctg_unit_no%TYPE,
37 	p_acct_no		IN		gl_acct_mst.acct_no%TYPE,
38 	p_create_combination	IN		VARCHAR2 DEFAULT 'N',
39 	x_ccid			OUT NOCOPY	NUMBER,
40 	x_concat_seg		OUT NOCOPY	VARCHAR2,
41 	x_status		OUT NOCOPY	VARCHAR2,
42 	x_errmsg		OUT NOCOPY	VARCHAR2
43   );
44 
45 
46   --
47   -- This procedure is called from account mapping form. Generates combinations
48   -- using all Account Units defined for the company and calls above procedure
49   -- to perform cross-validation.
50   --
51   -- Bug 3080232. Added additional parameter p_acct_no.
52   PROCEDURE cross_validate
53   (
54 	p_co_code		IN		gl_plcy_mst.co_code%TYPE,
55 	p_acct_id		IN		gl_acct_mst.acct_id%TYPE,
56 	p_called_from		IN		VARCHAR2,
57 	x_status		OUT NOCOPY	VARCHAR2,
58 	p_acct_no		IN		gl_acct_mst.acct_no%TYPE DEFAULT NULL
59   );
60 
61   --
62   -- Procedure to validate the accu and acct combination.
63   -- If combination or accu/acct ids exits then returns respective ids. Otherwise,
64   -- if p_create_acct = 'Y', then creates code combination in GL and
65   -- creates the accu and acct in OPM and returns accu_id and acct_id.
66   --
67   PROCEDURE get_accu_acct_ids
68   (
69 	p_co_code		IN		gl_plcy_mst.co_code%TYPE,
70 	p_acctg_unit_no		IN		gl_accu_mst.acctg_unit_no%TYPE,
71 	p_acct_no		IN		gl_acct_mst.acct_no%TYPE,
72 	p_create_acct		IN		VARCHAR2 DEFAULT 'N',
73 	x_acctg_unit_id		OUT NOCOPY	gl_accu_mst.acctg_unit_id%TYPE,
74 	x_acct_id		OUT NOCOPY	gl_acct_mst.acct_id%TYPE,
75 	x_ccid			OUT NOCOPY	NUMBER,
76 	x_status		OUT NOCOPY	VARCHAR2,
77 	x_errmsg		OUT NOCOPY	VARCHAR2
78   );
79 
80   -- Function to return account no
81   FUNCTION get_acct_no (
82 	p_co_code		IN	gl_acct_mst.co_code%TYPE,
83 	p_acct_id		IN	gl_acct_mst.acct_id%TYPE
84   ) 	RETURN VARCHAR2;
85 
86 
87   -- Function to return account unit no
88   FUNCTION get_acctg_unit_no (
89 	p_co_code		IN	gl_accu_mst.co_code%TYPE,
90 	p_acctg_unit_id		IN	gl_accu_mst.acctg_unit_id%TYPE
91   ) 	RETURN VARCHAR2;
92 
93   --
94   -- Fuction to return error messages record type to forms.
95   --
96   FUNCTION get_error_messages RETURN error_messages_RecType;
97 
98 END gmf_validate_account;