SAP Function Modules

FT_VEND_DECL_MM SAP Function module







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

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


Pattern for FM FT_VEND_DECL_MM - FT VEND DECL MM





CALL FUNCTION 'FT_VEND_DECL_MM' "
* EXPORTING
*   i_betpr = 'X'               " ftpre-p_betpr
*   i_betol =                   " ftpre-p_betol
*   i_preis =                   " ftpre-p_preis
*   i_ansch = 'X'               " ftpre-p_ansch
*   i_mahne = 'X'               " ftpre-p_mahne
*   i_maxma = '3'               " ftpre-p_maxma
*   i_doksp = 'X'               " ftpre-p_docsp
*   i_einsp =                   " ftpre-p_docsp
*   i_spras =                   " ftpre-p_spras
*   i_eulif = 'X'               " ftpre-p_eulif
*   i_simul = 'X'               " ftpre-p_simul
*   i_showl = 'X'               " ftpre-p_showl
*   i_ekver =                   " ftpre-p_ekver
*   i_nopre = 'X'               " ftpre-p_nopre
*   i_newpg =                   " ftpre-p_newpg
*   i_popup = 'X'               " ftpre-p_popup
*   i_varia =                   " disvariant-variant
*   i_prntr =                   " pri_params-pdest
*   i_esok0 =                   " ftpre-p_esokz
*   i_esok1 =                   " ftpre-p_esokz
*   i_esok2 =                   " ftpre-p_esokz
*   i_esok3 =                   " ftpre-p_esokz
*   i_esokp =                   " ftpre-p_esokz
*   i_esokz =                   " ftpre-p_esokz
*   i_herkl = 'X'               " ftpre-p_ekver
*   i_stawn = 'X'               " ftpre-p_ekver
*   i_land1 = 'X'               " ftpre-p_ekver
*   i_user = SY-UNAME           " usr01-bname
*   i_fname =                   " rsscf-tdform
*   i_preng =                   " lfei-preng
*   i_list = 'X'                " ftpre-p_outpt
*   i_file = 'X'                " ftpre-p_outpt
*   i_word = 'X'                " ftpre-p_outpt
*   i_form = 'X'                " ftpre-p_outpt
*   i_usepr = 'X'               " ftpre-p_usepr
*   i_zones =                   " ftpre-p_zones
  IMPORTING
    e_prntd =                   " ftpre-p_outpt
  TABLES
    r_ekorg =                   " vfls_ekorg_range
    r_werks =                   " vfls_werks_range
    r_ekgrp =                   " vfls_ekgrp_range
    r_lifnr =                   " vfls_lifnr_range
    r_matnr =                   " vfls_matnr_range
    r_mtart =                   " vfls_mtart_range
    r_matkl =                   " vfls_matkl_range
* CHANGING
*   i_mtxt0 =                   " ftpre-p_antxt
*   i_mtxt1 =                   " ftpre-p_matxt
*   i_mtxt2 =                   " ftpre-p_matxt
*   i_mtxt3 =                   " ftpre-p_matxt
*   i_mtxt4 =                   " ftpre-p_matxt
*   i_mtxt5 =                   " ftpre-p_matxt
*   i_mtxt6 =                   " ftpre-p_matxt
*   i_mtxt7 =                   " ftpre-p_matxt
*   i_mtxt8 =                   " ftpre-p_matxt
*   itab_t604l =                " vfls_itab_t604l
  EXCEPTIONS
    NO_DATA_FOUND = 1           "
    DATA_LOCKED = 2             "
    LANGUAGE_MISSING = 3        "
    MAXMA_TOO_LOW = 4           "
    MAXMA_TOO_HIGH = 5          "
    TEXT_NAME_MISSING = 6       "
    TEXT_NOT_FOUND = 7          "
    NEW_ERROR = 8               "
    NO_KIND_OF_PURCHASEINFO_RECORD = 9  "
    .  "  FT_VEND_DECL_MM

ABAP code example for Function Module FT_VEND_DECL_MM





