DBA Data[Home] [Help]

PACKAGE: APPS.PO_AUTOCREATE_DOC

Source


1 PACKAGE PO_AUTOCREATE_DOC AUTHID CURRENT_USER AS
2 /* $Header: POXWATCS.pls 120.2.12020000.2 2013/02/11 01:35:43 vegajula ship $ */
3 
4 procedure start_wf_process (ItemType           	   VARCHAR2,
5                             ItemKey                VARCHAR2,
6                             workflow_process   	   VARCHAR2,
7                             req_header_id  	   NUMBER,
8                             po_number          	   VARCHAR2,
9 			    interface_source_code  VARCHAR2,
10 			    org_id		   NUMBER,
11 			    is_federal_flow        VARCHAR2 DEFAULT NULL); --Bug14364343
12 
13 procedure should_req_be_autocreated(itemtype   IN   VARCHAR2,
14                                     itemkey    IN   VARCHAR2,
15                                     actid      IN   NUMBER,
16                                     funcmode   IN   VARCHAR2,
17                                     resultout  OUT NOCOPY  VARCHAR2 );
18 
19 procedure launch_req_line_processing(itemtype  IN   VARCHAR2,
20                                      itemkey   IN   VARCHAR2,
21                                      actid     IN   NUMBER,
22                                      funcmode  IN   VARCHAR2,
23                                      resultout OUT NOCOPY  VARCHAR2 );
24 
25 procedure start_wf_line_process ( ItemType           	VARCHAR2,
26                                   ItemKey            	VARCHAR2,
27                                   workflow_process   	VARCHAR2,
28 			          group_id		NUMBER,
29 			     	  req_header_id		NUMBER,
30 				  req_line_id		NUMBER,
31 				  parent_itemtype	VARCHAR2,
32 				  parent_itemkey	VARCHAR2);
33 
34 
35 procedure get_req_info (itemtype   IN   VARCHAR2,
36                         itemkey    IN   VARCHAR2,
37                         actid      IN   NUMBER,
38                         funcmode   IN   VARCHAR2,
39                         resultout  OUT NOCOPY  VARCHAR2 );
40 
41 
42 procedure rfq_required_check (itemtype   IN   VARCHAR2,
43                         itemkey    IN   VARCHAR2,
44                         actid      IN   NUMBER,
45                         funcmode   IN   VARCHAR2,
46                         resultout  OUT NOCOPY  VARCHAR2 );
47 
48 
49 procedure get_supp_info_for_acrt (itemtype   IN   VARCHAR2,
50                               itemkey    IN   VARCHAR2,
51                               actid      IN   NUMBER,
52                               funcmode   IN   VARCHAR2,
53                               resultout  OUT NOCOPY  VARCHAR2 );
54 
55 procedure is_source_doc_info_ok (itemtype   IN   VARCHAR2,
56                         	itemkey    IN   VARCHAR2,
57                                 actid      IN   NUMBER,
58                                 funcmode   IN   VARCHAR2,
59                                 resultout  OUT NOCOPY  VARCHAR2 );
60 
61 procedure does_contract_exist(itemtype   IN   VARCHAR2,
62                         	itemkey    IN   VARCHAR2,
63                                 actid      IN   NUMBER,
64                                 funcmode   IN   VARCHAR2,
65                                 resultout  OUT NOCOPY  VARCHAR2 );
66 
67 procedure is_req_pcard_line (itemtype   IN   VARCHAR2,
68                         	itemkey    IN   VARCHAR2,
69                                 actid      IN   NUMBER,
70                                 funcmode   IN   VARCHAR2,
71                                 resultout  OUT NOCOPY  VARCHAR2 );
72 
73 procedure get_buyer_from_req_line (itemtype   IN   VARCHAR2,
74                                    itemkey    IN   VARCHAR2,
75                                    actid      IN   NUMBER,
76                                    funcmode   IN   VARCHAR2,
77                                    resultout  OUT NOCOPY  VARCHAR2 );
78 
79 procedure get_buyer_from_item     (itemtype   IN   VARCHAR2,
80                                    itemkey    IN   VARCHAR2,
81                                    actid      IN   NUMBER,
82                                    funcmode   IN   VARCHAR2,
83                                    resultout  OUT NOCOPY  VARCHAR2 );
84 
85 procedure get_buyer_from_category  (itemtype   IN   VARCHAR2,
86                                    itemkey    IN   VARCHAR2,
87                                    actid      IN   NUMBER,
88                                    funcmode   IN   VARCHAR2,
89                                    resultout  OUT NOCOPY  VARCHAR2 );
90 
91 
92 procedure get_buyer_from_source_doc (itemtype   IN   VARCHAR2,
93                                    itemkey    IN   VARCHAR2,
94                                    actid      IN   NUMBER,
95                                    funcmode   IN   VARCHAR2,
96                                    resultout  OUT NOCOPY  VARCHAR2 );
97 
98 procedure get_buyer_from_contract (itemtype   IN   VARCHAR2,
99                                    itemkey    IN   VARCHAR2,
100                                    actid      IN   NUMBER,
101                                    funcmode   IN   VARCHAR2,
102                                    resultout  OUT NOCOPY  VARCHAR2 );
103 
104 procedure get_source_doc_type  (itemtype   IN   VARCHAR2,
105                                 itemkey    IN   VARCHAR2,
106                                 actid      IN   NUMBER,
107                                 funcmode   IN   VARCHAR2,
108                                 resultout  OUT NOCOPY  VARCHAR2 );
109 
110 procedure one_time_item_check  (itemtype   IN   VARCHAR2,
111                                 itemkey    IN   VARCHAR2,
112                                 actid      IN   NUMBER,
113                                 funcmode   IN   VARCHAR2,
114                                 resultout  OUT NOCOPY  VARCHAR2 );
115 
116 procedure get_rel_gen_method  (itemtype   IN   VARCHAR2,
117                                 itemkey    IN   VARCHAR2,
118                                 actid      IN   NUMBER,
119                                 funcmode   IN   VARCHAR2,
120                                 resultout  OUT NOCOPY  VARCHAR2 );
121 
122 procedure cont_wf_autocreate_rel_gen (itemtype   IN   VARCHAR2,
123                                       itemkey    IN   VARCHAR2,
124                                       actid      IN   NUMBER,
125                                       funcmode   IN   VARCHAR2,
126                                       resultout  OUT NOCOPY  VARCHAR2 );
127 
128 procedure insert_cand_req_lines_into_tbl (itemtype   IN   VARCHAR2,
129                                           itemkey    IN   VARCHAR2,
130                                           actid      IN   NUMBER,
131                                           funcmode   IN   VARCHAR2,
132                                           resultout  OUT NOCOPY  VARCHAR2 );
133 
134 procedure group_req_lines (itemtype   IN   VARCHAR2,
135                            itemkey    IN   VARCHAR2,
136                            actid      IN   NUMBER,
137                            funcmode   IN   VARCHAR2,
138                            resultout  OUT NOCOPY  VARCHAR2 );
139 
140 
141 function insert_into_headers_interface (itemtype		     IN  VARCHAR2,
142 					 itemkey		     IN  VARCHAR2,
143 					 x_group_id		     IN  NUMBER,
144 					 x_suggested_vendor_id       IN  NUMBER,
145 					 x_suggested_vendor_site_id  IN  NUMBER,
146 					 x_suggested_buyer_id	     IN  NUMBER,
147 					 x_source_doc_type_code	     IN  VARCHAR2,
148 					 x_source_doc_id	     IN  NUMBER,
149 					 x_currency_code	     IN  VARCHAR2,
150 					 x_rate_type		     IN  VARCHAR2,
151 					 x_rate_date		     IN  DATE,
152 					 x_rate			     IN  NUMBER,
153 					 x_pcard_id		     IN  NUMBER,
154                      p_style_id                  IN  NUMBER,  --<R12 STYLES PHASE II>
155 					 x_interface_header_id	 IN OUT NOCOPY  NUMBER)
156 return boolean; --bug 3401653
157 
158 
159 procedure insert_into_lines_interface (itemtype		      IN VARCHAR2,
160 				       itemkey		      IN VARCHAR2,
161 				       x_interface_header_id  IN NUMBER,
162 				       x_req_line_id	      IN NUMBER,
163 				       x_source_doc_line      IN NUMBER,
164 				       x_source_doc_type_code IN VARCHAR2,
165                                        x_contract_id          IN NUMBER,
166                                        x_source_doc_id        IN NUMBER,
167                                        x_cons_from_supp_flag  IN VARCHAR2);  -- CONSIGNED FPI
168 
169 
170 procedure launch_doc_creation_approval (itemtype   IN   VARCHAR2,
171                              	        itemkey    IN   VARCHAR2,
172                                         actid      IN   NUMBER,
173                                         funcmode   IN   VARCHAR2,
174                                         resultout  OUT NOCOPY  VARCHAR2 );
175 
176 procedure start_wf_create_apprv_process (ItemType           	VARCHAR2,
177                                		 ItemKey            	VARCHAR2,
178                                		 workflow_process   	VARCHAR2,
179 			       		 interface_header_id    NUMBER,
180 					 doc_type_to_create     VARCHAR2,
181 					 agent_id		NUMBER,
182 					 org_id			NUMBER,
183 					 purchasing_org_id	NUMBER, --<Shared Proc FPJ>
184 			       		 parent_itemtype	VARCHAR2,
185 			       		 parent_itemkey		VARCHAR2);
186 
187 procedure create_doc (itemtype   IN   VARCHAR2,
188                     itemkey     IN   VARCHAR2,
189                     actid       IN   NUMBER,
190                     funcmode    IN   VARCHAR2,
191                     resultout   OUT NOCOPY  VARCHAR2 );
192 
193 procedure setup_notification_data (itemtype   IN   VARCHAR2,
194                       		   itemkey    IN   VARCHAR2);
195 
196 
197 procedure should_doc_be_approved (itemtype   IN   VARCHAR2,
198                                   itemkey    IN   VARCHAR2,
199                                   actid      IN   NUMBER,
200                                   funcmode   IN   VARCHAR2,
201                                   resultout  OUT NOCOPY  VARCHAR2 );
202 
203 procedure launch_po_approval (itemtype   IN   VARCHAR2,
204                               itemkey    IN   VARCHAR2,
205                               actid      IN   NUMBER,
206                               funcmode   IN   VARCHAR2,
207                               resultout  OUT NOCOPY  VARCHAR2 );
208 
209 procedure purge_rows_from_temp_table (itemtype   IN   VARCHAR2,
210                                       itemkey    IN   VARCHAR2,
211                                       actid      IN   NUMBER,
212                                       funcmode   IN   VARCHAR2,
213                                       resultout  OUT NOCOPY  VARCHAR2 );
214 
215 procedure is_this_emergency_req(itemtype   IN   VARCHAR2,
216                                 itemkey    IN   VARCHAR2,
217                                 actid      IN   NUMBER,
218                                 funcmode   IN   VARCHAR2,
219                                 resultout  OUT NOCOPY  VARCHAR2 );
220 
221 procedure put_on_one_po(itemtype   IN   VARCHAR2,
222                         itemkey    IN   VARCHAR2,
223                         actid      IN   NUMBER,
224                         funcmode   IN   VARCHAR2,
225                         resultout  OUT NOCOPY  VARCHAR2 );
226 
227 -- dkfchan: This procedure sends a notification to the preparer when
228 --          the requisition is returned.
229 
230 procedure send_return_notif(p_req_header_id IN number,
231                             p_agent_id      IN number,
232                             p_reason        IN VARCHAR2);
233 
234 -- Bug # 1869409
235 -- Created a function get_document_num as an  autonomous transaction
236 -- to avoid the COMMIT for the Workflow transactions.
237 
238 --<Shared Proc FPJ>
239 -- Adding a new parameter p_purchasing_org.
240 function  get_document_num (
241   p_purchasing_org_id IN NUMBER
242 ) RETURN VARCHAR2;
243 
244 -- dhli: the following functions are added for contract autosourcing.
245 
246 procedure is_contract_required_on_req(itemtype   IN   VARCHAR2,
247                         itemkey    IN   VARCHAR2,
248                         actid      IN   NUMBER,
249                         funcmode   IN   VARCHAR2,
250                         resultout  OUT NOCOPY  VARCHAR2 );
251 
252 procedure should_contract_be_used(itemtype   IN   VARCHAR2,
253                                   itemkey    IN   VARCHAR2,
254                   		  actid      IN   NUMBER,
255 		                  funcmode   IN   VARCHAR2,
256 		      	          resultout  OUT NOCOPY  VARCHAR2 );
257 procedure non_catalog_item_check (itemtype   IN   VARCHAR2,
258                                   itemkey    IN   VARCHAR2,
259                                   actid      IN   NUMBER,
260                                   funcmode   IN   VARCHAR2,
261                                   resultout  OUT NOCOPY  VARCHAR2 );
262 
263 procedure should_nctlog_src_frm_contract(itemtype   IN   VARCHAR2,
264                         itemkey    IN   VARCHAR2,
265                         actid      IN   NUMBER,
266                         funcmode   IN   VARCHAR2,
267   		        resultout  OUT NOCOPY  VARCHAR2 );
268 procedure is_contract_doc_info_ok(itemtype   IN   VARCHAR2,
269                         itemkey    IN   VARCHAR2,
270                         actid      IN   NUMBER,
271                         funcmode   IN   VARCHAR2,
272    		        resultout  OUT NOCOPY  VARCHAR2 );
273 
274 /* FPI GA start */
275 /* New procedure to find out if the GA referenced in the req is from another OU */
276 procedure is_src_doc_ga_frm_other_ou (itemtype   IN   VARCHAR2,
277                                   itemkey    IN   VARCHAR2,
278                                   actid      IN   NUMBER,
279                                   funcmode   IN   VARCHAR2,
280                                   resultout  OUT NOCOPY  VARCHAR2 );
281 
282 /* FPI GA end */
283 
284 --Bug 2745549
285 PROCEDURE is_ga_still_valid(p_ga_po_header_id   IN NUMBER,
286                             x_ref_is_valid          OUT NOCOPY VARCHAR2);
287 
288 
289 --<Shared Proc FPJ START>
290 
291 PROCEDURE buyer_on_src_doc_ok (itemtype    IN        	VARCHAR2,
292    			       itemkey     IN           VARCHAR2,
293       			       actid       IN           NUMBER,
297 PROCEDURE buyer_on_contract_ok (itemtype   IN           VARCHAR2,
294    			       funcmode    IN           VARCHAR2,
295    			       resultout   OUT NOCOPY   VARCHAR2);
296 
298    				itemkey    IN           VARCHAR2,
299 				actid      IN           NUMBER,
300    				funcmode   IN           VARCHAR2,
301    				resultout  OUT NOCOPY   VARCHAR2);
302 
303 PROCEDURE purchasing_ou_check (itemtype    IN	         VARCHAR2,
304   				itemkey     IN           VARCHAR2,
305   				actid       IN           NUMBER,
306   				funcmode    IN           VARCHAR2,
307   				resultout   OUT NOCOPY   VARCHAR2);
308 
309 PROCEDURE ok_to_create_in_diff_ou (itemtype    IN          VARCHAR2,
310    				   itemkey     IN          VARCHAR2,
311    				   actid       IN          NUMBER,
312   				   funcmode    IN          VARCHAR2,
313 				   resultout   OUT NOCOPY  VARCHAR2);
314 
315 --<Shared Proc FPJ END>
316 
317 -- <SERVICES FPJ>
318 PROCEDURE is_expense_line(itemtype  IN         VARCHAR2,
319                           itemkey   IN         VARCHAR2,
320                           actid     IN         NUMBER,
321                           funcmode  IN         VARCHAR2,
322                           resultout OUT NOCOPY VARCHAR2);
323 
324 -- contract support for temp labor
325 procedure temp_labor_item_check	 (itemtype   IN   VARCHAR2,
326                                   itemkey    IN   VARCHAR2,
327                                   actid      IN   NUMBER,
328                                   funcmode   IN   VARCHAR2,
329                                   resultout  OUT NOCOPY  VARCHAR2 );
330 
331 procedure should_tmplbr_src_frm_contract(itemtype   IN   VARCHAR2,
332                         itemkey    IN   VARCHAR2,
333                         actid      IN   NUMBER,
334                         funcmode   IN   VARCHAR2,
335   		        resultout  OUT NOCOPY  VARCHAR2 );
336 
337 END PO_AUTOCREATE_DOC;