1 package GMS_PO_API2_GRP AUTHID CURRENT_USER as
2 --$Header: gmsgpo2s.pls 120.1 2005/07/26 14:22:20 appldev ship $
3
4
5 TYPE tbl_num is table of number index by binary_integer;
6 TYPE tbl_v1 is table of varchar2(1) index by binary_integer;
7 TYPE tbl_v15 is table of varchar2(15) index by binary_integer;
8
9 TYPE purge_in_rectype is record
10 ( entity_name VARCHAR2(50),
11 entity_ids TBL_NUM
12 );
13
14 TYPE purge_out_rectype is record
15 ( entity_ids TBL_NUM,
16 action TBL_V1
17 );
18
19
20
21 -- start of comments
22 -- --------------------
23 -- Standard Parameters : Standard parameters descriptions
24 -- p_api_version : This parameter is used by the api to compare the version
25 -- numbers of incoming calls to its current version number.
26 -- return an unexpected error if they are incompatible.
27 -- p_init_msg_list : This allows api called to request that the API does
28 -- the initialization of the message list on their behalf,
29 -- thus reducing the number of calls required by a caller
30 -- in order to execute an API.
31 --
32 -- p_commit : p_commit parameter is used by api caller to ask the API
33 -- to commit on their behalf after performing its function.
34 --
35 -- p_validation_level : APIs use the parameter to determine which validation steps
36 -- should be executed and which steps should be skipped.
37 -- value 0 = none validations
38 -- value 100 = FULL validations.
39 --
40 -- x_return_status : out varchar2
41 -- represents the result of all the operations performed by
42 -- the API and must have one of the following values.
43 -- G_RET_STS_SUCCESS = 'S'
44 -- G_RET_STS_ERROR = 'E'
45 -- G_RET_STS_UNEXP_ERROR= 'U'
46 --
47 -- x_msg_count : OUT NUMBER
48 -- the message count holds the number of messages in the
49 -- API message list. If this number is one then message data
50 -- holds the message in an encoded format.
51 -- x_msg_data : OUT number
52 -- message data holds the message in an encoded format.
53 -- end of comments
54 -- -----------------
55
56 -- Start of comments
57 -- -----------------
58 -- API Name : CREATE_ADLS
59 -- Type : This is a Public package program unit.
60 -- Pre Reqs : None
61 -- Function : This API is for creating Award Distribution Lines for new Purchase
62 -- Order Distributions created through Copy Document feature in PO.,
63 -- 2 : This API is for creating Award Distribution Lines for new Purchase
64 -- Order Distributions created through AUTOCREATE function
65 -- 3 : This API is for creating Award Distribution Lines for new Purchase
66 -- Order Distributions created through Create release concurrent process
67 -- function
68 --
69 -- Logic : Copy award distribution line from the award set id passed.
70 -- Calling API : po_interface_s.create_distributions
71 -- Calling API : PO_RELGEN_PKG.create_release_distribution
72 -- Calling API : PO_COPYDOC_S1.insert_distribution
73 -- Parameters :
74 -- : Standard parameters
75 -- p_api_version, p_commit, p_init_msg_list,
76 -- p_validation_level, x_msg_count, x_msg_data,
77 -- x_return_status
78 -- IN OUT
79 -- : p_interface_obj gms_po_interface_type
80 -- This is a SQL object having a following table
81 -- elements.
82 -- distribution_id - Holds distribution ID
83 -- distribution_num Holds distribution number
84 -- project_id Holds Project ID
85 -- task_id Holds Task ID
86 -- award_set_id_in Holds Award Set Id Reference
87 -- award_set_id_out Holds return value of new
88 -- award distribution line
89 -- reference.
90 -- IN p_calling_module -
91 -- This tells calling API for create_adls.
92 -- COPYDOC, AUTOCREATE, CREATE_RELEASE, CHANGE_PO
93 -- End of comments
94 -- ----------------
95
96 PROCEDURE CREATE_ADLS
97 ( p_api_version in number,
98 p_init_msg_list in varchar2,
99 p_commit in varchar2,
100 p_validation_level in number,
101 x_msg_count out nocopy number,
102 x_msg_data out nocopy varchar2,
103 x_return_status out nocopy varchar2,
104 p_calling_module in varchar2,
105 p_interface_obj in out nocopy gms_po_interface_type) ;
106
107
108 -- Start of comments
109 -- -----------------
110 -- API Name : validate_po_purge
111 -- Type : This is a Public package program unit.
112 -- Pre Reqs : None
113 -- Function : This api will determine if document can be purged
114 -- or not. The structure will hold the value 'N' to disallow
115 -- the purge.
116 -- Logic : A structure indicating whether PO documents can be purged
117 -- or corresponding entry in x_out_rec.purge_allowed will indicate
118 -- whether the document is purgable or not. e.g., If
119 -- x_out_rec.purge_allowedNi) is 'Y', it means that
120 -- the document specified in ip_in_rec.entity_ids(i) will not be purged.
121 -- The number of records in x_out_rec.purge_allowed should always
122 -- one that grants do not want to purge.
123
124 -- Calling API : ???????????
125 -- Parameters :
126 -- : Standard parameters
127 -- p_api_version, p_commit, p_init_msg_list,
128 -- p_validation_level, x_msg_count, x_msg_data,
129 -- x_return_status
130 --IN OUT:
131 --p_in_rec
132 -- A structure that holds PO information
133 -- p_in_rec.entity_name will expect 'PO_HEADERS',
134 -- while p_in_rec.entity_ids will be a table of all document
135 -- header ids that PO are about to be purged
136 --OUT:
137 --x_out_rec
138 -- A structure indicating whether PO documents can be purged
139 -- or corresponding entry in x_out_rec.purge_allowed will indicate
140 -- whether the document is purgable or not. e.g., If
141 -- x_out_rec.purge_allowedNi) is 'Y', it means that
142 -- the document specified in ip_in_rec.entity_ids(i) will not be purged.
143 -- The number of records in x_out_rec.purge_allowed should always
144 -- one that grants do not want to purge.
145 -- End of comments
146 -- ----------------
147 PROCEDURE validate_po_purge ( p_api_version IN NUMBER,
148 p_init_msg_list IN VARCHAR2,
149 p_commit IN VARCHAR2,
150 p_validation_level IN NUMBER,
151 x_return_status OUT NOCOPY VARCHAR2,
152 x_msg_count OUT NOCOPY NUMBER,
153 x_msg_data OUT NOCOPY VARCHAR2,
154 p_in_rec IN PURGE_IN_RECTYPE,
155 x_out_rec OUT NOCOPY PURGE_OUT_RECTYPE
156 );
157
158
159 -- Start of comments
160 -- -----------------
161 -- API Name : po_purge
162 -- Type : This is a Public package program unit.
163 -- Pre Reqs : None
164 -- Function : This will delette award distribution lines.
165 -- Logic : p_in_rec will have list of po header ids that
166 -- need to be purged. Grants will delete the
167 -- corresponding award distribution lines.
168 -- Calling API : ???????????
169 -- Parameters:
170 -- IN:
171 -- p_in_rec
172 -- A structure that holds PO information
173 -- p_in_rec.entity_name will expect 'PO_HEADERS', while
174 -- p_in_rec.entity_ids
175 -- will be a table of all document header ids that PO are
176 -- about to be purged
177 -- End of comments
178 -- -----------------
179
180 PROCEDURE po_purge ( p_api_version IN NUMBER,
181 p_init_msg_list IN VARCHAR2,
182 p_commit IN VARCHAR2,
183 p_validation_level IN NUMBER,
184 x_return_status OUT NOCOPY VARCHAR2,
185 x_msg_count OUT NOCOPY NUMBER,
186 x_msg_data OUT NOCOPY VARCHAR2,
187 p_in_rec IN PURGE_IN_RECTYPE
188 );
189
190 -- Start of comments
191 -- -----------------
192 -- API Name : get_award_number
193 -- Type : This is a Public package program unit.
194 -- Pre Reqs : None
195 -- Function : This API is for deriving the award number for the award_set_id
196 -- passed to the api. This is used in PO Fundscheck code to
197 -- populate reference column in gl bc packet with award number.
198 -- Logic : get the award number from the adl and gms_awards_all..
199 -- Calling API : PO funds check code PL/SQL Version.
200 -- Parameters :
201 -- : Standard parameters
202 -- p_api_version, p_commit, p_init_msg_list,
203 -- p_validation_level, x_msg_count, x_msg_data,
204 -- x_return_status
205 -- IN
206 -- : p_award_set_id_tbl
207 -- The list of award set IDs.
208 -- OUT x_award_num_tbl
209 -- The list of award number sent out.
210 -- End of comments
211 -- ----------------
212 PROCEDURE get_award_number ( p_api_version in NUMBER,
213 p_init_msg_list in varchar2,
214 p_commit in varchar2,
215 p_validation_level in NUMBER,
216 x_msg_count out nocopy number,
217 x_msg_data out nocopy varchar2,
218 x_return_status out nocopy varchar2,
219 p_award_set_id_tbl IN tbl_num,
220 x_award_num_tbl OUT nocopy tbl_v15);
221 END GMS_PO_API2_GRP ;