1 PACKAGE PO_COMMUNICATION_PVT AUTHID CURRENT_USER AS
2 /* $Header: POXVCOMS.pls 120.18.12020000.2 2013/02/10 14:40:47 vegajula ship $ */
3
4 /*=======================================================================+
5 | FILENAME
6 | POXVCOMS.pls
7 |
8 | DESCRIPTION
9 | PL/SQL spec for package: PO_COMMUNICATION_PVT
10 |
11 | NOTES
12 *=====================================================================*/
13
14 /* FPJ PO COMMUNICATION PROJECT */
15 /*******************************************************************
16 PROCEDURE NAME: PO_NEW_COMMUNICATION()
17
18 DESCRIPTION :This function will be called from the workflow process to Verify
19 whether the user is using the PO New Communication Method or not
20
21 Referenced by :
22 parameters :
23
24 CHANGE History: Created VSANJAY
25 *******************************************************************/
26
27 procedure PO_NEW_COMMUNICATION(itemtype in varchar2,
28 itemkey in varchar2,
29 actid in number,
30 funcmode in varchar2,
31 resultout out NOCOPY varchar2 );
32
33 /*******************************************************************
34 PROCEDURE NAME: GENERATE_PDF()
35
36 Description : This function will be called from the workflow process to genera
37 te the pdf document. It launches the concurrent program "Dispatch Purchase Order
38 ".
39
40 Referenced by :
41 parameters :
42
43 CHANGE History: Created VSANJAY
44 *******************************************************************/
45
46 procedure GENERATE_PDF(itemtype in varchar2,
47 itemkey in varchar2,
48 actid in number,
49 funcmode in varchar2,
50 resultout out NOCOPY varchar2 );
51
52 /*******************************************************************
53 PROCEDURE NAME: Delete_PDF_Attachments()
54
55 Description : This function will be called from the workflow process to delete
56 the pdf's from the fnd_attachment tables.
57
58 Referenced by :
59 parameters :
60
61 CHANGE History: Created VSANJAY
62 *******************************************************************/
63
64 PROCEDURE Delete_PDF_Attachments (itemtype IN VARCHAR2,
65 itemkey IN VARCHAR2,
66 actid IN NUMBER,
67 funcmode IN VARCHAR2,
68 resultout OUT NOCOPY VARCHAR2);
69
70 /*******************************************************************
71 PROCEDURE NAME: PO_PDF_EXISTS()
72
73 Description : This function will be called from the workflow process to Verify
74 whether PDF exists for the Current Document
75
76 Referenced by :
77 parameters :
78
79 CHANGE History: Created VSANJAY
80 *******************************************************************/
81
82 procedure PO_PDF_EXISTS(itemtype in varchar2,
83 itemkey in varchar2,
84 actid in number,
85 funcmode in varchar2,
86 resultout out NOCOPY varchar2 );
87
88 /*******************************************************************
89 PROCEDURE NAME: Start_Email_WF_Process()
90
91 DESCRIPTION : This function will be called from the workflow process to the
92 email to the supplier with PDF as an attachment
93 Referenced by :
94 parameters :
95
96 CHANGE History: Created VSANJAY
97 *******************************************************************/
98
99 procedure Start_Email_WF_Process(p_document_id NUMBER,
100 p_revision_num NUMBER,
101 p_document_type VARCHAR2,
102 p_document_subtype VARCHAR2,
103 p_email_address VARCHAR2,
104 p_language_code VARCHAR2,
105 p_store_flag VARCHAR2,
106 p_with_terms VARCHAR2 );
107
108
109 /*******************************************************************
110 PROCEDURE NAME: GENERATE_PDF_BUYER()
111
112 Description : This function will be called from the workflow process to genera
113 te the pdf document without T's and C's in buyers language . It launches the concurrent program "Dispatch Purchase Order".
114
115 Referenced by :
116 parameters :
117
118 CHANGE History: Created VSANJAY
119 *******************************************************************/
120
121 procedure GENERATE_PDF_BUYER(itemtype in varchar2,
122 itemkey in varchar2,
123 actid in number,
124 funcmode in varchar2,
125 resultout out NOCOPY varchar2 );
126
127 /*******************************************************************
128 PROCEDURE NAME: GENERATE_PDF_SUPP()
129
130 Description : This function will be called from the workflow process to genera
131 te the pdf document without T's and C's in suppliers language . It launches the concurrent program "Dispatch Purchase Order".
132
133 Referenced by :
134 parameters :
135
136 CHANGE History: Created VSANJAY
137 *******************************************************************/
138
139 procedure GENERATE_PDF_SUPP(itemtype in varchar2,
140 itemkey in varchar2,
141 actid in number,
142 funcmode in varchar2,
143 resultout out NOCOPY varchar2 );
144
145 /*******************************************************************
146 PROCEDURE NAME: GENERATE_PDF_EMAIL_PROCESS()
147
148 Description : This function will be called from the email po pdf workflow process to generate the pdf document . It launches the concurrent program "Dispatch Purchase Order".
149
150 Referenced by :
151 parameters :
152
153 CHANGE History: Created VSANJAY
154 *******************************************************************/
155
156 procedure GENERATE_PDF_EMAIL_PROCESS(itemtype in varchar2,
157 itemkey in varchar2,
158 actid in number,
159 funcmode in varchar2,
160 resultout out NOCOPY varchar2 );
161
162 /*******************************************************************
163 PROCEDURE NAME: LAUNCH_COMMUNICATE()
164
165 Description : This function will launch the concurrent request which is requested
166 from the communicate window
167
168
169 Referenced by :
170 parameters :
171
172 CHANGE History: Created VSANJAY
173 *******************************************************************/
174
175
176 procedure launch_communicate(p_mode in varchar2,
177 p_document_id in number ,
178 p_revision_number in number,
179 p_document_type in varchar2,
180 p_authorization_status in varchar2,
181 p_language_code in varchar2,
182 p_fax_enable in varchar2,
183 p_fax_num in varchar2,
184 p_with_terms in varchar2,
185 p_print_flag in varchar2,
186 p_store_flag in varchar2,
187 p_request_id out NOCOPY number);
188
189 /*******************************************************************
190 PROCEDURE NAME: COMMUNICATE()
191
192 Description : This function will launch the concurrent request which is requested
193 from the communicate window
194
195
196 Referenced by :
197 parameters :
198
199 CHANGE History: Created VSANJAY
200 *******************************************************************/
201
202
203 procedure Communicate(p_authorization_status in varchar2,
204 p_with_terms in varchar2,
205 p_language_code in varchar2,
206 p_mode in varchar2,
207 p_document_id in number ,
208 p_revision_number in number,
209 p_document_type in varchar2,
210 p_fax_number in varchar2,
211 p_email_address in varchar2,
212 p_request_id out NOCOPY number);
213
214 function po_communication_profile RETURN VARCHAR2;
215 function IS_PON_PRINTING_ENABLED RETURN VARCHAR2;
216 function USER_HAS_ACCESS_TC RETURN VARCHAR2;
217 /*******************************************************************
218 <PO Attachment Support 11i.11> Changed the name of the procedure
219 to Store_Blob because it will now be used for creating Blob
220 locator for Zip file also, not just PDF
221 PROCEDURE NAME: Store_Blob()
222
223 Description : This method will store the generated Blob in the repository
224 PO_HEAD or PO_REL
225
226 Referenced by :
227 parameters :
228
229 CHANGE History: Created VSANJAY
230 *******************************************************************/
231 procedure Store_Blob(p_document_id number ,
232 p_revision_number number ,
233 p_document_type varchar2,
234 p_file_name varchar2,
235 p_blob_type varchar2, --<PO Attachment Support 11i.11>
236 x_media_id out nocopy number);
237 /*******************************************************************/
238 procedure Store_Blob(p_document_id number ,
239 p_revision_number number ,
240 p_draft_id number , -- CLM Projects
241 p_document_type varchar2,
242 p_file_name varchar2,
243 p_blob_type varchar2, --<PO Attachment Support 11i.11>
244 x_media_id out nocopy number);
245
246 /*******************************************************************
247 PROCEDURE NAME: pdf_attach_app
248
249 Description : This function will retrieve the pdf document
250 from the fnd attachments table
251
252 Referenced by :
253 parameters :
254
255 CHANGE History: Created VSANJAY
256 *******************************************************************/
257
258
259 procedure pdf_attach_app(document_id in varchar2,
260 content_type in varchar2,
261 document in out nocopy blob,
262 document_type in out nocopy varchar2);
263
264 /*******************************************************************
265 PROCEDURE NAME: pdf_attach_supp
266
267 Description : This function will retrieve the pdf document
268 from the fnd attachments table
269
270 Referenced by :
271 parameters :
272
273 CHANGE History: Created VSANJAY
274 *******************************************************************/
275
276
277 procedure pdf_attach_supp(document_id in varchar2,
278 content_type in varchar2,
279 document in out nocopy blob,
280 document_type in out nocopy varchar2);
281
282 /*******************************************************************
283 PROCEDURE NAME: pdf_attach
284
285 Description : This function will retrieve the pdf document
286 from the fnd attachments table
287
288 Referenced by :
289 parameters :
290
291 CHANGE History: Created VSANJAY
292 *******************************************************************/
293
294 procedure pdf_attach(document_id in varchar2,
295 content_type in varchar2,
296 document in out nocopy blob,
297 document_type in out nocopy varchar2);
298
299
300 -- <Start Word Integration 11.5.10+>
301 /*******************************************************************
302 PROCEDURE NAME: okc_doc_attach
303
304 Description : This function will retrieve the attached contract
305 document from the contracts repository (fnd_attachments table)
306
307 Referenced by :
308 parameters :
309
310 CHANGE History: Created SPANGULU
311 *******************************************************************/
312
313 PROCEDURE okc_doc_attach(document_id in varchar2,
314 content_type in varchar2,
315 document in out nocopy blob,
316 document_type in out nocopy varchar2);
317
318 -- <End Word Integration 11.5.10+>
319
320
321
322 -------------------------------------------------------------------------------
323 --Start of Comments
324 --Name: zip_attach
325 --Pre-reqs:
326 -- Zip file should be generated correctly and stored in the database
327 --Modifies:
328 -- None.
329 --Locks:
330 -- None.
331 --Function:
332 -- Queries the Zip Blob for specified document and returns it as a blob
333 -- to attach to the workflow notification
334 --Parameters:
335 -- Follows workflow standatd API specification for documents
336 --IN:
337 --document_id
338 -- A string the uniquely identifies the document to be attached
339 --content_type
340 -- For PL/SQL Blob documents, the values is ''
341 --IN OUT:
342 --document
343 -- Outbound Lob locator for the Blob to be attached
344 --document_type
345 -- String buffer that contains the content type of outbound Blob
346 --Notes:
347 -- Added as a part of <PO Attachment Support 11i.11>
348 --End of Comments
349 -------------------------------------------------------------------------------
350 PROCEDURE zip_attach(document_id in varchar2,
351 content_type in varchar2,
352 document in out nocopy blob,
353 document_type in out nocopy varchar2);
354
355 -------------------------------------------------------------------------------
356 --Start of Comments
357 --Name: set_zip_error_code
358 --Pre-reqs:
359 -- None.
360 --Modifies:
361 -- Workflow Attribute zip_error_code
362 --Locks:
363 -- None.
364 --Function:
365 -- Sets the workflow attribute zip_error_code to the value passed in
366 --Parameters:
367 --IN:
368 --p_itemtype
369 -- String that identifies the workflow process
370 --p_itemkey
371 -- Uniquely identifies the current instance of the workflow process
372 --p_zip_error_code
373 -- Value to which the workflow attribute zip_error_code should be
374 -- set to. Possible values can be OVERSIZED, DUPLICATE_FILENAME
375 -- and UNEXPECTED (values of lookup type POAPPRV_ZIP_ERROR_CODE)
376 --Notes:
377 -- Added as a part of <PO Attachment Support 11i.11>
378 --End of Comments
379 -------------------------------------------------------------------------------
380 PROCEDURE set_zip_error_code (p_itemtype IN VARCHAR2,
381 p_itemkey IN VARCHAR2,
382 p_zip_error_code IN VARCHAR2);
383
384 -------------------------------------------------------------------------------
385 --Start of Comments
386 --Name: get_zip_error_code
387 --Pre-reqs:
388 -- None.
389 --Modifies:
390 -- None.
391 --Locks:
392 -- None.
393 --Function:
394 -- Returns the value of workflow attribute ZIP_ERROR_CODE
395 --Parameters:
396 -- Follows standard workflow API specification
397 --IN:
398 --itemtype
399 -- String that identifies the workflow process
400 --itemkey
401 -- Uniquely identifies the current instance of the workflow process
402 --actid
403 -- The ID number of the activity from which this procedure is callled
404 --funcmode
405 -- The execution mode of the activity
406 --OUT:
407 --resultout
408 -- Holds the value of the workflow attribute zip_error_code. Possible
409 -- values can be OVERSIZED, DUPLICATE_FILENAME and UNEXPECTED
410 -- (values of lookup type POAPPRV_ZIP_ERROR_CODE)
411 --Notes:
415 PROCEDURE get_zip_error_code (itemtype IN VARCHAR2,
412 -- Added as a part of <PO Attachment Support 11i.11>
413 --End of Comments
414 -------------------------------------------------------------------------------
416 itemkey IN VARCHAR2,
417 actid IN NUMBER,
418 funcmode IN VARCHAR2,
419 resultout OUT NOCOPY VARCHAR2);
420
421 -------------------------------------------------------------------------------
422 --Start of Comments
423 --Name: get_max_zip_size
424 --Pre-reqs:
425 -- Column max_attachment_size should exist in table po_system_parameters_all
426 -- Org context should be set correctly to enable querying from org striped
427 -- view po_system_parameters
428 --Modifies:
429 -- None.
430 --Locks:
431 -- None.
432 --Function:
433 -- Queries the value of 'Maximum Attachment Size' which is the maximum
434 -- allowed size of the Zip file.
435 --Parameters:
436 --IN:
437 --itemtype
438 -- String that identifies the workflow process
439 --itemkey
440 -- Uniquely identifies the current instance of the workflow process
441 --Returns:
442 -- For functions:
443 -- Returns the values of 'Maximum Attachment Size' in Purchasing Options
444 -- Setup form. This is the maximum allowed size of the Zip file.
445 --Notes:
446 -- Added as a part of <PO Attachment Support 11i.11>
447 -- A value of 0 means Zip Attachments are not supported
448 --End of Comments
449 -------------------------------------------------------------------------------
450 FUNCTION get_max_zip_size (p_itemtype IN VARCHAR2,
451 p_itemkey IN VARCHAR2) RETURN NUMBER;
452
453 -------------------------------------------------------------------------------
454 --Start of Comments
455 --Name: check_for_attachments
456 --Pre-reqs:
457 -- None.
458 --Modifies:
459 -- None.
460 --Locks:
461 -- None.
462 --Function:
463 -- Checks if any attachments of category 'To Supplier' and type 'File'
464 -- exist for the current PO/Release
465 --Parameters:
466 --IN:
467 --p_document_type
468 -- Document Type, can be PO, PA or RELEASE
469 --p_document_id
470 -- po_header_id for PO, PA and po_release_id for RELEASE
471 --Returns:
472 -- For functions:
473 -- Returns 'Y' if any attachments of category 'To Supplier' and type 'File'
474 -- exist for the current PO/Release
475 --Notes:
476 -- Added as a part of <PO Attachment Support 11i.11>
477 -- Exception handling for this light weight function is left to the calling
478 -- code. This is because the exception handling will be different in
479 -- different calls
480 --End of Comments
481 -------------------------------------------------------------------------------
482 FUNCTION check_for_attachments(p_document_type IN VARCHAR2,
483 p_document_id IN NUMBER) RETURN VARCHAR2;
484
485
486 /*******************************************************************
487 FUNCTION NAME: POXMLGEN
488
489 Description : This function will generate the XML for a Document
490
491 Referenced by :
492 parameters :
493
494 CHANGE History: Created MANRAM
495 *******************************************************************/
496
497 function POXMLGEN( p_api_version in NUMBER,
498 p_document_id in NUMBER,
499 p_revision_num in NUMBER,
500 p_document_type in VARCHAR2,
501 p_document_subtype in VARCHAR2,
502 p_test_flag in VARCHAR2,
503 p_which_tables in VARCHAR2,
504 p_with_terms in VARCHAR2 --Bug#3583910
505 -- Bug 3690810. Removed file.encoding parameter
506 ) return clob ;
507
508 /**************************************************************************************
509 FUNCTION NAME : GET_DROP_SHIP_DETAILS
510
511 Description : This function retreives drop ship details for given line location id
512 by calling OE_DROP_SHIP_GRP.GET_ORDER_LINE_INFO procedure.
513
514 Referenced by :
515
516 parameters : p_location_id of type number as IN parameter
517
518 CHANGE History: Created MANRAM
519 *************************************************************************************/
520
521 function GET_DROP_SHIP_DETAILS(p_location_id in number) return number ;
522
523
524 /*******************************************************************
525 The following functions returns the global variables that are
526 populated by GET_DROP_SHIP_DETAILS function
527 *******************************************************************/
528 function getShipContPhone return VARCHAR2;
529 --bug#3438608 added three function getTownOrCity
530 --getPostalCode and getStateOrProvince
531 --to return the values in global variables
532 --po_communication_pvt.g_town_or_city
533 --po_communication_pvt.g_postal_code
534 --and po_communication_pvt.g_state_or_province.
535
536 function getTownOrCity return Varchar2;
537 function getStateOrProvince return Varchar2;
538 function getPostalCode return Varchar2;
539 --bug#3438608
540 function getShipContEmail return VARCHAR2;
541 function getDeliverContPhone return VARCHAR2;
542 function getDeliverContEmail return VARCHAR2;
543 function getShipContName return VARCHAR2;
544 function getDeliverContName return VARCHAR2;
545 function getShipCustName return VARCHAR2;
546 function getShipCustLocation return VARCHAR2;
547 function getDeliverCustName return VARCHAR2;
551 function getDeliverContactFax return VARCHAR2;
548 function getDeliverCustLocation return VARCHAR2 ;
549 function getShipContactfax return VARCHAR2;
550 function getDeliverContactName return VARCHAR2;
552 function getShippingMethod return VARCHAR2;
553 function getShippingInstructions return VARCHAR2;
554 function getPackingInstructions return VARCHAR2;
555 function getCustomerProductDesc return VARCHAR2;
556 function getCustomerPoNumber return VARCHAR2;
557 function getCustomerPoLineNum return VARCHAR2;
558 function getCustomerPoShipmentNum return VARCHAR2;
559 /*******************************************************************
560 End of functions that returns drop ship details
561 ********************************************************************/
562
563
564 function getDocumentId RETURN NUMBER ;
565
566 function getRevisionNum RETURN NUMBER;
567
568 function getVendorId RETURN NUMBER;
569
570 function getCoverMessage RETURN VARCHAR2;
571
572 function getAmendmentMessage RETURN VARCHAR2;
573
574 function getTimezone RETURN VARCHAR2;
575
576 function getTestFlag RETURN VARCHAR2;
577 function getReleaseHeaderId RETURN VARCHAR2 ;
578 --ADD TO bug 16076162
579 function getReleaseId RETURN VARCHAR2;
580 --END of bug 16076162
581 /*******************************************************************************
582 FUNCTION NAME : GETLOCATIONINFO
583
584 Description : This function retreives address details(like ship to, bill to)
585 for a given location id by calling PO_HR_LOCATION.GET_ADDRESS procedure and
586 populates the retrieved values into global variables
587
588 Referenced by :
589 parameters : p_location_id of type number as IN parameter
590
591 CHANGE History: Created MANRAM
592 ********************************************************************************/
593 function getLocationInfo(p_location_id in number) return NUMBER;
594
595
596 /*******************************************************************
597 The following functions returns the global variables that are
598 populated by GETLOCATIONINFO function
599 *******************************************************************/
600
601 function getAddressLine1 return varchar2;
602 function getAddressLine2 return varchar2;
603 function getAddressLine3 return varchar2;
604 --Bug 4504228 function getPhone return varchar2;
605 /*Bug 4504228 Buyer contact phone and buyer email were not shown
606 in PDF Output. Adding procedure getEmail() and
607 changing the specification of getPhone()*/
608 function getPhone(p_agent_id in number) return varchar2;
609 function getEmail return varchar2;
610 function getFax return varchar2;
611 function getLocationName return varchar2;
612 function getTerritoryShortName return varchar2;
613 function getAddressInfo return varchar2;
614 /*******************************************************************
615 End of functions that returns address details
616 ********************************************************************/
617
618
619
620 /*******************************************************************************
621 FUNCTION NAME : GETOPERATIONINFO
622
623 Description : This function retreives Operation Unit address details
624 for given organization id and populates the retrieved values into
625 global variables
626
627 Referenced by :
628 parameters : p_org_id of type number as IN parameter
629
630 CHANGE History: Created MANRAM
631 ********************************************************************************/
632 function getOperationInfo(p_org_id in NUMBER) return varchar2;
633
634
635 /*******************************************************************
636 The following functions returns the Operation Unint address
637 variables that are populated by GETOPERATIONINFO function
638 *******************************************************************/
639 function getOUAddressLine1 return varchar2;
640 function getOUAddressLine2 return varchar2;
641 function getOUAddressLine3 return varchar2;
642 function getOUTownCity return varchar2;
643 function getOURegion2 return varchar2;
644 function getOUPostalCode return varchar2;
645 /*******************************************************************
646 End of functions that returns operation unit address details
647 ********************************************************************/
648
649 function getSegmentNum(p_header_id in NUMBER) return VARCHAR2;
650 function getAgreementLineNumber return VARCHAR2;
651 function getQuoteNumber return VARCHAR2;
652 function getAgreementFlag return VARCHAR2;
653
654 function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER;
655
656 function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER;
657 function getArcBuyerFName return VARCHAR2;
658 function getArcBuyerLName return VARCHAR2;
659 function getArcBuyerTitle return VARCHAR2;
660
661 function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER;
662
663 function getVendorAddressLine1(p_vendor_site_id in NUMBER) return VARCHAR2;
664 function getVendorAddressLine2 return VARCHAR2;
665 function getVendorAddressLine3 return VARCHAR2;
666 function getVendorCityStateZipInfo return VARCHAR2;
667 function getVendorCountry return VARCHAR2;
668
669 function getJob(p_job_id in NUMBER) return VARCHAR2;
670
671 function getDocumentType return VARCHAR2;
672
673 function getFormatMask return VARCHAR2;
674
675 function getLegalEntityName return VARCHAR2;
676
677 function IsDocumentSigned(p_header_id number) return varchar2;
678
679 function getPDFFileName(p_document_type varchar2,
680 p_terms varchar2,
681 p_orgid number,
682 p_document_id varchar2,
683 p_revision_num number,
687 p_terms varchar2,
684 p_language_code varchar2) return varchar2;
685 --CLM
686 function getPDFFileName(p_document_type varchar2,
688 p_orgid number,
689 p_document_id varchar2,
690 p_revision_num number,
691 p_draft_id number,
692 p_language_code varchar2,
693 p_is_conf_doc varchar2) return varchar2;
694
695
696 -- <Start Word Integration 11.5.10+>
697
698 function getRTFFileName(p_document_type varchar2,
699 p_terms varchar2,
700 p_orgid number,
701 p_document_id varchar2,
702 p_revision_num number,
703 p_language_code varchar2) return varchar2;
704
705 --CLM
706 function getRTFFileName(p_document_type varchar2,
707 p_terms varchar2,
708 p_orgid number,
709 p_document_id varchar2,
710 p_revision_num number,
711 p_draft_id number,
712 p_language_code varchar2) return varchar2;
713
714 -- <End Word Integration 11.5.10+>
715
716
717 -------------------------------------------------------------------------------
718 --Start of Comments
719 --Name: getZipFileName
720 --Pre-reqs:
721 -- None.
722 --Modifies:
723 -- None.
724 --Locks:
725 -- None.
726 --Function:
727 -- Returns the name of the Zip file for current PO
728 --Parameters:
729 -- p_org_id of type number as IN parameter
730 --Returns:
731 -- For functions:
732 -- Returns the name of the Zip file for the PO
733 --Notes:
734 -- Added as a part of <PO Attachment Support 11i.11>
735 -- History
736 -- Bug# 5240634 Changed the signature to take in a org_id
737 --
738 -- The function used to construct the zip file name using
739 -- document type, orgid, document id and revision num as
740 -- p_document_type||'_'||p_orgid||'_'||l_document_number||'_'||p_revision_num||'.zip';
741 -- This was changed as per ECO Bug #43877577
742 --End of Comments
743 -------------------------------------------------------------------------------
744 FUNCTION getZIPFileName(p_org_id in number) RETURN varchar2 ;
745
746 /* Function to retru Address line 4 value*/
747 --bug:346361
748 function getAddressLine4 return varchar2;
749
750 /* Function to retrun vendor Address line 4 value*/
751 --bug:346361
752 function getVendorAddressLine4 return VARCHAR2;
753
754
755 /*******************************************************************************
756 FUNCTION NAME : getLegalEntityDetails
757
758 Description : This function retreives Legal Entity address details
759 for given inventory organization id and populates the retrieved values into
760 global variables
761
762 Referenced by :
763 parameters : p_org_id of type number as IN parameter
764
765 CHANGE History: Created MANRAM
766 ********************************************************************************/
767 function getLegalEntityDetails(p_org_id in NUMBER) return varchar2;
768
769 /*******************************************************************
770 The following functions returns Legal Entity address
771 variables that are populated by getLegalEntityDetails function
772 *******************************************************************/
773
774 function getLEAddressLine1 return varchar2;
775 function getLEAddressLine2 return varchar2;
776 function getLEAddressLine3 return varchar2;
777 function getLECountry return varchar2;
778 function getLETownOrCity return varchar2;
779 function getLEPostalCode return varchar2;
780 function getLEStateOrProvince return varchar2;
781 /*******************************************************************
782 End of functions that returns operation unit address details
783 ********************************************************************/
784
785 -- <Complex Work R12 Start>
786 -- Begin Functions Related To Complex Work Procurement
787
788 FUNCTION getIsComplexWorkPO RETURN VARCHAR2;
789
790 -- End Functions Related To Complex Work Procurement
791 -- <Complex Work R12 End>
792
793 /*
794 Function returns distinct count of shipment level ship to from header level ship to. This count is
795 used in XSL to identify what to display in ship to address at header and shipment level
796 */
797 function getDistinctShipmentCount return number;
798
799 /*
800 Function to retrieve cancel date for Standard, Blanket and Contract PO's
801 */
802 function getPOCancelDate(p_po_header_id in NUMBER) return date;
803
804
805 /* Function retuns the Operation Unit country value that
806 retreived in getOperationInfo function.
807 */
808 function getOUCountry return varchar2 ;
809
810
811 /*******************************************************************************
812 FUNCTION NAME : getCanceledAmount
813
814 Description : This function retreives Canceled Line amount and Total
815 line amount for given line id. Returns canceled_amount and populates
816 g_line_org_amount global variable with original line amount
817
818 Referenced by :
819 parameters : p_po_line_id of type number as IN parameter
820 p_po_revision_num of type number as IN parameter
821 p_po_header_id of type number as IN parameter
822
823 CHANGE History: Created MANRAM
824 ********************************************************************************/
825 function getCanceledAmount(p_po_line_id IN NUMBER,
826 p_po_revision_num IN NUMBER,
827 p_po_header_id IN NUMBER) return varchar2 ;
828
829
830 function getLineOriginalAmount return number;
831
832 /*Bug#3583910 return the global variable g_with_terms */
833 function getWithTerms return varchar2;
834
835
836 /*******************************************************************************
840 Description : This procedure is called from the PoGenerateDocument.java
837 bug#3630737.
838 PROCEDURE NAME : getOUDocumentDetails
839
841 file. This procedure retrieves and returns OperatingUnitName, Draft message
842 from and document name.
843
844 Referenced by : PoGenerateDocument.java
845 CHANGE History: Created MANRAM
846 ********************************************************************************/
847
848 PROCEDURE getOUDocumentDetails(p_documentID IN NUMBER,
849 p_draftId IN NUMBER := -1, --CLM
850 x_pendingSignatureFlag OUT NOCOPY VARCHAR2,
851 x_documentName OUT NOCOPY VARCHAR2,
852 x_organizationName OUT NOCOPY VARCHAR2,
853 x_draft OUT NOCOPY VARCHAR2) ;
854
855 /*********************************************************************************
856 bug#3630737.
857 Returns concatinated message of DocumentType, po number and revision number
858 **********************************************************************************/
859 function getDocumentName return VARCHAR2;
860
861 /*********************************************************************************
862 bug#3771735.
863 Returns the DocumentTypeCode stored in the global variable g_documentTypeCode
864 **********************************************************************************/
865 function getDocumentTypeCode return VARCHAR2;
866
867 /**************************************************************************
868 Bug 4026592
869 Returns whether contract source is attached document.
870 Stored in the global variable g_is_contract_attached_doc
871 ***************************************************************************/
872 FUNCTION getIsContractAttachedDoc return VARCHAR2;
873
874 /*********************************************************************************
875 11i10+ Contract ER TC Sup Lang
876 Procedure to generate pdf with terms in suppliers language
877 **********************************************************************************/
878 PROCEDURE GENERATE_PDF_SUPP_TC (itemtype IN VARCHAR2,
879 itemkey IN VARCHAR2,
880 actid IN NUMBER,
881 funcmode IN VARCHAR2,
882 resultout OUT NOCOPY VARCHAR2);
883
884 /*********************************************************************************
885 bug#AMIT.
886 Returns the Inventory Org Id stored in FINANCIALS_SYSTEM_PARAMETERS
887 **********************************************************************************/
888 FUNCTION getInventoryOrgId return NUMBER;
889 -- Added for bug 6692126
890 FUNCTION get_preparer_profile (p_document_id NUMBER,
891 p_document_type VARCHAR2,
892 p_profile_option VARCHAR2) RETURN VARCHAR2;
893
894
895 /********************************************************************************
896 Bug5213932 Converts long text into clob and returns clob.
897 ********************************************************************************/
898 FUNCTION get_clob(p_row_id IN ROWID) RETURN CLOB;
899
900 /*Bug4568471/6829381 Introduced two new functions*/
901 FUNCTION get_oneTime_loc(p_location_id NUMBER) RETURN VARCHAR2;
902 FUNCTION get_oneTime_address(p_line_location_id NUMBER) RETURN CLOB;
903 /*Bug4568471/6829381*/
904
905 FUNCTION get_item_num(p_item_id NUMBER,p_org_id NUMBER) RETURN VARCHAR2;
906 /*Above function for bug8982745*/
907
908
909 end PO_COMMUNICATION_PVT;