SAP Function Modules

CR_BREAK_SCHEDULE_EVAL SAP Function module







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

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


Pattern for FM CR_BREAK_SCHEDULE_EVAL - CR BREAK SCHEDULE EVAL





CALL FUNCTION 'CR_BREAK_SCHEDULE_EVAL' "
  EXPORTING
    in_tc37a =                  " tc37a
*   bypass_buffer =             " c
*   iv_starttime =              " flag          General Indicator
*   iv_workstart =              " kapbegzt      Start time in seconds (internal)
  IMPORTING
    work_time =                 " rc68k-einzh
    break_time =                " rc68k-einzh
    work_sek =                  " tc37a-einzt
    break_sek =                 " tc37p-padauer
* TABLES
*   in_tc37p =                  " tc37p
*   out_tc37p =                 " tc37p
*   shift_with_breaks =         " crtimeperi
  EXCEPTIONS
    BREAK_GT_WORK = 1           "
    BREAK_MODEL_NOT_FOUND = 2   "
    .  "  CR_BREAK_SCHEDULE_EVAL

ABAP code example for Function Module CR_BREAK_SCHEDULE_EVAL





The ABAP code below is a full code listing to execute function module CR_BREAK_SCHEDULE_EVAL 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_work_time  TYPE RC68K-EINZH ,
ld_break_time  TYPE RC68K-EINZH ,
ld_work_sek  TYPE TC37A-EINZT ,
ld_break_sek  TYPE TC37P-PADAUER ,
it_in_tc37p  TYPE STANDARD TABLE OF TC37P,"TABLES PARAM
wa_in_tc37p  LIKE LINE OF it_in_tc37p ,
it_out_tc37p  TYPE STANDARD TABLE OF TC37P,"TABLES PARAM
wa_out_tc37p  LIKE LINE OF it_out_tc37p ,
it_shift_with_breaks  TYPE STANDARD TABLE OF CRTIMEPERI,"TABLES PARAM
wa_shift_with_breaks  LIKE LINE OF it_shift_with_breaks .

DATA(ld_in_tc37a) = 'Check type of data required'.
DATA(ld_bypass_buffer) = 'Check type of data required'.
DATA(ld_iv_starttime) = 'Check type of data required'.
DATA(ld_iv_workstart) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_in_tc37p to it_in_tc37p.

"populate fields of struture and append to itab
append wa_out_tc37p to it_out_tc37p.

"populate fields of struture and append to itab
append wa_shift_with_breaks to it_shift_with_breaks. . CALL FUNCTION 'CR_BREAK_SCHEDULE_EVAL' EXPORTING in_tc37a = ld_in_tc37a * bypass_buffer = ld_bypass_buffer * iv_starttime = ld_iv_starttime * iv_workstart = ld_iv_workstart IMPORTING work_time = ld_work_time break_time = ld_break_time work_sek = ld_work_sek break_sek = ld_break_sek * TABLES * in_tc37p = it_in_tc37p * out_tc37p = it_out_tc37p * shift_with_breaks = it_shift_with_breaks EXCEPTIONS BREAK_GT_WORK = 1 BREAK_MODEL_NOT_FOUND = 2 . " CR_BREAK_SCHEDULE_EVAL
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 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_work_time  TYPE RC68K-EINZH ,
ld_in_tc37a  TYPE TC37A ,
it_in_tc37p  TYPE STANDARD TABLE OF TC37P ,
wa_in_tc37p  LIKE LINE OF it_in_tc37p,
ld_break_time  TYPE RC68K-EINZH ,
ld_bypass_buffer  TYPE C ,
it_out_tc37p  TYPE STANDARD TABLE OF TC37P ,
wa_out_tc37p  LIKE LINE OF it_out_tc37p,
ld_work_sek  TYPE TC37A-EINZT ,
ld_iv_starttime  TYPE FLAG ,
it_shift_with_breaks  TYPE STANDARD TABLE OF CRTIMEPERI ,
wa_shift_with_breaks  LIKE LINE OF it_shift_with_breaks,
ld_break_sek  TYPE TC37P-PADAUER ,
ld_iv_workstart  TYPE KAPBEGZT .

ld_in_tc37a = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_in_tc37p to it_in_tc37p.
ld_bypass_buffer = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_out_tc37p to it_out_tc37p.
ld_iv_starttime = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_shift_with_breaks to it_shift_with_breaks.
ld_iv_workstart = '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 CR_BREAK_SCHEDULE_EVAL or its description.