Ansicht
Dokumentation

HRBRAS_WORKING_TIME - BAdI: Determine Employee Working Time and Position

HRBRAS_WORKING_TIME - BAdI: Determine Employee Working Time and Position

CPI1466 during Backup   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

You use this Business Add-In (BAdI) to override the standard formula for calculating the effective staffing percentage of an employee.

The effective staffing percentage is an attribute for a person and describes the percentage with which an employee occupies a position, based on their working time.

In the standard delivery, you calculate the effective staffing percentage according to the following formula:

IT0007-EMPTY x IT 1001-PROZT ÷ IT1011-CPROZT

Meanings here:

IT0007-EMPTY: Employment percentage, defined in the infotype Planned working time (IT0007)

IT 1001-PROZT: Staffing percentage, defined in the Relationships infotype (IT 1001)

IT1011-CPROZT: Weighting Percentage, calculated in the Working Time infotype (IT1011)

The standard SAP delivery also includes the BAdI Implementation Read Working Time of Employee using Infotype (BSGRD) (HRBAS_EMPL_WORKTIME_0008). The BAdI is inactive. After the BAdI has been activated, it overrides the standard formula by calculating the effective staffing percentage using the Capacity Utilization Level (infotype Basic Pay (IT 0008)) as follows:

IT0008-BSGRD x IT 1001-PROZT ÷ IT1011-CPROZT

If none of the calculation formulas lead to the desired result, you can use a customer-specific BAdI implementation to define your own calculation formula.

The interface IF_HRBAS_WORKING_TIME provides the following methods for this purpose:

  • Define Employee Working Time (GET_EMPLOYEE_WORKING_TIME)
  • Define Position Working Time (GET_POSITION_WORKING_TIME)

For more information about the effective staffing percentage, see SAP Note 2116998.

In the standard delivery, the system uses the formula described above to calculate the effective staffing percentage. The implementation HRBAS_EMPL_WORKTIME_0008 is not active.

If required, activate BAdI implementation HRBAS_EMPL_WORKTIME_0008 or create and activate your own BAdI implementation.

The examples are based on the following specifications.

The following values for the default working time of a position are defined in table T77S0 in Customizing.

Group Name Semantic Abbreviation Value
WORKT DAILY 800
WORKT DAYWK 500

The following weekly working hours have been defined for the secretarial position and the customer service position

Secretarial position

T1011-WKAVG = 40 Hours/Week => IT1011-CPROZT = 100%

Customer Service

IT1011-WKAVG = 20 Hours/Week => IT1011-CPROZT = 50%

Meanings here: IT1011-WKAVG: Number of Hours per Week

Example 1: Work schedule rule 'full-time':

To calculate the effective staffing percentage, the system uses the employment percentage from the infotype Planned Working Type (IT0007).

The work schedule rule VOLL means a weekly working time of 40 hours (T508A-WOSTD).

Ms. Smith works 20 hours per week (IT0007-WOSTD) according to infotype 0007.

For 40% of the time Ms. Smith works in a secretarial position and for 60% of the time she works in customer service.

This results in the following values:

  • IT0007-WOSTD: 20 Hours/Week
  • IT0007-EMPTY: 50% (IT0007-EMPTY = IT0007-WOSTD ÷ T508A-WOSTD)
  • IT 1001-PROZT: 40% for the secretarial position
  • IT 1001-PROZT: 60% for the customer service position
  • IT1011-CPROZT: 100% for the secretarial position
  • IT1011-CPROZT: 50% for the customer service position

If you use the standard calculation formula, this results in the following effective staffing percentages for Ms. Smith:

Position Formula Staffing Percentage
Secretarial position 50*40/100 20%
Customer Service 50*60/50 60%

Example 2: The work schedule rule 'part-time'

Ms. Mayer works part-time. Ms. Smith works 20 hours per week (IT0007-WOSTD) according to infotype 0007. The work schedule rule TEIL means a weekly working time of 20 hours (T508A-WOSTD).

For 40% of the time Ms. Mayer works in a secretarial position and for 60% of the time she works in customer service.

This results in the following values:

  • IT0007-WOSTD: 20 Hours/Week
  • IT0007-EMPTY: 100% ! (IT0007-EMPTY = IT0007-WOSTD ÷ T508A-WOSTD)
  • IT0008-BSGRD: 50%
  • IT 1001-PROZT: 60% for the secretarial position
  • IT 1001-PROZT: 40% for the customer service position
  • IT1011-CPROZT: 100% for the secretarial position
  • IT1011-CPROZT: 50% for the customer service position

If you use the standard calculation formula (IT0007-EMPTY), this results in the following effective staffing percentages for Ms. Mayer:

Position Formula Staffing Percentage
Secretarial position 100*40/100 40%
Customer Service 100*60/50 120%

If the capacity utilization level of an employee in the IT0007-EMPTY field is determined based on the work schedule rule (in the example, this is a part-time work schedule rule) but not on the standard agreed working time of a full-time employee, then the calculation of the effective staffing percentage of an employee does NOT deliver the expected values (based on the standard formula IT0007-EMPTY).

In this case in particular, values of more then 100% might be displayed when you use the standard formula based on IT0007-EMPTY.

In the Capacity Utilization Level field in IT0008, however, the employee's actual working time is put in proportion with the standard working time of a full-time employee. This means that the IT0008-BSGRD field in this example contains the value 50%,

When calculating the BAdI implementation Working Time of Employee Using Infotype 0008 (BSGRD), these are the resulting values:






General Material Data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 9015 Date: 20240523 Time: 220111     sap01-206 ( 71 ms )
Position Formula Staffing Percentage
Secretarial position 50*40/100 20%
Customer Service 50*60/50 60%