1 PACKAGE PO_DOCUMENT_ACTIONS_SV AUTHID CURRENT_USER AS
2 /* $Header: POXDORAS.pls 120.0 2005/06/01 14:12:21 appldev noship $*/
3
4 -- <HTMLAC BEGIN>
5 -- Start of comments
6 -- API name : po_request_action_bulk
7 -- Type : Public
8 -- Pre-reqs : None.
9 -- Function : Calls po_request_action for each line that needs
10 -- to have an action requsted.
11 -- Parameters :
12 -- IN : p_api_version IN NUMBER Required
13 -- p_reason IN varchar2 Required
14 -- The reason needed to return this document if any
15 -- p_employee_id IN NUMBER Required
16 -- The employee_id to whom we will send a notification.
17 -- p_grouping_method IN varchar2 Required
18 -- The req grouping selected from the UI
19 -- p_req_header_id_tbl IN PO_TBL_NUMBER Required
20 -- The table containing the req_header_id column.
21 -- OUT : x_result OUT NUMBER
22 -- x_error_message OUT VARCHAR2
23 -- x_online_report_id_tbl OUT PO_TBL_NUMBER
24 -- The online report ids that have been generated.
25 -- x_req_header_id_succ_tbl OUT PO_TBL_NUMBER
26 -- Contains all the header_ids of the successful reqs.
27 -- Version : Current version 1.0
28 -- Previous version 1.0
29 -- Initial version 1.0
30 -- End of comments
31 PROCEDURE po_request_action_bulk (
32 p_api_version IN NUMBER,
33 x_result OUT NOCOPY NUMBER,
34 x_error_message OUT NOCOPY VARCHAR2,
35 p_reason IN VARCHAR2 := NULL,
36 p_employee_id IN NUMBER,
37 p_req_header_id_tbl IN PO_TBL_NUMBER,
38 x_online_report_id_tbl OUT NOCOPY PO_TBL_NUMBER,
39 x_req_header_id_succ_tbl OUT NOCOPY PO_TBL_NUMBER
40 );
41 -- <HTMLAC END>
42
43 /*===========================================================================
44 FUNCTION NAME: PO_REQUEST_ACTION
45
46 DESCRIPTION:
47
48 Main document action interface for interacting with the Document
49 Action Manager. The Document Action Manager is a server side Transaction
50 Manager that sits on the server and awaits requests for processing from the
51 client. The execution of the program will happen on the
52 server transparent to the client and with minimal time de-
53 lay. At the end of program execution, the client will be
54 notified of the outcome and a completion message will be
55 given along with a set of return values. We pass information back
56 and forth across the pipe. When we make a request we send information
57 about the action we wish to take and the document we wish to take action
58 upon and we get back the results of that request. To get the various
59 return parameters from the request we use
60 fnd_transaction.get_values (). We then parse the arguments that returned
61 through this mechanism and return them to the user through arguments to
62 this function.
63
64
65 PARAMETERS:
66
67 Action VARCHAR2(25) IN (Required)
68 - Action would you like to take APPROVE, APPROVE AND RESERVE,
69 SUBMISSION_CHECK, etc.
70
71 Document_Type VARCHAR2(25) IN (Required)
72 - Type of document are you trying to take the action on PO, REQ
73
74 Document_Subtype VARCHAR2(25) IN (Required)
75 - Subtype of the doument you are trying to take the action
76 on STANDARD, PLANNED, BLANKET
77
78 Document_Id NUMBER IN (Required)
79 - Primary key for the document header
80
81 Line_Id NUMBER IN (Optional)
82 - Primary key for the document line
83
84 Shipment_Id NUMBER IN (Optional)
85 - Primary key for the document shipment
86
87 Distribution_Id NUMBER IN (Optional)
88 - Primary key for the document distribtion
89
90 Employee_Id NUMBER IN (Required for Approvals)
91 - Primary key for the employee that is performing the action
92
93 New_Document_Status VARCHAR2(30) IN (Required for Approvals)
94 - New status for the documnt forward_document action
95 (IN-PROCESS, PRE-APPROVED)
96
97 Offline_Code VARCHAR2(1) IN (Required for Approvals)
98 - Is the Approver and Offline approver
99
100 Note VARCHAR2(480) IN (Optional)
101 - Note to send to person document is being submitted to
102 < UTF8 FPI - changed from Note VARCHAR2(240) >
103
104 Approval_Path_Id NUMBER IN (Optional)
105 - Primary key for the Approval path for this document
106
107 Forward_To_Id NUMBER IN (Optional)
108 - Id for the person you are forwarding the document to
109
110 Action_Date DATE IN (Optional)
111 - The date that you would like to apply for encumbrance transactions
112
113 Override_Funds VARCHAR2(1) IN (Optional)
114 - If there are no more funds available do you wish to override the
115 funds checker return code
116
117 Info_Request VARCHAR2(25) OUT
118 - Information about your request
119
120 Document_Status VARCHAR2(240) OUT
121 - The status of the document that you've taken the action on
122 APPROVED, INCOMPLETE, RESERVED
123
124 Online_Report_Id NUMBER OUT
125 - The primary key for the report lines if the document failed the request
126
127 Return_Code VARCHAR2(25) OUT
128 - The return code from the request that you've submitted
129
130 Error_Msg VARCHAR2(2000) OUT
131 - The error msg that you should put in a dialog and if the
132 return value = 1,2,3
133
134 --<CANCEL API FPI START>
135
136 p_extra_arg1 IN VARCHAR2 DEFAULT NULL (Optional)
137 p_extra_arg2 IN VARCHAR2 DEFAULT NULL (Optional)
138 p_extra_arg3 IN VARCHAR2 DEFAULT NULL (Optional)
139 - Any extra arguments needed to pass to the Document Manager. These must
140 be in the format expected by the Document Manager: 'NAME=VALUE'.
141
142 --<CANCEL API FPI END>
143
144 -- <ENCUMBRANCE FPJ START>
145 p_extra_args4 IN VARCHAR2 DEFAULT NULL (Optional)
146 - Any extra arguments needed to pass to the Document Manager. These must
147 be in the format expected by the Document Manager: 'NAME=VALUE'.
148 -- <ENCUMBRANCE FPJ END>
149
150 RETURN VALUES
151
152 E_SUCCESS constant number := 0; -- success
153 E_TIMEOUT constant number := 1; -- timeout
154 E_NOMGR constant number := 2; -- no manager
155 E_OTHER constant number := 3; -- other
156
157 DESIGN REFERENCES:
158
159 NOTES:
160
161 OPEN ISSUES:
162
163 CLOSED ISSUES:
164
165 CHANGE HISTORY:
166
167 ===========================================================================*/
168 FUNCTION PO_REQUEST_ACTION (
169 Action IN VARCHAR2,
170 Document_Type IN VARCHAR2,
171 Document_Subtype IN VARCHAR2,
172 Document_Id IN NUMBER,
173 Line_Id IN NUMBER,
174 Shipment_Id IN NUMBER,
175 Distribution_Id IN NUMBER,
176 Employee_id IN NUMBER,
177 New_Document_Status IN VARCHAR2,
178 Offline_Code IN VARCHAR2,
179 Note IN VARCHAR2,
180 Approval_Path_Id IN NUMBER,
181 Forward_To_Id IN NUMBER,
182 Action_Date IN DATE,
183 Override_Funds IN VARCHAR2,
184 Info_Request OUT NOCOPY VARCHAR2,
185 Document_Status OUT NOCOPY VARCHAR2,
186 Online_Report_Id OUT NOCOPY NUMBER,
187 Return_Code OUT NOCOPY VARCHAR2,
188 Error_Msg OUT NOCOPY VARCHAR2,
189 --<CANCEL API FPI START>
190 p_extra_arg1 IN VARCHAR2 DEFAULT NULL,
191 p_extra_arg2 IN VARCHAR2 DEFAULT NULL,
192 p_extra_arg3 IN VARCHAR2 DEFAULT NULL,
193 --<CANCEL API FPI END>
194 p_extra_arg4 IN VARCHAR2 DEFAULT NULL -- <ENCUMBRANCE FPJ>
195 )
196 RETURN NUMBER;
197
198 /*===========================================================================
199 FUNCTION NAME: PO_HOLD_DOCUMENT
200
201 DESCRIPTION:
202
203
204
205 PARAMETERS:
206
207 PO_Header_Id NUMBER IN (Required)
208 - Primary key for the Purchase Order Header
209
210 PO_Release_Id NUMBER IN (Optional)
211 - Primary key for the individual Purchase Order Release
212
213 Error_Msg VARCHAR2(2000) OUT
214 - The error msg that you should put in a dialog and if the
215 return value = 1,2,3
216
217 RETURN VALUES
218
219 E_SUCCESS constant number := 0; -- success
220 E_TIMEOUT constant number := 1; -- timeout
221 E_NOMGR constant number := 2; -- no manager
222 E_OTHER constant number := 3; -- other
223
224 DESIGN REFERENCES:
225
226 NOTES:
227
228 OPEN ISSUES:
229
230 CLOSED ISSUES:
231
232 CHANGE HISTORY:
233
234 ===========================================================================*/
235 FUNCTION PO_HOLD_DOCUMENT (
236 Po_Header_Id IN NUMBER ,
237 Po_Release_Id IN NUMBER ,
238 Error_Msg OUT NOCOPY VARCHAR2) RETURN NUMBER;
239
240 END PO_DOCUMENT_ACTIONS_SV;