SAP Function Modules

FT_CONTROL_LICENSES_SELECT SAP Function module







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

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


Pattern for FM FT_CONTROL_LICENSES_SELECT - FT CONTROL LICENSES SELECT





CALL FUNCTION 'FT_CONTROL_LICENSES_SELECT' "
  EXPORTING
    i_gegru =                   " embk-gegru    Legal Regulation
*   i_kndsp =                   " t606-kndsp
*   i_vbdsp =                   " t606-vbdsp    Affiliated companies specified
*   i_aditi =                   " t606-aditi    Partner function specified
*   i_matsp =                   " t606-matsp
*   i_lndco =                   " t606-lndco    Specific destination countries
*   i_exaco =                   " t606-exaco    Transaction Type Specified
*   i_belsp =                   " t606-belsp    Sales document specified
*   i_trmco =                   " t606-trmco    Specified term of payment
*   i_hwtsp =                   " t606-hwtsp    Maximum Amount Specified
*   i_anzco =                   " t606-anzco    Max. quantity specified
*   i_amili =                   " t606-amili    Military use permitted
*   i_extra =                   " t606-extra    Decl. relevance EXTRASTAT
*   i_kobra =                   " t606-kobra    KOBRA declaration rel.
*   i_sedsp =                   " t606-sedsp    Relevance for SED/AERP
*   i_przab =                   " ftsel-p_przab  Open value percent. lower than/equal to
*   i_anztg =                   " ftsel-p_anztg
*   i_parag =                   " t606z-parag   Sold-to party function for license
*   i_parwf =                   " t606z-parwf   Ship-to party function for license
*   i_parrs =                   " t606z-parrs
*   i_parre =                   " t606z-parre   Payer function for license
*   i_paren =                   " t606z-paren   Ultimate consignee function for license
*   i_sel_all = 'X'             "
*   i_langu = SY-LANGU          " sy-langu      Language
*   i_msg =                     " ftsel-show_msg  Display Processing Steps
*   i_package_size =            " sy-tabix
* TABLES
*   t_range_geart =             " vfcs_range_geart  License type
*   t_range_gennr =             " vfcs_range_gennr
*   t_range_exgen =             " vfcs_range_exgen
*   t_range_genda =             " vfcs_range_genda  Valid To Date
*   t_range_genst =             " vfcs_range_genst  License status
*   t_range_indei =             " vfcs_range_indei
*   t_range_bukrs =             " vfcs_range_bukrs  Company Code
*   t_range_kunnr =             " vfcs_range_kunnr  Customers
*   t_range_alnum =             " vfcs_range_alnum  Material classification
*   t_range_ernam =             " vfcs_range_ernam  Created By
*   t_range_exart =             " vfcs_range_exart  Transaction Type
*   t_range_genla =             " vfcs_range_genla  Dest. Country
*   t_range_vbeln =             " vfcs_range_vbeln  Sales Document
*   t_range_zterm =             " vfcs_range_zterm  Terms of Payment Key
*   t_embk =                    " embk          License - Header data
*   t_t606x =                   " t606x         Countries of Destination for License
*   t_t606y =                   " t606y
*   t_t606z =                   " t606z
*   t_t606v =                   " t606v
*   t_kna1 =                    " kna1          Customer Master (General Part)
*   t_t005t =                   " t005t         Country Names
*   t_dd07v =                   " dd07v         Fixed Values and Texts of Domains
  EXCEPTIONS
    NO_DATA_SELECTED = 1        "               No Data Found
    NO_DATA_AUTHORITY_CHECK = 2  "
    .  "  FT_CONTROL_LICENSES_SELECT

ABAP code example for Function Module FT_CONTROL_LICENSES_SELECT





