SAP Function Modules

MAIN_PARAMETER_GET SAP Function module







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

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


Pattern for FM MAIN_PARAMETER_GET - MAIN PARAMETER GET





CALL FUNCTION 'MAIN_PARAMETER_GET' "
  IMPORTING
    neuflag =                   " t130f-kzref
    flgnumint =                 " t130f-kzref
    flgdark =                   " t130f-kzref
    wrmmg1 =                    " rmmg1
    wrmmg1_ref =                " rmmg1_ref
    wrmmg1_bez =                " rmmg1_bez
    wrmmzu =                    " rmmzu
    wrmmg2 =                    " rmmg2
    aktvstatus =                " mara-pstat
    transstatus =               " t130m-pstat
    wt130m =                    " t130m
    wt133s =                    " t133s
    wt134 =                     " t134
    sperrmodus =                " tvgvi-spera
    bildsequenz =               " t133a-bilds
    bisstatus =                 " t130m-pstat
    wt001w =                    " t001w
    ref_bisstatus =             " t130m-pstat
    ref_mara =                  " mara
    ref_makt =                  " makt
    ref_marc =                  " marc
    ref_mard =                  " mard
    ref_mbew =                  " mbew
    ref_mvke =                  " mvke
    ref_mlgn =                  " mlgn
    ref_mlgt =                  " mlgt
    ref_mpgd =                  " mpgd
    ref_vpbme =                 " mara-meins
    ref_mfhm =                  " mfhm
    ref_mpop =                  " mpop
    ref_myms =                  " myms
    t001_waers =                " t001-waers
    rt001_waers =               " t001-waers
    t001_periv =                " t001-periv
* TABLES
*   mtab =                      " sptap
*   rptab =                     " sptap
*   red_stat =                  " mredstat
*   reftab =                    " mreftab
*   bildtab =                   " mbildtab
*   ref_steuertab =             " mg03steuer
*   ref_steummtab =             " mg03steumm
*   ref_meinh =                 " smeinh
*   ref_ktext =                 " sktext
    .  "  MAIN_PARAMETER_GET

ABAP code example for Function Module MAIN_PARAMETER_GET





The ABAP code below is a full code listing to execute function module MAIN_PARAMETER_GET 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_neuflag  TYPE T130F-KZREF ,
ld_flgnumint  TYPE T130F-KZREF ,
ld_flgdark  TYPE T130F-KZREF ,
ld_wrmmg1  TYPE RMMG1 ,
ld_wrmmg1_ref  TYPE RMMG1_REF ,
ld_wrmmg1_bez  TYPE RMMG1_BEZ ,
ld_wrmmzu  TYPE RMMZU ,
ld_wrmmg2  TYPE RMMG2 ,
ld_aktvstatus  TYPE MARA-PSTAT ,
ld_transstatus  TYPE T130M-PSTAT ,
ld_wt130m  TYPE T130M ,
ld_wt133s  TYPE T133S ,
ld_wt134  TYPE T134 ,
ld_sperrmodus  TYPE TVGVI-SPERA ,
ld_bildsequenz  TYPE T133A-BILDS ,
ld_bisstatus  TYPE T130M-PSTAT ,
ld_wt001w  TYPE T001W ,
ld_ref_bisstatus  TYPE T130M-PSTAT ,
ld_ref_mara  TYPE MARA ,
ld_ref_makt  TYPE MAKT ,
ld_ref_marc  TYPE MARC ,
ld_ref_mard  TYPE MARD ,
ld_ref_mbew  TYPE MBEW ,
ld_ref_mvke  TYPE MVKE ,
ld_ref_mlgn  TYPE MLGN ,
ld_ref_mlgt  TYPE MLGT ,
ld_ref_mpgd  TYPE MPGD ,
ld_ref_vpbme  TYPE MARA-MEINS ,
ld_ref_mfhm  TYPE MFHM ,
ld_ref_mpop  TYPE MPOP ,
ld_ref_myms  TYPE MYMS ,
ld_t001_waers  TYPE T001-WAERS ,
ld_rt001_waers  TYPE T001-WAERS ,
ld_t001_periv  TYPE T001-PERIV ,
it_mtab  TYPE STANDARD TABLE OF SPTAP,"TABLES PARAM
wa_mtab  LIKE LINE OF it_mtab ,
it_rptab  TYPE STANDARD TABLE OF SPTAP,"TABLES PARAM
wa_rptab  LIKE LINE OF it_rptab ,
it_red_stat  TYPE STANDARD TABLE OF MREDSTAT,"TABLES PARAM
wa_red_stat  LIKE LINE OF it_red_stat ,
it_reftab  TYPE STANDARD TABLE OF MREFTAB,"TABLES PARAM
wa_reftab  LIKE LINE OF it_reftab ,
it_bildtab  TYPE STANDARD TABLE OF MBILDTAB,"TABLES PARAM
wa_bildtab  LIKE LINE OF it_bildtab ,
it_ref_steuertab  TYPE STANDARD TABLE OF MG03STEUER,"TABLES PARAM
wa_ref_steuertab  LIKE LINE OF it_ref_steuertab ,
it_ref_steummtab  TYPE STANDARD TABLE OF MG03STEUMM,"TABLES PARAM
wa_ref_steummtab  LIKE LINE OF it_ref_steummtab ,
it_ref_meinh  TYPE STANDARD TABLE OF SMEINH,"TABLES PARAM
wa_ref_meinh  LIKE LINE OF it_ref_meinh ,
it_ref_ktext  TYPE STANDARD TABLE OF SKTEXT,"TABLES PARAM
wa_ref_ktext  LIKE LINE OF it_ref_ktext .


