Sunteți pe pagina 1din 5

Understanding Skip Rule

Understanding An Element Skip Rule and Stop Recurring Rule (Doc ID 135954.1)

Payroll Run Process: Understanding An Element Skip Rule and Stop Recurring Rule
Payroll Run Process Overview

The Payroll Run process calculates an employee assignments gross to net payment. Payroll actions are created in the process to represent each payroll run. Assignments that have payroll actions performed on them are identified by an assignment action. Run results values are the results from processing each element for an assignment. These individual results are accumulated into balances that summarize gross to net. The Payroll Run has to cope with many different conditions when processing entries. This paper will discuss the skipping of element entry processing and the date effective delete of element processing.
Element Skip Rule

Element Skip Rules allow you to define specific formula criteria to determine whether an element entry should be processed. This functionality is particularly important if your payroll policies require periodic or conditional processing of an element. Only one Element Skip Rule can be associated with each element. Skip rules are defined as formulas through the Formulas window, which is form FFXXWMNG. Navigate as follows: US HRMS Manager: Compensation & Benefits > Write Formulas 1. The formula type is Element Skip. 2. The formula must set and return a local variable of type text. and this variable must be called skip_flag. If the return value of this variable begins with the letter y (such as Yes), all processing for the element is skipped. Example: IF earnings_balance > 5000 THEN skip_flag = yes ELSE skip_flag = no RETURN skip_flag.
Additional notes on Element Skip rules:

1. You select a skip rule or change an existing skip rule for the element in the Skip Rule field on the Element Description form. This form is PAYWSDET. The user navigation is as follows:

US HRMS Manager: Compensation & Benefits > Element Description. 2. Element skip rules must be defined before the element that uses them else they wont appear in LOV (list of values) for the Skip Rule field. 3. If a skip rule shows that an element entry must be skipped, any target of the skipped element must not be processed. 4. You cannot return a message from a skip rule. The skip functionality looks only for the value of skip_flag that is returned.
Analysis of the seeded skip formula SICK_SKIP

The seeded formula SICK_SKIP code is as follows: DEFAULT FOR USER_ENTERED_TIME IS 'N' already_processed = CONSUMED_ENTRY() IF already_processed = 'Y' THEN ( SKIP_FLAG = 'Y' mesg = 'Skipped Sick Pay, already processed this period.' RETURN SKIP_FLAG ) sick_hours_taken = accrual_time_taken('S') IF sick_hours_taken <> 0 AND USER_ENTERED_TIME = 'Y' THEN SKIP_FLAG = 'N' ELSE SKIP_FLAG = 'Y' RETURN SKIP_FLAG This formula does the following: 1. Calls the function CONSUMED_ENTRY to determine if the element has already been processed via a prior payroll run process for the current pay period. 2. If this element was already processed, set the variable SKIP_FLAG to a value of Y and return. Note that the mesg variable will be ignored. 3. Derive sick_hours_taken by calling function accrual_time_taken. 4. If sick_hour_taken not equal to zero and the database item USER_ENTERED_TIME had a value of Y then set SKIP_FLAG to a value of N else, if these conditions are not met, set SKIP_FLAG to a value of Y and return.
Troubleshooting Skip Rule Tip.

The skipped element entry will not show up when viewing the assignments run results. Identifying an Elements Skip Formula

select pet.element_type_id, pet.element_name, pet.formula_id, ff.formula_name from pay_element_types_f pet, ff_formulas_f ff where pet.element_name like '%&ELEMENT_NAME%' and ff.formula_id = pet.formula_id;

Stop Recurring Rule Following the execution of a formula, the Payroll Run process loops through any returns results, processing them as required by the formula results rules. It looks for a formula result rule name that matches the formula result that has been returned. Formula Results Rules are defined through the Formula Results Rules window, which is form PAYWSDFR. Navigate as follows: US HRMS Manager: Compensation & Benefits > Formula Results There are several types of result rule and one of these is the Stop Recurring Rule. A local variable stop flag is returned from the formula. The Payroll Run calls a PL/SQL procedure to find the appropriate element entry to stop. This procedure then performs a date effective delete. That is, an end date is put on the recurring element entry for the formulas element or another element, to stop processing of the entry after the end date. This functionality is used to perform functions such as final pay processing or ending a deduction with an amount taken limit. Example: The following code is in the formula: IF my_balance > 100 THEN ( STOP_ENTRY = 'Y' mesg = '<Element Name> entry has been stopped.' ) RETURN item01, item02, item03, STOP_ENTRY, mesg

The following rule is in the formula results block in form PAYWSDFR:

Name: STOP_ENTRY Type: Stop Element: <Element Name>

Sample STOP_ENTRY Code in a Recurring Earning /* ===== Final Pay Section Begin ===== */ /* Checks both normal case where regular run is being processed, and also the case where some earnings are being processed in a separate check or special processing run during final pay - ie. FINAL_PAY_PROCESSED = 'Y'. */ IF (TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'N') OR (TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'Y' AND RUN_TYPE != 'R') THEN (STOP_ENTRY = 'Y' mesg = '<Element Name> earning has been stopped for this assignment.' ) /* ===== Final Pay Section End ===== */ /* ===== Returns Section Begin ===== */ if (1 = 1) then ( soe_run = <Element Name>_ASG_GRE_RUN soe_ytd = <Element Name>_ASG_GRE_YTD ) RETURN flat_amount, clear_addl_amt, clear_repl_amt, neg_earn, STOP_ENTRY, mesg /* ===== Returns Section End ===== */

Code Explanation If this is a terminated employee and final pay has not been processed or if this is a terminated employee, final pay has been processed and this is not a regular payroll run then: 1. Set STOP_ENTRY to a value of Y 2. generate a meaningful message 3. return

Note that the Formula Results Rules will specify which element is end dated.
Troubleshooting Stop Recurring Rule Tips.

Locate each STOP_ENTRY in a particular formula, note its message and match it with any message produced at the assignment level during the Payroll Run Process. Please note that although the seeded formulas use the variable name STOP_ENTRY by

convention, any local variable name returned with a Formula Results Type of Stop with end date the specified element.

Sample STOP_ENTRY Code in a Recurring Deduction with a Limit /* ===== Stop Rule Section Begin ===== */ IF Total_Owed WAS NOT DEFAULTED THEN IF Towards_Owed = 'Y' THEN /* Put towards total owed - ie reduce declining balance */ (total_accrued = dedn_amt + <element Name>_ACCRUED_ASG_ITD IF total_accrued >= Total_Owed THEN (dedn_amt = Total_Owed - <element Name>_ACCRUED_ASG_ITD /* The total has been reached - the return will stop the entry under these conditions. Also, zero out Accrued balance. */ to_total_owed = -1 * <Element Name>_ACCRUED_ASG_ITD STOP_ENTRY = 'Y' mesg = <Element Name> entry has been stopped.' ) ELSE /* Total Owed not reached yet. */ to_total_owed = dedn_amt )

Code Explanation If the following conditions are true: 1. The total_owed element input value was populated with a value 2. The towards_owed element input value = Y 3. The amount of the deduction taken previously plus the current deduction amount is greater than or equal to the amount in the total_owed input value Then do the following: 1. Reinitialized the balance holding the accumulation of previously taken deduction amounts to zero by multiplying the current balance value by its reciprocal and feeding that amount into the balance as an indirect result. 2. Set the flag STOP_ENTRY to a value of Y 3. Generate a meaningful message.

S-ar putea să vă placă și