The ABAP code below is a full code listing to execute function module FT_CONTROL_LICENSES_SELECT 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:
it_t_range_geart  TYPE STANDARD TABLE OF VFCS_RANGE_GEART,"TABLES PARAM
wa_t_range_geart  LIKE LINE OF it_t_range_geart ,
it_t_range_gennr  TYPE STANDARD TABLE OF VFCS_RANGE_GENNR,"TABLES PARAM
wa_t_range_gennr  LIKE LINE OF it_t_range_gennr ,
it_t_range_exgen  TYPE STANDARD TABLE OF VFCS_RANGE_EXGEN,"TABLES PARAM
wa_t_range_exgen  LIKE LINE OF it_t_range_exgen ,
it_t_range_genda  TYPE STANDARD TABLE OF VFCS_RANGE_GENDA,"TABLES PARAM
wa_t_range_genda  LIKE LINE OF it_t_range_genda ,
it_t_range_genst  TYPE STANDARD TABLE OF VFCS_RANGE_GENST,"TABLES PARAM
wa_t_range_genst  LIKE LINE OF it_t_range_genst ,
it_t_range_indei  TYPE STANDARD TABLE OF VFCS_RANGE_INDEI,"TABLES PARAM
wa_t_range_indei  LIKE LINE OF it_t_range_indei ,
it_t_range_bukrs  TYPE STANDARD TABLE OF VFCS_RANGE_BUKRS,"TABLES PARAM
wa_t_range_bukrs  LIKE LINE OF it_t_range_bukrs ,
it_t_range_kunnr  TYPE STANDARD TABLE OF VFCS_RANGE_KUNNR,"TABLES PARAM
wa_t_range_kunnr  LIKE LINE OF it_t_range_kunnr ,
it_t_range_alnum  TYPE STANDARD TABLE OF VFCS_RANGE_ALNUM,"TABLES PARAM
wa_t_range_alnum  LIKE LINE OF it_t_range_alnum ,
it_t_range_ernam  TYPE STANDARD TABLE OF VFCS_RANGE_ERNAM,"TABLES PARAM
wa_t_range_ernam  LIKE LINE OF it_t_range_ernam ,
it_t_range_exart  TYPE STANDARD TABLE OF VFCS_RANGE_EXART,"TABLES PARAM
wa_t_range_exart  LIKE LINE OF it_t_range_exart ,
it_t_range_genla  TYPE STANDARD TABLE OF VFCS_RANGE_GENLA,"TABLES PARAM
wa_t_range_genla  LIKE LINE OF it_t_range_genla ,
it_t_range_vbeln  TYPE STANDARD TABLE OF VFCS_RANGE_VBELN,"TABLES PARAM
wa_t_range_vbeln  LIKE LINE OF it_t_range_vbeln ,
it_t_range_zterm  TYPE STANDARD TABLE OF VFCS_RANGE_ZTERM,"TABLES PARAM
wa_t_range_zterm  LIKE LINE OF it_t_range_zterm ,
it_t_embk  TYPE STANDARD TABLE OF EMBK,"TABLES PARAM
wa_t_embk  LIKE LINE OF it_t_embk ,
it_t_t606x  TYPE STANDARD TABLE OF T606X,"TABLES PARAM
wa_t_t606x  LIKE LINE OF it_t_t606x ,
it_t_t606y  TYPE STANDARD TABLE OF T606Y,"TABLES PARAM
wa_t_t606y  LIKE LINE OF it_t_t606y ,
it_t_t606z  TYPE STANDARD TABLE OF T606Z,"TABLES PARAM
wa_t_t606z  LIKE LINE OF it_t_t606z ,
it_t_t606v  TYPE STANDARD TABLE OF T606V,"TABLES PARAM
wa_t_t606v  LIKE LINE OF it_t_t606v ,
it_t_kna1  TYPE STANDARD TABLE OF KNA1,"TABLES PARAM
wa_t_kna1  LIKE LINE OF it_t_kna1 ,
it_t_t005t  TYPE STANDARD TABLE OF T005T,"TABLES PARAM
wa_t_t005t  LIKE LINE OF it_t_t005t ,
it_t_dd07v  TYPE STANDARD TABLE OF DD07V,"TABLES PARAM
wa_t_dd07v  LIKE LINE OF it_t_dd07v .