The ABAP code below is a full code listing to execute function module FT_VEND_DECL_MM 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_e_prntd  TYPE FTPRE-P_OUTPT ,
it_r_ekorg  TYPE STANDARD TABLE OF VFLS_EKORG_RANGE,"TABLES PARAM
wa_r_ekorg  LIKE LINE OF it_r_ekorg ,
it_r_werks  TYPE STANDARD TABLE OF VFLS_WERKS_RANGE,"TABLES PARAM
wa_r_werks  LIKE LINE OF it_r_werks ,
it_r_ekgrp  TYPE STANDARD TABLE OF VFLS_EKGRP_RANGE,"TABLES PARAM
wa_r_ekgrp  LIKE LINE OF it_r_ekgrp ,
it_r_lifnr  TYPE STANDARD TABLE OF VFLS_LIFNR_RANGE,"TABLES PARAM
wa_r_lifnr  LIKE LINE OF it_r_lifnr ,
it_r_matnr  TYPE STANDARD TABLE OF VFLS_MATNR_RANGE,"TABLES PARAM
wa_r_matnr  LIKE LINE OF it_r_matnr ,
it_r_mtart  TYPE STANDARD TABLE OF VFLS_MTART_RANGE,"TABLES PARAM
wa_r_mtart  LIKE LINE OF it_r_mtart ,
it_r_matkl  TYPE STANDARD TABLE OF VFLS_MATKL_RANGE,"TABLES PARAM
wa_r_matkl  LIKE LINE OF it_r_matkl .


DATA(ld_i_mtxt0) = some text here

DATA(ld_i_mtxt1) = some text here

DATA(ld_i_mtxt2) = some text here

DATA(ld_i_mtxt3) = some text here

DATA(ld_i_mtxt4) = some text here

DATA(ld_i_mtxt5) = some text here

DATA(ld_i_mtxt6) = some text here

DATA(ld_i_mtxt7) = some text here

DATA(ld_i_mtxt8) = some text here
DATA(ld_itab_t604l) = 'Check type of data required'.

DATA(ld_i_betpr) = some text here

DATA(ld_i_betol) = Check type of data required

DATA(ld_i_preis) = 20.50

DATA(ld_i_ansch) = some text here

DATA(ld_i_mahne) = some text here

DATA(ld_i_maxma) = Check type of data required

DATA(ld_i_doksp) = some text here

DATA(ld_i_einsp) = some text here

DATA(ld_i_spras) = Check type of data required

DATA(ld_i_eulif) = some text here

DATA(ld_i_simul) = some text here

DATA(ld_i_showl) = some text here

DATA(ld_i_ekver) = some text here

DATA(ld_i_nopre) = some text here

DATA(ld_i_newpg) = some text here

DATA(ld_i_popup) = some text here

DATA(ld_i_varia) = some text here

DATA(ld_i_prntr) = some text here

DATA(ld_i_esok0) = some text here

DATA(ld_i_esok1) = some text here

DATA(ld_i_esok2) = some text here

DATA(ld_i_esok3) = some text here

DATA(ld_i_esokp) = some text here

DATA(ld_i_esokz) = some text here

DATA(ld_i_herkl) = some text here

DATA(ld_i_stawn) = some text here

DATA(ld_i_land1) = some text here

SELECT single BNAME
FROM USR01
INTO @DATA(ld_i_user).


DATA(ld_i_fname) = some text here

SELECT single PRENG
FROM LFEI
INTO @DATA(ld_i_preng).


DATA(ld_i_list) = some text here

DATA(ld_i_file) = some text here

DATA(ld_i_word) = some text here

DATA(ld_i_form) = some text here

DATA(ld_i_usepr) = some text here

DATA(ld_i_zones) = some text here

"populate fields of struture and append to itab
append wa_r_ekorg to it_r_ekorg.

"populate fields of struture and append to itab
append wa_r_werks to it_r_werks.

"populate fields of struture and append to itab
append wa_r_ekgrp to it_r_ekgrp.

"populate fields of struture and append to itab
append wa_r_lifnr to it_r_lifnr.

"populate fields of struture and append to itab
append wa_r_matnr to it_r_matnr.

"populate fields of struture and append to itab
append wa_r_mtart to it_r_mtart.

