DBA Data[Home] [Help]

PACKAGE: APPS.GL_PA_AUTOALLOC_PKG

Source


1 PACKAGE  GL_PA_AUTOALLOC_PKG AS
2 /*  $Header: glalprjs.pls 120.2 2002/11/11 23:53:35 djogg ship $  */
3 
4   --
5   -- Function
6   --   get_period_type
7   -- Purpose
8   --  Given a set id it determines if Project Allocation Rules use GL period or
9   --  PA period. If all the rules use PA Period type then return 'P' similarly if
10   --  all the rules use GL Period Type then return 'G'- if both types exist return
11   --  'B' - if the set does not have any Project Allocation Rules return 'N'
12   -- Arguments
13   --   allocation_set_id
14   -- Example
15   --   period_req := GL_PA_AUTOALLOC_PKG.get_period_type(id);
16 
17 
18 Function 	get_period_type ( p_allocation_set_id In Number	)
19 Return Varchar2;
20 PRAGMA RESTRICT_REFERENCES (Get_Period_Type,WNDS,WNPS);
21 
22   --
23   -- Function
24   --   Valid_Run_Period
25   -- Purpose
26   --  This function calls Get_Period_Type to determine which run period (pa/gl)
27   --  value is required. It further checks if that period is not null.
28   --  TRUE on success, FALSE on failure.
29   -- Arguments
30   --   allocation_set_id, pa_period, gl_period
31   -- Example
32   --  is_period_valid := GL_PA_AUTOALLOC_PKG.Valid_Run_Period(id,pa_period,gl_period);
33 
34 
35 Function valid_run_period ( p_allocation_set_id	In 	Number,
36 			    p_pa_period 		In	 Varchar2
37 							Default  Null,
38 		            p_gl_period 		In	 Varchar2
39 							Default  Null)
40 Return Boolean;
41 
42 PRAGMA RESTRICT_REFERENCES (Valid_Run_Period,WNDS,WNPS);
43 
44   --
45   -- Function
46   --   submit_alloc_request
47   -- Purpose
48   --  function does two things
49   --  1.Identify which period to be passed as parameter to a process.
50   --  2. Submits the Generate Allocation Transactions Request.
51   --  Return Value: Request Id of submitted request
52   -- Arguments
53   --  p_rule_id,p_expnd_item_date,p_pa_period,p_gl_period
54 
55 Function  submit_alloc_request(
56                        p_rule_id          In    Number,
57   		       p_expnd_item_date  In	Date,
58 		       p_pa_period	  In	Varchar2,
59 		       p_gl_period	  In	Varchar2
60 				     )
61 Return Number;
62 
63   --
64   -- Procedure
65   --   get_pa_step_status
66   -- Purpose
67   --  For a given request_id and step number it returns the step status .
68   --  p_mode = 'S' for step-down otherwise its parallel
69   --  This is only for a project step in the auto allocation.
70   -- Arguments
71   --   request_id, step_number, mode
72   --  Returns  run status of a project step in the auto allocation
73 
74 Procedure get_pa_step_status (
75                       p_request_Id        In   Number
76                      ,p_step_number       In   Number
77                      ,p_mode              In   Varchar2
78                      ,p_status            Out NOCOPY  Varchar2);
79 
80 
81   --
82   -- Procedure
83   --   upd_gl_auto_alloc_batch_history
84   -- Purpose
85   --  For a given request_id and step number , it update the PA_ALLOCATION_RUN_ID
86   --  with p_pa_allocation_run_id
87   --
88   -- Arguments
89   --   request_id, step_number, pa_allocation_run_id
90   --  Returns -1 if record is not found else returns 0
91 
92 Procedure upd_gl_autoalloc_batch_hist(
93                      p_request_Id             In  Number
94                     ,p_step_number            In  Number
95                     ,p_pa_allocation_run_id   In  Number
96                     ,p_return_code            Out NOCOPY Number );
97 
98 End gl_pa_autoalloc_pkg;