1 PACKAGE INV_TRANSACTION_FLOW_PUB AS
2 /* $Header: INVPICTS.pls 120.2 2006/04/21 14:24:34 umoogala noship $ */
3 /*#
4 * This package provides routines to create, update and query
5 * inter-company transaction flows.
6 * @rep:scope public
7 * @rep:product INV
8 * @rep:lifecycle active
9 * @rep:displayname Inter-company transaction flow
10 * @rep:category BUSINESS_ENTITY INV_IC_TRANSACTION_FLOW
11 */
12
13 G_PACKAGE_NAME CONSTANT VARCHAR2(30) := 'INV_TRANSACTION_FLOW_PUB';
14
15 G_RET_STS_SUCCESS CONSTANT VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
16 G_RET_STS_WARNING CONSTANT VARCHAR2(1) := 'W';
17 G_RET_STS_ERROR CONSTANT VARCHAR2(1) := FND_API.G_RET_STS_ERROR;
18
19 G_RET_STS_UNEXP_ERROR CONSTANT VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
20
21 G_TRUE CONSTANT VARCHAR2(1) := FND_API.G_TRUE;
22 G_FALSE CONSTANT VARCHAR2(1) := FND_API.G_FALSE;
23
24 G_MISS_NUM CONSTANT NUMBER := FND_API.G_MISS_NUM;
25 -- Record type for inter-company transaction flow
26 TYPE mtl_transaction_flow_rec_type is RECORD
27 (
28 HEADER_ID NUMBER -- Transaction flow header ID
29 , START_ORG_ID NUMBER -- Start Operating Unit
30 , END_ORG_ID NUMBER -- End Operating Unit
31 , ORGANIZATION_ID NUMBER -- The Ship From Organization ID for shipping flow or Ship TO organization
32 -- for procuring flow
33 , LINE_NUMBER NUMBER -- Sequence of the intermediate Node
34 , FROM_ORG_ID NUMBER -- From operating unit
35 , FROM_ORGANIZATION_ID NUMBER -- Default Inventory Organization of the Source Operating Unit
36 , TO_ORG_ID NUMBER -- To Operating Unit
37 , TO_ORGANIZATION_ID NUMBER -- Default Inventory Organization of the Destination Operating Unit
38 , ASSET_ITEM_PRICING_OPTION NUMBER -- The pricing option for asset item
39 , EXPENSE_ITEM_PRICING_OPTION NUMBER -- The pricing option for expense Item
40 , START_DATE DATE -- Start Effective Date
41 , END_DATE DATE -- End Effective Date
42 , CUSTOMER_ID NUMBER -- Customer Id
43 , ADDRESS_ID NUMBER -- Address ID
44 , CUSTOMER_SITE_ID NUMBER -- Customer location ID
45 , CUST_TRX_TYPE_ID NUMBER -- Customer transaction type id
46 , VENDOR_ID NUMBER -- Vendor ID
47 , VENDOR_SITE_ID NUMBER -- Vendor Location ID
48 , FREIGHT_CODE_COMBINATION_ID NUMBER -- Account ID for Freight Code
49 , INVENTORY_ACCRUAL_ACCOUNT_ID NUMBER -- Account ID for Inventory Accrual Account
50 , EXPENSE_ACCRUAL_ACCOUNT_ID NUMBER -- Account ID for Expense Accrual
51 , INTERCOMPANY_COGS_ACCOUNT_ID NUMBER -- ACCOUNT ID For Intercompany COGS
52 , NEW_ACCOUNTING_FLAG VARCHAR2(1) -- Flag to indicate if transaction flow is used
53 , From_ORG_COST_GROUP_ID NUMBER -- Cost group of the Source Inventory Organization
54 , TO_ORG_COST_GROUP_ID NUMBER -- Cost Group Of the Destination Inventory Organization
55 );
56
57
58 TYPE g_transaction_flow_tbl_type is TABLE of mtl_transaction_flow_rec_type INDEX BY BINARY_INTEGER;
59
60 TYPE number_tbl IS TABLE of Number INDEX BY BINARY_INTEGER;
61
62 TYPE varchar2_tbl IS TABLE OF VARCHAR2(200) INDEX BY BINARY_INTEGER;
63
64 /*==================================================================================================
65 * Following constant are for transaction flow type:
66 * 1 - Shipping
67 * 2 - Procuring
68 * This mapped to mfg_lookups with lookup_type INV_TRANSACTION_FLOW_TYPE
69 *==================================================================================================*/
70 G_SHIPPING_FLOW_TYPE CONSTANT NUMBER := 1;
71 G_PROCURING_FLOW_TYPE CONSTANT NUMBER := 2;
72
73 -- This constant is for the qualifier code. For 115.10, the only qualifier is category
74
75 G_QUALIFIER_CODE CONSTANT NUMBER := 1;
76
77
78 -- Global constant for x_transaction_flow_status used in check_transaction_flow()
79
80 G_TRANSACTION_FLOW_FOUND CONSTANT VARCHAR2(1) := 'Y';
81 G_TRANSACTION_FLOW_NOT_FOUND CONSTANT VARCHAR2(1) := 'N';
82 /*==================================================================================================
83 * The following constant are for the ds_type_code, the type code of drop ship transaction
84 * 1 - logical receipt for global procurement transaction
85 * 2 - physical receipt for drop ship transaction
86 * 3 - physical receipt for non drop ship transaction
87 *=================================================================================================*/
88 G_LOGICAL_RECEIPT_FOR_DS CONSTANT NUMBER := 1;
89 G_PHYSICAL_RECEIPT_FOR_DS CONSTANT NUMBER := 2;
90 G_PHYSICAL_RECEIPT_FOR_NON_DS CONSTANT NUMBER := 3;
91
92 /*===================================================================================================
93 * Procedure: GET_TRANSACTION_FLOW()
94 *
95 * Description:
96 * This API is used to get a valid Inter-company Transaction Flow defined
97 * between the provided Start Operating Unit and End Operating Unit,
98 * which is active on the transaction date provided and of the flow type
99 * specified, Global Procurement Flow or Drop Ship flow.
100 *
101 * Usage:
102 * This API will be a public API and will be called by
103 * 1. The "Create Logical Transaction" API within Oracle Inventory,
104 * 2. By Receiving during the time of delivery for True Drop Ship flows
105 * 3. By Oracle Costing while creating the Receiving Accounting Event records for
106 * Global Procurement flows
107 *
108 * Inputs:
109 * 1. p_start_operating_unit: The start Operating Unit for which the Global Procurement or Drop Ship occurred.
110 * This is a required parameter.
111 * 2. p_end_operating_unit: The End Operating Unit for which the Global Procurement of Drop Ship occurred.
112 * This is a required parameter
113 * 3. p_flow_type: To indicate whether this is Global Procurement flow or Drop Ship flow
114 * 4. p_organization_id: Indicates the ship from/ship to organization for
115 * drop ship and global procuremnt flows respectively
116 * 5. p_qualifier_code_tbl: Array of Qualifier Codes, The qualifier code
117 * for this release will be "1" representing 'Category'
118 * This is an optional parameter. Default value for this parameter is NULL.
119 * 5. Array of Qualifier Value IDs: The value of the qualifier.
120 * For this release, it will be the category_id of the item. This is an optional parameter.
121 * The default value of this parameter will be NULL.
122 * 6. Transaction Date: The date when the transaction is going to happen.
123 * 7. API version - the version of the API
124 * 8. Get default cost group - Flag to get the default cost group for the
125 * intermediate organization nodes
126 *
127 * Outputs:
128 * This API will return a table of records(x_transaction_flows_tbl) of all the nodes in between the
129 * Start Operating Unit and End Operating Unit, the pricing options,
130 * and the Inter-Company Relations information
131 * x_return_status - this API will return FND_API.G_RET_STS_SUCESS if it is successfull and a transaction flow record
132 * is found.
133 * - This API will return G_RET_STS_WARNING if it is successful but no transaction flow record is
134 * found
135 * - This API will return FND_API.G_RET_STS_ERROR,FND_API.G_RET_STS_UNEXP_ERROR on error.
136 * x_transaction_flows_tbl - table of records of all the nodes in between
137 * the Start Operating Unit and End Operating Unit, the pricing options,
138 * and the Inter-Company Relations information
139 *===================================================================================================*/
140 /*#
141 * This API is used to get a valid Inter-company Transaction Flow defined
142 * between the provided Start Operating Unit and End Operating Unit,
143 * which is active on the transaction date provided and of the flow type
144 * specified; Global Procurement Flow or Drop Ship flow.
145 * @param x_return_status return variable holding the status of the procedure call
146 * @param x_msg_count return variable holding the number of error messages returned
147 * @param x_msg_data return variable holding the error message
148 * @param x_transaction_flows_tbl return variable holding the table of records of all the nodes in between the Start Operating Unit and End Operating Unit
149 * @param p_api_version API Version of this procedure. Current version is 1.0
150 * @param p_init_msg_list Indicates whether message stack is to be initialized
151 * @param p_start_operating_unit The start Operating Unit for which the Global Procurement or Drop Ship occurred.
152 * @param p_end_operating_unit The End Operating Unit for which the Global Procurement of Drop Ship occurred.
153 * @param p_flow_type To indicate whether this is Global Procurement flow or Drop Ship flow
154 * @param p_organization_id Indicates the ship from/ship to organization for drop ship and global procuremnt flows respectively
155 * @param p_qualifier_code_tbl Array of Qualifier Codes, The qualifier code for this release will be "1" representing 'Category'
156 * @param p_qualifier_value_tbl Array of Qualifier Value IDs. For this release, it will be the category_id of the item.
157 * @param p_transaction_date The date when the transaction is going to happen.
158 * @param p_get_default_cost_group pass 'Y' to get the default cost group for the intermediate organization nodes
159 * @rep:displayname Get Intercompany Transaction Flow
160 */
161 procedure get_transaction_flow(
162 x_return_status OUT NOCOPY VARCHAR2
163 , x_msg_data OUT NOCOPY VARCHAR2
164 , x_msg_count OUT NOCOPY NUMBER
165 , x_transaction_flows_tbl OUT NOCOPY G_TRANSACTION_FLOW_TBL_TYPE
166 , p_api_version IN NUMBER
167 , p_init_msg_list IN VARCHAR2 DEFAULT G_FALSE
168 , p_start_operating_unit IN NUMBER
169 , p_end_operating_unit IN NUMBER
170 , p_flow_type IN NUMBER
171 , p_organization_id IN NUMBER
172 , p_qualifier_code_tbl IN NUMBER_TBL
173 , p_qualifier_value_tbl IN NUMBER_TBL
174 , p_transaction_date IN DATE
175 , p_get_default_cost_group IN VARCHAR2
176 );
177
178
179 /*===================================================================================================
180 * Procedure: GET_TRANSACTION_FLOW()
181 *
182 * Description:
183 * This API is used to get a valid Inter-company Transaction Flow for a
184 * given transaction flow header
185 *
186 * Usage:
187 * This API will be a PUBLIC PROCEDURE and will be called by
188 * 1. the "Create Logical Transaction" API within Oracle Inventory,
189 *
190 * To get a valid Inter-company Transaction Flow for a given transaction flow header.
191 * Inputs:
192 * This API will receive the following input parameters:
193 * 1. p_api_version - the version of the API
194 * 2. p_header_id - Transaction Flow Header id
195 * 3. p_Get_default_cost_group - if passed 'Y' , populates the from org
196 * cost group and to org cost group on the return transaction flows table
197 *
198 * Outputs:
199 * This API will return a table of records(x_transaction_flows_tbl) of all the nodes in between the
200 * Start Operating Unit and End Operating Unit, the pricing options,
201 * and the Inter-Company Relations information
202 * x_return_status - this API will return FND_API.G_RET_STS_SUCESS if it is successfull and a transaction flow record
203 * is found.
204 * - This API will return G_RET_STS_WARNING if it is successful but no transaction flow record is
205 * found
206 * - This API will return FND_API.G_RET_STS_ERROR,FND_API.G_RET_STS_UNEXP_ERROR on error.
207 * x_transaction_flows_tbl - table of records of all the nodes in between
208 * the Start Operating Unit and End Operating Unit, the pricing options,
209 * and the Inter-Company Relations information
210 *===================================================================================================*/
211 /*#
212 * This API is used to get a valid Inter-company Transaction Flow defined
213 * for a given transaction flow header.
214 * @param x_return_status return variable holding the status of the procedure call
215 * @param x_msg_count return variable holding the number of error messages returned
216 * @param x_msg_data return variable holding the error message
217 * @param x_transaction_flows_tbl return variable holding the table of records of all the nodes in between the Start Operating Unit and End Operating Unit
218 * @param p_api_version API Version of this procedure. Current version is 1.0
219 * @param p_init_msg_list Indicates whether message stack is to be initialized
220 * @param p_header_id Transaction Flow Header identifier
221 * @param p_get_default_cost_group pass 'Y' to get the default cost group for the intermediate organization nodes
222 * @rep:displayname Get Intercompany Transaction Flow
223 */
224 procedure get_transaction_flow(
225 x_return_status OUT NOCOPY VARCHAR2
226 , x_msg_data OUT NOCOPY VARCHAR2
227 , x_msg_count OUT NOCOPY NUMBER
228 , x_transaction_flows_tbl OUT NOCOPY g_transaction_flow_tbl_type
229 , p_api_version IN NUMBER
230 , p_init_msg_list IN VARCHAR2 default G_FALSE
231 , p_header_id IN NUMBER
232 , p_get_default_cost_group IN VARCHAR2
233 );
234
235
236 /*======================================================================================================
237 * Procedure: CHECK_TRANSACTION_FLOW()
238 * Description:
239 * This procedure will return true if a Inter-company Transaction Flow exists
240 * between the provided Start Operating Unit and End Operating Unit,
241 * which is active on the transaction date provided and of the flow type
242 * specified, Global Procurement Flow or Drop Ship flow.
243 *
244 * Usage:
245 * This will be a public procedure and will be called by PO while user creates the PO Document.
246 * This API will return true if a Inter-company Transaction Flow exists between two operating units
247 * for user specified date and qualifier.
248 *
249 * Inputs:
250 * 1. p_start_operating_unit: The start Operating Unit for which the Global Procurement or Drop Ship occurred.
251 * This is a required parameter.
252 * 2. p_end_operating_unit: The End Operating Unit for which the Global Procurement of Drop Ship occurred.
253 * This is a required parameter
254 * 3. p_flow_type: To indicate whether this is Global Procurement flow or Drop Ship flow
255 * 4. p_organization_id: Indicates the ship from/ship to organization for
256 * drop ship and global procuremnt flows respectively
257 * 5. p_qualifier_code_tbl: Array of Qualifier Codes, The qualifier code
258 * for this release will be "1" representing 'Category'
259 * This is an optional parameter. Default value for this parameter is NULL.
260 * 6. Array of Qualifier Value IDs: The value of the qualifier.
261 * For this release, it will be the category_id of the item. This is an optional parameter.
262 * The default value of this parameter will be NULL.
263 * 7. Transaction Date: The date when the transaction is going to happen.
264 * 8. API version - the version of the API
265 * 9. Get default cost group - Flag to get the default cost group for the
266 * intermediate organization nodes
267 *
268 * Outputs:
269 * This API will return G_TRANSACTION_FLOW_FOUND in x_transaction_flow_exists if a
270 * Inter-company Transaction Flow exists between two operating units for user specified date and qualifier.
271 * Otherwise, it will return G_TRANSACTION_FLOW_NOT_FOUND
272 * The API will also return the header_id for the Inter-company Transaction Flow,
273 * and the new_accounting_flag to indicate whether Inter-company Transaction Flow is used or not.
274 *
275 * x_transaction_flow_exists - G_TRANSACTION_FLOW_FOUND or G_TRANSACTION_FLOW_NOT_FOUND
276 * x_header_id - header_id of the transaction flow found
277 * x_new_accounting_flag - new_accounting_flag indicating whether Inter-company Transaction Flow is used or not.
278 * x_return_status - this API will return FND_API.G_RET_STS_SUCESS if it is successful and a transaction flow record
279 * is found.
280 * - This API will return G_RET_STS_WARNING if it is successful but no transaction flow record is
281 * found
282 * - This API will return FND_API.G_RET_STS_ERROR,FND_API.G_RET_STS_UNEXP_ERROR on error.
283 *======================================================================================================*/
284 /*#
285 * This procedure will return true if an Inter-company Transaction Flow exists
286 * between the provided Start Operating Unit and End Operating Unit,
287 * which is active on the transaction date provided and of the flow type
288 * specified; Global Procurement Flow or Drop Ship flow.
289 * @param p_api_version API Version of this procedure. Current version is 1.0
293 * @param p_flow_type To indicate whether this is Global Procurement flow or Drop Ship flow
290 * @param p_init_msg_list Indicates whether message stack is to be initialized
291 * @param p_start_operating_unit The start Operating Unit for which the Global Procurement or Drop Ship occurred.
292 * @param p_end_operating_unit The End Operating Unit for which the Global Procurement of Drop Ship occurred.
294 * @param p_organization_id Indicates the ship from/ship to organization for drop ship and global procuremnt flows respectively
295 * @param p_qualifier_code_tbl Array of Qualifier Codes, The qualifier code for this release will be "1" representing 'Category'
296 * @param p_qualifier_value_tbl Array of Qualifier Value IDs. For this release, it will be the category_id of the item.
297 * @param p_transaction_date The date when the transaction is going to happen.
298 * @param x_return_status return variable holding the status of the procedure call
299 * @param x_msg_count return variable holding the number of error messages returned
300 * @param x_msg_data return variable holding the error message
301 * @param x_header_id return variable holding the header id of the transaction flow found
302 * @param x_new_accounting_flag return variable indicating whether advanced accounting is being used for the transaction flow
303 * @param x_transaction_flow_exists return FND_API.G_RET_STS_SUCESS if transaction flow found
304 * @rep:displayname Check Inter Company Transaction Flow
305 */
306 Procedure check_transaction_flow(
307 p_api_version IN NUMBER
308 , p_init_msg_list IN VARCHAR2 default G_FALSE
309 , p_start_operating_unit IN NUMBER
310 , p_end_operating_unit IN NUMBER
311 , p_flow_type IN NUMBER
312 , p_organization_id IN NUMBER
313 , p_qualifier_code_tbl IN NUMBER_TBL
314 , p_qualifier_value_tbl IN NUMBER_TBL
315 , p_transaction_date IN DATE
316 , x_return_status OUT NOCOPY VARCHAR2
317 , x_msg_count OUT NOCOPY NUMBER
318 , x_msg_data OUT NOCOPY VARCHAR2
319 , x_header_id OUT NOCOPY NUMBER
320 , x_new_accounting_flag OUT NOCOPY VARCHAR2
321 , x_transaction_flow_exists OUT NOCOPY VARCHAR2
322 );
323
324 /*=======================================================================================================
325 * Procedure: create_transaction_flow()
326 * This API is a private API to insert new transaction flow for a start operating unit and end operating unit.
327 * This API will be called by the Transaction Flow Setup Form on the ON-INSERT trigger of the block.
328 * Inputs:
329 *
330 * 1. Start OU: The start Operating Unit for which the Global Procurement or Drop Ship occurred.
331 * This is a required parameter.
332 * 2. End OU: The End Operating Unit for which the Global Procurement of Drop Ship occurred.
333 * This is a required parameter
334 * 3. Flow Type: To indicate what is the flow type, either Global Procurement or Drop Ship
335 * 4. Qualifier Code: The qualifier code, for this release, it will be "1" - Category.
336 * This is an optional parameter. Default value for this parameter is NULL.
337 * 5. Qualifier Value ID: The value of the qualifier.
338 * For this release, it will be the category_id of the item. The default value of this parameter will be NULL.
339 * 6. Start Date: The date when the Inter-company Transaction Flow become active.
340 * The default value is SYSDATE. This is required parameter
341 * 7. End Date: The date when the when Inter-company Transaction Flow become inactive.
342 * 8. Asset Item Pricing Option: The pricing option for asset item for global procurement flow.
343 * 9. Expense Item Pricing option: the pricing option for expense item
344 * 10. new accounting flag : flag to indicate new accounting will be use
345 * 11. line_number_tbl - list of sequence of the line nodes
346 * 12. from_ou_tbl - list of from operating unit of the line nodes
347 * 13. to_ou_tbl - list of to_operating unit of the line nodes
348 *
349 * Outputs:
350 * 1. header_id
351 * 2. line_number
352 *
353 *=======================================================================================================*/
354 /*#
355 * This procedure is used to create an intercompany transaction flow header,
356 * transaction flow lines and intercompany relations together. This procedure
357 * mimics the creation of a transaction flow through the Intercompany
358 * transaction flow form. Please refer to the form and the Inventory User's
359 * Guide to understand each parameter.
360 * @param x_return_status return variable holding the status of the procedure call
361 * @param x_msg_count return variable holding the number of error messages returned
362 * @param x_msg_data return variable holding the error message
363 * @param x_header_id return variable holding the header id of the transaction flow created
364 * @param x_line_number_tbl return variable table of transaction flow line numbers created
365 * @param p_api_version API Version of this procedure. Current version is 1.0
366 * @param p_init_msg_list Indicates whether message stack is to be initialized
367 * @param p_validation_level Indiactes the level of validation to be done. Pass 1.
368 * @param p_start_org_id Start operating_unit
369 * @param p_end_org_id End Operating Unit
370 * @param p_flow_type indicate whether this is used for Global Procurement flow or Drop Ship flow
371 * @param p_organization_id Indicates the ship from/ship to organization for drop ship and global procuremnt flows respectively
372 * @param p_qualifier_code The qualifier code for this release will be "1" representing 'Category'
373 * @param p_qualifier_value_id The qualifier value For this release will be the category_id of the item.
377 * @param p_start_date The date when the Inter-company Transaction Flow become active.
374 * @param p_asset_item_pricing_option pricing option for asset item for global procurement flow.
375 * @param p_expense_item_pricing_option pricing option for expense item
376 * @param p_new_accounting_flag Indicates whether advanced accounting to be used
378 * @param p_end_date The date when the when Inter-company Transaction Flow become inactive.
379 * @param p_Attribute_Category Flexfield Attribute for Transaction Flow Header
380 * @param p_Attribute1 Flexfield Attribute for Transaction Flow Header
381 * @param p_Attribute2 Flexfield Attribute for Transaction Flow Header
382 * @param p_Attribute3 Flexfield Attribute for Transaction Flow Header
383 * @param p_Attribute4 Flexfield Attribute for Transaction Flow Header
384 * @param p_Attribute5 Flexfield Attribute for Transaction Flow Header
385 * @param p_Attribute6 Flexfield Attribute for Transaction Flow Header
386 * @param p_Attribute7 Flexfield Attribute for Transaction Flow Header
387 * @param p_Attribute8 Flexfield Attribute for Transaction Flow Header
388 * @param p_Attribute9 Flexfield Attribute for Transaction Flow Header
389 * @param p_Attribute10 Flexfield Attribute for Transaction Flow Header
390 * @param p_Attribute11 Flexfield Attribute for Transaction Flow Header
391 * @param p_Attribute12 Flexfield Attribute for Transaction Flow Header
392 * @param p_Attribute13 Flexfield Attribute for Transaction Flow Header
393 * @param p_Attribute14 Flexfield Attribute for Transaction Flow Header
394 * @param p_Attribute15 Flexfield Attribute for Transaction Flow Header
395 * @param p_line_number_tbl Table of line numbers
396 * @param p_from_org_id_tbl Table of from operating unit of the line nodes
397 * @param p_from_organization_id_tbl Table of from organization_id of the line nodes
398 * @param p_to_org_id_tbl Table of to operating unit of the line nodes
399 * @param p_to_organization_id_tbl Table of to organization_id of the line nodes
400 * @param p_LINE_Attribute_Category_tbl Table of Flexfield Attribute for Transaction Flow Lines
401 * @param p_LINE_Attribute1_tbl Table of Flexfield Attribute for Transaction Flow Lines
402 * @param p_LINE_Attribute2_tbl Table of Flexfield Attribute for Transaction Flow Lines
403 * @param p_LINE_Attribute3_tbl Table of Flexfield Attribute for Transaction Flow Lines
404 * @param p_LINE_Attribute4_tbl Table of Flexfield Attribute for Transaction Flow Lines
405 * @param p_LINE_Attribute5_tbl Table of Flexfield Attribute for Transaction Flow Lines
406 * @param p_LINE_Attribute6_tbl Table of Flexfield Attribute for Transaction Flow Lines
407 * @param p_LINE_Attribute7_tbl Table of Flexfield Attribute for Transaction Flow Lines
408 * @param p_LINE_Attribute8_tbl Table of Flexfield Attribute for Transaction Flow Lines
409 * @param p_LINE_Attribute9_tbl Table of Flexfield Attribute for Transaction Flow Lines
410 * @param p_LINE_Attribute10_tbl Table of Flexfield Attribute for Transaction Flow Lines
411 * @param p_LINE_Attribute11_tbl Table of Flexfield Attribute for Transaction Flow Lines
412 * @param p_LINE_Attribute12_tbl Table of Flexfield Attribute for Transaction Flow Lines
413 * @param p_LINE_Attribute13_tbl Table of Flexfield Attribute for Transaction Flow Lines
414 * @param p_LINE_Attribute14_tbl Table of Flexfield Attribute for Transaction Flow Lines
415 * @param p_LINE_Attribute15_tbl Table of Flexfield Attribute for Transaction Flow Lines
416 * @param p_Ship_Organization_Id_tbl Table of Shipping organization_id for each Transaction Flow Line
417 * @param p_Sell_Organization_Id_tbl Table of selling organization_id for each Transaction Flow Line
418 * @param p_Vendor_Id_tbl Table of vendor_id for each Transaction Flow Line
419 * @param p_Vendor_Site_Id_tbl Table of vendor site id for each Transaction Flow Line
420 * @param p_Customer_Id_tbl Table of customer id for each Transaction Flow Line
421 * @param p_Address_Id_tbl Table of address id for each Transaction Flow Line
422 * @param p_Customer_Site_Id_tbl Table of customer site id for each Transaction Flow Line
423 * @param p_Cust_Trx_Type_Id_tbl Table of customer transaction type id for each Transaction Flow Line
424 * @param p_IC_Attribute_Category_tbl Table of Flexfield Attribute for Inter company relation
425 * @param p_IC_Attribute1_tbl Table of Flexfield Attribute for Inter company relation
426 * @param p_IC_Attribute2_tbl Table of Flexfield Attribute for Inter company relation
427 * @param p_IC_Attribute3_tbl Table of Flexfield Attribute for Inter company relation
428 * @param p_IC_Attribute4_tbl Table of Flexfield Attribute for Inter company relation
429 * @param p_IC_Attribute5_tbl Table of Flexfield Attribute for Inter company relation
430 * @param p_IC_Attribute6_tbl Table of Flexfield Attribute for Inter company relation
431 * @param p_IC_Attribute7_tbl Table of Flexfield Attribute for Inter company relation
432 * @param p_IC_Attribute8_tbl Table of Flexfield Attribute for Inter company relation
433 * @param p_IC_Attribute9_tbl Table of Flexfield Attribute for Inter company relation
434 * @param p_IC_Attribute10_tbl Table of Flexfield Attribute for Inter company relation
435 * @param p_IC_Attribute11_tbl Table of Flexfield Attribute for Inter company relation
436 * @param p_IC_Attribute12_tbl Table of Flexfield Attribute for Inter company relation
437 * @param p_IC_Attribute13_tbl Table of Flexfield Attribute for Inter company relation
438 * @param p_IC_Attribute14_tbl Table of Flexfield Attribute for Inter company relation
439 * @param p_IC_Attribute15_tbl Table of Flexfield Attribute for Inter company relation
440 * @param p_Revalue_Average_Flag_tbl Table of revalue average flags for Inter company relation
441 * @param p_Freight_Code_Comb_Id_tbl Table of Freight Code Combination Ids for Inter company relation
442 * @param p_Inv_Currency_Code_tbl Table of currency code for Inter company relation
443 * @param p_IC_COGS_Acct_Id_tbl Table of COGS account ids for Inter company relation
447 */
444 * @param p_Inv_Accrual_Acct_Id_tbl Table of accrual account Ids for Inter company relation
445 * @param p_Exp_Accrual_Acct_Id_tbl Table of expense accrual account Ids for Inter company relation
446 * @rep:displayname Create Inter Company Transaction Flow
448 PROCEDURE create_transaction_flow
449 (
450 x_return_status OUT NOCOPY VARCHAR2
451 , x_msg_data OUT NOCOPY VARCHAR2
452 , x_msg_count OUT NOCOPY NUMBER
453 , x_header_id OUT NOCOPY NUMBER
454 , x_line_number_tbl OUT NOCOPY NUMBER_TBL
455 , p_api_version IN NUMBER
456 , p_init_msg_list IN VARCHAR2 default G_FALSE
457 , p_validation_level IN NUMBER
458 , p_start_org_id IN NUMBER
459 , p_end_org_id IN NUMBER
460 , p_flow_type IN NUMBER
461 , p_organization_id IN NUMBER
462 , p_qualifier_code IN NUMBER
463 , p_qualifier_value_id IN NUMBER
464 , p_asset_item_pricing_option IN NUMBER
465 , p_expense_item_pricing_option IN NUMBER
466 , p_new_accounting_flag IN VARCHAR2
467 , p_start_date IN DATE DEFAULT SYSDATE
468 , p_end_date IN DATE DEFAULT NULL
469 , P_Attribute_Category IN VARCHAR2
470 , P_Attribute1 IN VARCHAR2
471 , P_Attribute2 IN VARCHAR2
472 , P_Attribute3 IN VARCHAR2
473 , P_Attribute4 IN VARCHAR2
474 , P_Attribute5 IN VARCHAR2
475 , P_Attribute6 IN VARCHAR2
476 , P_Attribute7 IN VARCHAR2
477 , P_Attribute8 IN VARCHAR2
478 , P_Attribute9 IN VARCHAR2
479 , P_Attribute10 IN VARCHAR2
480 , P_Attribute11 IN VARCHAR2
481 , P_Attribute12 IN VARCHAR2
482 , P_Attribute13 IN VARCHAR2
483 , P_Attribute14 IN VARCHAR2
484 , P_Attribute15 IN VARCHAR2
485 , p_line_number_tbl IN NUMBER_TBL
486 , p_from_org_id_tbl IN NUMBER_TBL
487 , p_from_organization_id_tbl IN NUMBER_TBL
488 , p_to_org_id_tbl IN NUMBER_TBL
489 , p_to_organization_id_tbl IN NUMBER_TBL
490 , P_LINE_Attribute_Category_tbl IN VARCHAR2_tbl
491 , P_LINE_Attribute1_tbl IN VARCHAR2_tbl
492 , P_LINE_Attribute2_tbl IN VARCHAR2_tbl
493 , P_LINE_Attribute3_tbl IN VARCHAR2_tbl
494 , P_LINE_Attribute4_tbl IN VARCHAR2_tbl
495 , P_LINE_Attribute5_tbl IN VARCHAR2_tbl
496 , P_LINE_Attribute6_tbl IN VARCHAR2_tbl
497 , P_LINE_Attribute7_tbl IN VARCHAR2_tbl
498 , P_LINE_Attribute8_tbl IN VARCHAR2_tbl
499 , P_LINE_Attribute9_tbl IN VARCHAR2_tbl
500 , P_LINE_Attribute10_tbl IN VARCHAR2_tbl
501 , P_LINE_Attribute11_tbl IN VARCHAR2_tbl
502 , P_LINE_Attribute12_tbl IN VARCHAR2_tbl
503 , P_LINE_Attribute13_tbl IN VARCHAR2_tbl
504 , P_LINE_Attribute14_tbl IN VARCHAR2_tbl
505 , P_LINE_Attribute15_tbl IN VARCHAR2_tbl
506 , P_Ship_Organization_Id_tbl IN NUMBER_tbl
507 , P_Sell_Organization_Id_tbl IN NUMBER_tbl
508 , P_Vendor_Id_tbl IN NUMBER_tbl
509 , P_Vendor_Site_Id_tbl IN NUMBER_tbl
510 , P_Customer_Id_tbl IN NUMBER_tbl
511 , P_Address_Id_tbl IN NUMBER_tbl
512 , P_Customer_Site_Id_tbl IN NUMBER_tbl
513 , P_Cust_Trx_Type_Id_tbl IN NUMBER_tbl
514 , P_IC_Attribute_Category_tbl IN VARCHAR2_tbl
515 , P_IC_Attribute1_tbl IN VARCHAR2_tbl
516 , P_IC_Attribute2_tbl IN VARCHAR2_tbl
517 , P_IC_Attribute3_tbl IN VARCHAR2_tbl
518 , P_IC_Attribute4_tbl IN VARCHAR2_tbl
519 , P_IC_Attribute5_tbl IN VARCHAR2_tbl
520 , P_IC_Attribute6_tbl IN VARCHAR2_tbl
521 , P_IC_Attribute7_tbl IN VARCHAR2_tbl
522 , P_IC_Attribute8_tbl IN VARCHAR2_tbl
523 , P_IC_Attribute9_tbl IN VARCHAR2_tbl
524 , P_IC_Attribute10_tbl IN VARCHAR2_tbl
525 , P_IC_Attribute11_tbl IN VARCHAR2_tbl
526 , P_IC_Attribute12_tbl IN VARCHAR2_tbl
527 , P_IC_Attribute13_tbl IN VARCHAR2_tbl
528 , P_IC_Attribute14_tbl IN VARCHAR2_tbl
529 , P_IC_Attribute15_tbl IN VARCHAR2_tbl
530 , P_Revalue_Average_Flag_tbl IN VARCHAR2_tbl
531 , P_Freight_Code_Comb_Id_tbl IN NUMBER_tbl
532 , P_Inv_Currency_Code_tbl IN NUMBER_tbl
533 , P_IC_COGS_Acct_Id_tbl IN NUMBER_tbl
534 , P_Inv_Accrual_Acct_Id_tbl IN NUMBER_tbl
535 , P_Exp_Accrual_Acct_Id_tbl IN NUMBER_tbl
536 );
537
538
539
540 /*========================================================================================================
541 * Procedure: Update_transaction_Flow()
542 *
543 * Description:
547 * Inputs:
544 * This API is used to update the transaction flow. Once a transaction flow is created, user can only
545 * update the start date and the end date.
546 *
548 * 1. header_id
549 * 2. end_date
550 * 3. start_date
551 *
552 * Outputs:
553 * 1. Return status
554 * 2. message
555 * 3. message count
556 *
557 *========================================================================================================*/
558 /*#
559 * This procedure is used to update an intercompany transaction flow. Once a
560 * transaction flow has been created, user can only
561 * update the start date and the end date on the header.
562 * @param x_return_status return variable holding the status of the procedure call
563 * @param x_msg_count return variable holding the number of error messages returned
564 * @param x_msg_data return variable holding the error message
565 * @param p_api_version API Version of this procedure. Current version is 1.0
566 * @param p_init_msg_list Indicates whether message stack is to be initialized
567 * @param p_validation_level Indiactes the level of validation to be done. Pass 1.
568 * @param p_header_id Transaction flow header
569 * @param p_flow_type indicate whether this is used for Global Procurement flow or Drop Ship flow
570 * @param p_start_date The date when the Inter-company Transaction Flow become active.
571 * @param p_end_date The date when the when Inter-company Transaction Flow become inactive.
572 * @param p_Attribute_Category Flexfield Attribute for Transaction Flow Header
573 * @param p_Attribute1 Flexfield Attribute for Transaction Flow Header
574 * @param p_Attribute2 Flexfield Attribute for Transaction Flow Header
575 * @param p_Attribute3 Flexfield Attribute for Transaction Flow Header
576 * @param p_Attribute4 Flexfield Attribute for Transaction Flow Header
577 * @param p_Attribute5 Flexfield Attribute for Transaction Flow Header
578 * @param p_Attribute6 Flexfield Attribute for Transaction Flow Header
579 * @param p_Attribute7 Flexfield Attribute for Transaction Flow Header
580 * @param p_Attribute8 Flexfield Attribute for Transaction Flow Header
581 * @param p_Attribute9 Flexfield Attribute for Transaction Flow Header
582 * @param p_Attribute10 Flexfield Attribute for Transaction Flow Header
583 * @param p_Attribute11 Flexfield Attribute for Transaction Flow Header
584 * @param p_Attribute12 Flexfield Attribute for Transaction Flow Header
585 * @param p_Attribute13 Flexfield Attribute for Transaction Flow Header
586 * @param p_Attribute14 Flexfield Attribute for Transaction Flow Header
587 * @param p_Attribute15 Flexfield Attribute for Transaction Flow Header
588 * @param p_line_number_tbl Table of line numbers
589 * @param p_LINE_Attribute_Category_tbl Table of Flexfield Attribute for Transaction Flow Lines
590 * @param p_LINE_Attribute1_tbl Table of Flexfield Attribute for Transaction Flow Lines
591 * @param p_LINE_Attribute2_tbl Table of Flexfield Attribute for Transaction Flow Lines
592 * @param p_LINE_Attribute3_tbl Table of Flexfield Attribute for Transaction Flow Lines
593 * @param p_LINE_Attribute4_tbl Table of Flexfield Attribute for Transaction Flow Lines
594 * @param p_LINE_Attribute5_tbl Table of Flexfield Attribute for Transaction Flow Lines
595 * @param p_LINE_Attribute6_tbl Table of Flexfield Attribute for Transaction Flow Lines
596 * @param p_LINE_Attribute7_tbl Table of Flexfield Attribute for Transaction Flow Lines
597 * @param p_LINE_Attribute8_tbl Table of Flexfield Attribute for Transaction Flow Lines
598 * @param p_LINE_Attribute9_tbl Table of Flexfield Attribute for Transaction Flow Lines
599 * @param p_LINE_Attribute10_tbl Table of Flexfield Attribute for Transaction Flow Lines
600 * @param p_LINE_Attribute11_tbl Table of Flexfield Attribute for Transaction Flow Lines
601 * @param p_LINE_Attribute12_tbl Table of Flexfield Attribute for Transaction Flow Lines
602 * @param p_LINE_Attribute13_tbl Table of Flexfield Attribute for Transaction Flow Lines
603 * @param p_LINE_Attribute14_tbl Table of Flexfield Attribute for Transaction Flow Lines
604 * @param p_LINE_Attribute15_tbl Table of Flexfield Attribute for Transaction Flow Lines
605 * @param p_Ship_Organization_Id_tbl Table of Shipping organization_id for each Transaction Flow Line
606 * @param p_Sell_Organization_Id_tbl Table of selling organization_id for each Transaction Flow Line
607 * @param p_Vendor_Id_tbl Table of vendor_id for each Transaction Flow Line
608 * @param p_Vendor_Site_Id_tbl Table of vendor site id for each Transaction Flow Line
609 * @param p_Customer_Id_tbl Table of customer id for each Transaction Flow Line
610 * @param p_Address_Id_tbl Table of address id for each Transaction Flow Line
611 * @param p_Customer_Site_Id_tbl Table of customer site id for each Transaction Flow Line
612 * @param p_Cust_Trx_Type_Id_tbl Table of customer transaction type id for each Transaction Flow Line
613 * @param p_IC_Attribute_Category_tbl Table of Flexfield Attribute for Inter company relation
614 * @param p_IC_Attribute1_tbl Table of Flexfield Attribute for Inter company relation
615 * @param p_IC_Attribute2_tbl Table of Flexfield Attribute for Inter company relation
616 * @param p_IC_Attribute3_tbl Table of Flexfield Attribute for Inter company relation
617 * @param p_IC_Attribute4_tbl Table of Flexfield Attribute for Inter company relation
618 * @param p_IC_Attribute5_tbl Table of Flexfield Attribute for Inter company relation
619 * @param p_IC_Attribute6_tbl Table of Flexfield Attribute for Inter company relation
620 * @param p_IC_Attribute7_tbl Table of Flexfield Attribute for Inter company relation
621 * @param p_IC_Attribute8_tbl Table of Flexfield Attribute for Inter company relation
622 * @param p_IC_Attribute9_tbl Table of Flexfield Attribute for Inter company relation
623 * @param p_IC_Attribute10_tbl Table of Flexfield Attribute for Inter company relation
624 * @param p_IC_Attribute11_tbl Table of Flexfield Attribute for Inter company relation
625 * @param p_IC_Attribute12_tbl Table of Flexfield Attribute for Inter company relation
626 * @param p_IC_Attribute13_tbl Table of Flexfield Attribute for Inter company relation
627 * @param p_IC_Attribute14_tbl Table of Flexfield Attribute for Inter company relation
628 * @param p_IC_Attribute15_tbl Table of Flexfield Attribute for Inter company relation
629 * @param p_Revalue_Average_Flag_tbl Table of revalue average flags for Inter company relation
630 * @param p_Freight_Code_Comb_Id_tbl Table of Freight Code Combination Ids for Inter company relation
631 * @param p_Inv_Currency_Code_tbl Table of currency code for Inter company relation
632 * @param p_IC_COGS_Acct_Id_tbl Table of COGS account ids for Inter company relation
633 * @param p_Inv_Accrual_Acct_Id_tbl Table of accrual account Ids for Inter company relation
634 * @param p_Exp_Accrual_Acct_Id_tbl Table of expense accrual account Ids for Inter company relation
635 * @rep:displayname Update Inter Company Transaction Flow
636 */
637 PROCEDURE update_transaction_flow
638 (
639 x_return_status OUT NOCOPY VARCHAR2
640 , x_msg_data OUT NOCOPY VARCHAR2
641 , x_msg_count OUT NOCOPY NUMBER
642 , p_api_version IN NUMBER
643 , p_init_msg_list IN VARCHAR2
644 , p_validation_level IN NUMBER
645 , p_header_id IN NUMBER
646 , p_flow_type IN NUMBER
647 , p_start_date IN DATE
648 , p_end_date IN DATE
649 , P_Attribute_Category IN VARCHAR2
650 , P_Attribute1 IN VARCHAR2
651 , P_Attribute2 IN VARCHAR2
652 , P_Attribute3 IN VARCHAR2
653 , P_Attribute4 IN VARCHAR2
654 , P_Attribute5 IN VARCHAR2
655 , P_Attribute6 IN VARCHAR2
656 , P_Attribute7 IN VARCHAR2
657 , P_Attribute8 IN VARCHAR2
658 , P_Attribute9 IN VARCHAR2
659 , P_Attribute10 IN VARCHAR2
660 , P_Attribute11 IN VARCHAR2
661 , P_Attribute12 IN VARCHAR2
662 , P_Attribute13 IN VARCHAR2
663 , P_Attribute14 IN VARCHAR2
664 , P_Attribute15 IN VARCHAR2
665 , p_line_number_tbl IN NUMBER_TBL
666 , P_LINE_Attribute_Category_tbl IN VARCHAR2_tbl
667 , P_LINE_Attribute1_tbl IN VARCHAR2_tbl
668 , P_LINE_Attribute2_tbl IN VARCHAR2_tbl
669 , P_LINE_Attribute3_tbl IN VARCHAR2_tbl
670 , P_LINE_Attribute4_tbl IN VARCHAR2_tbl
671 , P_LINE_Attribute5_tbl IN VARCHAR2_tbl
672 , P_LINE_Attribute6_tbl IN VARCHAR2_tbl
673 , P_LINE_Attribute7_tbl IN VARCHAR2_tbl
674 , P_LINE_Attribute8_tbl IN VARCHAR2_tbl
675 , P_LINE_Attribute9_tbl IN VARCHAR2_tbl
676 , P_LINE_Attribute10_tbl IN VARCHAR2_tbl
677 , P_LINE_Attribute11_tbl IN VARCHAR2_tbl
678 , P_LINE_Attribute12_tbl IN VARCHAR2_tbl
679 , P_LINE_Attribute13_tbl IN VARCHAR2_tbl
680 , P_LINE_Attribute14_tbl IN VARCHAR2_tbl
681 , P_LINE_Attribute15_tbl IN VARCHAR2_tbl
682 , P_Ship_Organization_Id_tbl IN NUMBER_tbl
683 , P_Sell_Organization_Id_tbl IN NUMBER_tbl
684 , P_Vendor_Id_tbl IN NUMBER_tbl
685 , P_Vendor_Site_Id_tbl IN NUMBER_tbl
686 , P_Customer_Id_tbl IN NUMBER_tbl
687 , P_Address_Id_tbl IN NUMBER_tbl
688 , P_Customer_Site_Id_tbl IN NUMBER_tbl
689 , P_Cust_Trx_Type_Id_tbl IN NUMBER_tbl
690 , P_IC_Attribute_Category_tbl IN VARCHAR2_tbl
691 , P_IC_Attribute1_tbl IN VARCHAR2_tbl
692 , P_IC_Attribute2_tbl IN VARCHAR2_tbl
693 , P_IC_Attribute3_tbl IN VARCHAR2_tbl
694 , P_IC_Attribute4_tbl IN VARCHAR2_tbl
695 , P_IC_Attribute5_tbl IN VARCHAR2_tbl
696 , P_IC_Attribute6_tbl IN VARCHAR2_tbl
700 , P_IC_Attribute10_tbl IN VARCHAR2_tbl
697 , P_IC_Attribute7_tbl IN VARCHAR2_tbl
698 , P_IC_Attribute8_tbl IN VARCHAR2_tbl
699 , P_IC_Attribute9_tbl IN VARCHAR2_tbl
701 , P_IC_Attribute11_tbl IN VARCHAR2_tbl
702 , P_IC_Attribute12_tbl IN VARCHAR2_tbl
703 , P_IC_Attribute13_tbl IN VARCHAR2_tbl
704 , P_IC_Attribute14_tbl IN VARCHAR2_tbl
705 , P_IC_Attribute15_tbl IN VARCHAR2_tbl
706 , P_Revalue_Average_Flag_tbl IN VARCHAR2_tbl
707 , P_Freight_Code_Comb_Id_tbl IN NUMBER_tbl
708 , p_inv_currency_code_tbl IN NUMBER_tbl
709 , P_IC_COGS_Acct_Id_tbl IN NUMBER_tbl
710 , P_Inv_Accrual_Acct_Id_tbl IN NUMBER_tbl
711 , P_Exp_Accrual_Acct_Id_tbl IN NUMBER_tbl
712 ) ;
713
714
715 /*#
716 * This procedure is used to update an intercompany transaction flow header.
717 * Once a transaction flow is created, a user can only
718 * update the start date and the end date on the header.
719 * @param x_return_status return variable holding the status of the procedure call
720 * @param x_msg_count return variable holding the number of error messages returned
721 * @param x_msg_data return variable holding the error message
722 * @param p_api_version API Version of this procedure. Current version is 1.0
723 * @param p_init_msg_list Indicates whether message stack is to be initialized
724 * @param p_header_id Transaction flow header
725 * @param p_start_date The date when the Inter-company Transaction Flow become active.
726 * @param p_end_date The date when the when Inter-company Transaction Flow become inactive.
727 * @param p_Attribute_Category Flexfield Attribute for Transaction Flow Header
728 * @param p_Attribute1 Flexfield Attribute for Transaction Flow Header
729 * @param p_Attribute2 Flexfield Attribute for Transaction Flow Header
730 * @param p_Attribute3 Flexfield Attribute for Transaction Flow Header
731 * @param p_Attribute4 Flexfield Attribute for Transaction Flow Header
732 * @param p_Attribute5 Flexfield Attribute for Transaction Flow Header
733 * @param p_Attribute6 Flexfield Attribute for Transaction Flow Header
734 * @param p_Attribute7 Flexfield Attribute for Transaction Flow Header
735 * @param p_Attribute8 Flexfield Attribute for Transaction Flow Header
736 * @param p_Attribute9 Flexfield Attribute for Transaction Flow Header
737 * @param p_Attribute10 Flexfield Attribute for Transaction Flow Header
738 * @param p_Attribute11 Flexfield Attribute for Transaction Flow Header
739 * @param p_Attribute12 Flexfield Attribute for Transaction Flow Header
740 * @param p_Attribute13 Flexfield Attribute for Transaction Flow Header
741 * @param p_Attribute14 Flexfield Attribute for Transaction Flow Header
742 * @param p_Attribute15 Flexfield Attribute for Transaction Flow Header
743 * @rep:displayname Update Inter Company Transaction Flow Header
744 */
745 PROCEDURE update_transaction_flow_header
746 (X_return_status OUT NOCOPY VARCHAR2
747 , x_msg_data OUT NOCOPY VARCHAR2
748 , x_msg_count OUT NOCOPY NUMBER
749 , p_api_version IN NUMBER
750 , p_init_msg_list IN VARCHAR2 DEFAULT G_FALSE
751 , p_header_id IN NUMBER
752 , p_end_date IN DATE
753 , p_start_date IN DATE
754 , P_Attribute_Category IN VARCHAR2
755 , P_Attribute1 IN VARCHAR2
756 , P_Attribute2 IN VARCHAR2
757 , P_Attribute3 IN VARCHAR2
758 , P_Attribute4 IN VARCHAR2
759 , P_Attribute5 IN VARCHAR2
760 , P_Attribute6 IN VARCHAR2
761 , P_Attribute7 IN VARCHAR2
762 , P_Attribute8 IN VARCHAR2
763 , P_Attribute9 IN VARCHAR2
764 , P_Attribute10 IN VARCHAR2
765 , P_Attribute11 IN VARCHAR2
766 , P_Attribute12 IN VARCHAR2
767 , P_Attribute13 IN VARCHAR2
768 , P_Attribute14 IN VARCHAR2
769 , P_Attribute15 IN VARCHAR2);
770
771 /*#
772 * This procedure is used to update an intercompany transaction flow line. A
773 * User can only update the flexfield attributes on the line.
774 * @param x_return_status return variable holding the status of the procedure call
775 * @param x_msg_count return variable holding the number of error messages returned
776 * @param x_msg_data return variable holding the error message
777 * @param p_api_version API Version of this procedure. Current version is 1.0
778 * @param p_init_msg_list Indicates whether message stack is to be initialized
779 * @param p_header_id Transaction flow header
780 * @param p_line_number Transaction flow line number
781 * @param p_Attribute_Category Flexfield Attribute for Transaction Flow line
782 * @param p_Attribute1 Flexfield Attribute for Transaction Flow line
783 * @param p_Attribute2 Flexfield Attribute for Transaction Flow line
784 * @param p_Attribute3 Flexfield Attribute for Transaction Flow line
785 * @param p_Attribute4 Flexfield Attribute for Transaction Flow line
786 * @param p_Attribute5 Flexfield Attribute for Transaction Flow line
787 * @param p_Attribute6 Flexfield Attribute for Transaction Flow line
788 * @param p_Attribute7 Flexfield Attribute for Transaction Flow line
789 * @param p_Attribute8 Flexfield Attribute for Transaction Flow line
790 * @param p_Attribute9 Flexfield Attribute for Transaction Flow line
791 * @param p_Attribute10 Flexfield Attribute for Transaction Flow line
792 * @param p_Attribute11 Flexfield Attribute for Transaction Flow line
793 * @param p_Attribute12 Flexfield Attribute for Transaction Flow line
794 * @param p_Attribute13 Flexfield Attribute for Transaction Flow line
795 * @param p_Attribute14 Flexfield Attribute for Transaction Flow line
799 PROCEDURE update_transaction_flow_line
796 * @param p_Attribute15 Flexfield Attribute for Transaction Flow line
797 * @rep:displayname Update Inter Company Transaction Flow line
798 */
800 (x_return_status OUT NOCOPY VARCHAR2
801 , x_msg_data OUT NOCOPY VARCHAR2
802 , x_msg_count OUT NOCOPY VARCHAR2
803 , p_api_version IN NUMBER
804 , p_init_msg_list IN VARCHAR2 DEFAULT G_FALSE
805 , p_header_id IN NUMBER
806 , p_line_number IN NUMBER
807 , p_attribute_category IN VARCHAR2
808 , p_attribute1 IN VARCHAR2
809 , p_attribute2 IN VARCHAR2
810 , p_attribute3 IN VARCHAR2
811 , p_attribute4 IN VARCHAR2
812 , p_attribute5 IN VARCHAR2
813 , p_attribute6 IN VARCHAR2
814 , p_attribute7 IN VARCHAR2
815 , p_attribute8 IN VARCHAR2
816 , p_attribute9 IN VARCHAR2
817 , p_attribute10 IN VARCHAR2
818 , p_attribute11 IN VARCHAR2
819 , p_attribute12 IN VARCHAR2
820 , p_attribute13 IN VARCHAR2
821 , p_attribute14 IN VARCHAR2
822 , p_attribute15 IN VARCHAR2
823 );
824
825 /*#
826 * This procedure is used to update the intercompany relation information
827 * between two operating units.
828 * @param x_return_status return variable holding the status of the procedure call
829 * @param x_msg_count return variable holding the number of error messages returned
830 * @param x_msg_data return variable holding the error message
831 * @param p_api_version API Version of this procedure. Current version is 1.0
832 * @param p_init_msg_list Indicates whether message stack is to be initialized
833 * @param p_Ship_Organization_Id shipping organization
834 * @param p_Sell_Organization_Id selling organization
835 * @param p_vendor_id vendor id
836 * @param p_Vendor_Site_Id vendor site id
837 * @param p_Customer_Id customer id
838 * @param p_Address_Id address id
839 * @param p_Customer_Site_Id customer site id
840 * @param p_Cust_Trx_Type_Id customer transaction type id
841 * @param p_Attribute_Category Flexfield Attribute for Inter-company relation
842 * @param p_Attribute1 Flexfield Attribute for Inter-company relation
843 * @param p_Attribute2 Flexfield Attribute for Inter-company relation
844 * @param p_Attribute3 Flexfield Attribute for Inter-company relation
845 * @param p_Attribute4 Flexfield Attribute for Inter-company relation
846 * @param p_Attribute5 Flexfield Attribute for Inter-company relation
847 * @param p_Attribute6 Flexfield Attribute for Inter-company relation
848 * @param p_Attribute7 Flexfield Attribute for Inter-company relation
849 * @param p_Attribute8 Flexfield Attribute for Inter-company relation
850 * @param p_Attribute9 Flexfield Attribute for Inter-company relation
851 * @param p_Attribute10 Flexfield Attribute for Inter-company relation
852 * @param p_Attribute11 Flexfield Attribute for Inter-company relation
853 * @param p_Attribute12 Flexfield Attribute for Inter-company relation
854 * @param p_Attribute13 Flexfield Attribute for Inter-company relation
855 * @param p_Attribute14 Flexfield Attribute for Inter-company relation
856 * @param p_Attribute15 Flexfield Attribute for Inter-company relation
857 * @param p_Revalue_Average_Flag Revalue average flag for Inter-company relation
858 * @param p_Freight_Code_Combination_Id Freight Code Combination Id for Inter company relation
859 * @param p_Inv_Currency_Code currency code for Inter-company relation
860 * @param p_flow_type indicate whether this is used for Global Procurement flow or Drop Ship flow
861 * @param p_Intercompany_COGS_Account_Id COGS account id for Inter-company relation
862 * @param p_Inventory_Accrual_Account_Id accrual account Id for Inter company relation
863 * @param p_Expense_Accrual_Account_Id expense accrual account Id for Inter company relation
864 * @rep:displayname Update Inter-company relation
865 */
866 PROCEDURE update_ic_relation
867 (x_return_status OUT NOCOPY VARCHAR2,
868 x_msg_data OUT NOCOPY VARCHAR2,
869 x_msg_count OUT NOCOPY VARCHAR2,
870 p_api_version IN NUMBER,
871 p_init_msg_list IN VARCHAR2 DEFAULT g_false,
872 p_Ship_Organization_Id IN NUMBER,
873 p_Sell_Organization_Id IN NUMBER,
874 p_Vendor_Id IN NUMBER,
875 p_Vendor_Site_Id IN NUMBER,
876 p_Customer_Id IN NUMBER,
877 p_Address_Id IN NUMBER,
878 p_Customer_Site_Id IN NUMBER,
879 p_Cust_Trx_Type_Id IN NUMBER,
880 p_Attribute_Category IN VARCHAR2,
881 p_Attribute1 IN VARCHAR2,
882 p_Attribute2 IN VARCHAR2,
883 p_Attribute3 IN VARCHAR2,
884 p_Attribute4 IN VARCHAR2,
885 p_Attribute5 IN VARCHAR2,
886 p_Attribute6 IN VARCHAR2,
887 p_Attribute7 IN VARCHAR2,
888 p_Attribute8 IN VARCHAR2,
889 p_Attribute9 IN VARCHAR2,
890 p_Attribute10 IN VARCHAR2,
891 p_Attribute11 IN VARCHAR2,
892 p_Attribute12 IN VARCHAR2,
893 p_Attribute13 IN VARCHAR2,
894 p_Attribute14 IN VARCHAR2,
895 p_Attribute15 IN VARCHAR2,
896 p_Revalue_Average_Flag IN VARCHAR2,
897 p_Freight_Code_Combination_Id IN NUMBER,
898 p_inv_currency_code IN NUMBER,
899 p_Flow_Type IN NUMBER,
900 p_Intercompany_COGS_Account_Id IN NUMBER,
901 p_Inventory_Accrual_Account_Id IN NUMBER,
902 p_Expense_Accrual_Account_Id IN NUMBER
906 * This procedure is used to validate the intercompany relations information
903 );
904
905 /*#
907 * for two operating units.
908 * @param x_return_status return variable holding the status of the procedure call
909 * @param x_msg_count return variable holding the number of error messages returned
910 * @param x_msg_data return variable holding the error message
911 * @param x_valid return variable indicating if all the information is valid
912 * @param p_api_version API Version of this procedure. Current version is 1.0
913 * @param p_init_msg_list Indicates whether message stack is to be initialized
914 * @param p_Ship_Organization_Id shipping organization
915 * @param p_Sell_Organization_Id selling organization
916 * @param p_vendor_id vendor id
917 * @param p_Vendor_Site_Id vendor site id
918 * @param p_Customer_Id customer id
919 * @param p_Address_Id address id
920 * @param p_Customer_Site_Id customer site id
921 * @param p_Cust_Trx_Type_Id customer transaction type id
922 * @param p_Attribute_Category Flexfield Attribute for Inter-company relation
923 * @param p_Attribute1 Flexfield Attribute for Inter-company relation
924 * @param p_Attribute2 Flexfield Attribute for Inter-company relation
925 * @param p_Attribute3 Flexfield Attribute for Inter-company relation
926 * @param p_Attribute4 Flexfield Attribute for Inter-company relation
927 * @param p_Attribute5 Flexfield Attribute for Inter-company relation
928 * @param p_Attribute6 Flexfield Attribute for Inter-company relation
929 * @param p_Attribute7 Flexfield Attribute for Inter-company relation
930 * @param p_Attribute8 Flexfield Attribute for Inter-company relation
931 * @param p_Attribute9 Flexfield Attribute for Inter-company relation
932 * @param p_Attribute10 Flexfield Attribute for Inter-company relation
933 * @param p_Attribute11 Flexfield Attribute for Inter-company relation
934 * @param p_Attribute12 Flexfield Attribute for Inter-company relation
935 * @param p_Attribute13 Flexfield Attribute for Inter-company relation
936 * @param p_Attribute14 Flexfield Attribute for Inter-company relation
937 * @param p_Attribute15 Flexfield Attribute for Inter-company relation
938 * @param p_Revalue_Average_Flag Revalue average flag for Inter-company relation
939 * @param p_Freight_Code_Combination_Id Freight Code Combination Id for Inter company relation
940 * @param p_Inv_Currency_Code currency code for Inter-company relation
941 * @param p_flow_type indicate whether this is used for Global Procurement flow or Drop Ship flow
942 * @param p_Intercompany_COGS_Account_Id COGS account id for Inter-company relation
943 * @param p_Inventory_Accrual_Account_Id accrual account Id for Inter company relation
944 * @param p_Expense_Accrual_Account_Id expense accrual account Id for Inter company relation
945 * @rep:displayname Validate Inter-company relation
946 */
947 PROCEDURE validate_ic_relation_rec
948 (x_return_status OUT NOCOPY VARCHAR2,
949 x_msg_data OUT NOCOPY VARCHAR2,
950 x_msg_count OUT NOCOPY VARCHAR2,
951 x_valid OUT NOCOPY VARCHAR2,
952 p_api_version IN NUMBER,
953 p_init_msg_list IN VARCHAR2 DEFAULT g_false,
954 p_Ship_Organization_Id IN NUMBER,
955 p_Sell_Organization_Id IN NUMBER,
956 p_Vendor_Id IN NUMBER,
957 p_Vendor_Site_Id IN NUMBER,
958 p_Customer_Id IN NUMBER,
959 p_Address_Id IN NUMBER,
960 p_Customer_Site_Id IN NUMBER,
961 p_Cust_Trx_Type_Id IN NUMBER,
962 p_Attribute_Category IN VARCHAR2,
963 p_Attribute1 IN VARCHAR2,
964 p_Attribute2 IN VARCHAR2,
965 p_Attribute3 IN VARCHAR2,
966 p_Attribute4 IN VARCHAR2,
967 p_Attribute5 IN VARCHAR2,
968 p_Attribute6 IN VARCHAR2,
969 p_Attribute7 IN VARCHAR2,
970 p_Attribute8 IN VARCHAR2,
971 p_Attribute9 IN VARCHAR2,
972 p_Attribute10 IN VARCHAR2,
973 p_Attribute11 IN VARCHAR2,
974 p_Attribute12 IN VARCHAR2,
975 p_Attribute13 IN VARCHAR2,
976 p_Attribute14 IN VARCHAR2,
977 p_Attribute15 IN VARCHAR2,
978 p_Revalue_Average_Flag IN VARCHAR2,
979 p_Freight_Code_Combination_Id IN NUMBER,
980 p_inv_currency_code IN NUMBER,
981 p_Flow_Type IN NUMBER,
982 p_Intercompany_COGS_Account_Id IN NUMBER,
983 p_Inventory_Accrual_Account_Id IN NUMBER,
984 p_Expense_Accrual_Account_Id IN NUMBER
985 );
986
987 /*==========================================================================================================
988 * Package: INV_TRANSACTION_FLOW_PUB
989 *
990 * Procedure: GET_DROPSHIP_PO_TRANSACTION_TYPE
991 *
992 * Description:
993 * This API gets the drop ship transaction type code for a drop ship or global procurement flow.
994 * This API will be called by Oracle Receiving as well as Oracle Costing
995 *
996 * Inputs:
997 * - p_po_line_location_id - the Purchase Order LIne Location
998 * - p_global_procurement_flag - a flag to indicate whether the flow is global procurement flow
999 *
1000 * Outputs:
1001 * - x_ds_type_code - the drop ship transaction type code. The possible value for this are:
1002 * 1 - Drop Ship flow and logical
1003 * 2 - Drop Ship Flow and physical
1004 * 3 - Not a Drop Ship Flow and Physical
1005 * - x_header_id - Transaction Flow Header Identifier
1006 * - x_return_Status - the return status
1007 * - x_msg_data - the error message
1008 * - x_msg_count - the message count
1009 *============================================================================================================*/
1010 /*#
1014 * @param p_init_msg_list Indicates whether message stack is to be initialized
1011 * This API gets the drop ship transaction type code for a drop ship or global procurement flow.
1012 * This API will be called by Oracle Receiving as well as Oracle Costing
1013 * @param p_api_version API Version of this procedure. Current version is 1.0
1015 * @param p_rcv_transaction_id rcv_transaction_id from rcv_transactions table for the receipt
1016 * @param p_global_procurement_flag pass 'Y' for a global procurement flow
1017 * @param x_return_status return variable holding the status of the procedure call
1018 * @param x_msg_count return variable holding the number of error messages returned
1019 * @param x_msg_data return variable holding the error message
1020 * @param x_transaction_type_id return variable indicating Inventory transaction type id
1021 * @param x_transaction_action_id return variable indicating Inventory transaction action id
1022 * @param x_transaction_source_type_id return variable indicating Inventory transaction source type id
1023 * @param x_dropship_type_code return 1 - Drop Ship flow and logical, 2 - Drop Ship Flow and physical, 3 - Not a Drop Ship Flow and Physical
1024 * @param x_header_id return variable holding Transaction Flow Header Id found
1025 * @rep:scope internal
1026 * @rep:displayname Get Dropship Transaction type
1027 */
1028 Procedure Get_Dropship_PO_Txn_type
1029 (
1030 p_api_version IN NUMBER
1031 , p_init_msg_list IN VARCHAR2 default G_FALSE
1032 , p_rcv_transaction_id IN NUMBER
1033 , p_global_procurement_flag IN VARCHAR2
1034 , x_return_Status OUT NOCOPY VARCHAR2
1035 , x_msg_data OUT NOCOPY VARCHAR2
1036 , x_msg_count OUT NOCOPY NUMBER
1037 , x_transaction_type_id OUT NOCOPY NUMBER
1038 , x_transaction_action_id OUT NOCOPY NUMBER
1039 , x_transaction_Source_type_id OUT NOCOPY NUMBER
1040 , x_dropship_type_code OUT NOCOPY NUMBER
1041 , x_header_id OUT NOCOPY NUMBER
1042 );
1043
1044
1045 /*================================================================================================
1046 * Package : INV_TRANSACTION_FLOW_PUB
1047 *
1048 * Function: Convert_Currency();
1049 *
1050 * Description: This function is to convert the transfer price to the functional currency of
1051 * a given OU. It will also returns the functional currency of that OU.
1052 *
1053 * Input Parameters:
1054 * 1. p_org_id - The operating unit to which functional currency will be converted
1055 * 2. p_transfer_price - the transfer price to be converted
1056 * 3. p_currency_code - the currency code to be converted to functional currency
1057 * 4. Transaction date - the date to be used to get the conversion rate
1058 *
1059 * Output Parameter:
1060 * 1. transfer price in functional currency
1061 * 2. functional currency of the given OU
1062 * 3. x_return_status - return status
1063 * 4. x_msg_data - error message
1064 * 5. x_msg_count - number of message in the message stack
1065 *
1066 *================================================================================================*/
1067
1068
1069 FUNCTION convert_currency (
1070 p_org_id IN NUMBER
1071 , p_transfer_price IN NUMBER
1072 , p_currency_code IN VARCHAR2
1073 , p_transaction_date IN DATE
1074 , x_functional_currency_code OUT NOCOPY VARCHAR2
1075 , x_return_status OUT NOCOPY VARCHAR2
1076 , x_msg_data OUT NOCOPY VARCHAR2
1077 , x_msg_count OUT NOCOPY NUMBER
1078 ) RETURN NUMBER;
1079
1080
1081 /*==========================================================================================================
1082 * Package: INV_TRANSACTION_FLOWS_PUB
1083 *
1084 * Procedure: GET_TRANSFER_PRICE_FOR_ITEM
1085 *
1086 * Description:
1087 * This API gets the transfer price in the transaction UOM using the following defaulting mechanism:
1088 * 1. list price at transaction UOM I established transfer price list
1089 * 2. Transaction cost of shipment transaction.
1090 * This API will be called by Oracle Inventory as well as Oracle CTO for CTO item
1091 *
1092 * Inputs:
1093 * - From_Org_ID - the start operating unit
1094 * - To_Org_Id - The End operating Unit
1095 * - Transaction_UOM - the transaction units of meassure
1096 * - Invenotry_Item_ID - the inventory item identifier
1097 * - Transaction ID - the logical transaction id
1098 * - price_list_id - the static price list id.
1099 * - global_procurement_flag - the flag to indicate if the flow is for global procurement
1100 * - drop ship flag - the flag to indicate if the flow used is for external drop ship with
1101 * procurement flag.
1102 *
1103 *
1104 * Outputs:
1105 * - x_transfer_price - the unit transfer price of the item
1106 * - x_currency_code - the currency code of the transfer price
1107 * - x_return_Status - the return status
1108 * - x_msg_data - the error message
1109 * - x_msg_count - the message count
1110 *============================================================================================================*/
1111 Procedure get_transfer_price_for_item
1112 (
1113 x_return_status OUT NOCOPY VARCHAR2
1114 , x_msg_data OUT NOCOPY VARCHAR2
1115 , x_msg_count OUT NOCOPY NUMBER
1116 , x_transfer_price OUT NOCOPY NUMBER
1117 , x_currency_code OUT NOCOPY VARCHAR2
1118 , p_api_version IN NUMBER
1119 , p_init_msg_list IN VARCHAR2 default G_FALSE
1120 , p_from_org_id IN NUMBER
1121 , p_to_org_id IN NUMBER
1122 , p_transaction_uom IN VARCHAR2
1123 , p_inventory_item_id IN NUMBER
1124 , p_transaction_id IN NUMBER
1125 , p_from_organization_id IN NUMBER DEFAULT NULL
1126 , p_price_list_id IN NUMBER
1127 , p_global_procurement_flag IN VARCHAR2
1128 , p_drop_ship_flag IN VARCHAR2 DEFAULT 'N'
1129 , p_cto_item_flag IN VARCHAR2 DEFAULT 'N'
1133
1130 -- , p_process_discrete_xfer_flag IN VARCHAR2 DEFAULT 'N' -- Bug 4750256
1131 , p_order_line_id IN VARCHAR2 DEFAULT NULL -- Bug 5171637/5138311 umoogala: replaced above line with this one.
1132 );
1134 /*==========================================================================================================
1135 * Procedure: GET_TRANSFER_PRICE
1136 *
1137 * Description:
1138 * This API is wrapper API to the Get_Transfer_Price API.
1139 * This API will be called by Oracle Inventory Create_logical_transaction API
1140 * as well as Oracle Costing.
1141 * This API will be called with transaction_uom as : PO UOM or SO UOM, whichever is applicable.
1142 * The API will return the transfer_price in the Transaction_UOM that was passed to it.
1143 * The currency of the price will be the currency set in the price list.
1144 * The calling program will take care of appropriate conversions of UOM and currency.
1145 *
1146 * Inputs:
1147 * - From_Org_ID - the start operating unit
1148 * - To_Org_Id - The End operating Unit
1149 * - Transaction UOM - the units of meassure
1150 * - Invenotry_Item_ID - the inventory item identifier
1151 * - Transaction ID - the inventory transaction ID
1152 * - price_list_id - the static price list id.
1153 * - global_procurement_flag - the flag to indicate if the flow is for global procurement
1154 * - drop ship flag - the flag to indicate if the flow used is for external drop ship with
1155 * procurement flag.
1156 *
1157 * Outputs:
1158 * - x_transfer_price - The total price for the item.
1159 * If there are no pricelist found, then return 0
1160 * - x_currency_code - the currency code of the transfer price
1161 * - x_return_status - the return status - S - success, E - Error, U - Unexpected Error
1162 * - x_msg_data - the error message
1163 * - x_msg_count - the number of messages in the message stack.
1164 *==========================================================================================================*/
1165
1166 PROCEDURE Get_Transfer_Price
1167 (
1168 x_return_status OUT NOCOPY VARCHAR2
1169 , x_msg_data OUT NOCOPY VARCHAR2
1170 , x_msg_count OUT NOCOPY NUMBER
1171 , x_transfer_price OUT NOCOPY NUMBER
1172 , x_currency_code OUT NOCOPY VARCHAR2
1173 , x_incr_transfer_price OUT NOCOPY NUMBER
1174 , x_incr_currency_code OUT NOCOPY VARCHAR2
1175 , p_api_version IN NUMBER
1176 , p_init_msg_list IN VARCHAR2 default G_FALSE
1177 , p_from_org_id IN NUMBER
1178 , p_to_org_id IN NUMBER
1179 , p_transaction_uom IN VARCHAR2
1180 , p_inventory_item_id IN NUMBER
1181 , p_transaction_id IN NUMBER
1182 , p_from_organization_id IN NUMBER DEFAULT NULL
1183 , p_global_procurement_flag IN VARCHAR2
1184 , p_drop_ship_flag IN VARCHAR2 DEFAULT 'N'
1185 -- , p_process_discrete_xfer_flag IN VARCHAR2 DEFAULT 'N' -- Bug 4750256
1186 , p_order_line_id IN VARCHAR2 DEFAULT NULL -- Bug 5171637/5138311 umoogala: replaced above line with this one.
1187 );
1188
1189
1190 end INV_TRANSACTION_FLOW_PUB;