SAP Function Modules

EXIT_SAPLHRTIM00COV_HIST_005 SAP Function module - Refine Table AB







EXIT_SAPLHRTIM00COV_HIST_005 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 EXIT_SAPLHRTIM00COV_HIST_005 into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM EXIT_SAPLHRTIM00COV_HIST_005 - EXIT SAPLHRTIM00COV HIST 005





CALL FUNCTION 'EXIT_SAPLHRTIM00COV_HIST_005' "Refine Table AB
  EXPORTING
    p_pernr =                   " pernr-pernr   Personnel number
    begda =                     " sy-datum
    endda =                     " sy-datum
    klbew =                     " pc20i-klbew
    modif_a =                   " hrmodif-mod0a
    wpbp =                      " pc205
*   ab =                        " pc20i         Cluster RD/B2: Table AB
  TABLES
    mark_tab =                  " ptm_marktab
    return_tab =                " ptm_splittab
    i0000 =                     " p0000
    i0001 =                     " p0001
    i0007 =                     " p0007
    i0008 =                     " p0008
*   times_per_day =             " ptm_times_per_day  Actual times for each day with deduction information
    p_error_tab =               " edimessage
    .  "  EXIT_SAPLHRTIM00COV_HIST_005

ABAP code example for Function Module EXIT_SAPLHRTIM00COV_HIST_005





The ABAP code below is a full code listing to execute function module EXIT_SAPLHRTIM00COV_HIST_005 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_mark_tab  TYPE STANDARD TABLE OF PTM_MARKTAB,"TABLES PARAM
wa_mark_tab  LIKE LINE OF it_mark_tab ,
it_return_tab  TYPE STANDARD TABLE OF PTM_SPLITTAB,"TABLES PARAM
wa_return_tab  LIKE LINE OF it_return_tab ,
it_i0000  TYPE STANDARD TABLE OF P0000,"TABLES PARAM
wa_i0000  LIKE LINE OF it_i0000 ,
it_i0001  TYPE STANDARD TABLE OF P0001,"TABLES PARAM
wa_i0001  LIKE LINE OF it_i0001 ,
it_i0007  TYPE STANDARD TABLE OF P0007,"TABLES PARAM
wa_i0007  LIKE LINE OF it_i0007 ,
it_i0008  TYPE STANDARD TABLE OF P0008,"TABLES PARAM
wa_i0008  LIKE LINE OF it_i0008 ,
it_times_per_day  TYPE STANDARD TABLE OF PTM_TIMES_PER_DAY,"TABLES PARAM
wa_times_per_day  LIKE LINE OF it_times_per_day ,
it_p_error_tab  TYPE STANDARD TABLE OF EDIMESSAGE,"TABLES PARAM
wa_p_error_tab  LIKE LINE OF it_p_error_tab .


DATA(ld_p_pernr) = Check type of data required
DATA(ld_begda) = '20210129'.
DATA(ld_endda) = '20210129'.

DATA(ld_klbew) = Check type of data required

DATA(ld_modif_a) = some text here
DATA(ld_wpbp) = '20210129'.
DATA(ld_ab) = '20210129'.

"populate fields of struture and append to itab
append wa_mark_tab to it_mark_tab.

"populate fields of struture and append to itab
append wa_return_tab to it_return_tab.

"populate fields of struture and append to itab
append wa_i0000 to it_i0000.

"populate fields of struture and append to itab
append wa_i0001 to it_i0001.

"populate fields of struture and append to itab
append wa_i0007 to it_i0007.

"populate fields of struture and append to itab
append wa_i0008 to it_i0008.

"populate fields of struture and append to itab
append wa_times_per_day to it_times_per_day.

"populate fields of struture and append to itab
append wa_p_error_tab to it_p_error_tab. . CALL FUNCTION 'EXIT_SAPLHRTIM00COV_HIST_005' EXPORTING p_pernr = ld_p_pernr begda = ld_begda endda = ld_endda klbew = ld_klbew modif_a = ld_modif_a wpbp = ld_wpbp * ab = ld_ab TABLES mark_tab = it_mark_tab return_tab = it_return_tab i0000 = it_i0000 i0001 = it_i0001 i0007 = it_i0007 i0008 = it_i0008 * times_per_day = it_times_per_day p_error_tab = it_p_error_tab . " EXIT_SAPLHRTIM00COV_HIST_005
IF SY-SUBRC EQ 0. "All OK 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_p_pernr  TYPE PERNR-PERNR ,
it_mark_tab  TYPE STANDARD TABLE OF PTM_MARKTAB ,
wa_mark_tab  LIKE LINE OF it_mark_tab,
ld_begda  TYPE SY-DATUM ,
it_return_tab  TYPE STANDARD TABLE OF PTM_SPLITTAB ,
wa_return_tab  LIKE LINE OF it_return_tab,
ld_endda  TYPE SY-DATUM ,
it_i0000  TYPE STANDARD TABLE OF P0000 ,
wa_i0000  LIKE LINE OF it_i0000,
ld_klbew  TYPE PC20I-KLBEW ,
it_i0001  TYPE STANDARD TABLE OF P0001 ,
wa_i0001  LIKE LINE OF it_i0001,
ld_modif_a  TYPE HRMODIF-MOD0A ,
it_i0007  TYPE STANDARD TABLE OF P0007 ,
wa_i0007  LIKE LINE OF it_i0007,
ld_wpbp  TYPE PC205 ,
it_i0008  TYPE STANDARD TABLE OF P0008 ,
wa_i0008  LIKE LINE OF it_i0008,
ld_ab  TYPE PC20I ,
it_times_per_day  TYPE STANDARD TABLE OF PTM_TIMES_PER_DAY ,
wa_times_per_day  LIKE LINE OF it_times_per_day,
it_p_error_tab  TYPE STANDARD TABLE OF EDIMESSAGE ,
wa_p_error_tab  LIKE LINE OF it_p_error_tab.


ld_p_pernr = Check type of data required

"populate fields of struture and append to itab
append wa_mark_tab to it_mark_tab.
ld_begda = '20210129'.

"populate fields of struture and append to itab
append wa_return_tab to it_return_tab.
ld_endda = '20210129'.

"populate fields of struture and append to itab
append wa_i0000 to it_i0000.

ld_klbew = Check type of data required

"populate fields of struture and append to itab
append wa_i0001 to it_i0001.

ld_modif_a = some text here

"populate fields of struture and append to itab
append wa_i0007 to it_i0007.
ld_wpbp = '20210129'.

"populate fields of struture and append to itab
append wa_i0008 to it_i0008.
ld_ab = '20210129'.

"populate fields of struture and append to itab
append wa_times_per_day to it_times_per_day.

"populate fields of struture and append to itab
append wa_p_error_tab to it_p_error_tab.

SAP Documentation for FM EXIT_SAPLHRTIM00COV_HIST_005


You can use this enhancement to split entries in the AB table according to the markers in the internal table COVERAGE HISTORY and to assign a ...See here for full SAP fm documentation

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 EXIT_SAPLHRTIM00COV_HIST_005 or its description.