SAP Function Modules

RH_WORKTAB_OCK_FILL SAP Function module







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

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


Pattern for FM RH_WORKTAB_OCK_FILL - RH WORKTAB OCK FILL





CALL FUNCTION 'RH_WORKTAB_OCK_FILL' "
  EXPORTING
    wof_worktable =             " hrpd_worktab_new
    wof_s_tab =                 " hrpd_s_tab
    wof_it_table =              " hrpd_worktab
*   wof_kokrs_check = 'X'       " flag
*   wof_bukrs_check = 'X'       " flag
  IMPORTING
    wof_worktab_out =           " hrpd_worktab_new
    different_gsber =           " gsber
  EXCEPTIONS
    KOKRS_NOT_ALLOWED = 1       "
    BUKRS_NOT_ALLOWED = 2       "
    OTYPE_KOSTL_NOT_FOUND = 3   "
    .  "  RH_WORKTAB_OCK_FILL

ABAP code example for Function Module RH_WORKTAB_OCK_FILL





The ABAP code below is a full code listing to execute function module RH_WORKTAB_OCK_FILL 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:
ld_wof_worktab_out  TYPE HRPD_WORKTAB_NEW ,
ld_different_gsber  TYPE GSBER .

DATA(ld_wof_worktable) = 'Check type of data required'.
DATA(ld_wof_s_tab) = 'Check type of data required'.
DATA(ld_wof_it_table) = 'Check type of data required'.
DATA(ld_wof_kokrs_check) = 'Check type of data required'.
DATA(ld_wof_bukrs_check) = 'Check type of data required'. . CALL FUNCTION 'RH_WORKTAB_OCK_FILL' EXPORTING wof_worktable = ld_wof_worktable wof_s_tab = ld_wof_s_tab wof_it_table = ld_wof_it_table * wof_kokrs_check = ld_wof_kokrs_check * wof_bukrs_check = ld_wof_bukrs_check IMPORTING wof_worktab_out = ld_wof_worktab_out different_gsber = ld_different_gsber EXCEPTIONS KOKRS_NOT_ALLOWED = 1 BUKRS_NOT_ALLOWED = 2 OTYPE_KOSTL_NOT_FOUND = 3 . " RH_WORKTAB_OCK_FILL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "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_wof_worktab_out  TYPE HRPD_WORKTAB_NEW ,
ld_wof_worktable  TYPE HRPD_WORKTAB_NEW ,
ld_different_gsber  TYPE GSBER ,
ld_wof_s_tab  TYPE HRPD_S_TAB ,
ld_wof_it_table  TYPE HRPD_WORKTAB ,
ld_wof_kokrs_check  TYPE FLAG ,
ld_wof_bukrs_check  TYPE FLAG .

ld_wof_worktable = 'Check type of data required'.
ld_wof_s_tab = 'Check type of data required'.
ld_wof_it_table = 'Check type of data required'.
ld_wof_kokrs_check = 'Check type of data required'.
ld_wof_bukrs_check = 'Check type of data required'.

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