SAP Function Modules

MASTERIDOC_CREATE_MATMAS SAP Function module







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

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


Pattern for FM MASTERIDOC_CREATE_MATMAS - MASTERIDOC CREATE MATMAS





CALL FUNCTION 'MASTERIDOC_CREATE_MATMAS' "
  EXPORTING
    marakey =                   " bdimarakey
    rcvpfc =                    " bdaledc-rcvpfc
    rcvprn =                    " bdaledc-rcvprn
    rcvprt =                    " bdaledc-rcvprt
    sndpfc =                    " bdaledc-sndpfc
    sndprn =                    " bdaledc-sndprn
    sndprt =                    " bdaledc-sndprt
    message_type =              " tbdme-mestyp
*   flag_testmode = ' '         "
*   x_conv = ' '                " sy-batch
*   sendconfig =                " mgale-sendall  Indicator: Distribute material with all its links
*   sendconfig_all = 'X'        " xfeld
  IMPORTING
    created_comm_idocs =        " sy-tabix
  TABLES
    maktkey =                   " bdimaktkey
    marckey =                   " bdimarckey
    mardkey =                   " bdimardkey
    marmkey =                   " bdimarmkey
    meankey =                   " bdimeankey
    mvkekey =                   " bdimvkekey
    mlankey =                   " bdimlankey
    mbewkey =                   " bdimbewkey
    mlgnkey =                   " bdimlgnkey
    mlgtkey =                   " bdimlgtkey
    stxhkey =                   " bdistxhkey
*   mfhmkey =                   " bdimfhmkey
*   mpopkey =                   " bdimpopkey
*   mprwkey =                   " bdimprwkey
*   mvegkey =                   " bdimvegkey
*   mveukey =                   " bdimveukey
*   mpgdkey =                   " bdimpgdkey
*   mkalkey =                   " bdimkalkey
*   it_send_config =            " mvse_send_config  Send Transfer Structure f. Mat. Variants by Change Pointer
*   te_idoc_control =           " edidc         Control Record (IDoc)
*   it_steumm_ueb =             " steumm_ueb    Purchasing Taxes for Material
    .  "  MASTERIDOC_CREATE_MATMAS

ABAP code example for Function Module MASTERIDOC_CREATE_MATMAS





