SAP Function Modules

MM_ARRANG_NEW_IWMB01 SAP Function module







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

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


Pattern for FM MM_ARRANG_NEW_IWMB01 - MM ARRANG NEW IWMB01





CALL FUNCTION 'MM_ARRANG_NEW_IWMB01' "
  EXPORTING
    i_kona =                    " kona
    i_t6b1 =                    " t6b1
    i_t001 =                    " t001
    i_vake =                    " vake
    i_konh =                    " konh
    i_konp =                    " konp
    i_konp_main =               " konp
    i_old_vake =                " vake
    i_tmab =                    " tmab
    i_abgleich_period =         " c
    i_sortfields =              " arrang_sortfields
    i_turnover_type =           " rwm02-umsart
    i_filter_handle =           " i
    i_lines_to_append =         " i
    i_ref_wmb01 =               " wmb01
    i_error =                   " c
  IMPORTING
    e_old_last_line =           " sy-tabix
    e_rv13a =                   " rv13a
    e_subrc =                   " sy-subrc
  TABLES
    t_xkonp =                   " konpdb
    t_variable_key =            " vake
    t_condition_record =        " konp
    t_turnover_vrsio_akt =      " arrangvalu
    t_turnover_vrsio_cnd =      " arrangvalu
    t_turnover_vrsio_fix =      " arrangvalu
    t_iwmb01_ind =              " wmb01_ind
    t_iwmb01 =                  " wmb01
*   t_error_messages =          " arrang_err
    .  "  MM_ARRANG_NEW_IWMB01

ABAP code example for Function Module MM_ARRANG_NEW_IWMB01





The ABAP code below is a full code listing to execute function module MM_ARRANG_NEW_IWMB01 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_e_old_last_line  TYPE SY-TABIX ,
ld_e_rv13a  TYPE RV13A ,
ld_e_subrc  TYPE SY-SUBRC ,
it_t_xkonp  TYPE STANDARD TABLE OF KONPDB,"TABLES PARAM
wa_t_xkonp  LIKE LINE OF it_t_xkonp ,
it_t_variable_key  TYPE STANDARD TABLE OF VAKE,"TABLES PARAM
wa_t_variable_key  LIKE LINE OF it_t_variable_key ,
it_t_condition_record  TYPE STANDARD TABLE OF KONP,"TABLES PARAM
wa_t_condition_record  LIKE LINE OF it_t_condition_record ,
it_t_turnover_vrsio_akt  TYPE STANDARD TABLE OF ARRANGVALU,"TABLES PARAM
wa_t_turnover_vrsio_akt  LIKE LINE OF it_t_turnover_vrsio_akt ,
it_t_turnover_vrsio_cnd  TYPE STANDARD TABLE OF ARRANGVALU,"TABLES PARAM
wa_t_turnover_vrsio_cnd  LIKE LINE OF it_t_turnover_vrsio_cnd ,
it_t_turnover_vrsio_fix  TYPE STANDARD TABLE OF ARRANGVALU,"TABLES PARAM
wa_t_turnover_vrsio_fix  LIKE LINE OF it_t_turnover_vrsio_fix ,
it_t_iwmb01_ind  TYPE STANDARD TABLE OF WMB01_IND,"TABLES PARAM
wa_t_iwmb01_ind  LIKE LINE OF it_t_iwmb01_ind ,
it_t_iwmb01  TYPE STANDARD TABLE OF WMB01,"TABLES PARAM
wa_t_iwmb01  LIKE LINE OF it_t_iwmb01 ,
it_t_error_messages  TYPE STANDARD TABLE OF ARRANG_ERR,"TABLES PARAM
wa_t_error_messages  LIKE LINE OF it_t_error_messages .

DATA(ld_i_kona) = 'Check type of data required'.
DATA(ld_i_t6b1) = 'Check type of data required'.
DATA(ld_i_t001) = 'Check type of data required'.
DATA(ld_i_vake) = 'Check type of data required'.
DATA(ld_i_konh) = 'Check type of data required'.
DATA(ld_i_konp) = 'Check type of data required'.
DATA(ld_i_konp_main) = 'Check type of data required'.
DATA(ld_i_old_vake) = 'Check type of data required'.
DATA(ld_i_tmab) = 'Check type of data required'.
DATA(ld_i_abgleich_period) = 'Check type of data required'.
DATA(ld_i_sortfields) = 'Check type of data required'.

DATA(ld_i_turnover_type) = some text here
DATA(ld_i_filter_handle) = 'Check type of data required'.
DATA(ld_i_lines_to_append) = 'Check type of data required'.
DATA(ld_i_ref_wmb01) = 'Check type of data required'.
DATA(ld_i_error) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_xkonp to it_t_xkonp.

"populate fields of struture and append to itab
append wa_t_variable_key to it_t_variable_key.

"populate fields of struture and append to itab
append wa_t_condition_record to it_t_condition_record.

"populate fields of struture and append to itab
append wa_t_turnover_vrsio_akt to it_t_turnover_vrsio_akt.

"populate fields of struture and append to itab
append wa_t_turnover_vrsio_cnd to it_t_turnover_vrsio_cnd.

"populate fields of struture and append to itab
append wa_t_turnover_vrsio_fix to it_t_turnover_vrsio_fix.

"populate fields of struture and append to itab
append wa_t_iwmb01_ind to it_t_iwmb01_ind.

