SAP Function Modules

MI_MATERIAL_CHECK_RESB SAP Function module







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

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


Pattern for FM MI_MATERIAL_CHECK_RESB - MI MATERIAL CHECK RESB





CALL FUNCTION 'MI_MATERIAL_CHECK_RESB' "
  EXPORTING
    i_aufnr =                   " resb-aufnr
*   i_rsnum =                   " resb-rsnum
*   i_vornr =                   " resb-vornr
*   i_phase =                   " resb-vornr
    i_check =                   " char1
*   i_batch_splitt = 'Y'        " char1
*   i_resbtyp = 'A'             " char1
*   i_mode = SPACE              " char1
    i_matnr =                   " resb-matnr
*   i_charg =                   " resb-charg
  IMPORTING
    et_rspos =                  " resb_t
    ec_commit_necessary =       " char1
    ec_result =                 " char1
  EXCEPTIONS
    CHECK_ERROR = 1             "
    SPLIT_AMBIGOUS = 2          "
    MATERIAL_NOT_NEEDED = 3     "
    BATCH_NOT_NEEDED = 4        "
    .  "  MI_MATERIAL_CHECK_RESB

ABAP code example for Function Module MI_MATERIAL_CHECK_RESB





The ABAP code below is a full code listing to execute function module MI_MATERIAL_CHECK_RESB 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_et_rspos  TYPE RESB_T ,
ld_ec_commit_necessary  TYPE CHAR1 ,
ld_ec_result  TYPE CHAR1 .


SELECT single AUFNR
FROM RESB
INTO @DATA(ld_i_aufnr).


SELECT single RSNUM
FROM RESB
INTO @DATA(ld_i_rsnum).


SELECT single VORNR
FROM RESB
INTO @DATA(ld_i_vornr).


SELECT single VORNR
FROM RESB
INTO @DATA(ld_i_phase).

DATA(ld_i_check) = 'Check type of data required'.
DATA(ld_i_batch_splitt) = 'Check type of data required'.
DATA(ld_i_resbtyp) = 'Check type of data required'.
DATA(ld_i_mode) = 'Check type of data required'.

SELECT single MATNR
FROM RESB
INTO @DATA(ld_i_matnr).


SELECT single CHARG
FROM RESB
INTO @DATA(ld_i_charg).
. CALL FUNCTION 'MI_MATERIAL_CHECK_RESB' EXPORTING i_aufnr = ld_i_aufnr * i_rsnum = ld_i_rsnum * i_vornr = ld_i_vornr * i_phase = ld_i_phase i_check = ld_i_check * i_batch_splitt = ld_i_batch_splitt * i_resbtyp = ld_i_resbtyp * i_mode = ld_i_mode i_matnr = ld_i_matnr * i_charg = ld_i_charg IMPORTING et_rspos = ld_et_rspos ec_commit_necessary = ld_ec_commit_necessary ec_result = ld_ec_result EXCEPTIONS CHECK_ERROR = 1 SPLIT_AMBIGOUS = 2 MATERIAL_NOT_NEEDED = 3 BATCH_NOT_NEEDED = 4 . " MI_MATERIAL_CHECK_RESB
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 ELSEIF SY-SUBRC EQ 4. "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_et_rspos  TYPE RESB_T ,
ld_i_aufnr  TYPE RESB-AUFNR ,
ld_ec_commit_necessary  TYPE CHAR1 ,
ld_i_rsnum  TYPE RESB-RSNUM ,
ld_ec_result  TYPE CHAR1 ,
ld_i_vornr  TYPE RESB-VORNR ,
ld_i_phase  TYPE RESB-VORNR ,
ld_i_check  TYPE CHAR1 ,
ld_i_batch_splitt  TYPE CHAR1 ,
ld_i_resbtyp  TYPE CHAR1 ,
ld_i_mode  TYPE CHAR1 ,
ld_i_matnr  TYPE RESB-MATNR ,
ld_i_charg  TYPE RESB-CHARG .


SELECT single AUFNR
FROM RESB
INTO ld_i_aufnr.


SELECT single RSNUM
FROM RESB
INTO ld_i_rsnum.


SELECT single VORNR
FROM RESB
INTO ld_i_vornr.


SELECT single VORNR
FROM RESB
INTO ld_i_phase.

ld_i_check = 'Check type of data required'.
ld_i_batch_splitt = 'Check type of data required'.
ld_i_resbtyp = 'Check type of data required'.
ld_i_mode = 'Check type of data required'.

SELECT single MATNR
FROM RESB
INTO ld_i_matnr.


SELECT single CHARG
FROM RESB
INTO ld_i_charg.

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