SAP ABAP IMG Activity OHFBNTL07 (BAdI: Enhancement for GB FlexBens Holiday Time Unit Conversion)
Hierarchy
EA-HRCGB (Software Component) Sub component EA-HRCGB of EA-HR
   PA-BN-FB-XX (Application Component) General Parts
     PAOC_BEN_FBN (Package) Flexible Benefits System
IMG Activity
ID OHFBNTL07 BAdI: Enhancement for GB FlexBens Holiday Time Unit Conversion  
Transaction Code S_AEN_10000215   (empty) 
Created on 20041223    
Customizing Attributes OHFBNTL07   BAdI: Enhancement for GB FlexBens Holiday Time Unit Conversion 
Customizing Activity OHFBNTL07   BAdI: Enhancement for GB FlexBens Holiday Time Unit Conversion 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name PFBN0005    

Use

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 different time 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.

Requirements

Standard settings

  • 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.

Activities

After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.

If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:

  1. In the dialog box, enter a name for the implementation of the Add-In and choose Create.
    The system displays the initial screen for creating Business Add-In implementations.
  2. On this screen, enter a short description for your implementation in the Implementation Short Text field.
  3. If you choose the Interface tab, you will notice that the system has populated the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.
  4. Save your entries and assign the Add-In to a package.
  5. To edit a method, double-click its name.
  6. Enter your implementation code between the method <Interface Name>~<Name of Method>. and endmethod. statements.
  7. Save and activate your code. Navigate back to the Change Implementation screen.
    Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not perform the following step:
  8. Choose Activate.
    When the application program is executed, the code you created is run through.

Example

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.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 1   Critical 
Country-Dependency I   Valid for countries specified 
Customizing Attributes Country Key Country Name
OHFBNTL07 GB United Kingdom
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20041223 
SAP Release Created in