SAP ABAP IMG Activity HRAS_GS_BADI_BASIC (BAdI: Implement Generic Services)
Hierarchy
EA-HRGXX (Software Component) Sub component EA-HRGXX of EA-HR
   PA-AS (Application Component) HR Administrative Services
     PAOC_ASR_GENERIC_ACCESS (Package) Generic Access
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:

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:

  1. Choose Create Implementation and create a new enhancement implementation.
  2. Enter a name and a short text for the enhancement implementation.
  3. In the next dialog window, enter a package for the new enhancement implementation.
  4. 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).

  5. Choose Continue. The system displays the maintenance view for enhancement implementations.
  6. Select the Enhanced Implement. Elements tab page if this is not already automatically selected.
  7. Select the newly created implementation of the BAdI in the hierarchy structure (on the left).
  8. 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.
  9. 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.
  10. 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.
  11. 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:

  1. Switch to the implementing class of the BAdI HRASR00GEN_SERVICE_BASIC and navigate with the mouse to the ABAP class.
  2. Then switch to Change mode.
  3. Switch to the Interfaces tab page and add the interface IF_HRASR00GEN_SERVICE_ADVANCED.
  4. Activate the class.
  5. Return to the maintenance view for enhancement implementations.
  6. 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:

  1. Switch to the existing enhancement implementation.
  2. Switch to Change mode.
  3. Select the Enhanced Implement. Elements tab page.
  4. Select the implementation of the BAdI in the hierarchy structure (on the left).
  5. Select the underlying Implementing Class node.
  6. Navigate with the mouse to the class name in the Class Builder.
  7. Switch to Change mode.
  8. Select the Interfaces tab page and add the interface IF_HRASR00GEN_SERVICE_ADVANCED.
  9. Activate the class.
  10. Return to the maintenance view for enhancement implementations.
  11. Select the Enhanced Implement. Elements tab page.
  12. Choose Create Implementation and create a new enhancement implementation.
  13. Enter HRASR00GEN_SERVICE_ADVANCED as the BAdI definition.
  14. For Implementing Class, enter the class with which you enhanced the interface IF_HRASR00GEN_SERVICE_ADVANCED.
  15. Enter a name (and a short text if necessary) for the BAdI implementation and save your entries.
  16. Select the implementation that you just created of the BAdI HRASR00GEN_SERVICE_ADVANCED in the hierarchy structure.
  17. 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.
  18. 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.
  19. Select the node of the newly created implementation again in the hierarchy structure and set the Implementation Is Active indicator.
  20. 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