The ABAP code below is a full code listing to execute function module MASTERIDOC_CREATE_MATMAS 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_created_comm_idocs  TYPE SY-TABIX ,
it_maktkey  TYPE STANDARD TABLE OF BDIMAKTKEY,"TABLES PARAM
wa_maktkey  LIKE LINE OF it_maktkey ,
it_marckey  TYPE STANDARD TABLE OF BDIMARCKEY,"TABLES PARAM
wa_marckey  LIKE LINE OF it_marckey ,
it_mardkey  TYPE STANDARD TABLE OF BDIMARDKEY,"TABLES PARAM
wa_mardkey  LIKE LINE OF it_mardkey ,
it_marmkey  TYPE STANDARD TABLE OF BDIMARMKEY,"TABLES PARAM
wa_marmkey  LIKE LINE OF it_marmkey ,
it_meankey  TYPE STANDARD TABLE OF BDIMEANKEY,"TABLES PARAM
wa_meankey  LIKE LINE OF it_meankey ,
it_mvkekey  TYPE STANDARD TABLE OF BDIMVKEKEY,"TABLES PARAM
wa_mvkekey  LIKE LINE OF it_mvkekey ,
it_mlankey  TYPE STANDARD TABLE OF BDIMLANKEY,"TABLES PARAM
wa_mlankey  LIKE LINE OF it_mlankey ,
it_mbewkey  TYPE STANDARD TABLE OF BDIMBEWKEY,"TABLES PARAM
wa_mbewkey  LIKE LINE OF it_mbewkey ,
it_mlgnkey  TYPE STANDARD TABLE OF BDIMLGNKEY,"TABLES PARAM
wa_mlgnkey  LIKE LINE OF it_mlgnkey ,
it_mlgtkey  TYPE STANDARD TABLE OF BDIMLGTKEY,"TABLES PARAM
wa_mlgtkey  LIKE LINE OF it_mlgtkey ,
it_stxhkey  TYPE STANDARD TABLE OF BDISTXHKEY,"TABLES PARAM
wa_stxhkey  LIKE LINE OF it_stxhkey ,
it_mfhmkey  TYPE STANDARD TABLE OF BDIMFHMKEY,"TABLES PARAM
wa_mfhmkey  LIKE LINE OF it_mfhmkey ,
it_mpopkey  TYPE STANDARD TABLE OF BDIMPOPKEY,"TABLES PARAM
wa_mpopkey  LIKE LINE OF it_mpopkey ,
it_mprwkey  TYPE STANDARD TABLE OF BDIMPRWKEY,"TABLES PARAM
wa_mprwkey  LIKE LINE OF it_mprwkey ,
it_mvegkey  TYPE STANDARD TABLE OF BDIMVEGKEY,"TABLES PARAM
wa_mvegkey  LIKE LINE OF it_mvegkey ,
it_mveukey  TYPE STANDARD TABLE OF BDIMVEUKEY,"TABLES PARAM
wa_mveukey  LIKE LINE OF it_mveukey ,
it_mpgdkey  TYPE STANDARD TABLE OF BDIMPGDKEY,"TABLES PARAM
wa_mpgdkey  LIKE LINE OF it_mpgdkey ,
it_mkalkey  TYPE STANDARD TABLE OF BDIMKALKEY,"TABLES PARAM
wa_mkalkey  LIKE LINE OF it_mkalkey ,
it_it_send_config  TYPE STANDARD TABLE OF MVSE_SEND_CONFIG,"TABLES PARAM
wa_it_send_config  LIKE LINE OF it_it_send_config ,
it_te_idoc_control  TYPE STANDARD TABLE OF EDIDC,"TABLES PARAM
wa_te_idoc_control  LIKE LINE OF it_te_idoc_control ,
it_it_steumm_ueb  TYPE STANDARD TABLE OF STEUMM_UEB,"TABLES PARAM
wa_it_steumm_ueb  LIKE LINE OF it_it_steumm_ueb .

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

DATA(ld_rcvpfc) = some text here

DATA(ld_rcvprn) = some text here

DATA(ld_rcvprt) = some text here

DATA(ld_sndpfc) = some text here

DATA(ld_sndprn) = some text here

DATA(ld_sndprt) = some text here

SELECT single MESTYP
FROM TBDME
INTO @DATA(ld_message_type).

DATA(ld_flag_testmode) = 'some text here'.
DATA(ld_x_conv) = 'some text here'.

DATA(ld_sendconfig) = some text here
DATA(ld_sendconfig_all) = 'some text here'.

"populate fields of struture and append to itab
append wa_maktkey to it_maktkey.

"populate fields of struture and append to itab
append wa_marckey to it_marckey.

"populate fields of struture and append to itab
append wa_mardkey to it_mardkey.

"populate fields of struture and append to itab
append wa_marmkey to it_marmkey.

"populate fields of struture and append to itab
append wa_meankey to it_meankey.

"populate fields of struture and append to itab
append wa_mvkekey to it_mvkekey.

"populate fields of struture and append to itab
append wa_mlankey to it_mlankey.

"populate fields of struture and append to itab
append wa_mbewkey to it_mbewkey.

"populate fields of struture and append to itab
append wa_mlgnkey to it_mlgnkey.

"populate fields of struture and append to itab
append wa_mlgtkey to it_mlgtkey.

"populate fields of struture and append to itab
append wa_stxhkey to it_stxhkey.

"populate fields of struture and append to itab
append wa_mfhmkey to it_mfhmkey.

"populate fields of struture and append to itab
append wa_mpopkey to it_mpopkey.

"populate fields of struture and append to itab
append wa_mprwkey to it_mprwkey.

"populate fields of struture and append to itab
append wa_mvegkey to it_mvegkey.

"populate fields of struture and append to itab
append wa_mveukey to it_mveukey.

"populate fields of struture and append to itab
append wa_mpgdkey to it_mpgdkey.