"populate fields of struture and append to itab
append wa_r_matkl to it_r_matkl. . CALL FUNCTION 'FT_VEND_DECL_MM' * EXPORTING * i_betpr = ld_i_betpr * i_betol = ld_i_betol * i_preis = ld_i_preis * i_ansch = ld_i_ansch * i_mahne = ld_i_mahne * i_maxma = ld_i_maxma * i_doksp = ld_i_doksp * i_einsp = ld_i_einsp * i_spras = ld_i_spras * i_eulif = ld_i_eulif * i_simul = ld_i_simul * i_showl = ld_i_showl * i_ekver = ld_i_ekver * i_nopre = ld_i_nopre * i_newpg = ld_i_newpg * i_popup = ld_i_popup * i_varia = ld_i_varia * i_prntr = ld_i_prntr * i_esok0 = ld_i_esok0 * i_esok1 = ld_i_esok1 * i_esok2 = ld_i_esok2 * i_esok3 = ld_i_esok3 * i_esokp = ld_i_esokp * i_esokz = ld_i_esokz * i_herkl = ld_i_herkl * i_stawn = ld_i_stawn * i_land1 = ld_i_land1 * i_user = ld_i_user * i_fname = ld_i_fname * i_preng = ld_i_preng * i_list = ld_i_list * i_file = ld_i_file * i_word = ld_i_word * i_form = ld_i_form * i_usepr = ld_i_usepr * i_zones = ld_i_zones IMPORTING e_prntd = ld_e_prntd TABLES r_ekorg = it_r_ekorg r_werks = it_r_werks r_ekgrp = it_r_ekgrp r_lifnr = it_r_lifnr r_matnr = it_r_matnr r_mtart = it_r_mtart r_matkl = it_r_matkl * CHANGING * i_mtxt0 = ld_i_mtxt0 * i_mtxt1 = ld_i_mtxt1 * i_mtxt2 = ld_i_mtxt2 * i_mtxt3 = ld_i_mtxt3 * i_mtxt4 = ld_i_mtxt4 * i_mtxt5 = ld_i_mtxt5 * i_mtxt6 = ld_i_mtxt6 * i_mtxt7 = ld_i_mtxt7 * i_mtxt8 = ld_i_mtxt8 * itab_t604l = ld_itab_t604l EXCEPTIONS NO_DATA_FOUND = 1 DATA_LOCKED = 2 LANGUAGE_MISSING = 3 MAXMA_TOO_LOW = 4 MAXMA_TOO_HIGH = 5 TEXT_NAME_MISSING = 6 TEXT_NOT_FOUND = 7 NEW_ERROR = 8 NO_KIND_OF_PURCHASEINFO_RECORD = 9 . " FT_VEND_DECL_MM
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "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_mtxt0  TYPE FTPRE-P_ANTXT ,
ld_e_prntd  TYPE FTPRE-P_OUTPT ,
ld_i_betpr  TYPE FTPRE-P_BETPR ,
it_r_ekorg  TYPE STANDARD TABLE OF VFLS_EKORG_RANGE ,
wa_r_ekorg  LIKE LINE OF it_r_ekorg,
ld_i_mtxt1  TYPE FTPRE-P_MATXT ,
ld_i_betol  TYPE FTPRE-P_BETOL ,
it_r_werks  TYPE STANDARD TABLE OF VFLS_WERKS_RANGE ,
wa_r_werks  LIKE LINE OF it_r_werks,
ld_i_mtxt2  TYPE FTPRE-P_MATXT ,
it_r_ekgrp  TYPE STANDARD TABLE OF VFLS_EKGRP_RANGE ,
wa_r_ekgrp  LIKE LINE OF it_r_ekgrp,
ld_i_preis  TYPE FTPRE-P_PREIS ,
ld_i_mtxt3  TYPE FTPRE-P_MATXT ,
it_r_lifnr  TYPE STANDARD TABLE OF VFLS_LIFNR_RANGE ,
wa_r_lifnr  LIKE LINE OF it_r_lifnr,
ld_i_ansch  TYPE FTPRE-P_ANSCH ,
it_r_matnr  TYPE STANDARD TABLE OF VFLS_MATNR_RANGE ,
wa_r_matnr  LIKE LINE OF it_r_matnr,
ld_i_mahne  TYPE FTPRE-P_MAHNE ,
ld_i_mtxt4  TYPE FTPRE-P_MATXT ,
ld_i_maxma  TYPE FTPRE-P_MAXMA ,
ld_i_mtxt5  TYPE FTPRE-P_MATXT ,
it_r_mtart  TYPE STANDARD TABLE OF VFLS_MTART_RANGE ,
wa_r_mtart  LIKE LINE OF it_r_mtart,
ld_i_doksp  TYPE FTPRE-P_DOCSP ,
ld_i_mtxt6  TYPE FTPRE-P_MATXT ,
it_r_matkl  TYPE STANDARD TABLE OF VFLS_MATKL_RANGE ,
wa_r_matkl  LIKE LINE OF it_r_matkl,
ld_i_einsp  TYPE FTPRE-P_DOCSP ,
ld_i_mtxt7  TYPE FTPRE-P_MATXT ,
ld_i_spras  TYPE FTPRE-P_SPRAS ,
ld_i_mtxt8  TYPE FTPRE-P_MATXT ,
ld_i_eulif  TYPE FTPRE-P_EULIF ,
ld_itab_t604l  TYPE VFLS_ITAB_T604L ,
ld_i_simul  TYPE FTPRE-P_SIMUL ,
ld_i_showl  TYPE FTPRE-P_SHOWL ,
ld_i_ekver  TYPE FTPRE-P_EKVER ,
ld_i_nopre  TYPE FTPRE-P_NOPRE ,
ld_i_newpg  TYPE FTPRE-P_NEWPG ,
ld_i_popup  TYPE FTPRE-P_POPUP ,
ld_i_varia  TYPE DISVARIANT-VARIANT ,
ld_i_prntr  TYPE PRI_PARAMS-PDEST ,
ld_i_esok0  TYPE FTPRE-P_ESOKZ ,
ld_i_esok1  TYPE FTPRE-P_ESOKZ ,
ld_i_esok2  TYPE FTPRE-P_ESOKZ ,
ld_i_esok3  TYPE FTPRE-P_ESOKZ ,
ld_i_esokp  TYPE FTPRE-P_ESOKZ ,
ld_i_esokz  TYPE FTPRE-P_ESOKZ ,
ld_i_herkl  TYPE FTPRE-P_EKVER ,
ld_i_stawn  TYPE FTPRE-P_EKVER ,
ld_i_land1  TYPE FTPRE-P_EKVER ,
ld_i_user  TYPE USR01-BNAME ,
ld_i_fname  TYPE RSSCF-TDFORM ,
ld_i_preng  TYPE LFEI-PRENG ,
ld_i_list  TYPE FTPRE-P_OUTPT ,
ld_i_file  TYPE FTPRE-P_OUTPT ,
ld_i_word  TYPE FTPRE-P_OUTPT ,
ld_i_form  TYPE FTPRE-P_OUTPT ,
ld_i_usepr  TYPE FTPRE-P_USEPR ,
ld_i_zones  TYPE FTPRE-P_ZONES .


