SAP ABAP IMG Activity OHPSUSSICK91 (BAdI: Determine Full-Time Employees)
Hierarchy
SAP_HRCUS (Software Component) Sub component SAP_HRCUS of SAP_HR
   PY-US-PS (Application Component) Öffentlicher Dienst
     P10P1 (Package) HR Public Sector USA
IMG Activity
ID OHPSUSSICK91 BAdI: Determine Full-Time Employees  
Transaction Code S_AC0_52000408   (empty) 
Created on 20050119    
Customizing Attributes OHPSUSSICK91   BAdI: Determine Full-Time Employees 
Customizing Activity OHPSUSSICK91   BAdI: Determine Full-Time Employees 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name HRPBSUSAD01    

Use

This step describes how to use the optional Business Add-In (BAdI) HRPBSUSAD01, either with new implementations that reflect customer-specific enhancements, or with the standard implementation delivered by SAP. The purpose of this BAdI is to enable customers to decide how the system will determine whether employees work on a full-time basis. Because each organization uses its own rules to determine whether employees work on a full-time or part-time basis, SAP delivers this BAdI to give customers a flexible method of deciding how this determination will be made.

In most cases, customers choose the Part-time employee checkbox (field P0007-TEILK) on the Planned Working Time infotype (0007) to indicate that an employee works on a part-time basis; for full-time employees, this checkbox is not active. However, because some customers prefer not to use that field for this purpose, they can implement this BAdI as they wish to decide how the system will make this determination.

Requirements

Standard settings

SAP delivers the default implementation HRPBSUSAD01 with this BAdI; it reads the Planned Working Time infotype (0007).

Activities

  1. Execute this IMG step.
  2. In the subsequent dialog box, choose Create. (Alternatively, if you have already used this BAdI to create other implementations, choose an existing implementation from the dialog box, then Edit. The remainder of the documentation for this activity describes the steps to be performed when you create a new implementation.)
  3. Enter a name for the BAdI implementation you wish to create, then choose Continue.
  4. On the subsequent screen, enter the Implementation Short Text.
  5. From the tab index, choose Interface. Here, the Name of implementing class field is already populated, because the system automatically assigned this class to the implementation when you named it.
  6. Save your entries, then assign the implementation to a development class.
  7. Place the cursor on the method, then double-click to initiate method processing.
  8. Enter the code for the implementation between the statements method <Interface name> ~ <Name of method> and endmethod.
  9. Save and implement your code.
  10. Return to the Edit Implementation screen, then save your entries.
  11. If you wish to activate the implementation you have created at a later date, then exit the Edit Implementation screen without activating the implementation. Otherwise, choose Activate from this screen to activate the implementation for immediate use.

Once you have completed these activities, the source code that you stored in the method will be run when the associated application is executed.

Further notes

Example

Customers who use the Planned Working Time infotype (0007) to differentiate their full-time and part-time employees may implement the method check_employee_full_time as demonstrated below; this method reflects the standard implementation of this BAdI. By referring to this method, you can discern how the system determines whether an employee is full-time and how it responds to this determination.

METHOD if_ex_hrpbsusad01~check_employee_full_time.

DATA: a_read_infotype TYPE REF TO if_hrpa_read_infotype.
DATA: seltab TYPE hrpad_prelp_tab,
seltab_wa TYPE prelp,
sel_p0007 TYPE p0007,
data_exists TYPE boole_d.

CALL METHOD cl_hrpa_masterdata_factory=>get_read_infotype
IMPORTING
read_infotype = a_read_infotype.

CALL METHOD a_read_infotype->read
EXPORTING
tclas = 'A'
pernr = pernr
infty = '0007'
begda = begda
endda = endda
no_auth_check = 'X'
IMPORTING
infotype_tab = seltab
data_exists = data_exists.

IF data_exists EQ 'X'.
LOOP AT seltab INTO seltab_wa.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = seltab_wa
IMPORTING
pnnnn = sel_p0007.
IF sel_p0007-teilk = 'X'.
full_time = ' '.
RETURN.
ENDIF.
ENDLOOP.
full_time = 'X'.
ELSE.
full_time = ' ' .
ENDIF.

ENDMETHOD.

Recommendation

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency I   Valid for countries specified 
Customizing Attributes Country Key Country Name
OHPSUSSICK91 US USA
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20050218 
SAP Release Created in 600