"populate fields of struture and append to itab
append wa_mkalkey to it_mkalkey.

"populate fields of struture and append to itab
append wa_it_send_config to it_it_send_config.

"populate fields of struture and append to itab
append wa_te_idoc_control to it_te_idoc_control.

"populate fields of struture and append to itab
append wa_it_steumm_ueb to it_it_steumm_ueb. . CALL FUNCTION 'MASTERIDOC_CREATE_MATMAS' EXPORTING marakey = ld_marakey rcvpfc = ld_rcvpfc rcvprn = ld_rcvprn rcvprt = ld_rcvprt sndpfc = ld_sndpfc sndprn = ld_sndprn sndprt = ld_sndprt message_type = ld_message_type * flag_testmode = ld_flag_testmode * x_conv = ld_x_conv * sendconfig = ld_sendconfig * sendconfig_all = ld_sendconfig_all IMPORTING created_comm_idocs = ld_created_comm_idocs TABLES maktkey = it_maktkey marckey = it_marckey mardkey = it_mardkey marmkey = it_marmkey meankey = it_meankey mvkekey = it_mvkekey mlankey = it_mlankey mbewkey = it_mbewkey mlgnkey = it_mlgnkey mlgtkey = it_mlgtkey stxhkey = it_stxhkey * mfhmkey = it_mfhmkey * mpopkey = it_mpopkey * mprwkey = it_mprwkey * mvegkey = it_mvegkey * mveukey = it_mveukey * mpgdkey = it_mpgdkey * mkalkey = it_mkalkey * it_send_config = it_it_send_config * te_idoc_control = it_te_idoc_control * it_steumm_ueb = it_it_steumm_ueb . " MASTERIDOC_CREATE_MATMAS
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_created_comm_idocs  TYPE SY-TABIX ,
ld_marakey  TYPE BDIMARAKEY ,
it_maktkey  TYPE STANDARD TABLE OF BDIMAKTKEY ,
wa_maktkey  LIKE LINE OF it_maktkey,
ld_rcvpfc  TYPE BDALEDC-RCVPFC ,
it_marckey  TYPE STANDARD TABLE OF BDIMARCKEY ,
wa_marckey  LIKE LINE OF it_marckey,
ld_rcvprn  TYPE BDALEDC-RCVPRN ,
it_mardkey  TYPE STANDARD TABLE OF BDIMARDKEY ,
wa_mardkey  LIKE LINE OF it_mardkey,
it_marmkey  TYPE STANDARD TABLE OF BDIMARMKEY ,
wa_marmkey  LIKE LINE OF it_marmkey,
ld_rcvprt  TYPE BDALEDC-RCVPRT ,
it_meankey  TYPE STANDARD TABLE OF BDIMEANKEY ,
wa_meankey  LIKE LINE OF it_meankey,
ld_sndpfc  TYPE BDALEDC-SNDPFC ,
it_mvkekey  TYPE STANDARD TABLE OF BDIMVKEKEY ,
wa_mvkekey  LIKE LINE OF it_mvkekey,
ld_sndprn  TYPE BDALEDC-SNDPRN ,
it_mlankey  TYPE STANDARD TABLE OF BDIMLANKEY ,
wa_mlankey  LIKE LINE OF it_mlankey,
ld_sndprt  TYPE BDALEDC-SNDPRT ,
it_mbewkey  TYPE STANDARD TABLE OF BDIMBEWKEY ,
wa_mbewkey  LIKE LINE OF it_mbewkey,
ld_message_type  TYPE TBDME-MESTYP ,
ld_flag_testmode  TYPE STRING ,
it_mlgnkey  TYPE STANDARD TABLE OF BDIMLGNKEY ,
wa_mlgnkey  LIKE LINE OF it_mlgnkey,
ld_x_conv  TYPE SY-BATCH ,
it_mlgtkey  TYPE STANDARD TABLE OF BDIMLGTKEY ,
wa_mlgtkey  LIKE LINE OF it_mlgtkey,
ld_sendconfig  TYPE MGALE-SENDALL ,
it_stxhkey  TYPE STANDARD TABLE OF BDISTXHKEY ,
wa_stxhkey  LIKE LINE OF it_stxhkey,
ld_sendconfig_all  TYPE XFELD ,
it_mfhmkey  TYPE STANDARD TABLE OF BDIMFHMKEY ,
wa_mfhmkey  LIKE LINE OF it_mfhmkey,
it_mpopkey  TYPE STANDARD TABLE OF BDIMPOPKEY ,
wa_mpopkey  LIKE LINE OF it_mpopkey,
it_mprwkey  TYPE STANDARD TABLE OF BDIMPRWKEY ,
wa_mprwkey  LIKE LINE OF it_mprwkey,
it_mvegkey  TYPE STANDARD TABLE OF BDIMVEGKEY ,
wa_mvegkey  LIKE LINE OF it_mvegkey,
it_mveukey  TYPE STANDARD TABLE OF BDIMVEUKEY ,
wa_mveukey  LIKE LINE OF it_mveukey,
it_mpgdkey  TYPE STANDARD TABLE OF BDIMPGDKEY ,
wa_mpgdkey  LIKE LINE OF it_mpgdkey,
it_mkalkey  TYPE STANDARD TABLE OF BDIMKALKEY ,
wa_mkalkey  LIKE LINE OF it_mkalkey,
it_it_send_config  TYPE STANDARD TABLE OF MVSE_SEND_CONFIG ,
wa_it_send_config  LIKE LINE OF it_it_send_config,
it_te_idoc_control  TYPE STANDARD TABLE OF EDIDC ,
wa_te_idoc_control  LIKE LINE OF it_te_idoc_control,
it_it_steumm_ueb  TYPE STANDARD TABLE OF STEUMM_UEB ,
wa_it_steumm_ueb  LIKE LINE OF it_it_steumm_ueb.