SELECT single GEGRU
FROM EMBK
INTO @DATA(ld_i_gegru).


SELECT single KNDSP
FROM T606
INTO @DATA(ld_i_kndsp).


SELECT single VBDSP
FROM T606
INTO @DATA(ld_i_vbdsp).


SELECT single ADITI
FROM T606
INTO @DATA(ld_i_aditi).


SELECT single MATSP
FROM T606
INTO @DATA(ld_i_matsp).


SELECT single LNDCO
FROM T606
INTO @DATA(ld_i_lndco).


SELECT single EXACO
FROM T606
INTO @DATA(ld_i_exaco).


SELECT single BELSP
FROM T606
INTO @DATA(ld_i_belsp).


SELECT single TRMCO
FROM T606
INTO @DATA(ld_i_trmco).


SELECT single HWTSP
FROM T606
INTO @DATA(ld_i_hwtsp).


SELECT single ANZCO
FROM T606
INTO @DATA(ld_i_anzco).


SELECT single AMILI
FROM T606
INTO @DATA(ld_i_amili).


SELECT single EXTRA
FROM T606
INTO @DATA(ld_i_extra).


SELECT single KOBRA
FROM T606
INTO @DATA(ld_i_kobra).


SELECT single SEDSP
FROM T606
INTO @DATA(ld_i_sedsp).


DATA(ld_i_przab) = Check type of data required

DATA(ld_i_anztg) = Check type of data required

SELECT single PARAG
FROM T606Z
INTO @DATA(ld_i_parag).


SELECT single PARWF
FROM T606Z
INTO @DATA(ld_i_parwf).


SELECT single PARRS
FROM T606Z
INTO @DATA(ld_i_parrs).


SELECT single PARRE
FROM T606Z
INTO @DATA(ld_i_parre).


SELECT single PAREN
FROM T606Z
INTO @DATA(ld_i_paren).

DATA(ld_i_sel_all) = 'some text here'.
DATA(ld_i_langu) = 'Check type of data required'.

DATA(ld_i_msg) = some text here
DATA(ld_i_package_size) = '123 '.

"populate fields of struture and append to itab
append wa_t_range_geart to it_t_range_geart.

"populate fields of struture and append to itab
append wa_t_range_gennr to it_t_range_gennr.

"populate fields of struture and append to itab
append wa_t_range_exgen to it_t_range_exgen.

"populate fields of struture and append to itab
append wa_t_range_genda to it_t_range_genda.

"populate fields of struture and append to itab
append wa_t_range_genst to it_t_range_genst.

"populate fields of struture and append to itab
append wa_t_range_indei to it_t_range_indei.

"populate fields of struture and append to itab
append wa_t_range_bukrs to it_t_range_bukrs.

"populate fields of struture and append to itab
append wa_t_range_kunnr to it_t_range_kunnr.

"populate fields of struture and append to itab
append wa_t_range_alnum to it_t_range_alnum.

"populate fields of struture and append to itab
append wa_t_range_ernam to it_t_range_ernam.

"populate fields of struture and append to itab
append wa_t_range_exart to it_t_range_exart.

"populate fields of struture and append to itab
append wa_t_range_genla to it_t_range_genla.

"populate fields of struture and append to itab
append wa_t_range_vbeln to it_t_range_vbeln.

"populate fields of struture and append to itab
append wa_t_range_zterm to it_t_range_zterm.

"populate fields of struture and append to itab
append wa_t_embk to it_t_embk.

"populate fields of struture and append to itab
append wa_t_t606x to it_t_t606x.

"populate fields of struture and append to itab
append wa_t_t606y to it_t_t606y.

