1 PACKAGE PO_POAPPROVAL_INIT1 AUTHID CURRENT_USER AS
2 /* $Header: POXWPA2S.pls 120.4 2011/07/28 06:28:35 smvinod ship $ */
3
4
5 /*=======================================================================+
6 | FILENAME
7 | POXWPA2S.pls
8 |
9 | DESCRIPTION
10 | PL/SQL spec for package: PO_POAPPROVAL_INIT1
11 |
12 | NOTES
13 | MODIFIED Ben Chihaoui (06/10/97)
14 *=====================================================================*/
15
16
17 -- Record variable POHdr_rec
18 -- Public record variable used to hold the PO_HEADER columns
19 -- CLM Apprvl, included the column clm_document_number in the record for CLM documents.
20 TYPE POHdrRecord IS RECORD(
21 PO_HEADER_ID NUMBER,
22 COMMENTS VARCHAR2(240),
23 AUTHORIZATION_STATUS VARCHAR2(25),
24 TYPE_LOOKUP_CODE VARCHAR2(25),
25 PREPARER_ID NUMBER,
26 SEGMENT1 VARCHAR2(20),
27 CLOSED_CODE VARCHAR2(25),
28 CURRENCY_CODE VARCHAR2(15)
29 );
30
31 POHdr_rec POHdrRecord;
32
33 -- Record variable POLine_rec
34 -- Public record variable used to hold the PO_LINES columns.
35
36 TYPE POLineRecord IS RECORD(
37 LINE_NUM NUMBER,
38 ITEM_DESCRIPTION VARCHAR2(240),
39 UNIT_MEAS_LOOKUP_CODE VARCHAR2(25),
40 UNIT_PRICE NUMBER,
41 QUANTITY NUMBER);
42
43 POLine_rec POLineRecord;
44
45 -- Record variable RelHdr_rec
46 -- Public record variable used to hold the PO_RELEASES columns
47
48 TYPE RelHdrRecord IS RECORD(
49 PO_RELEASE_ID NUMBER,
50 PO_HEADER_ID NUMBER,
51 AUTHORIZATION_STATUS VARCHAR2(25),
52 RELEASE_TYPE VARCHAR2(25),
53 PREPARER_ID NUMBER,
54 RELEASE_NUM NUMBER,
55 CLOSED_CODE VARCHAR2(25),
56 PO_NUMBER VARCHAR2(20),
57 CURRENCY_CODE VARCHAR2(15),
58 COMMENTS VARCHAR2(240));
59 --Bug 10140786 Added comments to set PO_DESCRIPTION in release workflow.
60 RelHdr_rec RelHdrRecord;
61
62 -- Record variable POLine_loc_rec
63 -- Public record variable used to hold the PO_LINES and PO_LINE_LOCATIONS columns
64 -- for and Releases.
65
66 TYPE RelLineLocRecord IS RECORD(
67 PO_LINE_ID NUMBER,
68 ITEM_DESCRIPTION VARCHAR2(240),
69 UNIT_MEAS_LOOKUP_CODE VARCHAR2(25),
70 UNIT_PRICE NUMBER,
71 SHIPMENT_NUM NUMBER,
72 QUANTITY NUMBER,
73 SHIP_TO_LOCATION VARCHAR2(80),
74
75 /** <UTF8 FPI> **/
76 /** tpoon 9/27/2002 Expanded SHIP_TO_ORG from 60 to 240 **/
77 --<UTF-8 FPI START>
78 -- SHIP_TO_ORG VARCHAR2(240),
79 SHIP_TO_ORG HR_ALL_ORGANIZATION_UNITS.NAME%TYPE,
80 --<UTF-8 FPI END>
81
82 NEED_BY_DATE DATE,
83 PROMISED_DATE DATE,
84 SHIPMENT_TYPE VARCHAR2(25));
85
86 RelLineLoc_rec RelLineLocRecord;
87
88 -- Cursor GetPOHdr_csr
89 -- Public cursor used to get the PO_HEADER columns.
90
91 CURSOR GetPOHdr_csr(p_po_header_id NUMBER) RETURN POHdrRecord;
92
93 -- Cursor GetRelHdr_csr
94 -- Public cursor used to get the PO_RELEASES columns.
95
96 CURSOR GetRelHdr_csr(p_rel_header_id NUMBER) RETURN RelHdrRecord;
97
98 --
99 -- Get_PO_Attributes
100 -- Get the PO attributes. We get the header info and up to 5
101 -- PO lines.
102 --
103 -- IN
104 -- itemtype -- itemkey -- actid -- funcmode
105 -- OUT
106 -- Resultout
107 -- - Activity Performed - Activity was completed without any errors.
108 --
109 procedure Get_PO_Attributes( itemtype in varchar2,
110 itemkey in varchar2,
111 actid in number,
112 funcmode in varchar2,
113 resultout out NOCOPY varchar2 );
114
115 -- Is_this_new_doc
116 -- Is this a new document or a change order.
117 --
118 -- IN
119 -- itemtype -- itemkey -- actid -- funcmode
120 -- OUT
121 -- Resultout
122 -- - Y/N
123 --
124
125 procedure Is_this_new_doc( itemtype in varchar2,
126 itemkey in varchar2,
127 actid in number,
128 funcmode in varchar2,
129 resultout out NOCOPY varchar2 );
130
131 --
132
133 function Reserve_Unreserve_Check ( action in VARCHAR2,
134 doc_header_id in NUMBER,
135 doc_type_code in VARCHAR2,
136 doc_status in VARCHAR2,
137 doc_cancel_flag in VARCHAR2)
138 return BOOLEAN;
139
140 -- Is_Acceptance_Required
141 -- Is Acceptance required on this Document
142 --
143 -- IN
144 -- itemtype -- itemkey -- actid -- funcmode
145 -- OUT
146 -- Resultout
147 -- - Y/N
148 --
149
150 procedure Is_Acceptance_Required( itemtype in varchar2,
151 itemkey in varchar2,
152 actid in number,
153 funcmode in varchar2,
154 resultout out NOCOPY varchar2 );
155
156 -- <SVC_NOTIFICATIONS FPJ START>
157
158 -------------------------------------------------------------------------------
159 --Start of Comments
160 --Name: Get_Formatted_Address
161 --Function:
162 -- Given a location ID, concatenates fields from hr_locations into an address.
163 -- See the package body for more comments.
164 --End of Comments
165 -------------------------------------------------------------------------------
166 FUNCTION Get_Formatted_Address(p_location_id in NUMBER)
167 RETURN VARCHAR2;
168
169 -------------------------------------------------------------------------------
170 --Start of Comments
171 --Name: Get_Formatted_Full_Name
172 --Function:
173 -- Given a first and last name, returns a concatenated full name.
174 -- See the package body for more comments.
175 --End of Comments
176 -------------------------------------------------------------------------------
177 FUNCTION Get_Formatted_Full_Name(p_first_name in VARCHAR2,
178 p_last_name in VARCHAR2)
179 RETURN VARCHAR2;
180
181 -------------------------------------------------------------------------------
182 --Start of Comments
183 --Name: get_temp_labor_requester
184 --Function:
185 -- Returns the employee_id of the requester for the given Temp Labor PO line,
186 -- based on a series of rules.
187 -- See the package body for more comments.
188 --End of Comments
189 -------------------------------------------------------------------------------
190 PROCEDURE get_temp_labor_requester (
191 p_po_line_id IN PO_LINES_ALL.po_line_id%TYPE,
192 x_requester_id OUT NOCOPY PO_REQUISITION_LINES.to_person_id%TYPE
193 );
194
195 -------------------------------------------------------------------------------
196 --Start of Comments
197 --Name: launch_notify_tl_requesters
198 --Function:
199 -- For each new Temp Labor line (i.e. line that has not been approved before)
200 -- on a standard PO, starts the Notify Temp Labor Requester process to send
201 -- a PO Approval notification to the requester.
202 -- See the package body for more comments.
203 --End of Comments
204 -------------------------------------------------------------------------------
205 PROCEDURE launch_notify_tl_requesters (
206 itemtype IN VARCHAR2,
207 itemkey IN VARCHAR2,
208 actid IN NUMBER,
209 funcmode IN VARCHAR2,
210 resultout OUT NOCOPY VARCHAR2
211 );
212
213 -------------------------------------------------------------------------------
214 --Start of Comments
215 --Name: start_po_line_wf_process
216 --Function:
217 -- Starts a child workflow process for the given PO line.
218 -- See the package body for details.
219 --End of Comments
220 -------------------------------------------------------------------------------
221 /* bug 12773562 : Passing clm_document_number as a parameter. */
222 PROCEDURE start_po_line_wf_process (
223 p_item_type IN VARCHAR2,
224 p_item_key IN VARCHAR2,
225 p_process IN VARCHAR2,
226 p_parent_item_type IN VARCHAR2,
227 p_parent_item_key IN VARCHAR2,
228 p_po_line_id IN NUMBER,
229 p_requester_id IN NUMBER,
230 p_contractor_or_job IN VARCHAR2,
231 p_approver_user_name IN VARCHAR2,
232 p_clm_document_number IN VARCHAR2
233 );
234 -- <SVC_NOTIFICATIONS FPJ END>
235
236 --< Bug 3554754 Start >
237 PROCEDURE get_approved_date
238 ( p_doc_type IN VARCHAR2
239 , p_doc_id IN VARCHAR2
240 , x_return_status OUT NOCOPY VARCHAR2
241 , x_approved_date OUT NOCOPY DATE
242 );
243 --< Bug 3554754 End >
244
245 --
246 end PO_POAPPROVAL_INIT1;