SAP Function Modules

MM_DOCUMENT_INDEX_CREATE_NEW SAP Function module







MM_DOCUMENT_INDEX_CREATE_NEW 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_CREATE_NEW 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_CREATE_NEW - MM DOCUMENT INDEX CREATE NEW





CALL FUNCTION 'MM_DOCUMENT_INDEX_CREATE_NEW' "
  EXPORTING
    i_bltyp =                   " t6i1-bltyp    Document Category
*   i_ekko =                    " ekko
*   i_refresh_buffers = 'X'     " c
*   i_refresh_partners = SPACE  " c
*   i_pricing_date_from =       " rmeind1-bprdat_new  Date of Pricing (Limitation New Structure)
*   i_pricing_date_to =         " rmeind1-bprdat_new  Date of Pricing (Limitation New Structure)
  TABLES
    xekpo =                     " bekpo
    tmckonaib =                 " mckonaib      LIS communication struct.
    tkomv =                     " komv          Price Data
*   t_belind_err =              " belind_err    Structure for Noting Error Messages: Document Index
  EXCEPTIONS
    NOT_ACTIVE = 1              "
    .  "  MM_DOCUMENT_INDEX_CREATE_NEW

ABAP code example for Function Module MM_DOCUMENT_INDEX_CREATE_NEW





The ABAP code below is a full code listing to execute function module MM_DOCUMENT_INDEX_CREATE_NEW 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_xekpo  TYPE STANDARD TABLE OF BEKPO,"TABLES PARAM
wa_xekpo  LIKE LINE OF it_xekpo ,
it_tmckonaib  TYPE STANDARD TABLE OF MCKONAIB,"TABLES PARAM
wa_tmckonaib  LIKE LINE OF it_tmckonaib ,
it_tkomv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_tkomv  LIKE LINE OF it_tkomv ,
it_t_belind_err  TYPE STANDARD TABLE OF BELIND_ERR,"TABLES PARAM
wa_t_belind_err  LIKE LINE OF it_t_belind_err .


SELECT single BLTYP
FROM T6I1
INTO @DATA(ld_i_bltyp).

DATA(ld_i_ekko) = 'Check type of data required'.
DATA(ld_i_refresh_buffers) = 'Check type of data required'.
DATA(ld_i_refresh_partners) = 'Check type of data required'.

DATA(ld_i_pricing_date_from) = 20210129

DATA(ld_i_pricing_date_to) = 20210129

"populate fields of struture and append to itab
append wa_xekpo to it_xekpo.

"populate fields of struture and append to itab
append wa_tmckonaib to it_tmckonaib.

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

"populate fields of struture and append to itab
append wa_t_belind_err to it_t_belind_err. . CALL FUNCTION 'MM_DOCUMENT_INDEX_CREATE_NEW' EXPORTING i_bltyp = ld_i_bltyp * i_ekko = ld_i_ekko * i_refresh_buffers = ld_i_refresh_buffers * i_refresh_partners = ld_i_refresh_partners * i_pricing_date_from = ld_i_pricing_date_from * i_pricing_date_to = ld_i_pricing_date_to TABLES xekpo = it_xekpo tmckonaib = it_tmckonaib tkomv = it_tkomv * t_belind_err = it_t_belind_err EXCEPTIONS NOT_ACTIVE = 1 . " MM_DOCUMENT_INDEX_CREATE_NEW
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_i_bltyp  TYPE T6I1-BLTYP ,
it_xekpo  TYPE STANDARD TABLE OF BEKPO ,
wa_xekpo  LIKE LINE OF it_xekpo,
ld_i_ekko  TYPE EKKO ,
it_tmckonaib  TYPE STANDARD TABLE OF MCKONAIB ,
wa_tmckonaib  LIKE LINE OF it_tmckonaib,
ld_i_refresh_buffers  TYPE C ,
it_tkomv  TYPE STANDARD TABLE OF KOMV ,
wa_tkomv  LIKE LINE OF it_tkomv,
ld_i_refresh_partners  TYPE C ,
it_t_belind_err  TYPE STANDARD TABLE OF BELIND_ERR ,
wa_t_belind_err  LIKE LINE OF it_t_belind_err,
ld_i_pricing_date_from  TYPE RMEIND1-BPRDAT_NEW ,
ld_i_pricing_date_to  TYPE RMEIND1-BPRDAT_NEW .


SELECT single BLTYP
FROM T6I1
INTO ld_i_bltyp.


"populate fields of struture and append to itab
append wa_xekpo to it_xekpo.
ld_i_ekko = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tmckonaib to it_tmckonaib.
ld_i_refresh_buffers = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tkomv to it_tkomv.
ld_i_refresh_partners = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_belind_err to it_t_belind_err.

ld_i_pricing_date_from = 20210129

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