Ansicht
Dokumentation

PAY_DE_PS_KG13 - BAdI: Child Allowance Case Transfer: Generation of Data Class Instances

PAY_DE_PS_KG13 - BAdI: Child Allowance Case Transfer: Generation of Data Class Instances

Addresses (Business Address Services)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Business Add-In (BAdI) HRPAYDE_KGBA_B_DC_FACTORY is used as part of the child allowance case transfer to the Federal Employment Agency (BA) to override the fields filled in the standard SAP system or to fill fields that are still empty.

The BA groups the fields that have to be reported into "Classes". To avoid confusion with the ABAP classes known from object-oriented programming, will be referred to as “data classes” below.

Each data class from the notification procedure is displayed in an individual ABAP class. The purpose of this BAdI is to generate instances of this class by implementing factory methods. An implementation of interface IF_HRPAYDE_KGBA_DC_FACTORY is necessary for this. You can find further information about the available methods in the interface documentation.

In the standard SAP system, fallback class CL_HRPAYDE_KGBA_FB_DC_FACTORY is used for the implementation. The class documentation outlines which notification fields are filled in the standard SAP system.

To override the behavior of an existing data class, or to add a data class that is not included in the standard SAP system, proceed as follows:

  1. Create an implementation of BAdI HRPAYDE_KGBA_B_DC_FACTORY.
  2. When creating the implementation, note that there is a sample implementation class. Specify that you want to inherit from a sample class.
  3. Only instances of the required data class are generated in the BAdI class. Create your own additional (ABAP) class, which you should use to map the actual data class.

The rest of the process depends on whether you want to overwrite an existing data class or add a class that is not included in the standard SAP system.

  • Case 1: Overwrite existing class
  1. Inherit your new ABAP class from the relevant class delivered in the standard system. You can find this in the documentation of class CL_HRPAYDE_KGBA_FB_DC_FACTORY.
  2. For each notification field, there is an individual (protected) method within the class. Redefine the methods of the notification field that you want to overwrite.
  3. If necessary, repeat the previous step for further notification fields.
  4. In your BAdI class, redefine the GET_INSTANCE_* methods of the corresponding data class and generate an instance of your own data class.
  • Case 2: Add class that is not available in the standard SAP system
  1. Inherit your new (ABAP) class from the basis class for data classes CL_HRPAYDE_KGBA_DC_BASE.
  2. In this class, implement the methods of interface IF_HRPAYDE_KGBA_DATA_CLASS.
  3. In your BAdI class, redefine the GET_INSTANCE_* methods of the corresponding data class and generate an instance of your own data class.

In data class Administrative Data, the name of the person is entered in fields "benutzerNachname" und "benutzerVorname”, which confirms if the data transferred is correct. In the standard SAP system, both fields are filled with the name of the relevant personnel administrator.

If you want to always enter the name of the head of the Family Equalization Fund instead, Frau Anna Musterkasse, proceed as follows:

  1. Create your own BAdI implementation. You can call classes to be implemented ZCL_HRPAYDE_KGBA_IM_DC_FACTORY and inherit them from standard class CL_HRPAYDE_KGBA_FB_DC_FACTORY.
  2. Then create a new class called ZCL_HRPAYDE_KGBA_DC_VERWDATENand inherit it from standard class CL_HRPAYDE_KGBA_DC_VERWDATEN.
  3. Redefine method GET_BENUTZERNAME as follows:

    METHOD get_benutzername.
    ev_nachname = 'Musterkasse'.
    ev_vorname = 'Anna'
    ENDMETHOD.
  4. Go back to BAdI class ZCL_HRPAYDE_KGBA_IM_DC_FACTORY and redefine method IF_HRPAYDE_KGBA_DC_FACTORY~GET_INSTANCE_VERWALTUNGSDATEN as follows:

    METHOD if_hrpayde_kgba_dc_factory~get_instance_verwaltungsdaten.
    CREATE OBJECT ro_verwaltungsdaten TYPE zcl_hrpayde_kgba_dc_verwdaten
    EXPORTING
    io_pernr = io_pernr.
    ENDMETHOD.
  5. Activate the BAdI implementation.
  • Each data class contains an instance of personnel number MO_PERNR of type CL_HRPAYDE_KGBA_PERNR as an attribute. This object contains all infotypes that have been imported to fill notification fields in the standard SAP system as public, display-only attributes. The infotype records are already filtered according to the submission date.
  • To import further (for example, customer-specific) infotypes, object MO_PERNR contains instance MO_READ_INFOTYPE of infotype reader IF_HRPA_READ_INFOTYPE as an atrribute.
  • Messages can be transferred from the data class to the log using object MO_MESSAGE_HANDLER.





RFUMSV00 - Advance Return for Tax on Sales/Purchases   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 6507 Date: 20240523 Time: 193306     sap01-206 ( 91 ms )