Ansicht
Dokumentation

WFA_WR_ADJ_CLOSED_BD - BAdI: Adjustment of Work Rules if Closed On Holiday Is Switched On

WFA_WR_ADJ_CLOSED_BD - BAdI: Adjustment of Work Rules if Closed On Holiday Is Switched On

CPI1466 during Backup   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in Retail Workforce Management.

You can use this BAdI to implement your own algorithm to adjust the work rules and the benefits of an employee if there are one or more holidays in the week under consideration.

The BAdI is called only if the flag Closed on Holiday is set for the location to which the employee is assigned. Additionally, there has to be at least one holiday in the week under consideration. You maintain the flag Closed on Holiday in the general operational settings of the location to indicate whether the system should treat the location as closed on legal holidays by default.

For more information about the standard settings (filters, single or multiple uses), see the Enh. Spot Definitions tab in the BAdI Builder (transaction SE18).

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

In the standard system, the algorithm to adjust the work rules and the benefits of an employee is based on the following logic:

  • The calculation of the average weekly working hours of an employee is based on the employee's work rules:
  • The system calculates the average working time as the mean of the minimum and the maximum working hours, if neither of these two values is initial.

  • If one of them is initial, then the system uses the other one.

  • The maximum number of days an employee can be scheduled per week is also taken from the work rules. If this value is not maintained, the system uses the number of days the employee is generally available in a week without holidays and special operating hours.
  • The system divides the average weekly working hours by the maximum days an employee can be scheduled or is available in a week to get the default value by which the weekly working time has to be reduced for each legal holiday.
  • For each legal holiday, the system checks whether a reduction of the weekly working time is necessary:
  • If the employee is available on 5 or more days, then the reduction of the weekly working time is applied to each holiday on which the location is closed.

  • If the employee is available on 4 days or less, then for each holiday the system additionally checks whether the employee is available on that day. Only if this is the case does the system reduce the weekly working hours.

  • If a holiday is marked as a half-day holiday and the location is open on that day, then the system reduces the weekly working time by half the default value.

For more information, see the BAdI method documentation:

ADJUST_WR_FOR_SOLVER

ADJUST_WR_FOR_SCHED_EXCEPTION

ADJUST_BENEFITS_IN_SCHEDULE

ADJUST_BENEFITS_IN_SCHD_EXCEPT

  • Example 1: An employee has an average weekly working time of 40 hours and he or she can be scheduled for a maximum of 5 days. In the week under consideration, Wednesday and Thursday are holidays and the location is closed on both days. In this case, the working time is reduced by 16 (= 2 * 8) hours.
  • Example 2: An employee has an average weekly working time of 20 hours and he or she can be scheduled for Monday, Tuesday, Thursday, and Friday. In the week under consideration, Wednesday and Thursday are holidays and the location is closed on both days. In this case, the working time is reduced by 5 (= 1 * 5) hours. Since he or she cannot be scheduled for Wednesday, the working time is notreduced even though Wednesday is a holiday.
  • Example 3: Christmas Eve (December 24) is marked as a half-day holiday and the location is open on that day. In this case, the working time for the employee from example 1 is reduced by 4 hours. The working time for the employee from example 2 is reduced by 2.5 hours if the holiday is either on Monday, Tuesday, Thursday, or Friday.





Vendor Master (General Section)   General Material Data  
This documentation is copyright by SAP AG.

Length: 5714 Date: 20240523 Time: 210119     sap01-206 ( 148 ms )