SAP Function Modules

MATERIAL_MAINTAIN_DIAL_RETAIL SAP Function module







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

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


Pattern for FM MATERIAL_MAINTAIN_DIAL_RETAIL - MATERIAL MAINTAIN DIAL RETAIL





CALL FUNCTION 'MATERIAL_MAINTAIN_DIAL_RETAIL' "
  EXPORTING
*   irmmw1 =                    " rmmw1
    t_tcode =                   " sy-tcode      Transaction
*   p_pstat = SPACE             " rmmw3-aktvsta_rt
*   flg_stat_all = ' '          " t130f-kzref
*   kz_ein_dark = ' '           " t130f-kzref
*   flg_matnr_res = ' '         " t130f-kzref
*   call_mode2 = ' '            " rmmg2-call_mode2
  IMPORTING
    material_no =               " mara-matnr
    update_ok =                 " t130f-kzref
* TABLES
*   iauswg =                    " mgauswg
  EXCEPTIONS
    NO_AUTHORITY = 1            "               No authorization for this transaction
    MORE_THEN_ONE_CALL = 2      "
    .  "  MATERIAL_MAINTAIN_DIAL_RETAIL

ABAP code example for Function Module MATERIAL_MAINTAIN_DIAL_RETAIL





The ABAP code below is a full code listing to execute function module MATERIAL_MAINTAIN_DIAL_RETAIL 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_material_no  TYPE MARA-MATNR ,
ld_update_ok  TYPE T130F-KZREF ,
it_iauswg  TYPE STANDARD TABLE OF MGAUSWG,"TABLES PARAM
wa_iauswg  LIKE LINE OF it_iauswg .

DATA(ld_irmmw1) = 'Check type of data required'.
DATA(ld_t_tcode) = 'some text here'.

DATA(ld_p_pstat) = some text here

SELECT single KZREF
FROM T130F
INTO @DATA(ld_flg_stat_all).


SELECT single KZREF
FROM T130F
INTO @DATA(ld_kz_ein_dark).


SELECT single KZREF
FROM T130F
INTO @DATA(ld_flg_matnr_res).


DATA(ld_call_mode2) = some text here

"populate fields of struture and append to itab
append wa_iauswg to it_iauswg. . CALL FUNCTION 'MATERIAL_MAINTAIN_DIAL_RETAIL' EXPORTING * irmmw1 = ld_irmmw1 t_tcode = ld_t_tcode * p_pstat = ld_p_pstat * flg_stat_all = ld_flg_stat_all * kz_ein_dark = ld_kz_ein_dark * flg_matnr_res = ld_flg_matnr_res * call_mode2 = ld_call_mode2 IMPORTING material_no = ld_material_no update_ok = ld_update_ok * TABLES * iauswg = it_iauswg EXCEPTIONS NO_AUTHORITY = 1 MORE_THEN_ONE_CALL = 2 . " MATERIAL_MAINTAIN_DIAL_RETAIL
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_material_no  TYPE MARA-MATNR ,
ld_irmmw1  TYPE RMMW1 ,
it_iauswg  TYPE STANDARD TABLE OF MGAUSWG ,
wa_iauswg  LIKE LINE OF it_iauswg,
ld_update_ok  TYPE T130F-KZREF ,
ld_t_tcode  TYPE SY-TCODE ,
ld_p_pstat  TYPE RMMW3-AKTVSTA_RT ,
ld_flg_stat_all  TYPE T130F-KZREF ,
ld_kz_ein_dark  TYPE T130F-KZREF ,
ld_flg_matnr_res  TYPE T130F-KZREF ,
ld_call_mode2  TYPE RMMG2-CALL_MODE2 .

ld_irmmw1 = 'some text here'.

"populate fields of struture and append to itab
append wa_iauswg to it_iauswg.
ld_t_tcode = 'some text here'.

ld_p_pstat = some text here

SELECT single KZREF
FROM T130F
INTO ld_flg_stat_all.


SELECT single KZREF
FROM T130F
INTO ld_kz_ein_dark.


SELECT single KZREF
FROM T130F
INTO ld_flg_matnr_res.


ld_call_mode2 = some text here

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