Wednesday 26 December 2012

T&L Prior Period Access (PPA)

I recently had an issue where group leaders couldn't modify historic sessions, which they couldn't originally edit due to Christmas shutdown. Bah humbug!

In PeopleSoft the ability to amend old sessions is governed by the members row security class and the T&L Operator Security table TL_OPR_SECURITY.

The following SQL can be used to detemine the row security classes that operators, without unlimited access, have to give them Prior Period Access to specified sessions.
select distinct OPD.ROWSECCLASS,
                OPS.PPA_ACCESS,
                OPS.PPA_ALLOW
  from PSROLEUSER_VW      RUSR,
       PSOPRDEFN          OPD,
       PS_TL_OPR_SECURITY OPS
 where RUSR.OPRID     in ( select distinct OPRID
                             from PS_TL_RAPID_HEADER
                            where DESCR like 'MF%-12-2012%')
   and RUSR.OPRID       = OPD.OPRID
   and OPD.ROWSECCLASS  = OPS.ROWSECCLASS
   and OPS.PPA_ALLOW   != 0

Just change the DESCR like statement as per the sessions you want to check.

If there aren't too many permission lists you could manually change them at: -

Home > Setup HRMS > Time and Labor Security > TL Permission List Security

Modifying the Days Grace Allowed as required.

Alternatively you could do so by the back end with SQL along the lines of: -
update PS_TL_OPR_SECURITY OPR
   set PPA_ALLOW = 20
 where ROWSECCLASS in ( 'DPG542C1',
                        'DPG723A1'
                        ...
                        'DPE13001',
                        'DPA130Z1' )

With the row security permission lists being the ones you identified with the first SQL.
In this example I've set the allowed days to be 20, if you want to give them unlimited access set it to zero.

Before updating remember to dump out the original values first so you can set them back after the users have finished doing what they need to do with the sessions.

Thursday 29 November 2012

Rounding

If you want to round up or down in Oracle use one of the following: -

select 3.14159,
       ROUND(3.14159,2)       as ROUNDED,
       CEIL(3.14159*100)/100  as ROUNDED_UP,
       FLOOR(3.14159*100)/100 as ROUNDED_DOWN
 from DUAL

Replacing 2 in the first example with the number of decimal places you want to round to, and 100 in the other examples with 10 to the power of the  number of decimal places you want to round up or down to.

Friday 10 August 2012

Reccomended Application Engine Debug Settings

Open the PROCESS and go to the Override Options tab. Set Parameter List to Append and enter the following for it.

-TRACE 3 -TOOLSTRACE 3 -TOOLSTRACEPC 2060

Wednesday 27 June 2012

Finding a Time Admin Instance Number

SQL to find the Time Admin instance number for a particular run.
-- -------------------------------------------------------
-- Get the instance number for the Time Admin temp tables
-- prompting for the process instance number.
-- -------------------------------------------------------  
  select '1' as INSTANCE
    from PS_TL_IPT11
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '2' as INSTANCE
    from PS_TL_IPT12
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '3' as INSTANCE
    from PS_TL_IPT13
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '4' as INSTANCE
    from PS_TL_IPT14
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '5' as INSTANCE
    from PS_TL_IPT15
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '6' as INSTANCE
    from PS_TL_IPT16
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '7' as INSTANCE
    from PS_TL_IPT17
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '8' as INSTANCE
    from PS_TL_IPT18
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '9' as INSTANCE
    from PS_TL_IPT19
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '10' as INSTANCE
    from PS_TL_IPT110
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '11' as INSTANCE
    from PS_TL_IPT111
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
union
  select '12'
    from PS_TL_IPT112
   where PROCESS_INSTANCE = :PROCESS_INSTANCE
 union
  select '13' as INSTANCE
    from PS_TL_IPT113
   where PROCESS_INSTANCE = :PROCESS_INSTANCE


Batchman

SQL to determine how many members are in each of the Batches for a Time Admin run. The example shown below is for instance 7. Change this number to be the instance of the run you are interested in.
select batch_num,
           count(*)
   from PS_TL_TA_BATCH7
 group by BATCH_NUM
 order by BATCH_NUM Asc

Note that you can limit the maximum size of a batch from: -

Home > Setup HRMS > Install > Product and Country Specific > Time and Labor Installation

To see which rules are being processed for a particular batch you can use the following SQL: -

select BATCH_NUM,
       RULE_PGM_ID,
       PRIORITY,
       TL_RULE_ID
  from PS_TL_RULE_MAP7
 where BATCH_NUM = :BATCH_NUM
 order by BATCH_NUM,
          PRIORITY
You can use the following SQL to work out the approximate percentage complete of a Time Admin run.

select ROUND( ( ( ( select SUM(BA.END_DT - BA.START_DT)
                      from PS_TL_TA_BATCH7 BA,
                           PS_TL_RULE_MAP7 RM
                    where BA.BATCH_NUM <= :COMPLETED_BATCHES
                      and BA.BATCH_NUM = RM.BATCH_NUM
                  ) /
                  ( select SUM(BA.END_DT - BA.START_DT)
                      from PS_TL_TA_BATCH7 BA,
                           PS_TL_RULE_MAP7 RM
                     where BA.BATCH_NUM = RM.BATCH_NUM
                  ) 
                ) * 100
              ), 2
            ) AS PERCENT_COMPLETE
  from DUAL

What it does is mutiplies the number of employees in the completed batches by the number of rules for each, does the same for the total, divides one by the other, multiplies the result by a 100 and bingo! Not perfect but better than a poke in the eye with a stick to help you work out how much time you need to wait.