DBA Data[Home] [Help]

PACKAGE BODY: APPS.PA_COST_UTILS

Source


1 package body PA_Cost_Utils as
2   --  $Header: PAXCUTLB.pls 115.0 99/07/16 15:23:24 porting ship $
3 
4   function CDL_Exists( x_expenditure_item_id  IN  number)
5    return boolean
6    is
7       dummy integer;
8    begin
9 
10        --
11        -- Verify if there is any CDL associated with this expenditure item.
12        --
13 
14        SELECT 1
15        INTO   dummy
16        FROM   SYS.Dual
17        WHERE  EXISTS
18 	      (SELECT 1
19 	       FROM   PA_Cost_Distribution_Lines
20 	       WHERE  Expenditure_Item_ID = x_expenditure_item_id);
21 
22        -- Find at least one CDL with the specified expenditure_item_id
23        return(TRUE);
24 
25    exception
26 	when NO_DATA_FOUND then
27 	     return(FALSE);
28    end CDL_Exists;
29 
30 
31   function Related_Item_Exists( x_expenditure_item_id  IN  number)
32    return boolean
33    is
34       dummy integer;
35    begin
36 
37        --
38        -- Verify if there is any related items associated with the source item
39        --
40 
41        SELECT 1
42        INTO   dummy
43        FROM   SYS.Dual
44        WHERE  EXISTS
45 	      (SELECT 1
46 	       FROM   PA_Expenditure_Items
47 	       WHERE  Source_Expenditure_Item_ID = x_expenditure_item_id);
48 
49        -- Find at least one related item with the specified expenditure_item_id
50        return(TRUE);
51 
52    exception
53 	when NO_DATA_FOUND then
54 	     return(FALSE);
55    end Related_Item_Exists;
56 
57 
58 end PA_Cost_Utils;