Ansicht
Dokumentation

HRAS_GS_BADIBASIC_VP - BAdI: Implement Generic Services

HRAS_GS_BADIBASIC_VP - BAdI: Implement Generic Services

General Data in Customer Master   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

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.

You have performed the IMG activity Define Generic Services for Form Scenarios to define the Generic Services you want to use.

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.

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).
  1. Choose Continue. The system displays the maintenance view for enhancement implementations.
  2. Select the Enhanced Implement. Elements tab page if this is not already automatically selected.
  3. Select the newly created implementation of the BAdI in the hierarchy structure (on the left).
  4. Select the underlying Filter Values node for the selected implementation and create the filter combination as follows: SERVICEID = Generic Service>. For the you must enter the exact name under which you have defined the Generic Service in the IMG activity Define Generic Services for Form Scenarios.
  5. 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.
  6. 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.
  7. Activate the enhancement implementation using the function Enhancement Implementation → Activate.

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.

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 = Generic Service>. For , 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.






PERFORM Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 11051 Date: 20240523 Time: 184620     sap01-206 ( 158 ms )