ld_i_mtxt0 = some text here

ld_i_betpr = some text here

"populate fields of struture and append to itab
append wa_r_ekorg to it_r_ekorg.

ld_i_mtxt1 = some text here

ld_i_betol = Check type of data required

"populate fields of struture and append to itab
append wa_r_werks to it_r_werks.

ld_i_mtxt2 = some text here

"populate fields of struture and append to itab
append wa_r_ekgrp to it_r_ekgrp.

ld_i_preis = 20.50

ld_i_mtxt3 = some text here

"populate fields of struture and append to itab
append wa_r_lifnr to it_r_lifnr.

ld_i_ansch = some text here

"populate fields of struture and append to itab
append wa_r_matnr to it_r_matnr.

ld_i_mahne = some text here

ld_i_mtxt4 = some text here

ld_i_maxma = Check type of data required

ld_i_mtxt5 = some text here

"populate fields of struture and append to itab
append wa_r_mtart to it_r_mtart.

ld_i_doksp = some text here

ld_i_mtxt6 = some text here

"populate fields of struture and append to itab
append wa_r_matkl to it_r_matkl.

ld_i_einsp = some text here

ld_i_mtxt7 = some text here

ld_i_spras = Check type of data required

ld_i_mtxt8 = some text here

ld_i_eulif = some text here
ld_itab_t604l = 'Check type of data required'.

ld_i_simul = some text here

ld_i_showl = some text here

ld_i_ekver = some text here

ld_i_nopre = some text here

ld_i_newpg = some text here

ld_i_popup = some text here

ld_i_varia = some text here

ld_i_prntr = some text here

ld_i_esok0 = some text here

ld_i_esok1 = some text here

ld_i_esok2 = some text here

ld_i_esok3 = some text here

ld_i_esokp = some text here

ld_i_esokz = some text here

ld_i_herkl = some text here

ld_i_stawn = some text here

ld_i_land1 = some text here

SELECT single BNAME
FROM USR01
INTO ld_i_user.


ld_i_fname = some text here

SELECT single PRENG
FROM LFEI
INTO ld_i_preng.


ld_i_list = some text here

ld_i_file = some text here

ld_i_word = some text here

ld_i_form = some text here

ld_i_usepr = some text here

ld_i_zones = 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 FT_VEND_DECL_MM or its description.