SAP FT_VEND_DECL_SD Function Module for NOTRANSL: Außenhandel: Präferenz: LE erstellen
FT_VEND_DECL_SD is a standard ft vend decl sd SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Außenhandel: Präferenz: LE erstellen processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for ft vend decl sd FM, simply by entering the name FT_VEND_DECL_SD into the relevant SAP transaction such as SE37 or SE38.
Function Group: VFLS
Program Name: SAPLVFLS
Main Program: SAPLVFLS
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FT_VEND_DECL_SD pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'FT_VEND_DECL_SD'"NOTRANSL: Außenhandel: Präferenz: LE erstellen.
EXPORTING
I_CHKFK = "Materials from billing documents
I_ERTXT = "Text container for dunning text
* I_SHOWL = 'X' "Indicator list display
* I_PRNTR = "Spool Parameter: Name of Device
* I_ZONES = "Indicator: Print Preference Zone Comments
* I_POPUP = 'X' "Indicator selection window for print preview
I_VARIA = "Layout
* I_LIST = 'X' "Foreign Trade: PRE: Output types
* I_FILE = 'X' "Foreign Trade: PRE: Output types
* I_WORD = 'X' "Foreign Trade: PRE: Output types
* I_FORM = 'X' "Foreign Trade: PRE: Output types
* I_EINSP = "Output language for vendor declaration
* I_SPRAS = "Language Key
TABLES
R_MATNR = "
R_KUNNR = "
* R_WERKS = "
* R_ERDAT = "
* R_GZOLX = "
* R_MTART = "
EXCEPTIONS
NO_DATA_FOUND = 1 DATA_LOCKED = 2 LANGUAGE_MISSING = 3 TEXT_NAME_MISSING = 4 TEXT_NOT_FOUND = 5 NEW_ERROR = 6
IMPORTING Parameters details for FT_VEND_DECL_SD
I_CHKFK - Materials from billing documents
Data type: FTPRE-P_CHKFKOptional: No
Call by Reference: No ( called with pass by value option)
I_ERTXT - Text container for dunning text
Data type: FTPRE-P_MATXTOptional: No
Call by Reference: No ( called with pass by value option)
I_SHOWL - Indicator list display
Data type: FTPRE-P_SHOWLDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PRNTR - Spool Parameter: Name of Device
Data type: PRI_PARAMS-PDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ZONES - Indicator: Print Preference Zone Comments
Data type: FTPRE-P_ZONESOptional: Yes
Call by Reference: No ( called with pass by value option)
I_POPUP - Indicator selection window for print preview
Data type: FTPRE-P_POPUPDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_VARIA - Layout
Data type: DISVARIANT-VARIANTOptional: No
Call by Reference: No ( called with pass by value option)
I_LIST - Foreign Trade: PRE: Output types
Data type: FTPRE-P_OUTPTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FILE - Foreign Trade: PRE: Output types
Data type: FTPRE-P_OUTPTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WORD - Foreign Trade: PRE: Output types
Data type: FTPRE-P_OUTPTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FORM - Foreign Trade: PRE: Output types
Data type: FTPRE-P_OUTPTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_EINSP - Output language for vendor declaration
Data type: FTPRE-P_DOCSPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SPRAS - Language Key
Data type: FTPRE-P_SPRASOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FT_VEND_DECL_SD
R_MATNR -
Data type: VFLS_MATNR_RANGEOptional: No
Call by Reference: No ( called with pass by value option)
R_KUNNR -
Data type: VFLS_KUNNR_RANGEOptional: No
Call by Reference: No ( called with pass by value option)
R_WERKS -
Data type: VFLS_WERKS_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
R_ERDAT -
Data type: VFLS_ERDAT_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
R_GZOLX -
Data type: VFLS_GZOLX_RANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
R_MTART -
Data type: VFLS_MTART_RANGEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_DATA_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATA_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LANGUAGE_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TEXT_NAME_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TEXT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NEW_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FT_VEND_DECL_SD Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_chkfk | TYPE FTPRE-P_CHKFK, " | |||
| lt_r_matnr | TYPE STANDARD TABLE OF VFLS_MATNR_RANGE, " | |||
| lv_no_data_found | TYPE VFLS_MATNR_RANGE, " | |||
| lv_i_ertxt | TYPE FTPRE-P_MATXT, " | |||
| lv_i_showl | TYPE FTPRE-P_SHOWL, " 'X' | |||
| lv_i_prntr | TYPE PRI_PARAMS-PDEST, " | |||
| lv_i_zones | TYPE FTPRE-P_ZONES, " | |||
| lv_i_popup | TYPE FTPRE-P_POPUP, " 'X' | |||
| lt_r_kunnr | TYPE STANDARD TABLE OF VFLS_KUNNR_RANGE, " | |||
| lv_data_locked | TYPE VFLS_KUNNR_RANGE, " | |||
| lv_i_varia | TYPE DISVARIANT-VARIANT, " | |||
| lt_r_werks | TYPE STANDARD TABLE OF VFLS_WERKS_RANGE, " | |||
| lv_language_missing | TYPE VFLS_WERKS_RANGE, " | |||
| lv_i_list | TYPE FTPRE-P_OUTPT, " 'X' | |||
| lt_r_erdat | TYPE STANDARD TABLE OF VFLS_ERDAT_RANGE, " | |||
| lv_text_name_missing | TYPE VFLS_ERDAT_RANGE, " | |||
| lv_i_file | TYPE FTPRE-P_OUTPT, " 'X' | |||
| lt_r_gzolx | TYPE STANDARD TABLE OF VFLS_GZOLX_RANGE, " | |||
| lv_text_not_found | TYPE VFLS_GZOLX_RANGE, " | |||
| lv_i_word | TYPE FTPRE-P_OUTPT, " 'X' | |||
| lt_r_mtart | TYPE STANDARD TABLE OF VFLS_MTART_RANGE, " | |||
| lv_new_error | TYPE VFLS_MTART_RANGE, " | |||
| lv_i_form | TYPE FTPRE-P_OUTPT, " 'X' | |||
| lv_i_einsp | TYPE FTPRE-P_DOCSP, " | |||
| lv_i_spras | TYPE FTPRE-P_SPRAS. " |
|   CALL FUNCTION 'FT_VEND_DECL_SD' "NOTRANSL: Außenhandel: Präferenz: LE erstellen |
| EXPORTING | ||
| I_CHKFK | = lv_i_chkfk | |
| I_ERTXT | = lv_i_ertxt | |
| I_SHOWL | = lv_i_showl | |
| I_PRNTR | = lv_i_prntr | |
| I_ZONES | = lv_i_zones | |
| I_POPUP | = lv_i_popup | |
| I_VARIA | = lv_i_varia | |
| I_LIST | = lv_i_list | |
| I_FILE | = lv_i_file | |
| I_WORD | = lv_i_word | |
| I_FORM | = lv_i_form | |
| I_EINSP | = lv_i_einsp | |
| I_SPRAS | = lv_i_spras | |
| TABLES | ||
| R_MATNR | = lt_r_matnr | |
| R_KUNNR | = lt_r_kunnr | |
| R_WERKS | = lt_r_werks | |
| R_ERDAT | = lt_r_erdat | |
| R_GZOLX | = lt_r_gzolx | |
| R_MTART | = lt_r_mtart | |
| EXCEPTIONS | ||
| NO_DATA_FOUND = 1 | ||
| DATA_LOCKED = 2 | ||
| LANGUAGE_MISSING = 3 | ||
| TEXT_NAME_MISSING = 4 | ||
| TEXT_NOT_FOUND = 5 | ||
| NEW_ERROR = 6 | ||
| . " FT_VEND_DECL_SD | ||
ABAP code using 7.40 inline data declarations to call FM FT_VEND_DECL_SD
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single P_CHKFK FROM FTPRE INTO @DATA(ld_i_chkfk). | ||||
| "SELECT single P_MATXT FROM FTPRE INTO @DATA(ld_i_ertxt). | ||||
| "SELECT single P_SHOWL FROM FTPRE INTO @DATA(ld_i_showl). | ||||
| DATA(ld_i_showl) | = 'X'. | |||
| "SELECT single PDEST FROM PRI_PARAMS INTO @DATA(ld_i_prntr). | ||||
| "SELECT single P_ZONES FROM FTPRE INTO @DATA(ld_i_zones). | ||||
| "SELECT single P_POPUP FROM FTPRE INTO @DATA(ld_i_popup). | ||||
| DATA(ld_i_popup) | = 'X'. | |||
| "SELECT single VARIANT FROM DISVARIANT INTO @DATA(ld_i_varia). | ||||
| "SELECT single P_OUTPT FROM FTPRE INTO @DATA(ld_i_list). | ||||
| DATA(ld_i_list) | = 'X'. | |||
| "SELECT single P_OUTPT FROM FTPRE INTO @DATA(ld_i_file). | ||||
| DATA(ld_i_file) | = 'X'. | |||
| "SELECT single P_OUTPT FROM FTPRE INTO @DATA(ld_i_word). | ||||
| DATA(ld_i_word) | = 'X'. | |||
| "SELECT single P_OUTPT FROM FTPRE INTO @DATA(ld_i_form). | ||||
| DATA(ld_i_form) | = 'X'. | |||
| "SELECT single P_DOCSP FROM FTPRE INTO @DATA(ld_i_einsp). | ||||
| "SELECT single P_SPRAS FROM FTPRE INTO @DATA(ld_i_spras). | ||||
Search for further information about these or an SAP related objects