Hierarchy

⤷

⤷

IMG Activity
ID | HRAS_GS_BADI_BASIC | BAdI: Implement Generic Services |
Transaction Code | S_PEN_05000127 | (empty) |
Created on | 20050510 | |
Customizing Attributes | HRAS_GS_BADI_BASIC | BAdI: Implement Generic Services |
Customizing Activity | HRAS_GS_BADI_BASIC | BAdI: Implement Generic Services |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | HRAS_GS_BADI_BASIC |
Use
In this IMG activity, you implement Generic Services. You can implement Generic Services with basic functions and with enhanced functions.
For more information about <(ZK>Generic Services, see the documentation for the IMG activity Define Generic Services for Form Scenarios.
This IMG activity also provides you with an overview of all previously implemented Generic Services. In the IMG activity BAdI: Implement Enhanced Generic Services, you obtain an overview of the Generic Services that were implemented with enhanced functions.
Requirements
You have performed the IMG activity Define Generic Services for Form Scenarios to define the Generic Services you want to use.
Standard settings
Activities
Execute the IMG activity.
The system displays a list with all existing implementations. Each implementation corresponds to a Generic Service. For more information, see the documentation on the following implementations:
- Check Future Date
- Check Date up to Two Months in the Past
- Set Default Value to First Day of Current Payroll Period
- Set Default Value to First Day of Next Payroll Period
- Set Default Value to First Day of Current Month
- Set Default Value to First Day of Next Month
- Set Default Value to Last Day of Current Payroll Period
- Set Default Value to Last Day of Next Payroll Period
- Set Default Value to Last Day of Current Month
- Set Default Value to Last Day of Next Month
You can activate or deactivate these implementations. To be able to use a Generic Service in form scenarios, this must be activated.
Note
There is usually no point in deactivating a Generic Service as this means that you cannot use any of the form scenarios that use this service. Deactivating the service does not mean that a Generic Service cannot be used in new form scenarios.
The implementation of a Generic Service includes the implementation of an enhancement spot and the implementation of a BadI (or two BAdIs). You can use this activity to execute both of these implementations.
Creating a new Generic Service with basic functions (implementation of BAdI HRASR00GEN_SERVICE_BASIC)
If you want to create a new Generic Service, proceed as follows:
- Choose Create Implementation and create a new enhancement implementation.
- Enter a name and a short text for the enhancement implementation.
- In the next dialog window, enter a package for the new enhancement implementation.
- Select the entry for the BAdI HRASR00GEN_SERVICE_BASIC in the list that then appears, and enter a name for the BAdI implementation.
If you already know at this point that you want to create the Generic Service with enhanced functions, you can also select the entry for the BAdI HRASR00GEN_SERVICE_ADVANCED and then enter an (own) implementation name. You can also enhance the Generic Service retroactively (see the section Retroactive enhancement of Generic Service by implementing the BAdI HRASR00GEN_SERVICE_ADVANCED).
- Choose Continue. The system displays the maintenance view for enhancement implementations.
- Select the Enhanced Implement. Elements tab page if this is not already automatically selected.
- Select the newly created implementation of the BAdI in the hierarchy structure (on the left).
- Select the underlying Filter Values node for the selected implementation and create the filter combination as follows: SERVICEID = <Name of Generic Service>. For the <Name of Generic Service> you must enter the exact name under which you have defined the Generic Service in the IMG activity Define Generic Services for Form Scenarios.
- Select the Implementing Class node in the hierarchy structure and enter the name of an ABAP class in which you want to store the implementation. Then implement the class. For more information about implementation, see the documentation for the interface IF_HRASR00GEN_SERVICE_BASIC.
- Select the node of the newly created implementation again in the hierarchy structure (topmost node) and set the Implementation Is Active indicator. Overwrite the description of the implementation with a meaningful text.
- Activate the enhancement implementation using the function Enhancement Implementation -> Activate.
Simultaneous creation of a Generic Service with enhanced functions by implementing the BAdI HRASR00GEN_SERVICE_ADVANCED
If you created the Generic Service with enhanced functions at the same time, proceed as follows:
Perform the following steps:
- Switch to the implementing class of the BAdI HRASR00GEN_SERVICE_BASIC and navigate with the mouse to the ABAP class.
- Then switch to Change mode.
- Switch to the Interfaces tab page and add the interface IF_HRASR00GEN_SERVICE_ADVANCED.
- Activate the class.
- Return to the maintenance view for enhancement implementations.
- For more information about implementation, see the documentation for the interface IF_HRASR00GEN_SERVICE_ADVANCED.
If you have performed these steps, the basic functions and enhanced functions of the Generic Service are implemented in the same ABAP class. This is the recommended procedure. It is not recommended to make the implementations in two different classes (which is technically possible).
Then perform the steps described in the section Creating a new Generic Service (implementation of BAdI HRASR00GEN_SERVICE_BASIC) for the BAdI HRASR00GEN_SERVICE_ADVANCED.
Retroactive enhancement of a Generic Service by implementing the BAdI HRASR00GEN_SERVICE_ADVANCED
A Generic Service that only delivers basic functionality (with the implementation of the BAdI HRASR00GEN_SERVICE_BASIC) can also be enhanced with more functions retroactively (by the additional implementation of the BAdI HRASR00GEN_SERVICE_ADVANCED).
Perform the following steps:
- Switch to the existing enhancement implementation.
- Switch to Change mode.
- Select the Enhanced Implement. Elements tab page.
- Select the implementation of the BAdI in the hierarchy structure (on the left).
- Select the underlying Implementing Class node.
- Navigate with the mouse to the class name in the Class Builder.
- Switch to Change mode.
- Select the Interfaces tab page and add the interface IF_HRASR00GEN_SERVICE_ADVANCED.
- Activate the class.
- Return to the maintenance view for enhancement implementations.
- Select the Enhanced Implement. Elements tab page.
- Choose Create Implementation and create a new enhancement implementation.
- Enter HRASR00GEN_SERVICE_ADVANCED as the BAdI definition.
- For Implementing Class, enter the class with which you enhanced the interface IF_HRASR00GEN_SERVICE_ADVANCED.
- Enter a name (and a short text if necessary) for the BAdI implementation and save your entries.
- Select the implementation that you just created of the BAdI HRASR00GEN_SERVICE_ADVANCED in the hierarchy structure.
- Select the underlying Filter Values node and create the filter combination as follows: SERVICEID = <Name of Generic Service>. For <Name of Generic Service>, you must enter the exact name that you have also chosen for the BAdI HRASR00GEN_SERVICE_BASIC.
- Select the underlying node for the selected implementation, navigate to the implementing class, and enhance the Generic Service by implementing the method of the interface IF_HRASR00GEN_SERVICE_ADVANCED.
- Select the node of the newly created implementation again in the hierarchy structure and set the Implementation Is Active indicator.
- Activate the enhancement implementation using the function Enhancement Implementation -> Activate.
Business Attributes
ASAP Roadmap ID | 257 | Create User Exits |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 1 | Critical |
Country-Dependency | A | Valid for all countries |
Assigned Application Components
Documentation Object Class | Documentation Object Name | Current line number | Application Component | Application Component Name |
---|---|---|---|---|
SIMG | HRAS_GS_BADI_BASIC | 0 | AEN0000011 | HR Administrative Services |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20050616 |
SAP Release Created in | 600 |