Ansicht
Dokumentation

OHFBNTL06 - BAdI : Enhancement for GB FlexBens Processing Dates Calculation

OHFBNTL06 - BAdI : Enhancement for GB FlexBens Processing Dates Calculation

General Data in Customer Master   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

BAdI : Enhancement for GB FlexBens Processing Dates Calculation (PFBN0004)

Use

This Business Add-In (BAdI) is used in Flexible Benefits for Great Britain (PA-BN-FB-GB), in the process of creating a benefits offer.

In Flexible Benefits for Great Britain (GB FlexBens), the processing data for creating a benefits offer is calculated by the subroutine SAP_GET_PROCESS_DATES, within the function HR_BEN_GET_PROCESS_DATES. Alternatively, you can use the SAP-delivered Business Add-In (BAdI) PFBN0004.

Therefore, BAdI PFBN0004 is called to calculate the processing data for a benefits offer instead of calculation using the subroutine SAP_GET_PROCESS_DATES.

Requirements

You must use the following input parameters:

  • EE_BENEFIT_DATA Benefits-specific employee data
  • EVENT_DESCRIPTION Event description
  • ENRTY Type of plan enrollment
  • DATUM Validity date

You can specify the following as output parameters:

  • PROCESS_BEGDA Start of processing
  • PROCESS_ENDDA End of processing

In addition to this, you can define two exceptions to the standard coding:

  1. STANDARD_PROCEDURE execute SAP_GET_PROCESS_DATES

In the following sample coding, the processing data for creating a benefit offer should be read from the customer-specific table ZDATE. You can store the start of processing and end of processing in table ZDATE.

The processing data should be read from ZDATE in all clients. Only in client 00 should SAP_GET_PROCESS_DATES be accessed.

TABLES: ZDATE.

CASE SY-MANDT.

WHEN 0.

RAISE STANDARD_CALCULATION.

WHEN OTHERS.

SELECT * FROM ZDATE WHERE BAREA EQ _EE_BENEFIT_DATA-BAREA

AND EVENT EQ _EVENT_DESCRIPTION-EVENT

AND ENDDA GE _DATUM

AND BEGDA LE _DATUM.

EXIT.

ENDSELECT.

IF SY-SUBRC NE 0.

RAISE CUSTOMER_ERROR.

ENDIF.

_PROCESS_BEGDA = ZDATE-BEGDA.

_PROCESS_ENDDA = ZDATE-ENDDA.

ENDCASE.

Default Settings

  • This BAdI is not activated in the standard system.
  • If this BAdI is activated without first being modified, no output will be given by the function module HR_FBN_GET_PROCESS_DATES.
  • The standard routine is executed when there is no active customer implementation.
  • This BAdI is filter-dependent, according to country molga.
  • This BAdI cannot be enhanced or reused.

Activities

After you have called the IMG activity, proceed as follows:

  1. In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. Choose the tab Interface.
The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. Save on the screen Change Implementation.
Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.

Example

If you have created customer-specific infotypes or database tables, you can use their contents to calculate processing data to create a benefits offer.

See also

GET_PROCESS_DATES

For more information on how to use Business Add-Ins, access the SAP Library and choose: mySAP Technology Components -> SAP Web Application Server -> ABAP Workbench (BC-DWB) -> Changing the SAP Standard (BC) -> Business Add-Ins.






Addresses (Business Address Services)   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 6091 Date: 20240523 Time: 172631     sap01-206 ( 71 ms )