SAP Function Modules

HR_IMPUTE_CC_END_NL SAP Function module - Company car GB benefit calculation P0442 second exit







HR_IMPUTE_CC_END_NL is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HR_IMPUTE_CC_END_NL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RPNC
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HR_IMPUTE_CC_END_NL - HR IMPUTE CC END NL





CALL FUNCTION 'HR_IMPUTE_CC_END_NL' "Company car GB benefit calculation P0442 second exit
  EXPORTING
    infoline =                  " car_info
*   paper =                     " pc261-fpper
*   permo =                     " t549a-permo
*   sw_prot =                   " c
  TABLES
    it0442 =                    " p0442
*   calc_it =                   " pc207
    calc_wpbp =                 " pc205
    calc_v0 =                   " pc20c
*   calc_var =                  " hrvar
*   ptext =                     " plog_text
*   car_err_nat =               " hrerror
*   pytabnat =                  " pc208         Afrekeningsresultaat: gecumuleerde resultaattabel
    i51cb =                     " t51cb
  EXCEPTIONS
    ERR_GENERAL = 1             "
    .  "  HR_IMPUTE_CC_END_NL

ABAP code example for Function Module HR_IMPUTE_CC_END_NL





The ABAP code below is a full code listing to execute function module HR_IMPUTE_CC_END_NL including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_it0442  TYPE STANDARD TABLE OF P0442,"TABLES PARAM
wa_it0442  LIKE LINE OF it_it0442 ,
it_calc_it  TYPE STANDARD TABLE OF PC207,"TABLES PARAM
wa_calc_it  LIKE LINE OF it_calc_it ,
it_calc_wpbp  TYPE STANDARD TABLE OF PC205,"TABLES PARAM
wa_calc_wpbp  LIKE LINE OF it_calc_wpbp ,
it_calc_v0  TYPE STANDARD TABLE OF PC20C,"TABLES PARAM
wa_calc_v0  LIKE LINE OF it_calc_v0 ,
it_calc_var  TYPE STANDARD TABLE OF HRVAR,"TABLES PARAM
wa_calc_var  LIKE LINE OF it_calc_var ,
it_ptext  TYPE STANDARD TABLE OF PLOG_TEXT,"TABLES PARAM
wa_ptext  LIKE LINE OF it_ptext ,
it_car_err_nat  TYPE STANDARD TABLE OF HRERROR,"TABLES PARAM
wa_car_err_nat  LIKE LINE OF it_car_err_nat ,
it_pytabnat  TYPE STANDARD TABLE OF PC208,"TABLES PARAM
wa_pytabnat  LIKE LINE OF it_pytabnat ,
it_i51cb  TYPE STANDARD TABLE OF T51CB,"TABLES PARAM
wa_i51cb  LIKE LINE OF it_i51cb .

DATA(ld_infoline) = 'Check type of data required'.

DATA(ld_paper) = some text here

SELECT single PERMO
FROM T549A
INTO @DATA(ld_permo).

DATA(ld_sw_prot) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it0442 to it_it0442.

"populate fields of struture and append to itab
append wa_calc_it to it_calc_it.

"populate fields of struture and append to itab
append wa_calc_wpbp to it_calc_wpbp.

"populate fields of struture and append to itab
append wa_calc_v0 to it_calc_v0.

"populate fields of struture and append to itab
append wa_calc_var to it_calc_var.

"populate fields of struture and append to itab
append wa_ptext to it_ptext.

"populate fields of struture and append to itab
append wa_car_err_nat to it_car_err_nat.

"populate fields of struture and append to itab
append wa_pytabnat to it_pytabnat.

"populate fields of struture and append to itab
append wa_i51cb to it_i51cb. . CALL FUNCTION 'HR_IMPUTE_CC_END_NL' EXPORTING infoline = ld_infoline * paper = ld_paper * permo = ld_permo * sw_prot = ld_sw_prot TABLES it0442 = it_it0442 * calc_it = it_calc_it calc_wpbp = it_calc_wpbp calc_v0 = it_calc_v0 * calc_var = it_calc_var * ptext = it_ptext * car_err_nat = it_car_err_nat * pytabnat = it_pytabnat i51cb = it_i51cb EXCEPTIONS ERR_GENERAL = 1 . " HR_IMPUTE_CC_END_NL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_infoline  TYPE CAR_INFO ,
it_it0442  TYPE STANDARD TABLE OF P0442 ,
wa_it0442  LIKE LINE OF it_it0442,
ld_paper  TYPE PC261-FPPER ,
it_calc_it  TYPE STANDARD TABLE OF PC207 ,
wa_calc_it  LIKE LINE OF it_calc_it,
ld_permo  TYPE T549A-PERMO ,
it_calc_wpbp  TYPE STANDARD TABLE OF PC205 ,
wa_calc_wpbp  LIKE LINE OF it_calc_wpbp,
ld_sw_prot  TYPE C ,
it_calc_v0  TYPE STANDARD TABLE OF PC20C ,
wa_calc_v0  LIKE LINE OF it_calc_v0,
it_calc_var  TYPE STANDARD TABLE OF HRVAR ,
wa_calc_var  LIKE LINE OF it_calc_var,
it_ptext  TYPE STANDARD TABLE OF PLOG_TEXT ,
wa_ptext  LIKE LINE OF it_ptext,
it_car_err_nat  TYPE STANDARD TABLE OF HRERROR ,
wa_car_err_nat  LIKE LINE OF it_car_err_nat,
it_pytabnat  TYPE STANDARD TABLE OF PC208 ,
wa_pytabnat  LIKE LINE OF it_pytabnat,
it_i51cb  TYPE STANDARD TABLE OF T51CB ,
wa_i51cb  LIKE LINE OF it_i51cb.

ld_infoline = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it0442 to it_it0442.

ld_paper = some text here

"populate fields of struture and append to itab
append wa_calc_it to it_calc_it.

SELECT single PERMO
FROM T549A
INTO ld_permo.


"populate fields of struture and append to itab
append wa_calc_wpbp to it_calc_wpbp.
ld_sw_prot = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_calc_v0 to it_calc_v0.

"populate fields of struture and append to itab
append wa_calc_var to it_calc_var.

"populate fields of struture and append to itab
append wa_ptext to it_ptext.

"populate fields of struture and append to itab
append wa_car_err_nat to it_car_err_nat.

"populate fields of struture and append to itab
append wa_pytabnat to it_pytabnat.

"populate fields of struture and append to itab
append wa_i51cb to it_i51cb.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HR_IMPUTE_CC_END_NL or its description.