1 PACKAGE CST_PacEamCost_GRP AS
2 /* $Header: CSTPPEAS.pls 120.3 2005/07/12 23:41:51 arathee noship $ */
3
4
5 -- Start of comments
6 -- Notes : This PL/SQL table type is used to store WIP_Entity_id's for
7 -- which estimation is to run.
8 -- End of comments
9
10 TYPE G_WIP_ENTITY_TYP IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
11
12
13 -- Start of comments
14 -- API name : Estimate_PAC_WipJobs
15 -- Type : Public.
16 -- Function : This API is called from SRS to estimate eAM WorkOrders in PAC
17 -- Flow:
18 -- |-- Insert into CST_PAC_EAM_WO_EST_STATUSES all WIP entities not yet
19 -- | estimated for the given cost type.
20 -- |-- For the job/Jobs to be estimated for the given cost type.
21 -- | |-- Update est flag to a -ve no for the jobs to be processed.
22 -- | |-- Call delete_PAC_eamperbal to delete prior estimation columns
23 -- | |-- Compute the estimates, call Compute_PAC_JobEstimates API
24 -- | |-- Update the est status to 7 if successfull or to 3 if errors out
25 -- | End Loop;
26 -- Update Estimation status of unprocessed jobs to Pending for any other
27 -- exception so that they can be processed in the next run.
28 -- Pre-reqs : None.
29 -- Parameters :
30 -- IN : errbuf OUT NOCOPY VARCHAR2 Conc req param
31 -- retcode OUT NOCOPY NUMBER Conc req param
32 -- p_organization_id IN NUMBER Required
33 -- p_legal_entity_id IN NUMBER Required
34 -- p_cost_type_id IN NUMBER Required
35 -- p_period_id IN NUMBER Required
36 -- p_cost_group_id IN NUMBER Required
37 -- p_entity_type IN NUMBER Optional DEFAULT 6
38 -- p_job_option IN NUMBER Optional DEFAULT 1
39 -- p_job_dummy IN NUMBER Optional DEFAULT NULL
40 -- p_wip_entity_id IN NUMBER Optional DEFAULT NULL
41 -- OUT :
42 -- Version : Current version 1.0
43 --
44 -- Notes : This procedure is called as a concurrent program to estiamte work orders
45 -- p_job_otion :
46 -- 1: All Jobs
47 -- 2: Specific job
48 --
49 -- Estimation Status:
50 -- NULL,1: Pending
51 -- -ve: Running
52 -- 3: Error
53 -- 7: Complete
54 --
55 -- End of comments
56
57 /*---------------------------------------------------------------------------*
58 | PUBLIC PROCEDURES/FUNCTIONS |
59 *----------------------------------------------------------------------------*/
60
61 PROCEDURE Estimate_PAC_WipJobs(
62 errbuf OUT NOCOPY VARCHAR2,
63 retcode OUT NOCOPY NUMBER,
64 p_legal_entity_id IN NUMBER,
65 p_cost_type_id IN NUMBER,
66 p_period_id IN NUMBER,
67 p_cost_group_id IN NUMBER,
68 p_entity_type IN NUMBER DEFAULT 6,
69 p_job_option IN NUMBER DEFAULT 1,
70 p_job_dummy IN NUMBER DEFAULT NULL,
71 p_wip_entity_id IN NUMBER DEFAULT NULL
72 );
73
74
75 -- Start of comments
76 -- API name : Delete_Pac_EamPerBal
77 -- Type : Public.
78 -- Function : This API is called from Estimate_PAC_WipJobs
79 -- Flow:
80 -- |-- Get estimation details of the wip_entity LOOP
81 -- | |--Update amount in cst_pac_eam_asset_per_balances
82 -- | End Loop;
83 -- |-- Update estimation columns of cst_pac_eam_period_balances to 0
84 -- |-- Delete the row in cst_pac_eam_period_balances if estimation and
85 -- | actual cost columns are 0 or null
86 -- |-- Similarly delete the row in cst_pac_eam_asset_per_balances if
87 -- | estimation and actual cost columns are 0 or null
88 --
89 -- Pre-reqs : None.
90 -- Parameters :
91 -- IN : p_api_version IN NUMBER Required
92 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE
93 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
94 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
95 -- p_legal_entity_id IN NUMBER Required
96 -- p_cost_group_id IN NUMBER Required
97 -- p_cost_type_id IN NUMBER Required
98 -- p_organization_id IN NUMBER Required
99 -- p_wip_entity_id_tab IN CST_PacEamCost_GRP.G_WIP_ENTITY_TYP Required
100 -- OUT : x_return_status OUT VARCHAR2(1)
101 -- x_msg_count OUT NUMBER
102 -- x_msg_data OUT VARCHAR2(2000)
103 -- Version : Current version 1.0
104 --
105 -- Notes : This procedure does bulk deletes and bulk updates of the prior estimation
106 -- data for the particular Legal Entity/Cost Group/Cost Type using the PL/SQL table
107 --
108 -- End of comments
109
110 PROCEDURE Delete_Pac_EamPerBal (
111 p_api_version IN NUMBER,
112 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
113 p_commit IN VARCHAR2 := FND_API.G_FALSE,
114 p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
115 x_return_status OUT NOCOPY VARCHAR2,
116 x_msg_count OUT NOCOPY NUMBER,
117 x_msg_data OUT NOCOPY VARCHAR2,
118 p_legal_entity_id IN NUMBER,
119 p_cost_group_id IN NUMBER,
120 p_cost_type_id IN NUMBER,
121 p_wip_entity_id_tab IN CST_PacEamCost_GRP.G_WIP_ENTITY_TYP
122 );
123
124
125 -- Start of comments
126 -- API name : Compute_PAC_JobEstimates
127 -- Type : Public.
128 -- Function : This API is called from Estimate_PAC_WipJobs
129 -- Flow:
130 -- |-- Check Entity Type is eAM
131 -- |-- Get charge asset using API
132 -- |-- Get the period set name and period name
133 -- | |-- if scheduled date is in current PAC period use CST_PAC_PERIODS
134 -- | |-- else if its in a future period use GL_PERIODS
135 -- | End IF
136 -- |-- Derive the currency extended precision for the organization
137 -- |-- Derive valuation rates cost type based on organization's cost method
138 -- |-- For Resources, open c_wor cursor LOOP
139 -- | |-- Get_MaintCostCat (Get category, owning dept and operating dept)
140 -- | |-- Get_eamCostElement
141 -- | |-- InsertUpdate_PAC_eamPerBal (send asset number, category, wip entity id, eAM cost element, departments etc.)
142 -- | |-- For Resource based Overheads open c_rbo cursor LOOP
143 -- | | |-- InsertUpdate_PAC_eamPerBal
144 -- | | END LOOP for c_rbo
145 -- | |-- ADD value for the total resource based Overheads for this resource and the resource value
146 -- | END LOOP for c_wor
147 -- |-- Compute Material Costs, open c_wro cursor LOOP
148 -- | |--Get_MaintCostCat (Get category, owning dept and operating dept)
149 -- | |--Get_eamCostElement
150 -- | |--InsertUpdate_PAC_eamPerBal
151 -- | END LOOP
152 -- |-- For 'Non-stockable' Direct Items open c_wrodi cursor LOOP
153 -- | |--Get_MaintCostCat (Get category, owning dept and operating dept)
154 -- | |--Get_eamCostElement
155 -- | |--InsertUpdate_PAC_eamPerBal
156 -- | END LOOP
157 -- |-- For 'Description based' Direct Items open c_wedi cursor LOOP
158 -- | |--Get_MaintCostCat (Get category, owning dept and operating dept)
159 -- | |--Get Cost Element from CST_CAT_ELE_EXP_ASSOCS table (not from API)
160 -- | |--InsertUpdate_PAC_eamPerBal
161 -- | END LOOP
162 -- |-- For PO and REQ open c_pda cursor LOOP
163 -- | |--Get_MaintCostCat (Get category, owning dept and operating dept)
164 -- | |--Get Cost Element from cst_CAT_ELE_EXP_ASSOCS table (not from API)
165 -- | |--InsertUpdate_PAC_eamPerBal
166 -- | END LOOP
167 --
168 --
169 -- Pre-reqs : None.
170 -- Parameters :
171 -- IN : p_api_version IN NUMBER Required
172 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE
173 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
174 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
175 -- p_cost_group_id IN NUMBER Required
176 -- p_legal_entity_id IN NUMBER Required
177 -- p_Period_id IN NUMBER Required
178 -- p_wip_entity_id IN NUMBER Required
179 -- p_user_id IN NUMBER Required
180 -- p_request_id IN NUMBER Required
181 -- p_prog_id IN NUMBER Required
182 -- p_prog_app_id IN NUMBER Required
183 -- p_login_id IN NUMBER Required
184 -- OUT : x_return_status OUT VARCHAR2(1)
185 -- x_msg_count OUT NUMBER
186 -- x_msg_data OUT VARCHAR2(2000)
187 -- Version : Current version 1.0
188 --
189 -- Notes : This procedure calculates the estimates for the Work Order for the
190 -- Legal Entity/Cost Group/Cost Type association
191 --
192 -- End of comments
193
194
195 PROCEDURE Compute_PAC_JobEstimates (
196 p_api_version IN NUMBER,
197 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
198 p_commit IN VARCHAR2 := FND_API.G_FALSE,
199 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
200 x_return_status OUT NOCOPY VARCHAR2,
201 x_msg_count OUT NOCOPY NUMBER,
202 x_msg_data OUT NOCOPY VARCHAR2,
203 p_legal_entity_id IN NUMBER,
204 p_cost_group_id IN NUMBER,
205 p_cost_type_id IN NUMBER,
206 p_Period_id IN NUMBER,
207 p_wip_entity_id IN NUMBER,
208 p_user_id IN NUMBER,
209 p_request_id IN NUMBER,
210 p_prog_id IN NUMBER,
211 p_prog_app_id IN NUMBER,
212 p_login_id IN NUMBER
213 );
214
215
216 -- Start of comments
217 -- API name : InsertUpdate_pac_eamPerBal
218 -- Type : Public.
219 -- Function : This API is called from Compute_PAC_JobEstimates and Compute_PAC_JobActuals
220 -- Flow:
221 -- |-- Identify column to update value
222 -- |-- IF p_value_type = 1 THEN ==> actual_cost
223 -- | |-- IF p_eam_cost_element = 1 THEN --> equipment
224 -- | | |-- l_column := 'actual_eqp_cost';
225 -- | | |-- l_col_type := 11;
226 -- | |-- ELSIF p_eam_cost_element = 2 THEN --> labor
227 -- | | |-- l_column := 'actual_lab_cost';
228 -- | | |-- l_col_type := 12;
229 -- | |-- ELSE --> material
230 -- | | |-- l_column := 'actual_mat_cost';
231 -- | | |-- l_col_type := 13;
232 -- | | END IF;
233 -- |-- ELSE ==> system estimated
234 -- | |-- IF p_eam_cost_element = 1 THEN --> equipment
235 -- | | |-- l_column := 'system_estimated_eqp_cost';
236 -- | | |-- l_col_type := 21;
237 -- | |-- ELSIF p_eam_cost_element = 2 THEN --> labor
238 -- | | |-- l_column := 'system_estimated_lab_cost';
239 -- | | |-- l_col_type := 22;
240 -- | |-- ELSE --> material
241 -- | | |-- l_column := 'system_estimated_mat_cost';
242 -- | | |-- l_col_type := 23;
243 -- | | END IF;
244 -- | END IF;
245 -- |-- Insert/update CST_PAC_EAM_PERIOD_BALANCES
246 -- | |-- Check if txn record already existing CST_PAC_EAM_PERIOD_BALANCES
247 -- | | |-- If yes then UPDATE estimation details
248 -- | | |-- Else Insert estimation details
249 -- |-- Insert into asset period balances, call InsertUpdate_pac_assetPerBal
250 --
251 -- Pre-reqs : None.
252 -- Parameters :
253 -- IN : p_api_version IN NUMBER Required
254 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE
255 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
256 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
257 -- p_legal_entity_id IN NUMBER
258 -- p_cost_group_id IN NUMBER
259 -- p_cost_type_id IN NUMBER
260 -- p_period_id IN NUMBER Optional Default = null
261 -- p_period_set_name IN VARCHAR2 Optional Default = null
262 -- p_period_name IN VARCHAR2 Optional Default = null
263 -- p_organization_id IN NUMBER Required
264 -- p_wip_entity_id IN NUMBER Required
265 -- p_owning_dept_id IN NUMBER Required
266 -- p_dept_id IN NUMBER Required
267 -- p_maint_cost_cat IN NUMBER Required
268 -- p_opseq_num IN NUMBER Required
269 -- p_eam_cost_element IN NUMBER Required
270 -- p_asset_group_id IN NUMBER Required
271 -- p_asset_number IN VARCHAR2 Required
272 -- p_value_type IN NUMBER Required
273 -- p_value IN NUMBER Required
274 -- p_user_id IN NUMBER Required
275 -- p_request_id IN NUMBER Required
276 -- p_prog_id IN NUMBER Required
277 -- p_prog_app_id IN NUMBER Required
278 -- p_login_id IN NUMBER Required
279 -- OUT : x_return_status OUT VARCHAR2(1)
280 -- x_msg_count OUT NUMBER
281 -- x_msg_data OUT VARCHAR2(2000)
282 -- Version : Current version 1.0
283 --
284 -- Notes : This procedure inserts actuals (p_value_type = 1) or estimated (p_value_type = 2)
285 -- values into CST_PAC_EAM_PERIOD_BALANCES
286 --
287 -- End of comments
288
289 PROCEDURE InsertUpdate_PAC_eamPerBal (
290 p_api_version IN NUMBER,
291 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
292 p_commit IN VARCHAR2 := FND_API.G_FALSE,
293 p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
294 x_return_status OUT NOCOPY VARCHAR2,
295 x_msg_count OUT NOCOPY NUMBER,
296 x_msg_data OUT NOCOPY VARCHAR2,
297 p_legal_entity_id IN NUMBER,
298 p_cost_group_id IN NUMBER,
299 p_cost_type_id IN NUMBER,
300 p_period_id IN NUMBER := null,
301 p_period_set_name IN VARCHAR2 := null,
302 p_period_name IN VARCHAR2 := null,
303 p_organization_id IN NUMBER,
304 p_wip_entity_id IN NUMBER,
305 p_owning_dept_id IN NUMBER,
306 p_dept_id IN NUMBER,
307 p_maint_cost_cat IN NUMBER,
308 p_opseq_num IN NUMBER,
309 p_eam_cost_element IN NUMBER,
310 p_asset_group_id IN NUMBER,
311 p_asset_number IN VARCHAR2,
312 p_value_type IN NUMBER,
313 p_value IN NUMBER,
314 p_user_id IN NUMBER,
318 p_login_id IN NUMBER
315 p_request_id IN NUMBER,
316 p_prog_id IN NUMBER,
317 p_prog_app_id IN NUMBER,
319 );
320
321
322 -- Start of comments
323 -- API name : InsertUpdate_pac_assetPerBal
324 -- Type : Public.
325 -- Function : This API is called from InsertUpdate_PAC_eamPerBal
326 -- Flow:
327 -- Check if records already exist in CST_EAM_PAC_ASSET_PER_BALANCES
328 -- |-- If yes then Update CST_PAC_EAM_ASSET_PER_BALANCES
329 -- |-- Else Insert into CST_PAC_EAM_ASSET_PER_BALANCES
330 -- End if
331 --
332 -- Pre-reqs : None.
333 -- Parameters :
334 -- IN : p_api_version IN NUMBER Required
335 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE
336 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
337 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
338 -- p_legal_entity_id IN NUMBER,
339 -- p_cost_group_id IN NUMBER,
340 -- p_cost_type_id IN NUMBER,
341 -- p_period_id IN NUMBER Default = null,
342 -- p_period_set_name IN VARCHAR2 Default = null,
343 -- p_period_name IN VARCHAR2 Default = null,
344 -- p_organization_id IN NUMBER,
345 -- p_maint_cost_cat IN NUMBER,
346 -- p_asset_group_id IN NUMBER,
347 -- p_asset_number IN VARCHAR2,
348 -- p_value IN NUMBER,
349 -- p_column IN VARCHAR2,
350 -- p_col_type IN NUMBER,
351 -- p_period_start_date IN DATE,
352 -- p_user_id IN NUMBER,
353 -- p_request_id IN NUMBER,
354 -- p_prog_id IN NUMBER,
355 -- p_prog_app_id IN NUMBER,
356 -- p_login_id IN NUMBER,
357 -- p_maintenance_object_id IN NUMBER, -- Added as part of eam enhancements project - R12
358 -- p_maintenance_object_type IN NUMBER -- Added as part of eam enhancements project - R12
359 -- OUT : x_return_status OUT VARCHAR2(1)
360 -- x_msg_count OUT NUMBER
361 -- x_msg_data OUT VARCHAR2(2000)
362 -- Version : Current version 1.0
363 --
364 -- Notes : This procedure insets or Updates Actual/Estimate details at the Asset Group/Serial Number level
365 --
366 -- End of comments
367
368 PROCEDURE InsertUpdate_PAC_assetPerBal (
369 p_api_version IN NUMBER,
370 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
371 p_commit IN VARCHAR2 := FND_API.G_FALSE,
372 p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
373 x_return_status OUT NOCOPY VARCHAR2,
374 x_msg_count OUT NOCOPY NUMBER,
375 x_msg_data OUT NOCOPY VARCHAR2,
376 p_legal_entity_id IN NUMBER,
377 p_cost_group_id IN NUMBER,
378 p_cost_type_id IN NUMBER,
379 p_period_id IN NUMBER := null,
380 p_period_set_name IN VARCHAR2 := null,
381 p_period_name IN VARCHAR2 := null,
382 p_organization_id IN NUMBER,
383 p_maint_cost_cat IN NUMBER,
384 p_asset_group_id IN NUMBER,
385 p_asset_number IN VARCHAR2,
386 p_value IN NUMBER,
387 p_column IN VARCHAR2,
388 p_col_type IN NUMBER,
389 p_period_start_date IN DATE,
390 p_maintenance_object_id IN NUMBER,
391 p_maintenance_object_type IN NUMBER,
392 p_user_id IN NUMBER,
393 p_request_id IN NUMBER,
394 p_prog_id IN NUMBER,
395 p_prog_app_id IN NUMBER,
396 p_login_id IN NUMBER
397 );
398
399
400 -- Start of comments
401 -- API name : Compute_PAC_JobActuals
402 -- Type : Public.
403 -- Function : This API is called from CSTPPWRO.process_wip_resovhd_txns and
404 -- CSTPPWMT.charge_wip_material
405 -- Flow:
406 -- |-- Get Period set name and Period name from Period ID passed
407 -- |-- Get asset group, asset number and maint obj for the wip_entity_id
408 -- |-- Derive the currency extended precision for the organization
409 -- |-- Get maint cost category
410 -- |-- Get eAM cost element
411 -- | |-- If Direct Items use get_CostEle_for_DirectItem
412 -- | |-- Else use Get_eamCostElement
413 -- |-- End If
414 -- |-- Call API InsertUpdate_PAC_eamPerBal to update eAM PAC tables.
415 --
416 -- Pre-reqs : None.
417 -- Parameters :
418 -- IN : p_api_version IN NUMBER Required
419 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE
420 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
421 -- p_validation_level IN NUMBER Optional Default =
422 -- FND_API.G_VALID_LEVEL_FULL
423 -- p_legal_entity_id IN NUMBER,
427 -- p_organization_id IN NUMBER,
424 -- p_cost_group_id IN NUMBER,
425 -- p_cost_type_id IN NUMBER,
426 -- p_period_id IN NUMBER Default = null,
428 -- p_txn_mode IN NUMBER,
429 -- p_txn_id IN NUMBER,
430 -- p_value IN NUMBER,
431 -- p_entity_id IN NUMBER,
432 -- p_op_seq IN NUMBER,
433 -- p_resource_id IN NUMBER,
434 -- p_resource_seq_num IN NUMBER,
435 -- p_user_id IN NUMBER,
436 -- p_request_id IN NUMBER,
437 -- p_prog_id IN NUMBER,
438 -- p_prog_app_id IN NUMBER,
439 -- p_login_id IN NUMBER
440 -- OUT : x_return_status OUT VARCHAR2(1)
441 -- x_msg_count OUT NUMBER
442 -- x_msg_data OUT VARCHAR2(2000)
443 -- Version : Current version 1.0
444 --
445 -- Notes : This procedure gets asset, cost element and category associations
446 -- for the actual txns and then calls API's to update PAC_EAM tables
447 --
448 -- End of comments
449
450 PROCEDURE Compute_PAC_JobActuals(
451 p_api_version IN NUMBER,
452 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
453 p_commit IN VARCHAR2 := FND_API.G_FALSE,
454 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
455 x_return_status OUT NOCOPY VARCHAR2,
456 x_msg_count OUT NOCOPY NUMBER,
457 x_msg_data OUT NOCOPY VARCHAR2,
458 p_legal_entity_id IN NUMBER,
459 p_cost_group_id IN NUMBER,
460 p_cost_type_id IN NUMBER,
461 p_pac_period_id IN NUMBER,
462 p_pac_ct_id IN NUMBER,
463 p_organization_id IN NUMBER,
464 p_txn_mode IN NUMBER, -- To indicate Resource/Direct Item Txn
465 p_txn_id IN NUMBER,
466 p_value IN NUMBER,
467 p_wip_entity_id IN NUMBER,
468 p_op_seq IN NUMBER,
469 p_resource_id IN NUMBER,
470 p_resource_seq_num IN NUMBER,
471 p_user_id IN NUMBER,
472 p_request_id IN NUMBER,
473 p_prog_app_id IN NUMBER,
474 p_prog_id IN NUMBER,
475 p_login_id IN NUMBER
476 );
477
478
479 -- Start of comments
480 -- API name : Insert_PAC_eamBalAcct
481 -- Type : Public.
482 -- Function : This API is called from CST_PacEamCost_GRP.Estimate_PAC_WipJobs.
483 -- The procedure inserts/updates data into CST_PAC_EAM_BALANCE_BY_ACCTS
484 -- table.
485 -- Flow:
486 -- |-- Verify if the estimation data already exists for the wip job
487 -- | and GL Account for the given cost group and cost type.
488 -- | |--If data already exists add the new acct_value to existing
489 -- | acct_value
493 -- Parameters :
490 -- | |--Else insert a new row into the table
491 --
492 -- Pre-reqs : None.
494 -- IN : p_api_version IN NUMBER
495 -- p_init_msg_list IN VARCHAR2
496 -- p_commit IN VARCHAR2
497 -- p_validation_level IN NUMBER
498 -- p_legal_entity_id IN NUMBER,
499 -- p_cost_group_id IN NUMBER,
500 -- p_cost_type_id IN NUMBER,
501 -- p_period_id IN NUMBER,
502 -- p_period_set_name IN VARCHAR2,
503 -- p_period_name IN VARCHAR2,
504 -- p_org_id IN NUMBER,
505 -- p_wip_entity_id IN NUMBER,
506 -- p_owning_dept_id IN NUMBER,
507 -- p_dept_id IN NUMBER,
508 -- p_maint_cost_cat IN NUMBER,
509 -- p_opseq_num IN NUMBER,
510 -- p_period_start_date IN DATE,
511 -- p_account_ccid IN NUMBER,
512 -- p_value IN NUMBER,
513 -- p_txn_type IN NUMBER,
514 -- p_wip_acct_class IN VARCHAR2,
515 -- p_mfg_cost_element_id IN NUMBER,
516 -- p_user_id IN NUMBER,
517 -- p_request_id IN NUMBER,
518 -- p_prog_id IN NUMBER,
519 -- p_prog_app_id IN NUMBER,
520 -- p_login_id IN NUMBER
521 -- OUT : x_return_status OUT VARCHAR2(1)
522 -- x_msg_count OUT NUMBER
523 -- x_msg_data OUT VARCHAR2(2000)
524 -- Version : Current version 1.0
525 --
526 -- End of comments
527 PROCEDURE Insert_PAC_eamBalAcct
528 (
529 p_api_version IN NUMBER,
530 p_init_msg_list IN VARCHAR2,
531 p_commit IN VARCHAR2,
532 p_validation_level IN NUMBER,
533 x_return_status OUT NOCOPY VARCHAR2,
534 x_msg_count OUT NOCOPY NUMBER,
535 x_msg_data OUT NOCOPY VARCHAR2,
536 p_legal_entity_id IN NUMBER,
537 p_cost_group_id IN NUMBER,
538 p_cost_type_id IN NUMBER,
539 p_period_id IN NUMBER,
540 p_period_set_name IN VARCHAR2,
541 p_period_name IN VARCHAR2,
542 p_org_id IN NUMBER,
543 p_wip_entity_id IN NUMBER,
544 p_owning_dept_id IN NUMBER,
545 p_dept_id IN NUMBER,
546 p_maint_cost_cat IN NUMBER,
547 p_opseq_num IN NUMBER,
548 p_period_start_date IN DATE,
549 p_account_ccid IN NUMBER,
550 p_value IN NUMBER,
551 p_txn_type IN NUMBER,
552 p_wip_acct_class IN VARCHAR2,
553 p_mfg_cost_element_id IN NUMBER,
554 p_user_id IN NUMBER,
555 p_request_id IN NUMBER,
556 p_prog_id IN NUMBER,
557 p_prog_app_id IN NUMBER,
558 p_login_id IN NUMBER
559 );
560
561
562 -- Start of comments
563 -- API name : Delete_PAC_eamBalAcct
564 -- Type : Public.
565 -- Function : This API is called from CST_PacEamCost_GRP.Estimate_PAC_WipJobs
566 -- Flow:
567 -- |-- Delete estimation data from CST_EAM_BALANCE_BY_ACCTS table for the
568 -- | given legal entity id, cost group, cost type and wip job
569 --
570 -- Pre-reqs : None.
571 -- Parameters :
572 -- IN : p_api_version IN NUMBER
573 -- p_init_msg_list IN VARCHAR2
574 -- p_commit IN VARCHAR2
575 -- p_validation_level IN NUMBER
576 --
577 -- p_legal_entity_id IN NUMBER,
578 -- p_cost_group_id IN NUMBER,
579 -- p_cost_type_id IN NUMBER,
580 -- p_organization_id IN NUMBER,
581 -- p_wip_entity_id_tab IN CST_PacEamCost_GRP.G_WIP_ENTITY_TYP,
582 -- OUT : x_return_status OUT VARCHAR2(1)
583 -- x_msg_count OUT NUMBER
584 -- x_msg_data OUT VARCHAR2(2000)
585 -- Version : Current version 1.0
586 --
587 -- End of comments
588 PROCEDURE Delete_PAC_eamBalAcct
589 (
590 p_api_version IN NUMBER,
591 p_init_msg_list IN VARCHAR2,
592 p_commit IN VARCHAR2,
593 p_validation_level IN NUMBER ,
594 x_return_status OUT NOCOPY VARCHAR2,
595 x_msg_count OUT NOCOPY VARCHAR2,
596 x_msg_data OUT NOCOPY VARCHAR2,
597 p_wip_entity_id_tab IN CST_PacEamCost_GRP.G_WIP_ENTITY_TYP,
598 p_legal_entity_id IN NUMBER,
599 p_cost_group_id IN NUMBER,
600 p_cost_type_id IN NUMBER
601
602 );
603
604 END CST_PacEamCost_GRP;
605