SAP Function Modules

MDT_RW_CALL SAP Function module







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

Associated Function Group: RHMWBRW
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM MDT_RW_CALL - MDT RW CALL





CALL FUNCTION 'MDT_RW_CALL' "
  EXPORTING
    rw_rep_name =               " srepovari-report
    act_kokrs =                 " pkeyk-kokrs
*   act_user = SY-UNAME         " sy-uname
*   key_date = SY-DATLO         " sy-datlo
* TABLES
*   costcenter =                " pkeyk
    .  "  MDT_RW_CALL

ABAP code example for Function Module MDT_RW_CALL





The ABAP code below is a full code listing to execute function module MDT_RW_CALL 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_costcenter  TYPE STANDARD TABLE OF PKEYK,"TABLES PARAM
wa_costcenter  LIKE LINE OF it_costcenter .


SELECT single REPORT
FROM SREPOVARI
INTO @DATA(ld_rw_rep_name).


DATA(ld_act_kokrs) = some text here
DATA(ld_act_user) = 'some text here'.
DATA(ld_key_date) = '20210129'.

"populate fields of struture and append to itab
append wa_costcenter to it_costcenter. . CALL FUNCTION 'MDT_RW_CALL' EXPORTING rw_rep_name = ld_rw_rep_name act_kokrs = ld_act_kokrs * act_user = ld_act_user * key_date = ld_key_date * TABLES * costcenter = it_costcenter . " MDT_RW_CALL
IF SY-SUBRC EQ 0. "All OK 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_rw_rep_name  TYPE SREPOVARI-REPORT ,
it_costcenter  TYPE STANDARD TABLE OF PKEYK ,
wa_costcenter  LIKE LINE OF it_costcenter,
ld_act_kokrs  TYPE PKEYK-KOKRS ,
ld_act_user  TYPE SY-UNAME ,
ld_key_date  TYPE SY-DATLO .


SELECT single REPORT
FROM SREPOVARI
INTO ld_rw_rep_name.


"populate fields of struture and append to itab
append wa_costcenter to it_costcenter.

ld_act_kokrs = some text here
ld_act_user = 'some text here'.
ld_key_date = '20210129'.

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