SAP Function Modules

RE_GET_OP_FOR_DEB SAP Function module







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

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


Pattern for FM RE_GET_OP_FOR_DEB - RE GET OP FOR DEB





CALL FUNCTION 'RE_GET_OP_FOR_DEB' "
* EXPORTING
*   i_debitor =                 " vzgpo-kunnr
*   i_bukrs =                   " vimimv-bukrs
*   i_smive =                   " vimimv-smive
*   i_seldate =                 " rfvipdo-dopvon
*   i_unqual_items = ' '        " c
*   i_open_itm = 'X'            " c
*   i_cleared_itm = 'X'         " c
* TABLES
*   t_items =                   " bsid
*   t_mkb =                     " fvimk_t_mkb
*   t_selopt =                  " rfvmkb
  EXCEPTIONS
    DEBITOR_NOT_FOUND = 1       "
    WRONG_INPUT = 2             "
    .  "  RE_GET_OP_FOR_DEB

ABAP code example for Function Module RE_GET_OP_FOR_DEB





The ABAP code below is a full code listing to execute function module RE_GET_OP_FOR_DEB 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_t_items  TYPE STANDARD TABLE OF BSID,"TABLES PARAM
wa_t_items  LIKE LINE OF it_t_items ,
it_t_mkb  TYPE STANDARD TABLE OF FVIMK_T_MKB,"TABLES PARAM
wa_t_mkb  LIKE LINE OF it_t_mkb ,
it_t_selopt  TYPE STANDARD TABLE OF RFVMKB,"TABLES PARAM
wa_t_selopt  LIKE LINE OF it_t_selopt .


SELECT single KUNNR
FROM VZGPO
INTO @DATA(ld_i_debitor).


SELECT single BUKRS
FROM VIMIMV
INTO @DATA(ld_i_bukrs).


SELECT single SMIVE
FROM VIMIMV
INTO @DATA(ld_i_smive).


DATA(ld_i_seldate) = 20210129
DATA(ld_i_unqual_items) = 'Check type of data required'.
DATA(ld_i_open_itm) = 'Check type of data required'.
DATA(ld_i_cleared_itm) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_items to it_t_items.

"populate fields of struture and append to itab
append wa_t_mkb to it_t_mkb.

"populate fields of struture and append to itab
append wa_t_selopt to it_t_selopt. . CALL FUNCTION 'RE_GET_OP_FOR_DEB' * EXPORTING * i_debitor = ld_i_debitor * i_bukrs = ld_i_bukrs * i_smive = ld_i_smive * i_seldate = ld_i_seldate * i_unqual_items = ld_i_unqual_items * i_open_itm = ld_i_open_itm * i_cleared_itm = ld_i_cleared_itm * TABLES * t_items = it_t_items * t_mkb = it_t_mkb * t_selopt = it_t_selopt EXCEPTIONS DEBITOR_NOT_FOUND = 1 WRONG_INPUT = 2 . " RE_GET_OP_FOR_DEB
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_i_debitor  TYPE VZGPO-KUNNR ,
it_t_items  TYPE STANDARD TABLE OF BSID ,
wa_t_items  LIKE LINE OF it_t_items,
ld_i_bukrs  TYPE VIMIMV-BUKRS ,
it_t_mkb  TYPE STANDARD TABLE OF FVIMK_T_MKB ,
wa_t_mkb  LIKE LINE OF it_t_mkb,
ld_i_smive  TYPE VIMIMV-SMIVE ,
it_t_selopt  TYPE STANDARD TABLE OF RFVMKB ,
wa_t_selopt  LIKE LINE OF it_t_selopt,
ld_i_seldate  TYPE RFVIPDO-DOPVON ,
ld_i_unqual_items  TYPE C ,
ld_i_open_itm  TYPE C ,
ld_i_cleared_itm  TYPE C .


SELECT single KUNNR
FROM VZGPO
INTO ld_i_debitor.


"populate fields of struture and append to itab
append wa_t_items to it_t_items.

SELECT single BUKRS
FROM VIMIMV
INTO ld_i_bukrs.


"populate fields of struture and append to itab
append wa_t_mkb to it_t_mkb.

SELECT single SMIVE
FROM VIMIMV
INTO ld_i_smive.


"populate fields of struture and append to itab
append wa_t_selopt to it_t_selopt.

ld_i_seldate = 20210129
ld_i_unqual_items = 'Check type of data required'.
ld_i_open_itm = 'Check type of data required'.
ld_i_cleared_itm = '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 RE_GET_OP_FOR_DEB or its description.