[Home] [Help]
PACKAGE BODY: APPS.GL_PA_AUTOALLOC_PKG
Source
1 PACKAGE BODY GL_PA_AUTOALLOC_PKG AS
2 /* $Header: glalprjb.pls 120.2 2002/11/11 23:53:27 djogg ship $ */
3
4 FUNCTION GET_PERIOD_TYPE ( p_allocation_set_id In Number )
5 Return Varchar2 Is
6 l_period_type Varchar2(2);
7 Begin
8
9 l_period_type := PA_GL_AUTOALLOC_PKG.GET_PERIOD_TYPE(p_allocation_set_id);
10 return(l_period_type);
11 End GET_PERIOD_TYPE;
12
13
14
15 FUNCTION Valid_Run_Period ( p_allocation_set_id In Number,
16 p_pa_period In Varchar2
17 DEFAULT Null,
18 p_gl_period In Varchar2
19 DEFAULT Null)
20
21 Return BOOLEAN Is
22 is_valid Boolean;
23 Begin
24 is_valid :=PA_GL_AUTOALLOC_PKG.Valid_Run_Period(p_allocation_set_id,
25 p_pa_period,
26 p_gl_period );
27 return(is_valid);
28
29 End Valid_Run_Period;
30
31 Function Submit_Alloc_Request( p_rule_id In Number,
32 p_expnd_item_date In Date,
33 p_pa_period In Varchar2,
34 p_gl_period In Varchar2
35 )
36 Return Number Is
37 v_request_id Number;
38 Begin
39 v_request_id :=
40 PA_GL_AUTOALLOC_PKG.Submit_Alloc_Request
41 ( p_rule_id,
42 p_expnd_item_date,
43 p_pa_period,
44 p_gl_period );
45
46 Return v_request_id;
47 End Submit_Alloc_Request;
48
49 Procedure get_pa_step_status (
50 p_request_Id In Number
51 ,p_step_number In Number
52 ,p_mode In Varchar2
53 ,p_status Out NOCOPY Varchar2) IS
54 l_status Varchar2(240);
55 Begin
56 PA_GL_AUTOALLOC_PKG.get_pa_step_status
57 ( p_request_Id,
58 p_step_number,
59 p_mode,
60 l_status );
61
62 p_status := l_status;
63
64 End get_pa_step_status;
65
66 Procedure upd_gl_autoalloc_batch_hist(
67 p_request_Id In Number
68 ,p_step_number In Number
69 ,p_pa_allocation_run_id In Number
70 ,p_return_code Out NOCOPY Number ) Is
71 Begin
72
73 Update GL_AUTO_ALLOC_BATCH_HISTORY
74 Set pa_allocation_run_id = p_pa_allocation_run_id
75 Where request_Id = p_request_Id
76 And step_number = p_step_number;
77
78 If SQL%NOTFOUND Then
79 p_return_code := -1;
80 Else
81 p_return_code := 0;
82 End If;
83
84 End;
85
86 End GL_PA_AUTOALLOC_PKG;