DBA Data[Home] [Help]

PACKAGE: APPS.GMS_AWARDS_DIST_PKG

Source


1 PACKAGE  GMS_AWARDS_DIST_PKG  AUTHID CURRENT_USER as
2 -- $Header: gmsadlss.pls 120.1 2006/07/01 06:59:53 cmishra noship $
3 
4 	-- -------------------------------------------------------
5 	-- Declare package variables used in Workflow process
6 	-- -------------------------------------------------------
7 
8    G_doc_type			varchar2(3) ;
9    -- ---------------------------------------------------
10    -- G_rec_index identifies the document type and
11    -- corresponding variables
12    -- 1	-	Requisition
13    -- 2	-	PO
14    -- 3 -	AP Invoice
15    -- 4	-	APD distribution Set
16    -- 5 -	EXP Expenditure Entry
17    -- 6 -	ENC Expenditure Inquiry
18    -- ----------------------------------------------------
19 
20    -- ---------------------------------------------------
21    -- GET_AWARD_SET_ID : get the nextval from the sequence
22    -- and returns the award_set_id. This should be called
23    -- before create_adls.
24    -- ---------------------------------------------------
25    FUNCTION get_award_set_id	return NUMBER ;
26 
27    -- ----------------------------------------------------------------------------
28    -- CREATE_ADLS : Create Adls, Insert a new record into GMS_AWARD_DISTRIBUTIONS
29    -- Table.  The input parameter to this is gms_award_distributions%ROWTYPE.
30    -- ----------------------------------------------------------------------------
31    PROCEDURE create_adls( p_adls_rec	gms_award_distributions%ROWTYPE ) 	;
32 
33 
34    -- ----------------------------------------------------------------------------
35    -- UPDATE_ADLS : UPDATE_Adls, this is defined to update record into
36    -- gms_award_distributions table.
37    -- ----------------------------------------------------------------------------
38    PROCEDURE update_adls( p_adls_rec	gms_award_distributions%ROWTYPE )  ;
39 
40 
41    -- ---------------------------------------------------------------------
42    -- API to delete gms_award_distribution record.
43    -- ---------------------------------------------------------------------
44    PROCEDURE delete_adls( p_distribution_set_id	NUMBER )	;
45 
46    -- ---------------------------------------------------------------------
47    -- API to delete gms_award_distribution record.
48    -- 3733123 - PJ.M:B5: QA:P11:OTH: MANUAL ENC/EXP  FORM CREATING ORPHAN ADLS
49    -- ---------------------------------------------------------------------
50    PROCEDURE delete_adls( p_doc_header_id       IN NUMBER,
51                           p_doc_distribution_id IN NUMBER,
52                           p_doc_type            IN VARCHAR2 ) ;
53 
54    -- ----------------------------------------------------
55    -- When validate award item  always create a new
56    -- record into gms_award_distribution table. This may
57    -- result into lot of dangling records which are not
58    -- connected with anything like EXP, AP, INV, PO and REQ.
59    -- ------------------------------------------------------
60    PROCEDURE clean_dangling_adls ;
61 
62 
63    -- ---------------------------------------------------------------
64    -- COPY_ADLS : This is called from funds checker to create adls
65    -- for AP reversal prorate credit memo. PO match , Autocreate PO
66    -- ---------------------------------------------------------------
67    PROCEDURE copy_adls( p_award_set_id      IN  NUMBER ,
68                         P_NEW_AWARD_SET_ID  OUT NOCOPY NUMBER,
69                         p_doc_type          IN  varchar2,
70                         p_dist_id           IN  NUMBER,
71                         P_INVOICE_ID        IN  NUMBER DEFAULT NULL,
72                         p_dist_line_num     IN  NUMBER DEFAULT NULL,
73                         p_raw_cost          IN  NUMBER DEFAULT NULL,
74 			p_called_from       IN  varchar2 DEFAULT 'NOT_MISC_SYNCH_ADLS') ; -- Bug 5344693 : Added the parameter p_called_from.
75 
76    -- --------------------------------------------------------------
77    -- InsSi_items - Creates ADLS for the new expenditure items
78    --				created for Supplier Invoice Interface from
79    --				payables.
80    --				This is called from PA_TRX_IMPORT.NEWexpend.
81    -- ---------------------------------------------------------------
82    /*****************************************************************
83    ** This is moved to GMS_PA_API - gmspax1b.pls
84    ** ******************************************
85    PROCEDURE  InsSI_Items( X_user   IN NUMBER
86 						, X_login             IN NUMBER
87 						, X_module            IN VARCHAR2
88 						, X_calling_process   IN VARCHAR2
89 						, Rows                IN BINARY_INTEGER
90 						, X_status            IN OUT NOCOPY NUMBER ) ;
91    *****************************************************************/
92 
93    -- --------------------------------------------------------------
94    --  PROCEDURE update_billable_flag  (p_expenditure_item_id in number)
95    --        This procedure will initialize the billable flag
96    --        in PA_EXPENDITURE_ITEMS_ALL
97    --        Called from trigger GMS_UPDATE_EI_BILLABLE_FLAG
98    --        on GMS_AWARD_DISTRIBUTIONS
99    --        this Procedure is created as direct update of
100    --        other products tables directly from trigger leads to warning in
101    --        adpatch
102    -- --------------------------------------------------------------
103      PROCEDURE update_billable_flag  (p_expenditure_item_id in number);
104 
105     -- Start of comments
106     -- -----------------
107     -- API Name         : verify_create_adl
108     -- Type             : public
109     -- Pre Reqs         : None
110     -- Function         : This is used to create award distribution lines
111     --                    using the bulk processing. This provides a
112     --                    interface with PO/REQ/REL.
113     -- Logic            : Identify the newly created PO/REQ/REL distribution
114     --                    lines and create award distribution lines for
115     --                    sponsored project.
116     -- Parameters       :
117     -- IN               : p_header_id    IN     NUMBER
118     --                                  The Puchase Order/Requisition id created
119     --					and that may have distributions associated with
120     --                                  an award.
121     --                  : p_doc_type  IN  varchar2
122     --                      This will have value as PO/REQ/REL .
123     --
124     --                  : p_doc_num   IN  varchar2
125     --                      This will have  PO/REQ/REL Number.
126     -- Calling Place    :  POST-FORMS-COMMIT event in PO/REQ/REL
127     --
128     -- End of comments
129     -- ----------------
130 
131     PROCEDURE verify_create_adls( p_header_id  IN NUMBER,
132 			              p_doc_type   IN VARCHAR2,
133 	                          p_doc_num    IN VARCHAR2   ) ;
134 
135     -- Start of comments
136     -- -----------------
137     -- API Name         : copy_exp_adls
138     -- BUG              : 3684711
139     -- Description      : PJ.M:B5:P11:QA:FCE:PAXTREPE: UNABLE TO ENTER A REVERSAL BATCH GMS_AWARD_REQD
140     -- Type             : Private
141     -- Pre Reqs         : None
142     -- Function         : This is used to create award distribution lines for a reversed expenditure item.
143     -- Logic            : Copy the award distribution from the original expenditure item.
144     -- Parameters       :
145     -- IN               : P_exp_item_id    IN     NUMBER
146     --                    The original expenditure item.
147     --                  : p_backout_item_id  IN  NUMBER
148     --                     Reversed expenditure item ID.
149     --                    p_adj_activity IN VARCHAR2
150     --                      adjustment activity
151     --                    P_module, P_user, P_login
152     --                     Calling module, user and login details
153     --                    X_status out number
154     --                     API status
155     --                      This will have  PO/REQ/REL Number.
156     -- Calling Place    :  PA_ADJUSTMENTS.backout item (PAXTADJB.pls )
157     --
158     -- End of comments
159     -- ----------------
160 
161     PROCEDURE  copy_exp_adls( P_exp_item_id         IN NUMBER
162 			      , p_backout_item_id   IN NUMBER
163 			      , p_adj_activity      IN VARCHAR2
164 			      , P_module            IN VARCHAR2
165 			      , P_user              IN NUMBER
166 			      , P_login             IN NUMBER
167 			      , X_status            OUT nocopy NUMBER );
168 
169 end GMS_AWARDS_DIST_PKG;