1 PACKAGE BODY pa_expenditure_inquiry AS
2 -- $Header: PAXEXINB.pls 120.1 2005/08/11 10:11:56 eyefimov noship $
3 --================================================================
4
5
6 -- This function will be used in the view to determine the mode
7 FUNCTION Get_Mode RETURN VARCHAR2 IS
8 BEGIN
9 RETURN(pa_expenditure_inquiry.X_Calling_Mode);
10 END Get_Mode ;
11
12 -- This function will be used in the view to determine the criteria(Bug#680401)
13 FUNCTION Get_Criteria RETURN VARCHAR2 IS
14 BEGIN
15 RETURN(pa_expenditure_inquiry.X_Query_criteria);
16 END Get_Criteria ;
17
18
19 PROCEDURE pa_expenditure_inquiry_driver (
20 x_Mode IN VARCHAR2) IS
21 BEGIN
22 X_Calling_Mode := x_Mode ;
23 END pa_expenditure_inquiry_driver;
24
25 -- (Bug#680401)
26 PROCEDURE pa_expenditure_criteria_driver (
27 x_Criteria IN VARCHAR2) IS
28 BEGIN
29 X_Query_criteria := x_Criteria ;
30 END pa_expenditure_criteria_driver;
31
32 PROCEDURE pa_get_cdl_details( p_expenditure_item_id IN NUMBER,
33 x_vendor_id IN OUT NOCOPY NUMBER,
34 x_system_reference2 IN OUT NOCOPY VARCHAR2,
35 x_vendor_name IN OUT NOCOPY VARCHAR2,
36 x_vendor_number IN OUT NOCOPY VARCHAR2,
37 x_burden_sum_rej_code IN OUT NOCOPY VARCHAR2) is
38
39 cursor GetCdlInfo is
40 select vend.vendor_id,
41 cdl.system_reference2,
42 vend.vendor_name,
43 vend.segment1,
44 cdl.burden_sum_rejection_code
45 from po_vendors vend,
46 PA_COST_DIST_LINES_ALL_BAS cdl
47 where cdl.expenditure_item_id = p_expenditure_item_id
48 and cdl.line_num (+) = 1
49 /* Added the getNumericString wrapper over systeem_reference1 for bug3158748 */
50 and pa_utils4.getNumericString(cdl.system_reference1) = vend.vendor_id (+) ;
51
52 BEGIN
53
54 open GetCdlInfo ;
55 fetch GetCdlInfo
56 into x_vendor_id,
57 x_system_reference2,
58 x_vendor_name,
59 x_vendor_number,
60 x_burden_sum_rej_code ;
61
62 EXCEPTION
63 when no_data_found then
64 x_vendor_id := Null;
65 x_system_reference2 := Null;
66 x_vendor_name := Null;
67 x_vendor_number := Null;
68 x_burden_sum_rej_code := Null;
69 NULL ;
70 when others then
71 x_vendor_id := Null;
72 x_system_reference2 := Null;
73 x_vendor_name := Null;
74 x_vendor_number := Null;
75 x_burden_sum_rej_code := Null;
76 RAISE ;
77
78 END pa_get_cdl_details;
79
80 END pa_expenditure_inquiry ;