SAP Function Modules

WRF_COPY_WMMB_TO_BUFFER SAP Function module - Copy Special WMMB Data







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

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


Pattern for FM WRF_COPY_WMMB_TO_BUFFER - WRF COPY WMMB TO BUFFER





CALL FUNCTION 'WRF_COPY_WMMB_TO_BUFFER' "Copy Special WMMB Data
* EXPORTING
*   i_cursor_field =            " help_info-dynprofld  Field Name
*   i_cursor_line =             " systepl       Screens: Index of Current Table Line
*   i_mode =                    " mtrx_mode-mode  Single-Character Indicator
*   t_ymodes =                  " mgwgm_t_ymodes
*   t_achsen =                  " mgwgm_t_achsen
*   fixed_values =              " mgwgm_t_fixval
*   t_werte =                   " mgwgm_t_werte
*   t_msel =                    " matrx_msel
*   t_zl_msel =                 " matrx_msel
*   t_sp_msel =                 " matrx_msel
*   t_zl_wsel =                 " mgwgm_t_wsel
*   t_sp_wsel =                 " mgwgm_t_wsel
* TABLES
*   t_vartab =                  " mtrx_vart     Nodes in Variant Article Matrix for Transfer to Int. Article
*   t_select_colum =            " t130f         Field Attributes
* CHANGING
*   t_wsel =                    " mgwgm_t_wsel
*   exit_posible =              " am07m-xselk   Checkbox
*   i_okcode =                  " sy-tcode      ABAP Program, Current Transaction Code
    .  "  WRF_COPY_WMMB_TO_BUFFER

ABAP code example for Function Module WRF_COPY_WMMB_TO_BUFFER





The ABAP code below is a full code listing to execute function module WRF_COPY_WMMB_TO_BUFFER 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_vartab  TYPE STANDARD TABLE OF MTRX_VART,"TABLES PARAM
wa_t_vartab  LIKE LINE OF it_t_vartab ,
it_t_select_colum  TYPE STANDARD TABLE OF T130F,"TABLES PARAM
wa_t_select_colum  LIKE LINE OF it_t_select_colum .

DATA(ld_t_wsel) = 'Check type of data required'.

DATA(ld_exit_posible) = some text here
DATA(ld_i_okcode) = 'some text here'.

DATA(ld_i_cursor_field) = some text here
DATA(ld_i_cursor_line) = 'some text here'.

DATA(ld_i_mode) = some text here
DATA(ld_t_ymodes) = 'some text here'.
DATA(ld_t_achsen) = 'some text here'.
DATA(ld_fixed_values) = 'some text here'.
DATA(ld_t_werte) = 'some text here'.
DATA(ld_t_msel) = 'some text here'.
DATA(ld_t_zl_msel) = 'some text here'.
DATA(ld_t_sp_msel) = 'some text here'.
DATA(ld_t_zl_wsel) = 'some text here'.
DATA(ld_t_sp_wsel) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_vartab to it_t_vartab.

"populate fields of struture and append to itab
append wa_t_select_colum to it_t_select_colum. . CALL FUNCTION 'WRF_COPY_WMMB_TO_BUFFER' * EXPORTING * i_cursor_field = ld_i_cursor_field * i_cursor_line = ld_i_cursor_line * i_mode = ld_i_mode * t_ymodes = ld_t_ymodes * t_achsen = ld_t_achsen * fixed_values = ld_fixed_values * t_werte = ld_t_werte * t_msel = ld_t_msel * t_zl_msel = ld_t_zl_msel * t_sp_msel = ld_t_sp_msel * t_zl_wsel = ld_t_zl_wsel * t_sp_wsel = ld_t_sp_wsel * TABLES * t_vartab = it_t_vartab * t_select_colum = it_t_select_colum * CHANGING * t_wsel = ld_t_wsel * exit_posible = ld_exit_posible * i_okcode = ld_i_okcode . " WRF_COPY_WMMB_TO_BUFFER
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_t_wsel  TYPE MGWGM_T_WSEL ,
ld_i_cursor_field  TYPE HELP_INFO-DYNPROFLD ,
it_t_vartab  TYPE STANDARD TABLE OF MTRX_VART ,
wa_t_vartab  LIKE LINE OF it_t_vartab,
ld_exit_posible  TYPE AM07M-XSELK ,
ld_i_cursor_line  TYPE SYSTEPL ,
it_t_select_colum  TYPE STANDARD TABLE OF T130F ,
wa_t_select_colum  LIKE LINE OF it_t_select_colum,
ld_i_okcode  TYPE SY-TCODE ,
ld_i_mode  TYPE MTRX_MODE-MODE ,
ld_t_ymodes  TYPE MGWGM_T_YMODES ,
ld_t_achsen  TYPE MGWGM_T_ACHSEN ,
ld_fixed_values  TYPE MGWGM_T_FIXVAL ,
ld_t_werte  TYPE MGWGM_T_WERTE ,
ld_t_msel  TYPE MATRX_MSEL ,
ld_t_zl_msel  TYPE MATRX_MSEL ,
ld_t_sp_msel  TYPE MATRX_MSEL ,
ld_t_zl_wsel  TYPE MGWGM_T_WSEL ,
ld_t_sp_wsel  TYPE MGWGM_T_WSEL .

ld_t_wsel = 'some text here'.

ld_i_cursor_field = some text here

"populate fields of struture and append to itab
append wa_t_vartab to it_t_vartab.

ld_exit_posible = some text here
ld_i_cursor_line = 'some text here'.

"populate fields of struture and append to itab
append wa_t_select_colum to it_t_select_colum.
ld_i_okcode = 'some text here'.

ld_i_mode = some text here
ld_t_ymodes = 'some text here'.
ld_t_achsen = 'some text here'.
ld_fixed_values = 'some text here'.
ld_t_werte = 'some text here'.
ld_t_msel = 'some text here'.
ld_t_zl_msel = 'some text here'.
ld_t_sp_msel = 'some text here'.
ld_t_zl_wsel = 'some text here'.
ld_t_sp_wsel = '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 WRF_COPY_WMMB_TO_BUFFER or its description.