"populate fields of struture and append to itab
append wa_t_t606z to it_t_t606z.

"populate fields of struture and append to itab
append wa_t_t606v to it_t_t606v.

"populate fields of struture and append to itab
append wa_t_kna1 to it_t_kna1.

"populate fields of struture and append to itab
append wa_t_t005t to it_t_t005t.

"populate fields of struture and append to itab
append wa_t_dd07v to it_t_dd07v. . CALL FUNCTION 'FT_CONTROL_LICENSES_SELECT' EXPORTING i_gegru = ld_i_gegru * i_kndsp = ld_i_kndsp * i_vbdsp = ld_i_vbdsp * i_aditi = ld_i_aditi * i_matsp = ld_i_matsp * i_lndco = ld_i_lndco * i_exaco = ld_i_exaco * i_belsp = ld_i_belsp * i_trmco = ld_i_trmco * i_hwtsp = ld_i_hwtsp * i_anzco = ld_i_anzco * i_amili = ld_i_amili * i_extra = ld_i_extra * i_kobra = ld_i_kobra * i_sedsp = ld_i_sedsp * i_przab = ld_i_przab * i_anztg = ld_i_anztg * i_parag = ld_i_parag * i_parwf = ld_i_parwf * i_parrs = ld_i_parrs * i_parre = ld_i_parre * i_paren = ld_i_paren * i_sel_all = ld_i_sel_all * i_langu = ld_i_langu * i_msg = ld_i_msg * i_package_size = ld_i_package_size * TABLES * t_range_geart = it_t_range_geart * t_range_gennr = it_t_range_gennr * t_range_exgen = it_t_range_exgen * t_range_genda = it_t_range_genda * t_range_genst = it_t_range_genst * t_range_indei = it_t_range_indei * t_range_bukrs = it_t_range_bukrs * t_range_kunnr = it_t_range_kunnr * t_range_alnum = it_t_range_alnum * t_range_ernam = it_t_range_ernam * t_range_exart = it_t_range_exart * t_range_genla = it_t_range_genla * t_range_vbeln = it_t_range_vbeln * t_range_zterm = it_t_range_zterm * t_embk = it_t_embk * t_t606x = it_t_t606x * t_t606y = it_t_t606y * t_t606z = it_t_t606z * t_t606v = it_t_t606v * t_kna1 = it_t_kna1 * t_t005t = it_t_t005t * t_dd07v = it_t_dd07v EXCEPTIONS NO_DATA_SELECTED = 1 NO_DATA_AUTHORITY_CHECK = 2 . " FT_CONTROL_LICENSES_SELECT
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 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_gegru  TYPE EMBK-GEGRU ,
it_t_range_geart  TYPE STANDARD TABLE OF VFCS_RANGE_GEART ,
wa_t_range_geart  LIKE LINE OF it_t_range_geart,
ld_i_kndsp  TYPE T606-KNDSP ,
it_t_range_gennr  TYPE STANDARD TABLE OF VFCS_RANGE_GENNR ,
wa_t_range_gennr  LIKE LINE OF it_t_range_gennr,
ld_i_vbdsp  TYPE T606-VBDSP ,
it_t_range_exgen  TYPE STANDARD TABLE OF VFCS_RANGE_EXGEN ,
wa_t_range_exgen  LIKE LINE OF it_t_range_exgen,
ld_i_aditi  TYPE T606-ADITI ,
it_t_range_genda  TYPE STANDARD TABLE OF VFCS_RANGE_GENDA ,
wa_t_range_genda  LIKE LINE OF it_t_range_genda,
ld_i_matsp  TYPE T606-MATSP ,
it_t_range_genst  TYPE STANDARD TABLE OF VFCS_RANGE_GENST ,
wa_t_range_genst  LIKE LINE OF it_t_range_genst,
ld_i_lndco  TYPE T606-LNDCO ,
it_t_range_indei  TYPE STANDARD TABLE OF VFCS_RANGE_INDEI ,
wa_t_range_indei  LIKE LINE OF it_t_range_indei,
ld_i_exaco  TYPE T606-EXACO ,
it_t_range_bukrs  TYPE STANDARD TABLE OF VFCS_RANGE_BUKRS ,
wa_t_range_bukrs  LIKE LINE OF it_t_range_bukrs,
ld_i_belsp  TYPE T606-BELSP ,
it_t_range_kunnr  TYPE STANDARD TABLE OF VFCS_RANGE_KUNNR ,
wa_t_range_kunnr  LIKE LINE OF it_t_range_kunnr,
ld_i_trmco  TYPE T606-TRMCO ,
it_t_range_alnum  TYPE STANDARD TABLE OF VFCS_RANGE_ALNUM ,
wa_t_range_alnum  LIKE LINE OF it_t_range_alnum,
it_t_range_ernam  TYPE STANDARD TABLE OF VFCS_RANGE_ERNAM ,
wa_t_range_ernam  LIKE LINE OF it_t_range_ernam,
ld_i_hwtsp  TYPE T606-HWTSP ,
it_t_range_exart  TYPE STANDARD TABLE OF VFCS_RANGE_EXART ,
wa_t_range_exart  LIKE LINE OF it_t_range_exart,
ld_i_anzco  TYPE T606-ANZCO ,
it_t_range_genla  TYPE STANDARD TABLE OF VFCS_RANGE_GENLA ,
wa_t_range_genla  LIKE LINE OF it_t_range_genla,
ld_i_amili  TYPE T606-AMILI ,
it_t_range_vbeln  TYPE STANDARD TABLE OF VFCS_RANGE_VBELN ,
wa_t_range_vbeln  LIKE LINE OF it_t_range_vbeln,
ld_i_extra  TYPE T606-EXTRA ,
it_t_range_zterm  TYPE STANDARD TABLE OF VFCS_RANGE_ZTERM ,
wa_t_range_zterm  LIKE LINE OF it_t_range_zterm,
ld_i_kobra  TYPE T606-KOBRA ,
it_t_embk  TYPE STANDARD TABLE OF EMBK ,
wa_t_embk  LIKE LINE OF it_t_embk,
ld_i_sedsp  TYPE T606-SEDSP ,
it_t_t606x  TYPE STANDARD TABLE OF T606X ,
wa_t_t606x  LIKE LINE OF it_t_t606x,
ld_i_przab  TYPE FTSEL-P_PRZAB ,
it_t_t606y  TYPE STANDARD TABLE OF T606Y ,
wa_t_t606y  LIKE LINE OF it_t_t606y,
ld_i_anztg  TYPE FTSEL-P_ANZTG ,
it_t_t606z  TYPE STANDARD TABLE OF T606Z ,
wa_t_t606z  LIKE LINE OF it_t_t606z,
ld_i_parag  TYPE T606Z-PARAG ,
it_t_t606v  TYPE STANDARD TABLE OF T606V ,
wa_t_t606v  LIKE LINE OF it_t_t606v,
ld_i_parwf  TYPE T606Z-PARWF ,
it_t_kna1  TYPE STANDARD TABLE OF KNA1 ,
wa_t_kna1  LIKE LINE OF it_t_kna1,
ld_i_parrs  TYPE T606Z-PARRS ,
it_t_t005t  TYPE STANDARD TABLE OF T005T ,
wa_t_t005t  LIKE LINE OF it_t_t005t,
ld_i_parre  TYPE T606Z-PARRE ,
it_t_dd07v  TYPE STANDARD TABLE OF DD07V ,
wa_t_dd07v  LIKE LINE OF it_t_dd07v,
ld_i_paren  TYPE T606Z-PAREN ,
ld_i_sel_all  TYPE STRING ,
ld_i_langu  TYPE SY-LANGU ,
ld_i_msg  TYPE FTSEL-SHOW_MSG ,
ld_i_package_size  TYPE SY-TABIX .


