DBA Data[Home] [Help]

PACKAGE: APPS.PO_POAPPROVAL_INIT1

Source


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