"populate fields of struture and append to itab
append wa_t_iwmb01 to it_t_iwmb01.

"populate fields of struture and append to itab
append wa_t_error_messages to it_t_error_messages. . CALL FUNCTION 'MM_ARRANG_NEW_IWMB01' EXPORTING i_kona = ld_i_kona i_t6b1 = ld_i_t6b1 i_t001 = ld_i_t001 i_vake = ld_i_vake i_konh = ld_i_konh i_konp = ld_i_konp i_konp_main = ld_i_konp_main i_old_vake = ld_i_old_vake i_tmab = ld_i_tmab i_abgleich_period = ld_i_abgleich_period i_sortfields = ld_i_sortfields i_turnover_type = ld_i_turnover_type i_filter_handle = ld_i_filter_handle i_lines_to_append = ld_i_lines_to_append i_ref_wmb01 = ld_i_ref_wmb01 i_error = ld_i_error IMPORTING e_old_last_line = ld_e_old_last_line e_rv13a = ld_e_rv13a e_subrc = ld_e_subrc TABLES t_xkonp = it_t_xkonp t_variable_key = it_t_variable_key t_condition_record = it_t_condition_record t_turnover_vrsio_akt = it_t_turnover_vrsio_akt t_turnover_vrsio_cnd = it_t_turnover_vrsio_cnd t_turnover_vrsio_fix = it_t_turnover_vrsio_fix t_iwmb01_ind = it_t_iwmb01_ind t_iwmb01 = it_t_iwmb01 * t_error_messages = it_t_error_messages . " MM_ARRANG_NEW_IWMB01
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_e_old_last_line  TYPE SY-TABIX ,
ld_i_kona  TYPE KONA ,
it_t_xkonp  TYPE STANDARD TABLE OF KONPDB ,
wa_t_xkonp  LIKE LINE OF it_t_xkonp,
ld_e_rv13a  TYPE RV13A ,
ld_i_t6b1  TYPE T6B1 ,
it_t_variable_key  TYPE STANDARD TABLE OF VAKE ,
wa_t_variable_key  LIKE LINE OF it_t_variable_key,
ld_e_subrc  TYPE SY-SUBRC ,
ld_i_t001  TYPE T001 ,
it_t_condition_record  TYPE STANDARD TABLE OF KONP ,
wa_t_condition_record  LIKE LINE OF it_t_condition_record,
ld_i_vake  TYPE VAKE ,
it_t_turnover_vrsio_akt  TYPE STANDARD TABLE OF ARRANGVALU ,
wa_t_turnover_vrsio_akt  LIKE LINE OF it_t_turnover_vrsio_akt,
ld_i_konh  TYPE KONH ,
it_t_turnover_vrsio_cnd  TYPE STANDARD TABLE OF ARRANGVALU ,
wa_t_turnover_vrsio_cnd  LIKE LINE OF it_t_turnover_vrsio_cnd,
ld_i_konp  TYPE KONP ,
it_t_turnover_vrsio_fix  TYPE STANDARD TABLE OF ARRANGVALU ,
wa_t_turnover_vrsio_fix  LIKE LINE OF it_t_turnover_vrsio_fix,
ld_i_konp_main  TYPE KONP ,
it_t_iwmb01_ind  TYPE STANDARD TABLE OF WMB01_IND ,
wa_t_iwmb01_ind  LIKE LINE OF it_t_iwmb01_ind,
it_t_iwmb01  TYPE STANDARD TABLE OF WMB01 ,
wa_t_iwmb01  LIKE LINE OF it_t_iwmb01,
ld_i_old_vake  TYPE VAKE ,
it_t_error_messages  TYPE STANDARD TABLE OF ARRANG_ERR ,
wa_t_error_messages  LIKE LINE OF it_t_error_messages,
ld_i_tmab  TYPE TMAB ,
ld_i_abgleich_period  TYPE C ,
ld_i_sortfields  TYPE ARRANG_SORTFIELDS ,
ld_i_turnover_type  TYPE RWM02-UMSART ,
ld_i_filter_handle  TYPE I ,
ld_i_lines_to_append  TYPE I ,
ld_i_ref_wmb01  TYPE WMB01 ,
ld_i_error  TYPE C .

ld_i_kona = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_xkonp to it_t_xkonp.
ld_i_t6b1 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_variable_key to it_t_variable_key.
ld_i_t001 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_condition_record to it_t_condition_record.
ld_i_vake = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_turnover_vrsio_akt to it_t_turnover_vrsio_akt.
ld_i_konh = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_turnover_vrsio_cnd to it_t_turnover_vrsio_cnd.
ld_i_konp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_turnover_vrsio_fix to it_t_turnover_vrsio_fix.
ld_i_konp_main = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_iwmb01_ind to it_t_iwmb01_ind.

"populate fields of struture and append to itab
append wa_t_iwmb01 to it_t_iwmb01.
ld_i_old_vake = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_error_messages to it_t_error_messages.
ld_i_tmab = 'Check type of data required'.
ld_i_abgleich_period = 'Check type of data required'.
ld_i_sortfields = 'Check type of data required'.

ld_i_turnover_type = some text here
ld_i_filter_handle = 'Check type of data required'.
ld_i_lines_to_append = 'Check type of data required'.
ld_i_ref_wmb01 = 'Check type of data required'.
ld_i_error = '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 MM_ARRANG_NEW_IWMB01 or its description.