SAP Function Modules

EWCM_CHECK_REROUTING SAP Function module







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

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


Pattern for FM EWCM_CHECK_REROUTING - EWCM CHECK REROUTING





CALL FUNCTION 'EWCM_CHECK_REROUTING' "
* EXPORTING
*   target_kurst_int =          " tcurv-kurst
*   target_kurst_ext =          " tcurv-kurst
*   target_kurst_int_ext =      " tcurv-kurst
*   main_kurst =                " tcurv-kurst
*   rerout_date =               " tcurf-abwga
  IMPORTING
    rerouting_int_ok =          " boole-boole
    rerouting_ext_ok =          " boole-boole
    rerouting_int_ext_ok =      " boole-boole
  TABLES
    waers_list =                " ewwaerlist
*   waers_no_chge =             " ewwaerlist
    kurst_list =                " ewkurstlst
*   rrsource_int_ins =          " tcurf
*   rrsource_int_upd =          " tcurf
*   rrtarget_int =              " tcurf
*   rrsource_ext_ins =          " tcurf
*   rrsource_ext_upd =          " tcurf
*   rrtarget_ext =              " tcurf
*   rrsource_int_ext_ins =      " tcurf
*   rrsource_int_ext_upd =      " tcurf
*   rrtarget_int_ext =          " tcurf
*   rerout_incons =             " tcurf
  EXCEPTIONS
    OUTPUT_REQUEST_INCONSISTENT = 1  "
    INCONSISTENT_REROUTING_FOUND = 2  "
    INCOMPLETE_INPUT = 3        "
    .  "  EWCM_CHECK_REROUTING

ABAP code example for Function Module EWCM_CHECK_REROUTING





The ABAP code below is a full code listing to execute function module EWCM_CHECK_REROUTING 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_rerouting_int_ok  TYPE BOOLE-BOOLE ,
ld_rerouting_ext_ok  TYPE BOOLE-BOOLE ,
ld_rerouting_int_ext_ok  TYPE BOOLE-BOOLE ,
it_waers_list  TYPE STANDARD TABLE OF EWWAERLIST,"TABLES PARAM
wa_waers_list  LIKE LINE OF it_waers_list ,
it_waers_no_chge  TYPE STANDARD TABLE OF EWWAERLIST,"TABLES PARAM
wa_waers_no_chge  LIKE LINE OF it_waers_no_chge ,
it_kurst_list  TYPE STANDARD TABLE OF EWKURSTLST,"TABLES PARAM
wa_kurst_list  LIKE LINE OF it_kurst_list ,
it_rrsource_int_ins  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrsource_int_ins  LIKE LINE OF it_rrsource_int_ins ,
it_rrsource_int_upd  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrsource_int_upd  LIKE LINE OF it_rrsource_int_upd ,
it_rrtarget_int  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrtarget_int  LIKE LINE OF it_rrtarget_int ,
it_rrsource_ext_ins  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrsource_ext_ins  LIKE LINE OF it_rrsource_ext_ins ,
it_rrsource_ext_upd  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrsource_ext_upd  LIKE LINE OF it_rrsource_ext_upd ,
it_rrtarget_ext  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrtarget_ext  LIKE LINE OF it_rrtarget_ext ,
it_rrsource_int_ext_ins  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrsource_int_ext_ins  LIKE LINE OF it_rrsource_int_ext_ins ,
it_rrsource_int_ext_upd  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrsource_int_ext_upd  LIKE LINE OF it_rrsource_int_ext_upd ,
it_rrtarget_int_ext  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rrtarget_int_ext  LIKE LINE OF it_rrtarget_int_ext ,
it_rerout_incons  TYPE STANDARD TABLE OF TCURF,"TABLES PARAM
wa_rerout_incons  LIKE LINE OF it_rerout_incons .


SELECT single KURST
FROM TCURV
INTO @DATA(ld_target_kurst_int).


SELECT single KURST
FROM TCURV
INTO @DATA(ld_target_kurst_ext).


SELECT single KURST
FROM TCURV
INTO @DATA(ld_target_kurst_int_ext).


SELECT single KURST
FROM TCURV
INTO @DATA(ld_main_kurst).


SELECT single ABWGA
FROM TCURF
INTO @DATA(ld_rerout_date).


"populate fields of struture and append to itab
append wa_waers_list to it_waers_list.

"populate fields of struture and append to itab
append wa_waers_no_chge to it_waers_no_chge.

"populate fields of struture and append to itab
append wa_kurst_list to it_kurst_list.

"populate fields of struture and append to itab
append wa_rrsource_int_ins to it_rrsource_int_ins.

"populate fields of struture and append to itab
append wa_rrsource_int_upd to it_rrsource_int_upd.

"populate fields of struture and append to itab
append wa_rrtarget_int to it_rrtarget_int.

"populate fields of struture and append to itab
append wa_rrsource_ext_ins to it_rrsource_ext_ins.

"populate fields of struture and append to itab
append wa_rrsource_ext_upd to it_rrsource_ext_upd.

"populate fields of struture and append to itab
append wa_rrtarget_ext to it_rrtarget_ext.

"populate fields of struture and append to itab
append wa_rrsource_int_ext_ins to it_rrsource_int_ext_ins.

"populate fields of struture and append to itab
append wa_rrsource_int_ext_upd to it_rrsource_int_ext_upd.

"populate fields of struture and append to itab
append wa_rrtarget_int_ext to it_rrtarget_int_ext.