SELECT single GEGRU
FROM EMBK
INTO ld_i_gegru.


"populate fields of struture and append to itab
append wa_t_range_geart to it_t_range_geart.

SELECT single KNDSP
FROM T606
INTO ld_i_kndsp.


"populate fields of struture and append to itab
append wa_t_range_gennr to it_t_range_gennr.

SELECT single VBDSP
FROM T606
INTO ld_i_vbdsp.


"populate fields of struture and append to itab
append wa_t_range_exgen to it_t_range_exgen.

SELECT single ADITI
FROM T606
INTO ld_i_aditi.


"populate fields of struture and append to itab
append wa_t_range_genda to it_t_range_genda.

SELECT single MATSP
FROM T606
INTO ld_i_matsp.


"populate fields of struture and append to itab
append wa_t_range_genst to it_t_range_genst.

SELECT single LNDCO
FROM T606
INTO ld_i_lndco.


"populate fields of struture and append to itab
append wa_t_range_indei to it_t_range_indei.

SELECT single EXACO
FROM T606
INTO ld_i_exaco.


"populate fields of struture and append to itab
append wa_t_range_bukrs to it_t_range_bukrs.

SELECT single BELSP
FROM T606
INTO ld_i_belsp.


"populate fields of struture and append to itab
append wa_t_range_kunnr to it_t_range_kunnr.

