SAP Function Modules

MM_DOCUMENT_INDEX_BUILD SAP Function module - Generate Document Index for Condition Changes







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

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


Pattern for FM MM_DOCUMENT_INDEX_BUILD - MM DOCUMENT INDEX BUILD





CALL FUNCTION 'MM_DOCUMENT_INDEX_BUILD' "Generate Document Index for Condition Changes
  EXPORTING
    updkz_lis_index =           "               Update indicator
    i_bltyp =                   " c             Document category
    i_komk =                    " komk          Communication structure: header data
    i_komp =                    " komp          Communication structure: item data
    i_belnr =                   " komk-belnr    Document number
*   i_beldatab =                " sy-datum
*   i_beldatbi =                " sy-datum
*   i_date_from =               " mckonaib-datum
*   i_date_to =                 " mckonaib-datum
  TABLES
    tkomv =                     " komv          Price data
    tmckonai =                  " mckonaib      LIS structure for document index
*   t_belind_err =              " belind_err    Structure for Noting Error Messages: Document Index
    .  "  MM_DOCUMENT_INDEX_BUILD

ABAP code example for Function Module MM_DOCUMENT_INDEX_BUILD





The ABAP code below is a full code listing to execute function module MM_DOCUMENT_INDEX_BUILD 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_tkomv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_tkomv  LIKE LINE OF it_tkomv ,
it_tmckonai  TYPE STANDARD TABLE OF MCKONAIB,"TABLES PARAM
wa_tmckonai  LIKE LINE OF it_tmckonai ,
it_t_belind_err  TYPE STANDARD TABLE OF BELIND_ERR,"TABLES PARAM
wa_t_belind_err  LIKE LINE OF it_t_belind_err .

DATA(ld_updkz_lis_index) = 'some text here'.
DATA(ld_i_bltyp) = 'Check type of data required'.
DATA(ld_i_komk) = 'Check type of data required'.
DATA(ld_i_komp) = 'Check type of data required'.

DATA(ld_i_belnr) = some text here
DATA(ld_i_beldatab) = '20210129'.
DATA(ld_i_beldatbi) = '20210129'.

DATA(ld_i_date_from) = 20210129

DATA(ld_i_date_to) = 20210129

"populate fields of struture and append to itab
append wa_tkomv to it_tkomv.

"populate fields of struture and append to itab
append wa_tmckonai to it_tmckonai.

"populate fields of struture and append to itab
append wa_t_belind_err to it_t_belind_err. . CALL FUNCTION 'MM_DOCUMENT_INDEX_BUILD' EXPORTING updkz_lis_index = ld_updkz_lis_index i_bltyp = ld_i_bltyp i_komk = ld_i_komk i_komp = ld_i_komp i_belnr = ld_i_belnr * i_beldatab = ld_i_beldatab * i_beldatbi = ld_i_beldatbi * i_date_from = ld_i_date_from * i_date_to = ld_i_date_to TABLES tkomv = it_tkomv tmckonai = it_tmckonai * t_belind_err = it_t_belind_err . " MM_DOCUMENT_INDEX_BUILD
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_updkz_lis_index  TYPE STRING ,
it_tkomv  TYPE STANDARD TABLE OF KOMV ,
wa_tkomv  LIKE LINE OF it_tkomv,
ld_i_bltyp  TYPE C ,
it_tmckonai  TYPE STANDARD TABLE OF MCKONAIB ,
wa_tmckonai  LIKE LINE OF it_tmckonai,
ld_i_komk  TYPE KOMK ,
it_t_belind_err  TYPE STANDARD TABLE OF BELIND_ERR ,
wa_t_belind_err  LIKE LINE OF it_t_belind_err,
ld_i_komp  TYPE KOMP ,
ld_i_belnr  TYPE KOMK-BELNR ,
ld_i_beldatab  TYPE SY-DATUM ,
ld_i_beldatbi  TYPE SY-DATUM ,
ld_i_date_from  TYPE MCKONAIB-DATUM ,
ld_i_date_to  TYPE MCKONAIB-DATUM .

ld_updkz_lis_index = 'some text here'.

"populate fields of struture and append to itab
append wa_tkomv to it_tkomv.
ld_i_bltyp = '20210129'.

"populate fields of struture and append to itab
append wa_tmckonai to it_tmckonai.
ld_i_komk = '20210129'.

"populate fields of struture and append to itab
append wa_t_belind_err to it_t_belind_err.
ld_i_komp = '20210129'.

ld_i_belnr = some text here
ld_i_beldatab = '20210129'.
ld_i_beldatbi = '20210129'.

ld_i_date_from = 20210129

ld_i_date_to = 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 MM_DOCUMENT_INDEX_BUILD or its description.