Programme SAP RPUCTPM0 - Generation of Transfer Dates for Special Payroll

Description
Relevance to the payroll process:
If you run payroll, that is program RPCALCx0 or HxxCALC0, the payrollarea is transferred as a selection parameter and the current payrollperiod is determined from the control record. If validation of thecontrol record is not active in the schema in a test system, you mustalso specify the payroll period and the year on the selection screen.These two parameters, the payroll area and the payroll period, must nowbe used to determine the actual date of the period. The infotypes areread, for example, based on the actual date of the payroll period.
The actual date is determined using the information in the followingtables:
In T549A, a period parameter and a date modifier is assigned to eachpayroll area. The period parameter determines whether you run payrollmonthly, twice monthly, weekly, or every few weeks. You can choosewhich values are selected for the parameter, with one exception; 01 ispredefined for monthly periods. Each period parameter you use must beassigned to a time unit in table T549R. The values for the time unitsare fixed (monthly, twice monthly, weekly, every two weeks, every fourweeks, annually).
Table T549Q must contain the start and end dates for each periodparameter for all payroll periods.
In addition, table T549S must contain one or more date specificationsfor all payroll periods. The date specifications are distinguished bydate identifiers (date ID). In each case, the date ID 01 represents thepayday of the payroll period.
As a minimum requirement, you must have maintained this date for eachpayroll period.
You use program RPUCTP00 to generate the entries in table T549Q andT549S automatically. Depending on the period parameter, the programdetermines all periods that fall within the specified time interval,with start and end dates. The payday is also determined, using a rulethat you also enter as a parameter.
The tables T549Q and T549S are extended to include these entries: inT549Q the new periods are inserted with their start and end dates andin T549S the payday, with the date identifier 01, is generated for eachperiod.
If you run the program, you must enter the following parameters on theselection screen:
User parameter for the country grouping, if this has not already beenmaintained. If you do not enter a value, the program terminates.
Period parameter and date identifier: Modifiers for the payroll periodsfor which table entries are being generated.
Start date: Date on which the first period to be generated begins. Fora monthly period parameter, this is normally the first day of themonth. You can specify any other date, however, which applies inparticular for weekly periods.
Final year: Entries are generated up to the last period in the year youspecify here.
Start of tax year: This parameter specifies the day of the year onwhich the tax year begins. For the majority of country groupings, 0101is proposed as the default value because January 1 is the most usualdate. For Great Britain, 0406 is proposed because the tax year beginson April 6. In South Africa the tax year begins on March 1, in NewZealand on April 1, and in Australia on July 1. These values are alsoproposed as defaults.
Payday rule, Number of days: These fields determine how the payday forthe period is calculated. You can choose from the following paydayrules:
"1" : The number of days is added to the start date of the period.
"2" : The number of days is deducted from the end date of the period.
"3" : The number of days is added to the end date of the period.
"4" : For monthly periods only. The number of days represents thecalendar date for the payday.
Tax year identification: This parameter is only displayed for GreatBritain. The tax year continues after the start of a new calendar year,which means you must specify whether the first or second calendar yearidentifies the payroll period. You can enter one of the following:
"1" : The first year is used for identification
"2" : The second year is used for identification
For more information, see the field help for this parameter on theselection screen.
Determine period number: You can use this field to determine which datein the payroll period is used to calculate the period number. You canenter one of the following:
" " = Period number is determined according to date of payday
"1" = Period number is determined according to START date of period
"2" : Period number is determined according to END date of period
These three alternatives produce particularly different results if thethe payday falls outside the payroll period. Example: The monthlyperiod begins on 01.01.1996 and ends on 31.01.1996, and the paydayfalls three days after the end date, on 03.02.1996. If the periodnumber is determined based on the payday, the period is assigned number02 because the payday is in February, that is in the second month. Ifthe start or end date of the period is used to calculate the periodnumber, number 01 is assigned.
Carry out table change: The tables are only extended to include the newentries if you select this option. Otherwise the program performs atest run.
To ensure the complete maintenance of tables T549Q and T549S, theprogram must be run once for each combination of period parameter anddate modifier in table T549A and, optimally, for a few years inadvance. Since the majority of countries only use monthly periods, theperiod parameter 01 and the date modifier 00 are proposed as defaultvalues. You must only run the program once for these countries.
The views V_T549A, V_T549Q, V_T549S, and V_T549R exist for thesetables. You can call them using transaction SM30.

Precondition
All the payroll areas used in payroll must be entered in table T549Aand assigned a period parameter and date modifier.
Each period parameter you use must be entered in table T549R, whichenables it to be assigned a time unit.

Output
For the modifiers entered as selection parameters, the programgenerates one entry in tables T549Q and T549S for each period in theselected time interval. T549Q stores the start and end dates of theperiods. T549S stores the payday of the period.
The output list displays the new, generated date specifications for thepayroll periods.
If you do not select the option for carrying out the table change, theoutput list is displayed but the new entries are not inserted in tablesT549Q and T549S.

Example
You want to generate payroll periods for the years 1995 to 1999 forperiod parameter 01 (monthly) and date modifier 00. You want the paydayto fall 3 days before the end of the period and the period number to becalculated based on the end date of the period.
You must enter the following data for the parameters:
Period parameter 01
Date modifier 00
Start date 01.01.1995
Final year 1999
Start of tax year 0101
Payday rule 2
Number of days 3
Determine period number 2