DBA Data[Home] [Help]

PACKAGE: APPS.PO_INQ_SV

Source


1 PACKAGE  PO_INQ_SV as
2 /* $Header: POXPOVPS.pls 120.2 2005/09/08 18:22:57 spangulu noship $ */
3 
4 /*===========================================================================
5   PACKAGE NAME:		PO_INQ_SV
6 
7   DESCRIPTION:		This package contains the server side PO Inquiry
8 			Application Program Interfaces (APIs).
9 
10   CLIENT/SERVER:	Server
11 
12   OWNER:		Gopi Tummala
13 
14   FUNCTION/PROCEDURE:
15 ===========================================================================*/
16 
17 /*===========================================================================
18   PROCEDURE NAME:	get_action_history_values ()
19 
20   DESCRIPTION:		This procedure will get the startup values for the
21 			action history form. Several sql stmnts are included
22 			in here to save network roundtrips.
23 
24 
25    PARAMETERS:		Input paramters: document id
26 					 document type
27 					 document subtype -- comes in as null but
28 							     needed otherwise cannot
29 							     read its value in plsql.
30                         Output parameters :  document subtype
31 					     document preparer
32 					     security level
33 					     security_hierarchy_id
34 
35   DESIGN REFERENCES:	../POXPOAH.dd
36 
37   ALGORITHM:
38 
39   NOTES:
40 
41   OPEN ISSUES:
42 
43   CLOSED ISSUES:
44 
45   CHANGE HISTORY:	Created		19-JUL-95	GTUMMALA
46 ===========================================================================*/
47 PROCEDURE get_action_history_values (x_object_id        	IN 	NUMBER,
48 				     x_object_type_code 	IN 	VARCHAR2,
49 				     x_subtype_code    	 	IN OUT NOCOPY 	VARCHAR2,
50 				     x_type_name		OUT	NOCOPY VARCHAR2,
51 				     x_document_number		OUT	NOCOPY VARCHAR2,
52 				     x_preparer_id		OUT NOCOPY 	NUMBER,
53 				     x_security_level   	OUT NOCOPY 	VARCHAR2,
54 				     x_security_hierarchy_id    OUT NOCOPY 	NUMBER);
55 
56 
57 /*===========================================================================
58   PROCEDURE NAME:	get_po_doc_access_sec_level ()
59 
60   DESCRIPTION:		This procedure will get the access and secruity level
61                         for each of the four types of Purchase Orders and two
62 			Release types in addition to the security hierarchy.
63 
64 
65    PARAMETERS:		No input parameters.
66                         Output parameters are the  security level
67 			for each type of PO and Release in addition to the
68 			security hierarchy.
69 
70   DESIGN REFERENCES:	../POXPOVPO.dd
71 
72   ALGORITHM:
73 
74   NOTES:
75 
76   OPEN ISSUES:
77 
78   CLOSED ISSUES:
79 
80   CHANGE HISTORY:	Created		16-JUN-95	GTUMMALA
81 ===========================================================================*/
82 PROCEDURE get_po_doc_access_sec_level(x_standard_security      OUT NOCOPY  VARCHAR2,
83          			      x_blanket_security       OUT NOCOPY  VARCHAR2,
84          			      x_contract_security      OUT NOCOPY  VARCHAR2,
85          			      x_planned_security       OUT NOCOPY  VARCHAR2,
86          			      x_blanket_rel_security   OUT NOCOPY  VARCHAR2,
87          			      x_scheduled_rel_security OUT NOCOPY  VARCHAR2,
88 				      x_security_hierarchy_id  OUT NOCOPY  NUMBER);
89 
90 
91 /*===========================================================================
92   FUNCTION NAME:	get_active_enc_amount()
93 
94   DESCRIPTION:		This function returns the active encumbrance amount
95 			of the given po_distribtuion
96 
97   PARAMETERS:		In: rate of the dist.
98 			    ecumbered amount of dist.
99 			    shipment_type of the line.
100 			    po_distribution_id of dist.
101 
102 			Out: active encumbrance amount for the dist.
103 
104   DESIGN REFERENCES:	../POXPOVPO.dd
105 
106   ALGORITHM:
107 
108   NOTES:
109 
110   OPEN ISSUES:
111 
112   CLOSED ISSUES:
113 
114   CHANGE HISTORY:	Created		11-JUL-95	GTUMMALA
115 ===========================================================================*/
116 FUNCTION  get_active_enc_amount(x_rate 			IN NUMBER,
117 				x_enc_amount    	IN NUMBER,
118 				x_shipment_type		IN VARCHAR2,
119 				x_po_distribution_id	IN NUMBER )
120 							RETURN NUMBER;
121 --pragma restrict_references (get_active_enc_amount,WNDS,RNPS,WNPS);
122 
123 
124 /*===========================================================================
125   FUNCTION NAME:	get_dist_amount()
126 
127   DESCRIPTION:		This function returns the distribution amount
128 			of the given po_distribtuion
129 
130   PARAMETERS:		In:
131 			    quantity ordered of dist.
132 			    unit price of the line.
133 			    po_distribution_id of dist.
134 
135 			Out: amount for the dist.
136 
137   DESIGN REFERENCES:	../POXPOVPO.dd
138 
139   ALGORITHM:
140 
141   NOTES:
142 
143   OPEN ISSUES:
144 
145   CLOSED ISSUES:
146 
147   CHANGE HISTORY:	Created		11-JUL-95	GTUMMALA
148 ===========================================================================*/
149 /* Changed due to bug 601388
150   Removed IN parameter x_rate from the function as price is required in
151   foreign currency and not functional currency
152 */
153 
154 FUNCTION get_dist_amount
155 (   p_quantity_ordered      IN      NUMBER                    -- <SERVICES FPJ>
156 ,   p_price_override	    IN      NUMBER                    -- <SERVICES FPJ>
157 ,   p_amount_ordered        IN      NUMBER                    -- <SERVICES FPJ>
158 ,   p_po_line_loc_id         IN      NUMBER                    -- <Complex Work R12>
159 ) RETURN NUMBER;
160 -- pragma restrict_references (get_dist_amount,WNDS,RNPS,WNPS);
161 
162 /*===========================================================================
163   PROCEDURE NAME:	get_func_currency_attributes()
164 
165   DESCRIPTION:		This procedure returns the several attributes of the
166 			functional currency from fnd_currencies.
167 
168   PARAMETERS:		In : None
169 			Out: min_accountable_unit of the currency
170 		             precision of the currecny
171 
172   DESIGN REFERENCES:	../POXPOVPO.dd
173 
174   ALGORITHM:
175 
176   NOTES:
177 
178   OPEN ISSUES:
179 
180   CLOSED ISSUES:
181 
182   CHANGE HISTORY:	Created		11-JUL-95	GTUMMALA
183 ===========================================================================*/
184 PROCEDURE  get_func_currency_attributes(x_min_unit   OUT NOCOPY NUMBER,
185   				        x_precision  OUT NOCOPY NUMBER);
186 
187 -- pragma restrict_references (get_func_currency_attributes,WNDS,RNPS,WNPS);
188 
189 
190 /*===========================================================================
191   FUNCTION  NAME:	get_person_name
192 
193   DESCRIPTION:		This procedure returns the full_name
194 			of the person based on the id.
195 
196   PARAMETERS:		In : Id of the person
197 			Out: Full name of the person
198 
199 
200   DESIGN REFERENCES:	../POXPOVPO.dd
201 
202   ALGORITHM:
203 
204   NOTES:
205 
206   OPEN ISSUES:
207 
208   CLOSED ISSUES:
209 
210   CHANGE HISTORY:	Created		11-JUL-95	GTUMMALA
211 ===========================================================================*/
212 FUNCTION  get_person_name (x_person_id 		IN  NUMBER)
213 							RETURN VARCHAR2;
214 
215 -- pragma restrict_references (get_person_name,WNDS,WNPS);
216 
217 /* GK - removed RNPS for the package to compile; still need to
218    investigate the consequences */
219 
220 /*===========================================================================
221   FUNCTION  NAME:	get_wip_operation_code
222 
223   DESCRIPTION:		THIS PROCEDURE RETURNS WIP_OPERATION_CODE
224 			FOR THE PO DISTRIBUTION
225 
226   PARAMETERS:		IN : WIP_ENTITY_ID              OF PO DISTRIBUTION
227                              WIP_OPERATION_SEQ_NUM      "  "  "
228    			     DESTINATION_ORGANIZATION_ID"  "  "
229 			     WIP_REPETITIVE_SCHEDULE_ID "  "  "
230 
231 			OUT: WIP_OPERATION_CODE
232 
233 
234   DESIGN REFERENCES:	../POXPOVPO.DD
235 
236   ALGORITHM:
237 
238   NOTES:
239 
240   OPEN ISSUES:
241 
242   CLOSED ISSUES:
243 
244   CHANGE HISTORY:	CREATED		11-JUL-95	GTUMMALA
245 ===========================================================================*/
246 FUNCTION  GET_WIP_OPERATION_CODE(X_WIP_ENTITY_ID 	 IN  NUMBER,
247 				 X_WIP_OPERATION_SEQ_NUM IN  NUMBER,
248 				 X_DESTINATION_ORG_ID    IN  NUMBER,
249 				 X_WIP_REP_SCHEDULE_ID   IN  NUMBER)
250 							RETURN VARCHAR2;
251 
252 -- PRAGMA RESTRICT_REFERENCES (GET_WIP_OPERATION_CODE,WNDS,RNPS,WNPS);
253 
254 /*===========================================================================
255   FUNCTION  NAME:	GET_BOM_DEPARTMENT_CODE
256 
257   DESCRIPTION:		THIS PROCEDURE RETURNS BOM_DEPARTMENT_CODE
258 			FOR THE PO DISTRIBUTION
259 
260   PARAMETERS:		IN : WIP_ENTITY_ID              OF PO DISTRIBUTION
261                              WIP_OPERATION_SEQ_NUM      "  "  "
262    			     DESTINATION_ORGANIZATION_ID"  "  "
263 			     WIP_REPETITIVE_SCHEDULE_ID "  "  "
264 
265 			OUT: BOM_DEPARTMENT_CODE
266 
267 
268   DESIGN REFERENCES:	../POXPOVPO.DD
269 
270   ALGORITHM:
271 
272   NOTES:
273 
274   OPEN ISSUES:
275 
276   CLOSED ISSUES:
277 
278   CHANGE HISTORY:	CREATED		11-JUL-95	GTUMMALA
279 ===========================================================================*/
280 FUNCTION  GET_BOM_DEPARTMENT_CODE(X_WIP_ENTITY_ID 	 IN  NUMBER,
281 				 X_WIP_OPERATION_SEQ_NUM IN  NUMBER,
282 				 X_DESTINATION_ORG_ID    IN  NUMBER,
283 				 X_WIP_REP_SCHEDULE_ID   IN  NUMBER)
284 							RETURN VARCHAR2;
285 
286 -- PRAGMA RESTRICT_REFERENCES (GET_BOM_DEPARTMENT_CODE,WNDS,RNPS,WNPS);
287 
288 /*===========================================================================
289   FUNCTION  NAME:	get_assembly_quantity
290 
291   DESCRIPTION:		This function returns the bom_department_code for
292 			the distribution.
293 
294   PARAMETERS:		IN : item_id			of po line
295 			     wip_entity_id              of po distribution
296                              wip_operation_seq_num      "  "  "
297 			     wip_resource_seq_num	"  "  "
298    			     Destination_organization_id"  "  "
299 			     wip_repetitive_schedule_id "  "  "
300 			     quantity_ordered		"  "  "
301 
302 			Out: assembly quantity for the distribution
303 
304 
305   DESIGN REFERENCES:	../POXPOVPO.dd
306 
307   ALGORITHM:
308 
309   NOTES:
310 
311   OPEN ISSUES:
312 
313   CLOSED ISSUES:
314 
315   CHANGE HISTORY:	Created		11-JUL-95	GTUMMALA
316 
317 ===========================================================================*/
318 FUNCTION  get_assembly_quantity(x_item_id  		IN NUMBER,
319 				x_wip_entity_id 	IN NUMBER,
320 				x_wip_operation_seq_num IN NUMBER,
321 				x_wip_resource_seq_num  IN NUMBER,
322 				x_destination_org_id 	IN NUMBER,
323 				x_wip_rep_schedule_id   IN NUMBER,
324 				x_quantity_ordered	IN NUMBER,
325                                 p_item_organization_id  IN NUMBER DEFAULT NULL) -- <HTMLAC>
326 							RETURN NUMBER;
327 
328 -- pragma restrict_references (get_assembly_quantity,WNDS,RNPS,WNPS);
329 
330 
331 /*===========================================================================
332   FUNCTION  NAME:	get_resource_quantity
333 
334   DESCRIPTION:		This procedure returns bom_department_code
335 			for the po distribution
336 
337   PARAMETERS:		In : item_id 			of po line
338 			     wip_entity_id              of po distribution
339                              wip_operation_seq_num      "  "  "
340 			     wip_resource_seq_num	"  "  "
341    			     destination_organization_id"  "  "
342 			     wip_repetitive_schedule_id "  "  "
343 			     quantity_ordered		"  "  "
344 
345 			Out: resource quantity for the distribution
346 
347 
348   DESIGN REFERENCES:	../POXPOVPO.dd
349 
350   ALGORITHM:
351 
352   NOTES:
353 
354   OPEN ISSUES:
355 
356   CLOSED ISSUES:
357 
358   CHANGE HISTORY:	Created		11-JUL-95	GTUMMALA
359 ===========================================================================*/
360 FUNCTION  get_resource_quantity(x_item_id  		IN NUMBER,
361 				x_wip_entity_id 	IN NUMBER,
362 				x_wip_operation_seq_num IN NUMBER,
363 				x_wip_resource_seq_num  IN NUMBER,
364 				x_destination_org_id 	IN NUMBER,
365 				x_wip_rep_schedule_id   IN NUMBER,
366 				x_quantity_ordered	IN NUMBER,
367                                 p_item_organization_id  IN NUMBER DEFAULT NULL) -- <HTMLAC>
368 							RETURN NUMBER;
369 
370 -- pragma restrict_references (get_resource_quantity,WNDS,RNPS,WNPS);
371 
372 
373 /*===========================================================================
374   FUNCTION  NAME:	get_po_number
375 
376   DESCRIPTION:		This procedure returns the po number that a
377 			requisition line is on.
378 
379   PARAMETERS:		In : line_location_id
380 
381 			Out: po_number
382 
383 
384   DESIGN REFERENCES:
385 
386   ALGORITHM:
387 
388   NOTES:
389 
390   OPEN ISSUES:
391 
392   CLOSED ISSUES:
393 
394   CHANGE HISTORY:	Created		20-FEB-96	GTUMMALA
395 ===========================================================================*/
396 FUNCTION  get_po_number (x_line_location_id  IN NUMBER) RETURN VARCHAR2;
397 
398 
399 -- pragma restrict_references (get_po_number,WNDS,RNPS,WNPS);
400 
401 
402 /*===========================================================================
403   FUNCTION  NAME:	get_so_number
404 
405   DESCRIPTION:		This procedure returns the sales order number that a
406 			requisition line is on.
407 
408   PARAMETERS:		In : segment1(req_num), --obsolete
409 			     line_num                   --obsolete
410 
411                    po_requisition_header_id
412 				   po_requisition_line_id
413 
414 			Out: so_number
415 
416 
417   DESIGN REFERENCES:
418 
419   ALGORITHM:
420 
421   NOTES:
422 
423   OPEN ISSUES:
424 
425   CLOSED ISSUES:
426 
427   CHANGE HISTORY:	Created		20-FEB-96	GTUMMALA
428 ===========================================================================*/
429 
430 --Bug# 1392077
431 --Toju George 08/31/2000
432 --Modified the call to procedure to replace req_num and line_num with ids.
433 
434 /*FUNCTION  get_so_number (x_segment1 IN VARCHAR2,
435 			 x_line_num IN NUMBER) RETURN VARCHAR2;*/
436 
437  FUNCTION  get_so_number (x_requisition_header_id IN VARCHAR2,
438 			 x_requisition_line_id IN NUMBER) RETURN VARCHAR2;
439 
440  /* pragma restrict_references (get_so_number,WNDS,RNPS,WNPS);*/
441 
442 /*===========================================================================
443   FUNCTION  NAME:	shipment_from_req
444 
445   DESCRIPTION:		This function check whether a shipment is associated
446 			with a requisition line.
447 
448   PARAMETERS:		In : line_location_id
449 
450 			Returns: TRUE OR FALSE
451 
452 
453   DESIGN REFERENCES:
454 
455   ALGORITHM:
456 
457   NOTES:
458 
459   OPEN ISSUES:
460 
461   CLOSED ISSUES:
462 
463   CHANGE HISTORY:	Created		28-FEB-96	CMOK
464 ===========================================================================*/
465 
466 FUNCTION shipment_from_req  (x_line_location_id	  IN  NUMBER)
467 	RETURN BOOLEAN ;
468 
472   DESCRIPTION:		This function returns the total on a PO or Release.
469 /*===========================================================================
470   FUNCTION  NAME:	get_po_total
471 
473 			It is called by the view PO_HEADERS_INQ_V
474 
475   PARAMETERS:		In : type_lookup_code
476 			     po_header_id
477 			     po_release_id
478 
479 			Returns: PO total
480 
481 
482   DESIGN REFERENCES:
483 
484   ALGORITHM:
485 
486   NOTES:
487 
488   OPEN ISSUES:
489 
490   CLOSED ISSUES:
491 
492   CHANGE HISTORY:	Created		28-FEB-96	CMOK
493 ===========================================================================*/
494 
495 FUNCTION get_po_total (x_type_lookup_code  IN  VARCHAR2,
496 		       x_po_header_id	   IN  NUMBER,
497 		       x_po_release_id     IN  NUMBER)
498 	return NUMBER;
499 
500 -- pragma restrict_references (get_po_total,WNDS);
501 
502 /*===========================================================================
503   FUNCTION  NAME:	get_post_query_info
504 
505   DESCRIPTION:		This procedure is called in post-query for
506 			the headers, lines and shipments folders.  The purpose
507 			of this procedure is to reduce the round-trips to
508 			the server in the post-query.
509 
510   PARAMETERS:
511 
512   DESIGN REFERENCES:
513 
514   ALGORITHM:
515 
516   NOTES:
517 
518   OPEN ISSUES:
519 
520   CLOSED ISSUES:
521 
522   CHANGE HISTORY:	Created		28-OCT-96	CMOK
523 ===========================================================================*/
524 
525 PROCEDURE get_post_query_info (
526 			x_cancelled_by	    	IN     NUMBER,
527 			x_closed_by	    	IN     NUMBER,
528 			x_agent_id		IN     NUMBER,
529 			x_type_lookup_code  	IN  VARCHAR2,
530 		        x_po_header_id	    	IN  NUMBER,
531 		        x_po_release_id     	IN  NUMBER,
532 			x_po_line_id		IN     NUMBER,
533 			x_line_location_id	IN     NUMBER,
534 			x_agent_name		IN OUT NOCOPY VARCHAR2,
535 			x_closed_by_name    	IN OUT NOCOPY VARCHAR2,
536 			x_cancelled_by_name 	IN OUT NOCOPY VARCHAR2,
537 			x_base_currency		IN OUT NOCOPY VARCHAR2,
538 			x_amount		IN OUT NOCOPY NUMBER);
539 
540 
541 /*===========================================================================
542   FUNCTION  NAME:	get_distribution_info
543 
544   DESCRIPTION:		This procedure is called in post-query for
545 			the distribution folder.  The purpose
546 			of this procedure is to reduce the round-trips to
547 			the server in the post-query.
548 
549   PARAMETERS:
550 
551   DESIGN REFERENCES:
552 
553   ALGORITHM:
554 
555   NOTES:
556 
557   OPEN ISSUES:
558 
559   CLOSED ISSUES:
560 
561   CHANGE HISTORY:	Created		28-OCT-96	CMOK
562 ===========================================================================*/
563 
564 PROCEDURE get_distribution_info (
565 			x_deliver_to_person_id  IN     NUMBER,
566 			x_closed_by	    	IN     NUMBER,
567 			x_agent_id		IN     NUMBER,
568 			x_item_id		IN     NUMBER,
569 			x_wip_entity_id		IN     NUMBER,
570 			x_wip_operation_seq_num IN     NUMBER,
571 			x_wip_resource_seq_num  IN     NUMBER,
572 			x_destination_org_id    IN     NUMBER,
573 			x_wip_rep_schedule_id   IN     NUMBER,
574 			x_quantity_ordered	IN     NUMBER,
575 			x_rate			IN     NUMBER,
576 			x_price_override	IN     NUMBER,
577             x_amount_ordered    IN     NUMBER,                -- <SERVICES FPJ>
578             x_po_line_id        IN     NUMBER,                -- <SERVICES FPJ>
579 			x_line_location_id	IN     NUMBER,
580 			x_encumbered_amount	IN     NUMBER,
581 			x_shipment_type		IN     VARCHAR2,
582 			x_po_distribution_id    IN     NUMBER,
583 			x_deliver_to_person	IN OUT NOCOPY VARCHAR2,
584 			x_agent_name		IN OUT NOCOPY VARCHAR2,
585 			x_closed_by_name    	IN OUT NOCOPY VARCHAR2,
586 			x_base_currency		IN OUT NOCOPY VARCHAR2,
587 			x_assembly_quantity	IN OUT NOCOPY NUMBER,
588 		        x_resource_quantity	IN OUT NOCOPY NUMBER,
589 			x_wip_operation_code    IN OUT NOCOPY VARCHAR2,
590 			x_bom_department_code   IN OUT NOCOPY VARCHAR2,
591 			x_active_encumb_amount   IN OUT NOCOPY NUMBER,
592 			x_distribution_amount	IN OUT NOCOPY NUMBER);
593 
594 
595 /*===========================================================================
596   FUNCTION  NAME:	get_org_info
597 
598   DESCRIPTION:		This procedure is called in get_dist_info_pq
599 			to get the organization names corresponding
600                         to the ids
601                         bug 1338674
602 
603   CHANGE HISTORY:	Created		19-JUL-00	dreddy
604 ===========================================================================*/
605  PROCEDURE get_org_info(x_destination_org_id  IN  number,
606                         x_expenditure_org_id  IN  number,
607                         x_ship_to_org_id      IN  number ,
608                         x_dest_org_name       IN OUT NOCOPY  varchar2,
609                         x_exp_org_name        IN OUT NOCOPY  varchar2,
610                         x_ship_to_org_name    IN OUT NOCOPY  varchar2) ;
611 
612 
613 /*===========================================================================
614   FUNCTION  NAME:	get_location_info
615 
619 
616   DESCRIPTION:		This procedure is called in get_dist_info_pq
617 			to get the location names corresponding
618                         to the ids -  bug 1338674
620   CHANGE HISTORY:	Created		19-JUL-00	dreddy
621 ===========================================================================*/
622 PROCEDURE get_location_info(x_deliver_to_loc_id   IN  number,
623                            x_bill_to_loc_id      IN  number,
624                            x_ship_to_loc_id      IN  number ,
625                            x_dest_location_code  IN OUT NOCOPY  varchar2,
626                            x_bill_to_loc_code    IN OUT NOCOPY  varchar2,
627                            x_ship_to_loc_code    IN OUT NOCOPY  varchar2);
628 
629 
630 /*===========================================================================
631   FUNCTION  NAME:	get_project_info
632 
633   DESCRIPTION:		This procedure is called in get_dist_info_pq
634 			to get the project/task numbers corresponding
635                         to the ids  -  bug 1338674
636 
637   CHANGE HISTORY:	Created		19-JUL-00	dreddy
638 ===========================================================================*/
639 PROCEDURE get_project_info(x_project_id   IN number,
640                            x_task_id      IN number,
641                            x_project_num  IN OUT NOCOPY varchar2,
642                            x_task_num     IN OUT NOCOPY varchar2);
643 
644 
645 /*===========================================================================
646   FUNCTION  NAME:	get_wip_bom_info
647 
648   DESCRIPTION:		This procedure is called in get_dist_info_pq
649 			to get the wip/bom information  -  bug 1338674
650 
651   CHANGE HISTORY:	Created		19-JUL-00	dreddy
652 ===========================================================================*/
653 PROCEDURE get_wip_bom_info(x_wip_entity_id      IN  number,
654                            x_wip_line_id        IN  number ,
655                            x_bom_resource_id    IN  number ,
656                            x_destination_org_id IN  number,
657                            x_wip_entity_name    IN  OUT NOCOPY  varchar2,
658                            x_wip_line_code      IN  OUT NOCOPY  varchar2,
659                            x_bom_resource_code  IN  OUT NOCOPY  varchar2,
660                            x_bom_uom            IN  OUT NOCOPY  varchar2);
661 
662 
663 /*===========================================================================
664   FUNCTION  NAME:	get_vendor_info
665 
666   DESCRIPTION:		This procedure is called in get_dist_info_pq
667 			to get the vendor/vendor_site names corresponding
668                         to the ids  -  bug 1338674
669 
670   CHANGE HISTORY:	Created		19-JUL-00	dreddy
671 ===========================================================================*/
672 PROCEDURE  get_vendor_info(x_vendor_id        IN  number,
673                            x_vendor_site_id   IN  number ,
674                            x_vendor_name      IN OUT NOCOPY  varchar2,
675                            x_vendor_site_code IN OUT NOCOPY  varchar2);
676 
677 
678 /*===========================================================================
679   FUNCTION  NAME:	get_ap_terms
680 
681   DESCRIPTION:		This procedure is called in get_dist_info_pq
682 			to get the ap terms name corresponding
683                         to the termsid  -  bug 1338674
684 
685   CHANGE HISTORY:	Created		19-JUL-00	dreddy
686 ===========================================================================*/
687 PROCEDURE get_ap_terms(x_terms_id      IN  number,
688                        x_ap_terms_name IN OUT NOCOPY  varchar2);
689 
690 
691 /*===========================================================================
692   FUNCTION  NAME:	get_dist_info_pq
693 
694   DESCRIPTION:		This procedure is called in post-query for
695 			the distribution folder.  The purpose
696 			of this procedure is to reduce the round-trips to
697 			the server in the post-query and to get the info
698                         removed from the view for performance reasons.
699                         bug 1338674
700 
701   CHANGE HISTORY:	Created		19-JUL-00	dreddy
702 ===========================================================================*/
703 PROCEDURE get_dist_info_pq (x_po_header_id        IN  number,
704                             x_po_line_location_id IN  number,
705                             x_deliver_to_loc_id   IN  number,
706                             x_bill_to_loc_id      IN  number,
707                             x_destination_org_id  IN  number,
708                             x_expenditure_org_id  IN  number,
709                             x_vendor_id           IN  number,
710                             x_vendor_site_id      IN  number,
711                             x_project_id          IN  number,
712                             x_task_id             IN  number,
713                             x_bom_resource_id     IN  number,
714                             x_wip_entity_id       IN  number,
715                             x_wip_line_id         IN  number,
716                             x_dest_location_code  IN OUT NOCOPY  varchar2,
717                             x_bill_to_loc_code    IN OUT NOCOPY  varchar2,
718                             x_ship_to_loc_code    IN OUT NOCOPY  varchar2,
722                             x_project_num         IN OUT NOCOPY  varchar2,
719                             x_dest_org_name       IN OUT NOCOPY  varchar2,
720                             x_exp_org_name        IN OUT NOCOPY  varchar2,
721                             x_ship_to_org_name    IN OUT NOCOPY  varchar2,
723                             x_task_num            IN OUT NOCOPY  varchar2,
724                             x_wip_entity_name     IN OUT NOCOPY  varchar2,
725                             x_wip_line_code       IN OUT NOCOPY  varchar2,
726                             x_bom_resource_code   IN OUT NOCOPY  varchar2,
727                             x_bom_uom             IN OUT NOCOPY  varchar2,
728                             x_ap_terms_name       IN OUT NOCOPY  varchar2,
729                             x_vendor_name         IN OUT NOCOPY  varchar2,
730                             x_vendor_site_code    IN OUT NOCOPY  varchar2,
731                             --< Shared Proc FPJ Start >
732                             x_purchasing_ou_coa_id   OUT NOCOPY NUMBER,
733                             x_ship_to_ou_coa_id      OUT NOCOPY NUMBER,
734                             --< Shared Proc FPJ End >
735                             --< Bug 3266689 Start >
736                             x_type_lookup_code   IN varchar2
737                             --< Bug 3266689 End >
738                             ) ;
739 
740 /*===========================================================================
741   togeorge 06/14/2001
742   Bug# 1733951
743   This procedure fetches the lookup values removed from the view
744   po_line_locations_inq_v as part of the performance fix.
745 
746   PROCEDURE NAME:	get_shipments_pq_lookups
747 
748 ===========================================================================*/
749 PROCEDURE get_shipments_pq_lookups(x_enforce_ship_to_loc_code  IN  varchar2,
750 	  x_receipt_days_excpt_code  IN  	varchar2,
751           x_qty_rcv_excpt_code	     IN  	varchar2,
752           x_closed_code     	     IN  	varchar2,
753           x_shipment_type    	     IN  	varchar2,
754           x_authorization_status     IN  	varchar2,
755           x_fob_code	 	     IN  	varchar2,
756           x_freight_terms_code 	     IN  	varchar2,
757           x_enforce_ship_to_loc_dsp  IN  OUT	NOCOPY varchar2,
758           x_receipt_days_excpt_dsp   IN  OUT	NOCOPY varchar2,
759           x_qty_rcv_excpt_dsp        IN  OUT	NOCOPY varchar2,
760           x_closed_code_dsp          IN  OUT	NOCOPY varchar2,
761           x_shipment_type_dsp        IN  OUT	NOCOPY varchar2,
762           x_authorization_status_dsp IN  OUT	NOCOPY varchar2,
763           x_fob_code_dsp	     IN  OUT	NOCOPY varchar2,
764           x_freight_terms_code_dsp   IN  OUT	NOCOPY varchar2,
765           p_match_option             IN                VARCHAR2,--Bug 2947251
766           x_match_option_dsp             OUT    NOCOPY VARCHAR2 --Bug 2947251
767 );
768 
769 /*===========================================================================
770   togeorge 08/27/2001
771   Bug# 1870283
772   This procedure fetches the lookup values removed from the view
773   po_distributions_inq_v as part of the performance fix.
774 
775   PROCEDURE NAME:	get_dist_pq_lookups
776 
777 ===========================================================================*/
778 PROCEDURE get_dist_pq_lookups(
779        x_destination_type_code	   IN  	    varchar2,
780        x_authorization_status      IN  	    varchar2,
781        x_shipment_type    	   IN  	    varchar2,
782        x_closed_code     	   IN  	    varchar2,
783        x_destination_type	   IN  OUT NOCOPY  varchar2,
784        x_authorization_status_dsp  IN  OUT NOCOPY  varchar2,
785        x_shipment_type_dsp    	   IN  OUT NOCOPY  varchar2,
786        x_closed_code_dsp     	   IN  OUT NOCOPY  varchar2);
787 
788 /*===========================================================================
789   togeorge 08/31/2001
790   Bug# 1870283
791   This procedure fetches the lookup values removed from the view
792   po_lines_inq_v as part of the performance fix.
793 
794   PROCEDURE NAME:	get_lines_pq_lookups
795 
796 ===========================================================================*/
797 PROCEDURE get_lines_pq_lookups(
798        x_price_type_lookup_code    IN  	    varchar2,
799        x_transaction_reason_code   IN  	    varchar2,
800        x_price_break_lookup_code   IN  	    varchar2,
801        x_closed_code     	   IN  	    varchar2,
802        x_authorization_status      IN  	    varchar2,
803        x_fob_code	 	   IN  	    varchar2,
804        x_freight_terms_code 	   IN  	    varchar2,
805        x_price_type   		   IN  OUT NOCOPY  varchar2,
806        x_transaction_reason    	   IN  OUT NOCOPY  varchar2,
807        x_price_break		   IN  OUT NOCOPY  varchar2,
808        x_closed_code_dsp     	   IN  OUT NOCOPY  varchar2,
809        x_authorization_status_dsp  IN  OUT NOCOPY  varchar2,
810        x_fob_code_dsp	 	   IN  OUT NOCOPY  varchar2,
811        x_freight_terms_code_dsp    IN  OUT NOCOPY  varchar2);
812 
813 /*===========================================================================
814   togeorge 11/19/2001
815   Bug# 2038811
816   This procedure fetches the lookup values removed from the view
817   po_headers_inq_v as part of the performance fix.
818 
819   PROCEDURE NAME:	get_headers_pq_lookups
820 
821 ===========================================================================*/
825        x_freight_terms_code 	   IN  	    varchar2,
822 PROCEDURE get_headers_pq_lookups(
823        x_authorization_status      IN  	    varchar2,
824        x_fob_code	 	   IN  	    varchar2,
826        x_closed_code     	   IN  	    varchar2,
827        x_authorization_status_dsp  IN  OUT NOCOPY  varchar2,
828        x_fob_code_dsp	 	   IN  OUT NOCOPY  varchar2,
829        x_freight_terms_code_dsp    IN  OUT NOCOPY  varchar2,
830        x_closed_code_dsp     	   IN  OUT NOCOPY  varchar2,
831        p_shipping_control          IN              VARCHAR2,    -- <INBOUND LOGISTICS FPJ>
832        x_shipping_control_dsp      IN  OUT NOCOPY  VARCHAR2    -- <INBOUND LOGISTICS FPJ>
833        );
834 
835 /*===========================================================================
836 
837     PROCEDURE:   get_source_info                   <GA FPI>
838 
839     DESCRIPTION: Gets all source document-related information based on a
840                  po_header_id.
841 
842 ===========================================================================*/
843 PROCEDURE get_source_info
844 (
845     p_po_header_id              IN     PO_HEADERS_ALL.po_header_id%TYPE,
846     x_segment1                  OUT NOCOPY    PO_HEADERS_ALL.segment1%TYPE,
847     x_type_lookup_code          OUT NOCOPY    PO_HEADERS_ALL.type_lookup_code%TYPE,
848     x_global_agreement_flag     OUT NOCOPY    PO_HEADERS_ALL.global_agreement_flag%TYPE,
849     x_owning_org_id             OUT NOCOPY    PO_HEADERS_ALL.org_id%TYPE,
850     x_quote_vendor_quote_number OUT NOCOPY    PO_HEADERS_ALL.quote_vendor_quote_number%TYPE
851 );
852 
853 /*===========================================================================
854 
855     FUNCTION:    get_type_name                     <GA FPI>
856 
857     DESCRIPTION: Given the 'document_type_code' and 'document_subtype',
858                  the function will return the 'document_type_name' from
859                  PO_DOCUMENTS_TYPES_VL.
860 
861 ===========================================================================*/
862 FUNCTION get_type_name
863 (
864 	p_document_type_code 	PO_DOCUMENT_TYPES_VL.document_type_code%TYPE	,
865 	p_document_subtype	PO_DOCUMENT_TYPES_VL.document_subtype%TYPE
866 )
867 RETURN PO_DOCUMENT_TYPES_VL.type_name%TYPE;
868 
869 
870 /*===========================================================================
871 
872     PROCEDURE:    get_rate_type
873 
874     DESCRIPTION: Given the po_header_id this function will return user_conversion_rate
875 
876 
877 ===========================================================================*/
878 
879 PROCEDURE get_rate_type
880 (x_header_id  IN  NUMBER,
881  x_rate_type  OUT NOCOPY varchar2);
882 
883 
884 /* Bug 2788683 start */
885 /*===========================================================================
886 
887     PROCEDURE:   get_vendor_name
888 
889     DESCRIPTION: Get vendor real name based on log in name
890 
891 ===========================================================================*/
892 PROCEDURE get_vendor_name
893 (  l_user_name   IN         fnd_user.user_name%TYPE,
894    x_vendor_name OUT NOCOPY hz_parties.party_name%TYPE
895 );
896 /* Bug 2788683 end */
897 
898 --<HTML Agreement R12 Start>
899 ---------------------------------------------------------------------------
900 --Start of Comments
901 --Name: get_party_vendor_name
902 --Pre-reqs:
903 --  None.
904 --Modifies:
905 --  None
906 --Locks:
907 --  None.
908 --Function:
909 --  Retrieves the party name + vendor name for acceptance entries entered
910 --  by suppliers. The result is in the form of "party name(vendor name)",
911 --  e.g. "Maxwell Olden(Office Supplies, Inc.)".
912 --  This function is refactored from POXPOEAC.pld
913 --Parameters:
914 --IN:
915 --  p_user_id: user_id of the supplier party
916 --Returns:
917 --  "party name(vendor name)" of the given user_id
918 --Testing:
919 --End of Comments
920 ---------------------------------------------------------------------------
921 FUNCTION get_party_vendor_name (p_user_id IN NUMBER)
922 RETURN VARCHAR2;
923 
924 ---------------------------------------------------------------------------
925 --Start of Comments
926 --Name: get_vendor_eamil
927 --Pre-reqs:
928 --  None.
929 --Modifies:
930 --  None
931 --Locks:
932 --  None.
933 --Function:
934 --  Retrieves the vendor party email address for acceptance entries entered
935 --  by suppliers.
936 --Parameters:
937 --IN:
938 --  p_user_id: user_id of the supplier party
939 --Returns:
940 --  email address stored in HZ_PARTIES; if that is not available, return
941 --  email address stored in FND_USER
942 --Testing:
943 --End of Comments
944 ---------------------------------------------------------------------------
945 FUNCTION get_vendor_email (p_user_id IN NUMBER)
946 RETURN VARCHAR2;
947 --<HTML Agreement R12 End>
948 
949 END PO_INQ_SV;
950