SAP Function Modules

MDSTA_AUFBAUEN SAP Function module







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

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


Pattern for FM MDSTA_AUFBAUEN - MDSTA AUFBAUEN





CALL FUNCTION 'MDSTA_AUFBAUEN' "
  EXPORTING
    emdsta =                    " mdsta
*   einitf =                    "
*   emt61d = SPACE              " mt61d
*   ekzdwb = SPACE              " t399d-xfan1
*   ekzumb = SPACE              " t399d-kzumb
*   enfvbc = SPACE              " t399d-nfvbc
*   edsdat = SY-DATLO           " mdkp-dsdat    MRP Date
*   edefdt = SPACE              " boolean       Boolean Variable (X=True, -=False, Space=Unknown)
*   efabkl =                    " cm61w-fabkl   Key for Factory Calendar
  IMPORTING
    imdsta =                    " mdsta
  TABLES
    mdpsx =                     " mdps
    .  "  MDSTA_AUFBAUEN

ABAP code example for Function Module MDSTA_AUFBAUEN





The ABAP code below is a full code listing to execute function module MDSTA_AUFBAUEN 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_imdsta  TYPE MDSTA ,
it_mdpsx  TYPE STANDARD TABLE OF MDPS,"TABLES PARAM
wa_mdpsx  LIKE LINE OF it_mdpsx .

DATA(ld_emdsta) = 'Check type of data required'.
DATA(ld_einitf) = 'some text here'.
DATA(ld_emt61d) = 'Check type of data required'.

SELECT single XFAN1
FROM T399D
INTO @DATA(ld_ekzdwb).


SELECT single KZUMB
FROM T399D
INTO @DATA(ld_ekzumb).


SELECT single NFVBC
FROM T399D
INTO @DATA(ld_enfvbc).


SELECT single DSDAT
FROM MDKP
INTO @DATA(ld_edsdat).

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

DATA(ld_efabkl) = some text here

"populate fields of struture and append to itab
append wa_mdpsx to it_mdpsx. . CALL FUNCTION 'MDSTA_AUFBAUEN' EXPORTING emdsta = ld_emdsta * einitf = ld_einitf * emt61d = ld_emt61d * ekzdwb = ld_ekzdwb * ekzumb = ld_ekzumb * enfvbc = ld_enfvbc * edsdat = ld_edsdat * edefdt = ld_edefdt * efabkl = ld_efabkl IMPORTING imdsta = ld_imdsta TABLES mdpsx = it_mdpsx . " MDSTA_AUFBAUEN
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_imdsta  TYPE MDSTA ,
ld_emdsta  TYPE MDSTA ,
it_mdpsx  TYPE STANDARD TABLE OF MDPS ,
wa_mdpsx  LIKE LINE OF it_mdpsx,
ld_einitf  TYPE STRING ,
ld_emt61d  TYPE MT61D ,
ld_ekzdwb  TYPE T399D-XFAN1 ,
ld_ekzumb  TYPE T399D-KZUMB ,
ld_enfvbc  TYPE T399D-NFVBC ,
ld_edsdat  TYPE MDKP-DSDAT ,
ld_edefdt  TYPE BOOLEAN ,
ld_efabkl  TYPE CM61W-FABKL .

ld_emdsta = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_mdpsx to it_mdpsx.
ld_einitf = 'some text here'.
ld_emt61d = 'Check type of data required'.

SELECT single XFAN1
FROM T399D
INTO ld_ekzdwb.


SELECT single KZUMB
FROM T399D
INTO ld_ekzumb.


SELECT single NFVBC
FROM T399D
INTO ld_enfvbc.


SELECT single DSDAT
FROM MDKP
INTO ld_edsdat.

ld_edefdt = 'Check type of data required'.

ld_efabkl = 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 MDSTA_AUFBAUEN or its description.