SAP HR_GB_CV_FULL_BENEFIT Function Module for Full company car benefit calculation
HR_GB_CV_FULL_BENEFIT is a standard hr gb cv full benefit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Full company car benefit calculation processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for hr gb cv full benefit FM, simply by entering the name HR_GB_CV_FULL_BENEFIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRCARGB
Program Name: SAPLHRCARGB
Main Program: SAPLHRCARGB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_GB_CV_FULL_BENEFIT pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'HR_GB_CV_FULL_BENEFIT'"Full company car benefit calculation.
EXPORTING
BEGDA = "Date and Time, Current (Application Server) Date
ENDDA = "Date and Time, Current (Application Server) Date
* SW_PROT = "
* INFOLINE = "Infoline for company car IT0442
* P11D_CALL = "Called from the P11D
* PAPER = "For-period for payroll
* ABKRS = "Payroll Area
TABLES
IT0442 = "HR Master Record for Infotype 0442
CAR_DET = "HR-GB: Company Car Benefit Table (CO2)
CAR_ERR_NAT = "Transfer table for HR error handling
* PTEXT = "Structure for HR Function Log
EXCEPTIONS
PAYROLL_ERR_GEN = 1 DATES_ERROR = 2
IMPORTING Parameters details for HR_GB_CV_FULL_BENEFIT
BEGDA - Date and Time, Current (Application Server) Date
Data type: SY-DATUMOptional: No
Call by Reference: Yes
ENDDA - Date and Time, Current (Application Server) Date
Data type: SY-DATUMOptional: No
Call by Reference: Yes
SW_PROT -
Data type: COptional: Yes
Call by Reference: Yes
INFOLINE - Infoline for company car IT0442
Data type: CAR_INFOOptional: Yes
Call by Reference: Yes
P11D_CALL - Called from the P11D
Data type: COptional: Yes
Call by Reference: Yes
PAPER - For-period for payroll
Data type: PC261-FPPEROptional: Yes
Call by Reference: No ( called with pass by value option)
ABKRS - Payroll Area
Data type: PC261-IABKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_GB_CV_FULL_BENEFIT
IT0442 - HR Master Record for Infotype 0442
Data type: P0442Optional: No
Call by Reference: No ( called with pass by value option)
CAR_DET - HR-GB: Company Car Benefit Table (CO2)
Data type: P08_CCINOptional: No
Call by Reference: No ( called with pass by value option)
CAR_ERR_NAT - Transfer table for HR error handling
Data type: HRERROROptional: No
Call by Reference: No ( called with pass by value option)
PTEXT - Structure for HR Function Log
Data type: PLOG_TEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PAYROLL_ERR_GEN - An error with the benefit calculation occured
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATES_ERROR - Invalid date range it crosses a tax yaer
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_GB_CV_FULL_BENEFIT Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_begda | TYPE SY-DATUM, " | |||
| lt_it0442 | TYPE STANDARD TABLE OF P0442, " | |||
| lv_payroll_err_gen | TYPE P0442, " | |||
| lv_endda | TYPE SY-DATUM, " | |||
| lt_car_det | TYPE STANDARD TABLE OF P08_CCIN, " | |||
| lv_dates_error | TYPE P08_CCIN, " | |||
| lv_sw_prot | TYPE C, " | |||
| lt_car_err_nat | TYPE STANDARD TABLE OF HRERROR, " | |||
| lt_ptext | TYPE STANDARD TABLE OF PLOG_TEXT, " | |||
| lv_infoline | TYPE CAR_INFO, " | |||
| lv_p11d_call | TYPE C, " | |||
| lv_paper | TYPE PC261-FPPER, " | |||
| lv_abkrs | TYPE PC261-IABKRS. " |
|   CALL FUNCTION 'HR_GB_CV_FULL_BENEFIT' "Full company car benefit calculation |
| EXPORTING | ||
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| SW_PROT | = lv_sw_prot | |
| INFOLINE | = lv_infoline | |
| P11D_CALL | = lv_p11d_call | |
| PAPER | = lv_paper | |
| ABKRS | = lv_abkrs | |
| TABLES | ||
| IT0442 | = lt_it0442 | |
| CAR_DET | = lt_car_det | |
| CAR_ERR_NAT | = lt_car_err_nat | |
| PTEXT | = lt_ptext | |
| EXCEPTIONS | ||
| PAYROLL_ERR_GEN = 1 | ||
| DATES_ERROR = 2 | ||
| . " HR_GB_CV_FULL_BENEFIT | ||
ABAP code using 7.40 inline data declarations to call FM HR_GB_CV_FULL_BENEFIT
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single DATUM FROM SY INTO @DATA(ld_begda). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_endda). | ||||
| "SELECT single FPPER FROM PC261 INTO @DATA(ld_paper). | ||||
| "SELECT single IABKRS FROM PC261 INTO @DATA(ld_abkrs). | ||||
Search for further information about these or an SAP related objects