"populate fields of struture and append to itab
append wa_rerout_incons to it_rerout_incons. . CALL FUNCTION 'EWCM_CHECK_REROUTING' * EXPORTING * target_kurst_int = ld_target_kurst_int * target_kurst_ext = ld_target_kurst_ext * target_kurst_int_ext = ld_target_kurst_int_ext * main_kurst = ld_main_kurst * rerout_date = ld_rerout_date IMPORTING rerouting_int_ok = ld_rerouting_int_ok rerouting_ext_ok = ld_rerouting_ext_ok rerouting_int_ext_ok = ld_rerouting_int_ext_ok TABLES waers_list = it_waers_list * waers_no_chge = it_waers_no_chge kurst_list = it_kurst_list * rrsource_int_ins = it_rrsource_int_ins * rrsource_int_upd = it_rrsource_int_upd * rrtarget_int = it_rrtarget_int * rrsource_ext_ins = it_rrsource_ext_ins * rrsource_ext_upd = it_rrsource_ext_upd * rrtarget_ext = it_rrtarget_ext * rrsource_int_ext_ins = it_rrsource_int_ext_ins * rrsource_int_ext_upd = it_rrsource_int_ext_upd * rrtarget_int_ext = it_rrtarget_int_ext * rerout_incons = it_rerout_incons EXCEPTIONS OUTPUT_REQUEST_INCONSISTENT = 1 INCONSISTENT_REROUTING_FOUND = 2 INCOMPLETE_INPUT = 3 . " EWCM_CHECK_REROUTING
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_rerouting_int_ok  TYPE BOOLE-BOOLE ,
ld_target_kurst_int  TYPE TCURV-KURST ,
it_waers_list  TYPE STANDARD TABLE OF EWWAERLIST ,
wa_waers_list  LIKE LINE OF it_waers_list,
ld_rerouting_ext_ok  TYPE BOOLE-BOOLE ,
ld_target_kurst_ext  TYPE TCURV-KURST ,
it_waers_no_chge  TYPE STANDARD TABLE OF EWWAERLIST ,
wa_waers_no_chge  LIKE LINE OF it_waers_no_chge,
ld_rerouting_int_ext_ok  TYPE BOOLE-BOOLE ,
ld_target_kurst_int_ext  TYPE TCURV-KURST ,
it_kurst_list  TYPE STANDARD TABLE OF EWKURSTLST ,
wa_kurst_list  LIKE LINE OF it_kurst_list,
it_rrsource_int_ins  TYPE STANDARD TABLE OF TCURF ,
wa_rrsource_int_ins  LIKE LINE OF it_rrsource_int_ins,
ld_main_kurst  TYPE TCURV-KURST ,
it_rrsource_int_upd  TYPE STANDARD TABLE OF TCURF ,
wa_rrsource_int_upd  LIKE LINE OF it_rrsource_int_upd,
ld_rerout_date  TYPE TCURF-ABWGA ,
it_rrtarget_int  TYPE STANDARD TABLE OF TCURF ,
wa_rrtarget_int  LIKE LINE OF it_rrtarget_int,
it_rrsource_ext_ins  TYPE STANDARD TABLE OF TCURF ,
wa_rrsource_ext_ins  LIKE LINE OF it_rrsource_ext_ins,
it_rrsource_ext_upd  TYPE STANDARD TABLE OF TCURF ,
wa_rrsource_ext_upd  LIKE LINE OF it_rrsource_ext_upd,
it_rrtarget_ext  TYPE STANDARD TABLE OF TCURF ,
wa_rrtarget_ext  LIKE LINE OF it_rrtarget_ext,
it_rrsource_int_ext_ins  TYPE STANDARD TABLE OF TCURF ,
wa_rrsource_int_ext_ins  LIKE LINE OF it_rrsource_int_ext_ins,
it_rrsource_int_ext_upd  TYPE STANDARD TABLE OF TCURF ,
wa_rrsource_int_ext_upd  LIKE LINE OF it_rrsource_int_ext_upd,
it_rrtarget_int_ext  TYPE STANDARD TABLE OF TCURF ,
wa_rrtarget_int_ext  LIKE LINE OF it_rrtarget_int_ext,
it_rerout_incons  TYPE STANDARD TABLE OF TCURF ,
wa_rerout_incons  LIKE LINE OF it_rerout_incons.


SELECT single KURST
FROM TCURV
INTO ld_target_kurst_int.


"populate fields of struture and append to itab
append wa_waers_list to it_waers_list.

SELECT single KURST
FROM TCURV
INTO ld_target_kurst_ext.


"populate fields of struture and append to itab
append wa_waers_no_chge to it_waers_no_chge.

SELECT single KURST
FROM TCURV
INTO ld_target_kurst_int_ext.


"populate fields of struture and append to itab
append wa_kurst_list to it_kurst_list.

"populate fields of struture and append to itab
append wa_rrsource_int_ins to it_rrsource_int_ins.

SELECT single KURST
FROM TCURV
INTO ld_main_kurst.


"populate fields of struture and append to itab
append wa_rrsource_int_upd to it_rrsource_int_upd.

SELECT single ABWGA
FROM TCURF
INTO ld_rerout_date.


"populate fields of struture and append to itab
append wa_rrtarget_int to it_rrtarget_int.

"populate fields of struture and append to itab
append wa_rrsource_ext_ins to it_rrsource_ext_ins.

"populate fields of struture and append to itab
append wa_rrsource_ext_upd to it_rrsource_ext_upd.

"populate fields of struture and append to itab
append wa_rrtarget_ext to it_rrtarget_ext.

"populate fields of struture and append to itab
append wa_rrsource_int_ext_ins to it_rrsource_int_ext_ins.

"populate fields of struture and append to itab
append wa_rrsource_int_ext_upd to it_rrsource_int_ext_upd.

"populate fields of struture and append to itab
append wa_rrtarget_int_ext to it_rrtarget_int_ext.

"populate fields of struture and append to itab
append wa_rerout_incons to it_rerout_incons.

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