DBA Data[Home] [Help]

PACKAGE: APPS.GMS_PA_API

Source


1 PACKAGE GMS_PA_API AUTHID CURRENT_USER AS
2 /* $Header: gmspax1s.pls 120.3 2007/02/06 09:51:25 rshaik ship $ */
3 
4 
5  	SOURCE_AWARD_ID 		NUMBER ;
6 	x_default_dist_award_id         NUMBER ;
7  	DEST_AWARD_ID   		NUMBER ;
8  	SOURCE_PROJECT_ID 		NUMBER ;
9 	DEST_PROJECT_ID  		NUMBER ;
10 	X_ALLOWABLE_ID  		NUMBER ;
11 	X_END_DATE      DATE ;
12 	X_EXPENDITURE_TYPE VARCHAR2(30) ;
13 	X_ITEM_DATE     DATE ;
14 	X_TYPE          VARCHAR2(30) ;
15         X_error         VARCHAR2(100) ;
16         X_adj_action    VARCHAR2(30) ;
17 		X_message_num   NUMBER(1); -- Bug 2458518
18 	FUNCTION return_error return VARCHAR2 ;
19 
20 	-- ------------------------------------------------------------------
21 	-- This procedure is called by GMS.pld to copy the award information .
22 	-- ------------------------------------------------------------------
23 	PROCEDURE GMS_SPLIT  (x_expenditure_item_id IN NUMBER ) ;
24 
25     	-- ------------------------------------------------------
26         -- API to allow vertical application to compare awards
27         -- X_ADJUST_ACTION = 'MASADJUST'
28         -- -------------------------------------------------------
29         FUNCTION  VERT_ALLOW_ACTION(X_ADJUST_ACTION IN VARCHAR2) RETURN VARCHAR2 ;
30 
31 
32 	PROCEDURE GMS_SET_AWARD(x_source_award_id IN NUMBER , x_dest_award_id IN NUMBER);
33 
34 	PROCEDURE GMS_SET_PROJECT_ID(x_source_project_id IN NUMBER , x_dest_project_id IN NUMBER);
35 
36 	-- ----------------------------------------------------------------------------------------
37         -- This is called from PAXEIADJ.pll while overriding the Task validation . This will return
38 	-- the X_STATUS which will contain the error Label .
39 	-- ----------------------------------------------------------------------------------------
40   	FUNCTION VERT_TRANSFER (X_EXP_ID 		IN NUMBER ,
41                              	 X_STATUS               IN OUT NOCOPY VARCHAR2) RETURN BOOLEAN ;
42 
43 	-- ------------------------------------------------------------------
44 	-- This procedure is called form TRANSFER procedure in PAXTADJB.pls
45         -- to create adls both for TRANSFER and MASSADJUST
46 	-- ------------------------------------------------------------------
47          PROCEDURE VERT_ADJUST_ITEMS( X_CALLING_PROCESS 	IN   VARCHAR2 ,
48                             	      X_ROWS                    IN   NUMBER,
49 				      X_status		        IN OUT NOCOPY   NUMBER);
50 
51 
52 	-- ------------------------------------------------------------------
53         -- This is to verify whether the exp_item is trasnferable or not.
54         -- We check expenditure_type,expenditure_date,stauts of the exp_id
55 	-- in AP and compare the source and dest awards .
56 	-- ------------------------------------------------------------------
57 	FUNCTION vert_allow_adjustments( x_expenditure_item_id IN  NUMBER )
58 	return BOOLEAN ;
59 
60    -- ----------------------------------------------------------
61    -- Supplier Invoice Interface logic of creating ADLS.
62    -- LD PA Interface  logic of creating ADLS.
63    -- trx_interface - Creates ADLS for the new expenditure items
64    --               created for PA  Interface from payables/LD.
65    --               This is called after PA_TRX_IMPORT.NEWexpend.
66    -- -----------------------------------------------------------
67   PROCEDURE  vert_trx_interface( X_user              IN NUMBER
68                           , X_login             IN NUMBER
69                           , X_module            IN VARCHAR2
70                           , X_calling_process   IN VARCHAR2
71                           , Rows                IN BINARY_INTEGER
72                           , X_status            IN OUT NOCOPY NUMBER
73                           , X_GL_FLAG           IN VARCHAR2 ) ;
74 
75   -- ----------------------------------------------------------------
76   -- API to allow vertical applications to take actions following the
77   -- creation of AP distribution lines.
78   -- This is called from PA_XFER_ADJ.
79   -- -----------------------------------------------------------------
80   PROCEDURE VERT_PAAP_SI_ADJUSTMENTS( x_expenditure_item_id      IN NUMBER,
81 							     x_invoice_id               IN NUMBER,
82 								 x_distribution_line_number IN NUMBER,
83 								 x_cdl_line_num				IN NUMBER,
84 								 x_project_id               IN NUMBER,
85 								 x_task_id                  IN NUMBER,
86 								 status                 IN OUT NOCOPY NUMBER ) ;
87 
88   -- ----------------------------------------------------------------
89   -- API to allow vertical applications to validate transaction
90   -- interface. This is called from PA_TRX_IMPORTS just after ValidateItem
91   -- -----------------------------------------------------------------
92   PROCEDURE VERT_APP_VALIDATE(  X_transaction_source    IN VARCHAR2,
93                                 X_CURRENT_BATCH         IN VARCHAR2,
94                                 X_txn_interface_id      IN NUMBER ,
95 								X_org_id				IN NUMBER,
96                                 X_status            IN OUT NOCOPY Varchar2 ) ;
97 
98 
99 
100   PROCEDURE VERT_SI_ADJ ( x_expenditure_item_id			IN 	NUMBER,
101 						  x_invoice_id					IN  NUMBER,
102 						  x_distribution_line_number	IN  NUMBER,
103 						  x_project_id					IN  NUMBER,
104 						  x_task_id						IN  NUMBER,
105 						  status				    IN OUT NOCOPY  NUMBER ) ;
106 
107   FUNCTION IS_SPONSORED_PROJECT ( X_project_id	IN NUMBER ) return BOOLEAN ;
108 
109 
110   -- --------------------------------------------------------------------
111   -- BUG: 1332945 - GMS not doing validations for award informations.
112   -- called from GMS_TXN_INTERFACE_AIT1
113   -- file : gmstxntr.sql
114   -- Gms_validations may reject transaction import records.
115   -- --------------------------------------------------------------------
116   PROCEDURE VERT_REJECT_TXN(	x_txn_interface_id		IN NUMBER,
117 								x_batch_name			IN varchar2,
118 								x_txn_source			IN VARCHAR2,
119 								X_status				IN VARCHAR2,
120 								X_calling_source		IN VARCHAR2 DEFAULT NULL ) ;
121 
122   -- ---------------------------------------------------------------------
123   -- BUG:1380464 - net zero invoice items having different awards are not
124   --               picked up by supplier invoice interface process.
125   -- Call to this function is added in package PAAPIMP_PKG.
126   -- ----------------------------------------------------------------------
127   FUNCTION VERT_GET_AWARD_ID( x_award_set_id IN NUMBER,
128 							  x_invoice_id	 IN NUMBER,
129 							  x_dist_lno	 IN NUMBER ) return NUMBER ;
130 
131  -- -----------------------------------------------------------------------
132  -- Function to check whether GMS is installed or not
133  -- -----------------------------------------------------------------------
134    FUNCTION VERT_INSTALL return BOOLEAN ;
135  -- ----------------------------------------------------------------------
136  -- Procedure to set the Adjust_action for recalculate raw-cost or burden-cost
137  -- ----------------------------------------------------------------------
138    PROCEDURE set_adjust_action(X_adjust_action IN VARCHAR2) ;
139 
140 
141   PROCEDURE Override_Rate_Rev_Id(
142                            p_tran_item_id          IN  number DEFAULT NULL,
143                            p_tran_type             IN  Varchar2 DEFAULT NULL,
144                            p_task_id         	   IN  number DEFAULT NULL,
145                            p_schedule_type         IN  Varchar2 DEFAULT NULL,
146                            p_exp_item_date         IN  Date DEFAULT NULL,
147                            x_sch_fixed_date        OUT NOCOPY Date,
148                            x_rate_sch_rev_id 	   OUT NOCOPY number,
149                            x_status                OUT NOCOPY number ) ;
150 
151   --- pragma RESTRICT_REFERENCES (Override_Rate_Rev_Id, WNDS, WNPS ); /* commented as per 3786374 */
152 
153   -- ========================================================================================
154   --		30-APR-2001	aaggarwa	BUG		: 1751995
155   --								Description	: Multiple awards funding single projects causes
156   --		  						burdening problem.
157   --								Resolution	: PA_CLIENT_EXTN_BURDEN_SUMMARY.CLIENT_GROUPING
158   --		  						was modified for grants accounting to add award
159   --		  						parameter for grouping. This will allow to create
160   --		  						burden summarization lines for each award.
161   -- ========================================================================================
162   FUNCTION CLIENT_GROUPING
163 	(
164 		p_src_expnd_type     IN PA_EXPENDITURE_TYPES.expenditure_type%TYPE,
165      		p_src_ind_expnd_type IN PA_EXPENDITURE_TYPES.expenditure_type%TYPE,
166 		p_src_attribute1     IN PA_EXPENDITURE_TYPES.attribute1%TYPE ,
167 		v_grouping_method    IN varchar2
168 	) return varchar2 ;
169 
170   -- -----------------------------------------------------
171   -- Function to check the award status. This function
172   -- is called while doing adjustments in exp inquiry form.
173   -- -----------------------------------------------------
174   FUNCTION IS_AWARD_CLOSED(x_expenditure_item_id in number ,x_task_id in NUMBER ,x_doc_type in varchar2 default 'EXP') return varchar2 ; -- Bug 5726575
175 
176 /* R12 Changes Start */
177   -- -------------------------------------------------------------------------
178   -- This function gets the award id for the specified expenditure item
179   -- -------------------------------------------------------------------------
180   FUNCTION VERT_GET_EI_AWARD_ID(p_expenditure_item_id NUMBER)
181   RETURN NUMBER;
182 
183   -- -------------------------------------------------------------------------
184   -- This function checks whether the expenditure item belongs to the Source
185   -- Award or not
186   -- -------------------------------------------------------------------------
187   FUNCTION CHECK_ADJUST_ALLOWED(x_expenditure_item_id IN NUMBER)
188   RETURN BOOLEAN;
189 /* R12 Changes End */
190 
191 
192 /* Added for Bug 5490120
193    This function accepts the expenditure_item_id as the input and returns the award associated with
194    this expenditure item.
195    The function raises an exception if no award is associated with the expenditure item.
196 */
197   FUNCTION VERT_GET_AWARD_NUMBER(
198     p_expenditure_item_id IN PA_EXPENDITURE_ITEMS_ALL.EXPENDITURE_ITEM_ID%TYPE
199    ) RETURN VARCHAR2;
200 
201 /* Added for Bug 5490120
202    This function accepts the expenditure_item_id as the input.
203    If the exenditure item belongs to a sponsored project:
204      The function determines the Award Number and verifies if the Award Number falls in the specified range.
205        If yes, then the function returns 'Y'.
206        If no, then the funciton returns 'N'.
207    If the expenditure item belongs to a non-sponsored project:
208      If award range is not specified, then the function returns 'Y'.
209      If award range is specified, then the function returns 'N'.
210 */
211   FUNCTION VERT_IS_AWARD_WITHIN_RANGE(
212     p_expenditure_item_id IN PA_EXPENDITURE_ITEMS_ALL.EXPENDITURE_ITEM_ID%TYPE
213    ,p_from_award_number IN GMS_AWARDS_ALL.AWARD_NUMBER%TYPE DEFAULT NULL
214    ,p_to_award_number IN GMS_AWARDS_ALL.AWARD_NUMBER%TYPE DEFAULT NULL
215    ) RETURN VARCHAR2;
216 
217 END GMS_PA_API;