"populate fields of struture and append to itab
append wa_mtab to it_mtab.

"populate fields of struture and append to itab
append wa_rptab to it_rptab.

"populate fields of struture and append to itab
append wa_red_stat to it_red_stat.

"populate fields of struture and append to itab
append wa_reftab to it_reftab.

"populate fields of struture and append to itab
append wa_bildtab to it_bildtab.

"populate fields of struture and append to itab
append wa_ref_steuertab to it_ref_steuertab.

"populate fields of struture and append to itab
append wa_ref_steummtab to it_ref_steummtab.

"populate fields of struture and append to itab
append wa_ref_meinh to it_ref_meinh.

"populate fields of struture and append to itab
append wa_ref_ktext to it_ref_ktext. . CALL FUNCTION 'MAIN_PARAMETER_GET' IMPORTING neuflag = ld_neuflag flgnumint = ld_flgnumint flgdark = ld_flgdark wrmmg1 = ld_wrmmg1 wrmmg1_ref = ld_wrmmg1_ref wrmmg1_bez = ld_wrmmg1_bez wrmmzu = ld_wrmmzu wrmmg2 = ld_wrmmg2 aktvstatus = ld_aktvstatus transstatus = ld_transstatus wt130m = ld_wt130m wt133s = ld_wt133s wt134 = ld_wt134 sperrmodus = ld_sperrmodus bildsequenz = ld_bildsequenz bisstatus = ld_bisstatus wt001w = ld_wt001w ref_bisstatus = ld_ref_bisstatus ref_mara = ld_ref_mara ref_makt = ld_ref_makt ref_marc = ld_ref_marc ref_mard = ld_ref_mard ref_mbew = ld_ref_mbew ref_mvke = ld_ref_mvke ref_mlgn = ld_ref_mlgn ref_mlgt = ld_ref_mlgt ref_mpgd = ld_ref_mpgd ref_vpbme = ld_ref_vpbme ref_mfhm = ld_ref_mfhm ref_mpop = ld_ref_mpop ref_myms = ld_ref_myms t001_waers = ld_t001_waers rt001_waers = ld_rt001_waers t001_periv = ld_t001_periv * TABLES * mtab = it_mtab * rptab = it_rptab * red_stat = it_red_stat * reftab = it_reftab * bildtab = it_bildtab * ref_steuertab = it_ref_steuertab * ref_steummtab = it_ref_steummtab * ref_meinh = it_ref_meinh * ref_ktext = it_ref_ktext . " MAIN_PARAMETER_GET
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_neuflag  TYPE T130F-KZREF ,
it_mtab  TYPE STANDARD TABLE OF SPTAP ,
wa_mtab  LIKE LINE OF it_mtab,
ld_flgnumint  TYPE T130F-KZREF ,
it_rptab  TYPE STANDARD TABLE OF SPTAP ,
wa_rptab  LIKE LINE OF it_rptab,
ld_flgdark  TYPE T130F-KZREF ,
it_red_stat  TYPE STANDARD TABLE OF MREDSTAT ,
wa_red_stat  LIKE LINE OF it_red_stat,
ld_wrmmg1  TYPE RMMG1 ,
it_reftab  TYPE STANDARD TABLE OF MREFTAB ,
wa_reftab  LIKE LINE OF it_reftab,
ld_wrmmg1_ref  TYPE RMMG1_REF ,
it_bildtab  TYPE STANDARD TABLE OF MBILDTAB ,
wa_bildtab  LIKE LINE OF it_bildtab,
ld_wrmmg1_bez  TYPE RMMG1_BEZ ,
it_ref_steuertab  TYPE STANDARD TABLE OF MG03STEUER ,
wa_ref_steuertab  LIKE LINE OF it_ref_steuertab,
ld_wrmmzu  TYPE RMMZU ,
it_ref_steummtab  TYPE STANDARD TABLE OF MG03STEUMM ,
wa_ref_steummtab  LIKE LINE OF it_ref_steummtab,
ld_wrmmg2  TYPE RMMG2 ,
it_ref_meinh  TYPE STANDARD TABLE OF SMEINH ,
wa_ref_meinh  LIKE LINE OF it_ref_meinh,
ld_aktvstatus  TYPE MARA-PSTAT ,
it_ref_ktext  TYPE STANDARD TABLE OF SKTEXT ,
wa_ref_ktext  LIKE LINE OF it_ref_ktext,
ld_transstatus  TYPE T130M-PSTAT ,
ld_wt130m  TYPE T130M ,
ld_wt133s  TYPE T133S ,
ld_wt134  TYPE T134 ,
ld_sperrmodus  TYPE TVGVI-SPERA ,
ld_bildsequenz  TYPE T133A-BILDS ,
ld_bisstatus  TYPE T130M-PSTAT ,
ld_wt001w  TYPE T001W ,
ld_ref_bisstatus  TYPE T130M-PSTAT ,
ld_ref_mara  TYPE MARA ,
ld_ref_makt  TYPE MAKT ,
ld_ref_marc  TYPE MARC ,
ld_ref_mard  TYPE MARD ,
ld_ref_mbew  TYPE MBEW ,
ld_ref_mvke  TYPE MVKE ,
ld_ref_mlgn  TYPE MLGN ,
ld_ref_mlgt  TYPE MLGT ,
ld_ref_mpgd  TYPE MPGD ,
ld_ref_vpbme  TYPE MARA-MEINS ,
ld_ref_mfhm  TYPE MFHM ,
ld_ref_mpop  TYPE MPOP ,
ld_ref_myms  TYPE MYMS ,
ld_t001_waers  TYPE T001-WAERS ,
ld_rt001_waers  TYPE T001-WAERS ,
ld_t001_periv  TYPE T001-PERIV .


"populate fields of struture and append to itab
append wa_mtab to it_mtab.

"populate fields of struture and append to itab
append wa_rptab to it_rptab.

"populate fields of struture and append to itab
append wa_red_stat to it_red_stat.

"populate fields of struture and append to itab
append wa_reftab to it_reftab.

"populate fields of struture and append to itab
append wa_bildtab to it_bildtab.

"populate fields of struture and append to itab
append wa_ref_steuertab to it_ref_steuertab.

"populate fields of struture and append to itab
append wa_ref_steummtab to it_ref_steummtab.

"populate fields of struture and append to itab
append wa_ref_meinh to it_ref_meinh.

"populate fields of struture and append to itab
append wa_ref_ktext to it_ref_ktext.

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