DBA Data[Home] [Help]

PACKAGE: APPS.PAY_US_SIMULATION

Source


1 PACKAGE pay_us_simulation AUTHID CURRENT_USER AS
2 /* $Header: pyussmwr.pkh 120.0.12020000.3 2013/03/25 09:37:24 emunisek noship $ */
3 /*
4 
5    Change List
6    -----------
7    Date         Name        Vers   Bug No   Description
8    -----------  ----------  -----  -------  -------------------------------
9    04-FEB-2013  emunisek    120.0           Created. Bug#16082307
10    04-FEB-2013  emunisek    120.1           After enabling Dual Checkin,
11                                             arcsing in file to generate
12                                             Checkfile Equivalence
13 */
14 
15   /* Procedure : add_custom_xml
16      Purpose   : This procedure is to enable the Localization specific
17                  XML Data to be added in addition to the Generic XML that
18                  gets generated based on the Data archived in the table
19                  PAY_SIMULATION_INFORMATION. The Descriptive Flexfield
20                  Action Information DF Contexts which get stored to column
21                  ACTION_INFORMATION_CATEGORY of PAY_SIMULATION_INFORMATION
22                  form basis for the generation of XML Tags. In addition to
23                  these XML tags based on Flexfield Segments, Localization
24                  specific tags can be appended through this procedure.
25      Important : This should not be confused with the provison supplied to
26                  customers to add Custom XML. This procedure is for
27                  Legislative requirements only.
28   */
29 
30   PROCEDURE add_custom_xml(p_assignment_action_id        NUMBER ,
31                            p_action_information_category VARCHAR2,
32                            p_document_type               VARCHAR2);
33 
34   /* Procedure : pre_processing
35      Purpose   : This procedure is to execute any Pre-Processing tasks that
36                  need to be carried before Payroll Simulation page is made
37                  available to the user. For US Localization, we are using
38                  this procedure to determine all those "Element Name -
39                  Input Value" combinations applicable to the current
40                  Assignment. These combinations are stored to table
41                  PAY_SIMULATION_INFORMATION with ACTION_CONTEXT_TYPE as
42                  "INPUTSLOV". This data is used by the LOV Queries related
43                  to Earnings and Deductions regions of Payroll Simulator.
44      Important : This procedure is initiated from Payroll Simulator Page
45                  and the data gathered by this procedure will not be
46                  committed to the database. As of now, we are using it to
47                  determine "Element Name-Input Value" combinations for
48                  Value Set Queries as this can improve the performance of
49                  LOVs. In future, if required, additional tasks can be
50                  added as required.
51   */
52 
53   PROCEDURE pre_processing(p_assignment_id     NUMBER,
54                            p_business_group_id NUMBER   DEFAULT NULL,
55                            p_legislation_code  VARCHAR2 DEFAULT NULL,
56                            p_effective_date    DATE     DEFAULT NULL);
57 
58   /* Procedure : update_asg_data
59      Purpose   : This procedure is to propagate the changes made on the
60                  Payroll Simulator to the Assignment specific Data. This
61                  does not include the changes to Element entries as those
62                  changes are handled by Core Payroll Team. Only Assignment
63                  specific changes like Address, Work Location, Tax Data etc
64                  are propagated by this procedure.
65      Important : This procedure is initiated by Core Payroll Code after the
66                  creation of Database Level Savepoint. Once the Payroll
67                  Simulator Run is complete, the entire session will be
68                  rolled back to the initial Savepoint. Hence the changes
69                  made on the Payroll Simulator page will be propagated to
70                  the actual live data through this procedure.
71   */
72 
73   PROCEDURE update_asg_data(p_source_action_id  NUMBER,
74                             p_effective_date    DATE DEFAULT NULL);
75 
76   /* Procedure : archive_data
77      Purpose   : This procedure captures the results of Payroll Simulator
78                  Run to the table PAY_SIMULATION_INFORMATION. This
79                  procedure is similar to the Payroll Archiver procedure
80                  PAY_US_ACTION_ARCH.ACTION_ARCHIVE_DATA. The regular
81                  Payroll Archiver procedure is based on Prepayments where
82                  as the current procedure is based on actual Payroll Run
83                  itself.
84      Important : The Data archival process is similar to the regular
85                  Payroll Archiver except the Payment related data will be
86                  skipped here as there are no Prepayments executed as part
87                  of Payroll Simulation. All the data gathered during this
88                  procedure is inserted into PAY_SIMULATION_INFORMATION
89                  table autonomously so that the data can be used to
90                  generate the Output, post Database level rollback. Any
91                  information required for generating Output, that will not
92                  be available due to rollback should be captured through
93                  archive_data procedure
94   */
95 
96   PROCEDURE archive_data(p_source_action_id  NUMBER,
97                          p_effective_date    DATE DEFAULT NULL);
98 
99   /* Procedure : generate_xml
100      Purpose   : This procedure is used to generate the XML Data necessary
101                  to generate the Payroll Simulation Output. This procedure
102                  is similar to the current XML generation procedure
103                  PAY_PAYROLL_XML_EXTRACT_PKG.GENERATE.
104      Important : This procedure will be executed by Core Payroll post the
105                  Database level rollback of changes made during Payroll
106                  Simulation run. Hence any information required for
107                  generating Output, that will not be available due to
108                  rollback should be captured through archive_data procedure
109                  and saved autonomously to PAY_SIMULATION_INFORMATION table
110                  Parameter p_xml_code is to allow the Customers the ability
111                  to use Custom XML Code. This is hidden from Customers as
112                  of now and will be enabled if required in future. The
113                  entire code to support Custom XML Code is already in
114                  place. We need to add the Segment to input Custom XML Code
115                  details at Business Group and Organization Level in "Self
116                  Service Preference". The Segment name should be "Payroll
117                  Simulator XML Code".
118   */
119 
120   PROCEDURE generate_xml(p_assignment_id IN  NUMBER,
121                          p_xml_code      IN  VARCHAR2 DEFAULT NULL,
122                          p_xml           OUT NOCOPY BLOB);
123 
124   /* Procedure : get_profile
125      Purpose   : This procedure is used to indicate the Profile Options to
126                  be populated corresponding to the Flexfield Context
127                  segments. Core Payroll uses this procedure to get the
128                  PL/SQL table loaded with Profile Options and corresponding
129                  Flexfield segments for each Flexfield Context.
130      Important : It is necessary to update this procedure when ever we need
131                  value selected in Flexfield Segment to be set as Profile
132                  Option. Using the Profile Option, we can access the value
133                  chosen in one Flexfield context in other context.
134   */
135 
136   PROCEDURE get_profile(p_flex_context_code IN VARCHAR2,
137                         p_profile_tab       IN OUT NOCOPY PAY_SIMULATION_PROFILE_TAB);
138 
139   /* Procedure : is_entries_affected
140      Purpose   : This procedure is used to indicate if the change in a
141                  particular Flexfield segment can affect the Element
142                  entries. Core Payroll calls this procedure when ever
143                  change happens to the Flexfield Segments on Payroll
144                  Simulator Page. If this Function returns 'true', then
145                  Core Payroll will refresh the Earnings and Deductions
146                  section so that the Element entries can be populated as
147                  per the new Eligibility criteria.
148      Important : As of now, for US Localization we have "Work Location"
149                  Segment which can affect Element entries and which
150                  requires Element entries refresh if altered. If in future
151                  any more such Segments are added, this function needs to
152                  be updated accordingly.
153   */
154 
155   FUNCTION is_entries_affected(p_flex_context_code VARCHAR2,
156                                p_segment_name      VARCHAR2)
157   RETURN VARCHAR2;
158 
159   /* Procedure : get_run_type_id
160      Purpose   : This function is used to determine the Run Type ID
161                  corresponding to the type of run that Core Payroll should
162                  use to initiate the Simulation Run.
163      Important :
164   */
165 
166   FUNCTION get_run_type_id
167   RETURN NUMBER;
168 
169   /* Procedure : get_context_refresh
170      Purpose   : This procedure is used to indicate if the change in a
171                  particular Flexfield segment can affect the other
172                  regions or requires page reloaded. Core Payroll calls
173                  this procedure when ever change happens to the Flexfield
174                  Segments on Payroll Simulator Page. If this Procedure
175                  returns 'true' for any context, then Core Payroll will
176                  refresh the page and reloads the particular context
177                  clearing all the details in that context
178      Important : As of now, for US Localization we have "Work Location"
179                  Segment which can affect Element entries and which
180                  requires Element entries refresh if altered. For "Resident
181                  State" Change, the "Tax Withholding Details" needs to be
182                  refreshed and the page needs to be reloaded.
183   */
184 
185   PROCEDURE get_context_refresh(p_flex_context_code VARCHAR2,
186                                 p_segment_name      VARCHAR2,
187                                 p_flex1_context     IN OUT NOCOPY VARCHAR2 ,
188                                 p_flex2_context     IN OUT NOCOPY VARCHAR2 ,
189                                 p_flex3_context     IN OUT NOCOPY VARCHAR2 ,
190                                 p_flex4_context     IN OUT NOCOPY VARCHAR2);
191 
192 END pay_us_simulation;