SELECT single TRMCO
FROM T606
INTO ld_i_trmco.


"populate fields of struture and append to itab
append wa_t_range_alnum to it_t_range_alnum.

"populate fields of struture and append to itab
append wa_t_range_ernam to it_t_range_ernam.

SELECT single HWTSP
FROM T606
INTO ld_i_hwtsp.


"populate fields of struture and append to itab
append wa_t_range_exart to it_t_range_exart.

SELECT single ANZCO
FROM T606
INTO ld_i_anzco.


"populate fields of struture and append to itab
append wa_t_range_genla to it_t_range_genla.

SELECT single AMILI
FROM T606
INTO ld_i_amili.


"populate fields of struture and append to itab
append wa_t_range_vbeln to it_t_range_vbeln.

SELECT single EXTRA
FROM T606
INTO ld_i_extra.


"populate fields of struture and append to itab
append wa_t_range_zterm to it_t_range_zterm.

SELECT single KOBRA
FROM T606
INTO ld_i_kobra.


"populate fields of struture and append to itab
append wa_t_embk to it_t_embk.

SELECT single SEDSP
FROM T606
INTO ld_i_sedsp.


"populate fields of struture and append to itab
append wa_t_t606x to it_t_t606x.

ld_i_przab = Check type of data required

"populate fields of struture and append to itab
append wa_t_t606y to it_t_t606y.

ld_i_anztg = Check type of data required

"populate fields of struture and append to itab
append wa_t_t606z to it_t_t606z.

SELECT single PARAG
FROM T606Z
INTO ld_i_parag.


"populate fields of struture and append to itab
append wa_t_t606v to it_t_t606v.

SELECT single PARWF
FROM T606Z
INTO ld_i_parwf.


"populate fields of struture and append to itab
append wa_t_kna1 to it_t_kna1.

SELECT single PARRS
FROM T606Z
INTO ld_i_parrs.


"populate fields of struture and append to itab
append wa_t_t005t to it_t_t005t.

SELECT single PARRE
FROM T606Z
INTO ld_i_parre.


"populate fields of struture and append to itab
append wa_t_dd07v to it_t_dd07v.

SELECT single PAREN
FROM T606Z
INTO ld_i_paren.

ld_i_sel_all = 'some text here'.
ld_i_langu = 'Check type of data required'.

ld_i_msg = some text here
ld_i_package_size = '123 '.

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