DBA Data[Home] [Help]

PACKAGE: APPS.PA_DISPLAY_PERIOD_MASKS

Source


1 PACKAGE PA_DISPLAY_PERIOD_MASKS AS
2 /* $Header: PAFPPMKS.pls 120.0 2005/05/30 11:45:23 appldev noship $ */
3 
4      -- Package Variables.
5   g_preceeding_end   DATE;
6   g_suceeding_start  DATE;
7   g_period_mask_id   pa_period_mask_details.period_mask_id%TYPE;
8   g_get_mask_start   NUMBER := 0;
9   g_get_mask_end     NUMBER := 0;
10 
11 
12 /*  get_current_period_start_date() will get the current periods start date
13 --  it MUST have the following parameters:
14 --  current_planning_period,
15 --	period_set_name,
16 --  time_phase_code,
17 --	and either accounterd_period_type set for 'GL'
18 --	OR pa_period_type set for 'PA'
19 --	it is called by get_periods()
20 */
21 
22   FUNCTION get_current_period_start_date ( p_current_planning_period IN pa_budget_versions.current_planning_period%TYPE
23                                            ,p_period_set_name        IN gl_sets_of_books.period_set_name%TYPE
24 										   ,p_time_phase_code        IN pa_proj_fp_options.cost_time_phased_code%TYPE
25 										   ,p_accounted_period_type  IN gl_sets_of_books.accounted_period_type%TYPE
26 										   ,p_pa_period_type         IN pa_implementations_all.pa_period_type%TYPE)
27 										   RETURN DATE;
28 
29 /*   get_period_mask_start() returns the min from_anchor_start from pa_period_mask_details
30 --   it will not return rows that have an from_anchor_start with -99999 or 99999
31 --   these are flags for preceeding and suceeding buckets
32 --   this function is called from get_periods to populate the pl/sql table with the
33 --   before anchor date records from gl_periods
34 */
35   FUNCTION get_period_mask_start( p_period_mask_id IN pa_period_mask_details.period_mask_id%TYPE) RETURN NUMBER;
36 
37 
38 /*   get_period_mask_end() returns the max from_anchor_end from pa_period_mask_details
39 --   it will not return rows that have an from_anchor_start with -99999 or 99999
40 --   these are flags for preceeding and suceeding buckets
41 --   this function is called from get_periods to populate the pl/sql table with the
42 --   after anchor date records from gl_periods
43 */
44 
45   FUNCTION get_period_mask_end  ( p_period_mask_id IN pa_period_mask_details.period_mask_id%TYPE) RETURN NUMBER;
46 
47   TYPE period_names_type IS TABLE OF gl_periods%ROWTYPE INDEX BY BINARY_INTEGER;
48 
49     periods_tab period_names_type;
50 
51 /*
52 --  get_periods() is the main function of this package
53 --  it populates the periods_tab pl/sql table with rows of data from gl_periods
54 --  within the masks start and end periods
55 --  it will also set the global variables g_preceeding_end and g_suceeding_start
56 --  these will be used for the proceeding buckets end period and suceeding buckets start period
57 --  get_periods will return 1 if it populates periods_tab pl/sql table successfully
58 */
59 
60   FUNCTION get_periods ( p_budget_version_id  IN  pa_budget_versions.budget_version_id%TYPE,
61                          p_resource_assignment_id IN pa_resource_assignments.resource_assignment_id%TYPE DEFAULT -1) RETURN NUMBER;
62 
63 
64 /*
65 --  get_min_start_period, get_max_end_period, get_min_start_date, get_max_end_date
66 --  are used by the start_period, end_period, start_date, and end_date functions
67 */
68   FUNCTION get_min_start_period    RETURN VARCHAR2;
69 
70   FUNCTION get_max_end_period      RETURN VARCHAR2;
71 
72   FUNCTION get_min_start_date      RETURN DATE;
73 
74   FUNCTION get_max_end_date        RETURN DATE;
75 
76 
77 
78 /*
79 --  start_period(), end_period(), display_name(), start_date(), and end_date()
80 --  are the functions to be used in select statements calling this package
81 --  pass the parameter from_anchor_postion
82 */
83 
84 
85   FUNCTION start_period ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN VARCHAR2;
86 
87   FUNCTION end_period   ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN VARCHAR2;
88 
89   FUNCTION display_name ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN VARCHAR2;
90 
91   FUNCTION start_date   ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN DATE;
92 
93   FUNCTION end_date     ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN DATE;
94 
95    -- This will be called from the EditPlanLines Page to save the current planning period.
96    -- Bug Fix 3975683
97    -- Added Record Version Numbers.
98 
99   PROCEDURE update_current_pp (p_budget_version_id       IN  pa_budget_versions.budget_version_id%TYPE,
100                                p_current_planning_period IN pa_budget_versions.current_planning_period%TYPE,
101                                p_commit                  IN VARCHAR2 := FND_API.G_FALSE,
102                                p_bud_rec_ver_num         IN pa_budget_versions.record_version_number%TYPE,
103                                p_fp_rec_ver_num          IN pa_proj_fp_options.record_version_number%TYPE,
104                                X_Return_Status           OUT NOCOPY Varchar2,
105                                X_Msg_Count               OUT NOCOPY Number,
106         	               X_Msg_Data                OUT NOCOPY Varchar2);
107 
108 
109 END pa_display_period_masks;