ld_marakey = 'some text here'.

"populate fields of struture and append to itab
append wa_maktkey to it_maktkey.

ld_rcvpfc = some text here

"populate fields of struture and append to itab
append wa_marckey to it_marckey.

ld_rcvprn = some text here

"populate fields of struture and append to itab
append wa_mardkey to it_mardkey.

"populate fields of struture and append to itab
append wa_marmkey to it_marmkey.

ld_rcvprt = some text here

"populate fields of struture and append to itab
append wa_meankey to it_meankey.

ld_sndpfc = some text here

"populate fields of struture and append to itab
append wa_mvkekey to it_mvkekey.

ld_sndprn = some text here

"populate fields of struture and append to itab
append wa_mlankey to it_mlankey.

ld_sndprt = some text here

"populate fields of struture and append to itab
append wa_mbewkey to it_mbewkey.

SELECT single MESTYP
FROM TBDME
INTO ld_message_type.

ld_flag_testmode = 'some text here'.

"populate fields of struture and append to itab
append wa_mlgnkey to it_mlgnkey.
ld_x_conv = 'some text here'.

"populate fields of struture and append to itab
append wa_mlgtkey to it_mlgtkey.

ld_sendconfig = some text here

"populate fields of struture and append to itab
append wa_stxhkey to it_stxhkey.
ld_sendconfig_all = 'some text here'.

"populate fields of struture and append to itab
append wa_mfhmkey to it_mfhmkey.

"populate fields of struture and append to itab
append wa_mpopkey to it_mpopkey.

"populate fields of struture and append to itab
append wa_mprwkey to it_mprwkey.

"populate fields of struture and append to itab
append wa_mvegkey to it_mvegkey.

"populate fields of struture and append to itab
append wa_mveukey to it_mveukey.

"populate fields of struture and append to itab
append wa_mpgdkey to it_mpgdkey.

"populate fields of struture and append to itab
append wa_mkalkey to it_mkalkey.

"populate fields of struture and append to itab
append wa_it_send_config to it_it_send_config.

"populate fields of struture and append to itab
append wa_te_idoc_control to it_te_idoc_control.

"populate fields of struture and append to itab
append wa_it_steumm_ueb to it_it_steumm_ueb.

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