Ansicht
Dokumentation

HR_PBS_00_CA_10 - BAdI: Overriding of Assignment Based on Table T7PBSCA3B

HR_PBS_00_CA_10 - BAdI: Overriding of Assignment Based on Table T7PBSCA3B

Fill RESBD Structure from EBP Component Structure   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

You can use the Business Add-In (BAdI) Overriding of Assignment Based on Table T7PBSCA3B(HRPBS00CA_B_LGART) to implement a condition so that the system checks for entries of the view V_T7PBSCA3B whether the wage type is to be filled. In order for the system to call the BAdI, the BAdI checkbox has to be selected for the relevant row in the view V_T7PBSCA3B.

In the view V_T7PBSCA3B, the BAdI checkbox has to be selected for the entries to be processed.

Implement the method GET_VALID_PERIOD and activate the BAdI.

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

The method CHECK_ENTRY_VALID of the BAdI contains the following import parameters:

  • IV_MOLGA: HCM localization
  • IV_DATE: Validity start
  • IS_RESULT_VERSORGUNG: Result Calculation Module VERSORGUNG (Pension)
  • IS_DIENSTRECHT_CRIT: Criteria for assignment of indicator Public Services regulation
  • IS_T7PBSCA3B: Table Row of T7PBSCA3B
  • IO_MSG_HANDLER: Message Handler

The method also contains the following change parameters:

  • CV_VALID: Boolean Return Value TRUE/FALSE
  • CV_IS_OK: Indicator for Processing Without Errors

Implementation of the BAdI is a condition for filling the wage type from the relevant row of the view V_T7PBSCA3B. The implementation can set the CV_VALID change parameter depending on the import parameter, in particular, using the import parameter IS_T7PBSCA3B that contains the current table row of the table T7PBSCA3B. If the value abap_true ('X') is set, then the system fills and stores the wage type of the corresponding entry from the table T7PBSCA3B as usual, as if no check using the BAdI had occurred. If the value of the change parameter CV_VALID is set to abap_false (' '), then the system does not fill the wage type using the corresponding row of the table T7PBSCA3B.

The import parameter IS_RESULT_VERSORGUNG contains a table with value pairs consisting of the public services regulation and the name of the public services regulation provision (for example, for the Public Services regulation for Hesse, the entry 'H2', 'P50_ALT'), depending on the calculation in the component PSLAW_RULES. The evaluation uses this table for storing wage types depending on certain public services regulation provisions.

Important: The change parameter CV_IS_OK usually has to be set to abap_true ('X'), otherwise processing is terminated as the system recognizes that an error has occurred.

You want to store the wage type 9012 for all pension recipients who entered retirement before December 31, 2012 or for all surviving dependents where Entry: Pension for the pension holder is before December 31, 2012, and wage type 9013 for all other pension recipients. In each case, the wage type is to be filled with the amount of the pension payment. The underlying public services regulation is Federal (DNeuG).

To do this, you have to store the following entries in the view V_T7PBSCA3B with the corresponding validity date (for example, Valid From 01.01.1900 and Valid To 31.12.9999) and select the 'BAdI' checkbox in the last column in each case.

Calculation Module Var. Field Name from Structure run. No. Wage type Field Table BAdI
VERSORGUNG 0 VERSORGUNGSBEZUG 1 9012 +Amount IT X
VERSORGUNG 0 VERSORGUNGSBEZUG 2 9013 +Amount IT X

If the BAdI were not implemented, both wage types 9012 and 9013 would be filled despite the selection in the BAdI field.

One possible implementation of the BAdI is the following:

METHOD if_ex_hrpbs00ca_b_lgart~check_entry_valid.

* Store the wage type 9012 for all pension recipients who entered retirement before
* December 31, 2012 or for all surviving dependents where Entry: Pension for the pension
* holder is before December 31, 2012, and wage type 9013 for all other pension recipients.
* In each case, the wage type is to be filled with the amount of the pension payment. The
* The underlying public services regulation is DNeuG Bund.

* init
  cv_is_ok = abap_true.
    cv_valid = abap_false. " Return value of BAdI is abap_false

* main

* If necessary, the system can check the public services regulation:

  CHECK cl_hrdepbsvavg_dienstrecht=>get_dienstrecht(
          is_dienstrecht_criteria = is_dienstrecht_crit )
          = '25'. = '25'. " for Federal (DNeuG)

* Identification of the corresponding entry from the view
* V_T7PBSCA3B based on the import parameter is_t7pbsca3b using
* the following fields: fieldname, seqnr, and lgartname.

* Other conditions are to be checked based on the import
* parameter is_result_versorgung.

  IF is_t7pbsca3b-fieldname = 'VERSORGUNGSBEZUG'.
    IF is_t7pbsca3b-seqnr = 1
    AND is_result_versorgung-versorgung-einvf < '20121231'.
* Row 1 valid
      cv_valid = abap_true.
    ELSEIF is_t7pbsca3b-seqnr = 2
* Row 2 valid
    AND is_result_versorgung-versorgung-einvf >= '20121231'.
      cv_valid = abap_true.
    ENDIF.

  ENDIF. " is_t7pbsca3b-fieldname = 'VERSORGUNGSBEZUG'.

ENDMETHOD.






TXBHW - Original Tax Base Amount in Local Currency   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 8553 Date: 20240523 Time: 193713     sap01-206 ( 173 ms )