Ansicht
Dokumentation

OHFBNTL07 - BAdI: Enhancement for GB FlexBens Holiday Time Unit Conversion

OHFBNTL07 - BAdI: Enhancement for GB FlexBens Holiday Time Unit Conversion

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

The GB FlexBens Holiday Plan currently uses the same time unit (hour or day) for each holiday plan. This means that if your holiday quotas are stored in days, the plan options must also stored in days. Likewise, thecost calculation must also be in days. You may wish to remove this current restriction.

The SAP-delivered Business Add-In (BAdI) PFBN0005 is used in Flexible Benefits for Great Britain (PA-BN-FB-GB) for the HolidayPlan time unit conversion. This BAdI enables you to implement your own rule to convert the time unit of a plan option and holiday quota when the plan option and the holiday quota use differenttime units.

(BAdI) PFBN0005 therefore allows you to implement your own rule for timeunit conversion within holiday plans.

This BAdI is called each time the quantity of holiday buying/selling is read from Table T74_FBN04. The calling of this BadI is filtered according to calculation character FBN_CHARC, which has the following fixed values:

  • Holiday Quota:,,1
  • Cost Calculation:,,2
  • Report:,,,,3
  • Plan Option:,,,,4

Within the method CONV_OPTION_TIMEUNIT, the calculation character FBN_CHARC indicates which program reads the quantity of holiday buying/selling (Table T74_FBN04). You can determine whether a time unit conversion is required.

  • The standard implementation HR_FBN_CONV_DAY_HOUR is delivered for this BAdI.
  • This BAdI is filter-dependent, according to the calculation character FBN_CHARC .
  • This BAdI is not reusable.

After you have called the IMG activity, proceed as follows:

  1. In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. Choose the tab Interface.
The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. Save on the screen Change Implementation.
Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.

In your organisation, the holiday quota is calculated and stored in hours. However, you wish to give all employees in your organisation the option to purchase 1-5 days holiday. You therefore implement BAdI PFBN0005 to enable the system to calculate how many hours an employee purchases, based on their weekly hours and percentage employed and your own calculation formula. The holiday quota values are then updated dynamically with the number of hours purchased.

In the standard implementation HR_FBN_CONV_DAY_HOUR, the calculation formula is as below, for an employee buying 1-5 days holiday:

,,1 day = [Weekly Working Hours / 5] * 1 * [Percentage Employment /100]

,,2 days = [Weekly Working Hours / 5] * 2 * [Percentage Employment /100]

,,3 days = [Weekly Working Hours / 5] * 3 * [Percentage Employment /100]

,,4 days = [Weekly Working Hours / 5] * 4 * [Percentage Employment /100]

,,5 days = [Weekly Working Hours / 5] * 5 * [Percentage Employment /100]

Note:

  • Weekly Working Hours are read from P0007-WOSTD
  • Percentage Employment value is read from P0007-EMPCT

For example, an employee works 38 hours per week and his percentage employment is 45%. He buys four days holiday. BAdI PFBN0005 converts the four bought days into hours according to the above formula.

The result is that 13.68 hours will be added to his holiday quota.






BAL_S_LOG - Application Log: Log header data   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 5631 Date: 20240606 Time: 095107     sap01-206 ( 89 ms )