DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PROC_ENVIRONMENT_PKG

Source


1 package body pay_proc_environment_pkg as
2 /* $Header: pycopenv.pkb 120.3.12010000.1 2008/07/27 22:22:46 appldev ship $ */
3 --
4 /*
5    update_pop_action_status
6 
7    This procedure updates the action population then issues a commit.
8 */
9 procedure update_pop_action_status(p_payroll_action_id in number,
10                                    p_status in varchar2)
11 is
12 begin
13 --
14    UPDATE PAY_PAYROLL_ACTIONS PAC
15    SET    PAC.ACTION_POPULATION_STATUS = p_status,
16           PAC.LAST_UPDATE_DATE         = SYSDATE,
17           PAC.LAST_UPDATED_BY          = g_user_id,
18           PAC.LAST_UPDATE_LOGIN        = g_login_id
19    WHERE  PAC.PAYROLL_ACTION_ID        = p_payroll_action_id;
20 --
21    commit;
22 --
23 end update_pop_action_status;
24 --
25 /*
26    initialise_proc_env
27 
28    Initialise the process env.
29 */
30 procedure initialise_proc_env
31 is
32 begin
33 --
34    process_env_type := TRUE;
35 --
36    /* need to setup the trace options */
37 --
38    if (instr(pay_proc_environment_pkg.logging_category,
39              pay_proc_logging.PY_INTRSQL) <> 0) then
40 --
41      if (instr(pay_proc_environment_pkg.logging_category,
42              pay_proc_logging.PY_HRTRACE) <> 0) then
43 --
44         hr_utility.trace_on;
45         hr_utility.set_trace_options('TRACE_DEST:PAY_LOG');
46 --
47      end if;
48 --
49      pay_proc_logging.init_logging;
50 --
51    end if;
52 
53    if (instr(pay_proc_environment_pkg.logging_category,
54              pay_proc_logging.PY_FORMULA) <> 0)
55    then
56      pay_proc_logging.init_form_logging;
57    end if;
58 
59 
60 --
61 end initialise_proc_env;
62 --
63 /*
64    deinitialise_proc_env
65 
66    Deinitialise the process env.
67 */
68 procedure deinitialise_proc_env
69 is
70 begin
71 --
72    /* need to setup the trace options */
73 --
74    if (instr(pay_proc_environment_pkg.logging_category,
75              pay_proc_logging.PY_INTRSQL) <> 0) then
76 --
77      hr_utility.trace_off;
78      pay_proc_logging.deinit_logging;
79 --
80    end if;
81 --
82    if (instr(pay_proc_environment_pkg.logging_category,
83              pay_proc_logging.PY_FORMULA) <> 0)
84    then
85      pay_proc_logging.deinit_form_logging;
86    end if;
87 
88    process_env_type := FALSE;
89 --
90 end deinitialise_proc_env;
91 --
92 /*
93    get_pactid
94 
95    Returns the environment pactid
96 
97    This looks like a strange procedure, but its need to workaround
98    and RDBMS issue on referening PL/SQL variables in SQL statements
99 */
100 function get_pactid return number
101 is
102 begin
103    return pactid;
104 end get_pactid;
105 --
106 begin
107    logging_level := 0;
108    logging_category := '';
109    process_env_type := FALSE;
110 end pay_proc_environment_pkg;