SAP Function Modules

FM_SELECT_MULTIPLE SAP Function module - Mass selection of master data







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

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


Pattern for FM FM_SELECT_MULTIPLE - FM SELECT MULTIPLE





CALL FUNCTION 'FM_SELECT_MULTIPLE' "Mass selection of master data
  EXPORTING
    i_fikrs =                   " fmci-fikrs    Financial Management Area
    i_gjahr =                   " fmci-gjahr    Fiscal Year
*   i_varnt = '000'             " fmhici-varnt  Variant
*   i_hivarnt =                 " fmhisv-hivarnt  Hierarchy Variant of Funds Center
*   i_poper =                   " t009b-poper   Period
*   i_fipex_only = SPACE        " fmdy-xfeld
*   i_fictr_only = SPACE        " fmdy-xfeld
*   i_fonds_bp_only = SPACE     " fmdy-xfeld
*   i_fonds_only = SPACE        " fmdy-xfeld
*   i_fipex_fictr_fonds = SPACE  " fmdy-xfeld
*   i_budgetpd_only = SPACE     " fmdy-xfeld
*   i_bsp_element = SPACE       " fmdy-xfeld
*   i_bsp_element_bcs = SPACE   " fmdy-xfeld
*   i_select_without_fonds = SPACE  " fmdy-xfeld
*   i_select_without_budgetpd = SPACE  " fmdy-xfeld
*   i_select_without_function = SPACE  " fmdy-xfeld
*   i_select_without_measure = SPACE  " fmdy-xfeld
*   i_select_without_grant = SPACE  " fmdy-xfeld
*   i_status = 'U'              " fmdy-xfeld
*   i_list_title =              " sy-title      List heading
*   i_flg_no_list = SPACE       " fmdy-xfeld    Display no list
*   i_flg_no_overtake = SPACE   " fmdy-xfeld
*   i_flg_maint_sequent = SPACE  " fmdy-xfeld
*   i_flg_maint_multiple = SPACE  " fmdy-xfeld
*   i_flg_del = SPACE           " fmdy-xfeld
*   i_flg_check_budget = SPACE  " fmdy-xfeld
*   i_maint_funcname = SPACE    " tfdir-funcname
*   i_prog_varnt = SPACE        " rsvar-variant
*   i_flg_blank_dim_bcs =       " fmslblnkdim
  IMPORTING
    e_f_fkrs =                  " fkrs
    e_f_fvar =                  " fvar
* TABLES
*   t_fmslbsp =                 " fmslbsp
*   t_fmsltrp =                 " fmsltrp
*   t_fmslfctr =                " fmslfctr
*   t_fmslfpex =                " fm_t_cisl
*   t_fmslffnd =                " fmslffnd
*   t_fmslpara =                " fmslpara
*   t_fmslheader =              " fmslheader
*   t_fmslfields =              " fmslfields
*   t_fmslfbdp =                " fmslfbdp
*   t_fmslffbp =                " fmslffbp
  EXCEPTIONS
    INPUT_ERROR = 1             "               Wrong Input Parameter
    NO_ENTRY_FOUND = 2          "               No records were selected
    PROG_VARNT_ERROR = 3        "
    .  "  FM_SELECT_MULTIPLE

ABAP code example for Function Module FM_SELECT_MULTIPLE





The ABAP code below is a full code listing to execute function module FM_SELECT_MULTIPLE 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_f_fkrs  TYPE FKRS ,
ld_e_f_fvar  TYPE FVAR ,
it_t_fmslbsp  TYPE STANDARD TABLE OF FMSLBSP,"TABLES PARAM
wa_t_fmslbsp  LIKE LINE OF it_t_fmslbsp ,
it_t_fmsltrp  TYPE STANDARD TABLE OF FMSLTRP,"TABLES PARAM
wa_t_fmsltrp  LIKE LINE OF it_t_fmsltrp ,
it_t_fmslfctr  TYPE STANDARD TABLE OF FMSLFCTR,"TABLES PARAM
wa_t_fmslfctr  LIKE LINE OF it_t_fmslfctr ,
it_t_fmslfpex  TYPE STANDARD TABLE OF FM_T_CISL,"TABLES PARAM
wa_t_fmslfpex  LIKE LINE OF it_t_fmslfpex ,
it_t_fmslffnd  TYPE STANDARD TABLE OF FMSLFFND,"TABLES PARAM
wa_t_fmslffnd  LIKE LINE OF it_t_fmslffnd ,
it_t_fmslpara  TYPE STANDARD TABLE OF FMSLPARA,"TABLES PARAM
wa_t_fmslpara  LIKE LINE OF it_t_fmslpara ,
it_t_fmslheader  TYPE STANDARD TABLE OF FMSLHEADER,"TABLES PARAM
wa_t_fmslheader  LIKE LINE OF it_t_fmslheader ,
it_t_fmslfields  TYPE STANDARD TABLE OF FMSLFIELDS,"TABLES PARAM
wa_t_fmslfields  LIKE LINE OF it_t_fmslfields ,
it_t_fmslfbdp  TYPE STANDARD TABLE OF FMSLFBDP,"TABLES PARAM
wa_t_fmslfbdp  LIKE LINE OF it_t_fmslfbdp ,
it_t_fmslffbp  TYPE STANDARD TABLE OF FMSLFFBP,"TABLES PARAM
wa_t_fmslffbp  LIKE LINE OF it_t_fmslffbp .


SELECT single FIKRS
FROM FMCI
INTO @DATA(ld_i_fikrs).


SELECT single GJAHR
FROM FMCI
INTO @DATA(ld_i_gjahr).


SELECT single VARNT
FROM FMHICI
INTO @DATA(ld_i_varnt).


SELECT single HIVARNT
FROM FMHISV
INTO @DATA(ld_i_hivarnt).


SELECT single POPER
FROM T009B
INTO @DATA(ld_i_poper).


DATA(ld_i_fipex_only) = some text here

DATA(ld_i_fictr_only) = some text here

DATA(ld_i_fonds_bp_only) = some text here

DATA(ld_i_fonds_only) = some text here

DATA(ld_i_fipex_fictr_fonds) = some text here

DATA(ld_i_budgetpd_only) = some text here

DATA(ld_i_bsp_element) = some text here

DATA(ld_i_bsp_element_bcs) = some text here

DATA(ld_i_select_without_fonds) = some text here

DATA(ld_i_select_without_budgetpd) = some text here

DATA(ld_i_select_without_function) = some text here

DATA(ld_i_select_without_measure) = some text here

DATA(ld_i_select_without_grant) = some text here

DATA(ld_i_status) = some text here
DATA(ld_i_list_title) = 'some text here'.

DATA(ld_i_flg_no_list) = some text here

DATA(ld_i_flg_no_overtake) = some text here

DATA(ld_i_flg_maint_sequent) = some text here

DATA(ld_i_flg_maint_multiple) = some text here

DATA(ld_i_flg_del) = some text here

DATA(ld_i_flg_check_budget) = some text here

SELECT single FUNCNAME
FROM TFDIR
INTO @DATA(ld_i_maint_funcname).


DATA(ld_i_prog_varnt) = some text here
DATA(ld_i_flg_blank_dim_bcs) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_fmslbsp to it_t_fmslbsp.

"populate fields of struture and append to itab
append wa_t_fmsltrp to it_t_fmsltrp.

"populate fields of struture and append to itab
append wa_t_fmslfctr to it_t_fmslfctr.

"populate fields of struture and append to itab
append wa_t_fmslfpex to it_t_fmslfpex.

"populate fields of struture and append to itab
append wa_t_fmslffnd to it_t_fmslffnd.

"populate fields of struture and append to itab
append wa_t_fmslpara to it_t_fmslpara.

"populate fields of struture and append to itab
append wa_t_fmslheader to it_t_fmslheader.

"populate fields of struture and append to itab
append wa_t_fmslfields to it_t_fmslfields.

"populate fields of struture and append to itab
append wa_t_fmslfbdp to it_t_fmslfbdp.

"populate fields of struture and append to itab
append wa_t_fmslffbp to it_t_fmslffbp. . CALL FUNCTION 'FM_SELECT_MULTIPLE' EXPORTING i_fikrs = ld_i_fikrs i_gjahr = ld_i_gjahr * i_varnt = ld_i_varnt * i_hivarnt = ld_i_hivarnt * i_poper = ld_i_poper * i_fipex_only = ld_i_fipex_only * i_fictr_only = ld_i_fictr_only * i_fonds_bp_only = ld_i_fonds_bp_only * i_fonds_only = ld_i_fonds_only * i_fipex_fictr_fonds = ld_i_fipex_fictr_fonds * i_budgetpd_only = ld_i_budgetpd_only * i_bsp_element = ld_i_bsp_element * i_bsp_element_bcs = ld_i_bsp_element_bcs * i_select_without_fonds = ld_i_select_without_fonds * i_select_without_budgetpd = ld_i_select_without_budgetpd * i_select_without_function = ld_i_select_without_function * i_select_without_measure = ld_i_select_without_measure * i_select_without_grant = ld_i_select_without_grant * i_status = ld_i_status * i_list_title = ld_i_list_title * i_flg_no_list = ld_i_flg_no_list * i_flg_no_overtake = ld_i_flg_no_overtake * i_flg_maint_sequent = ld_i_flg_maint_sequent * i_flg_maint_multiple = ld_i_flg_maint_multiple * i_flg_del = ld_i_flg_del * i_flg_check_budget = ld_i_flg_check_budget * i_maint_funcname = ld_i_maint_funcname * i_prog_varnt = ld_i_prog_varnt * i_flg_blank_dim_bcs = ld_i_flg_blank_dim_bcs IMPORTING e_f_fkrs = ld_e_f_fkrs e_f_fvar = ld_e_f_fvar * TABLES * t_fmslbsp = it_t_fmslbsp * t_fmsltrp = it_t_fmsltrp * t_fmslfctr = it_t_fmslfctr * t_fmslfpex = it_t_fmslfpex * t_fmslffnd = it_t_fmslffnd * t_fmslpara = it_t_fmslpara * t_fmslheader = it_t_fmslheader * t_fmslfields = it_t_fmslfields * t_fmslfbdp = it_t_fmslfbdp * t_fmslffbp = it_t_fmslffbp EXCEPTIONS INPUT_ERROR = 1 NO_ENTRY_FOUND = 2 PROG_VARNT_ERROR = 3 . " FM_SELECT_MULTIPLE
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 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_e_f_fkrs  TYPE FKRS ,
ld_i_fikrs  TYPE FMCI-FIKRS ,
it_t_fmslbsp  TYPE STANDARD TABLE OF FMSLBSP ,
wa_t_fmslbsp  LIKE LINE OF it_t_fmslbsp,
ld_e_f_fvar  TYPE FVAR ,
ld_i_gjahr  TYPE FMCI-GJAHR ,
it_t_fmsltrp  TYPE STANDARD TABLE OF FMSLTRP ,
wa_t_fmsltrp  LIKE LINE OF it_t_fmsltrp,
ld_i_varnt  TYPE FMHICI-VARNT ,
it_t_fmslfctr  TYPE STANDARD TABLE OF FMSLFCTR ,
wa_t_fmslfctr  LIKE LINE OF it_t_fmslfctr,
ld_i_hivarnt  TYPE FMHISV-HIVARNT ,
it_t_fmslfpex  TYPE STANDARD TABLE OF FM_T_CISL ,
wa_t_fmslfpex  LIKE LINE OF it_t_fmslfpex,
ld_i_poper  TYPE T009B-POPER ,
it_t_fmslffnd  TYPE STANDARD TABLE OF FMSLFFND ,
wa_t_fmslffnd  LIKE LINE OF it_t_fmslffnd,
ld_i_fipex_only  TYPE FMDY-XFELD ,
it_t_fmslpara  TYPE STANDARD TABLE OF FMSLPARA ,
wa_t_fmslpara  LIKE LINE OF it_t_fmslpara,
ld_i_fictr_only  TYPE FMDY-XFELD ,
it_t_fmslheader  TYPE STANDARD TABLE OF FMSLHEADER ,
wa_t_fmslheader  LIKE LINE OF it_t_fmslheader,
ld_i_fonds_bp_only  TYPE FMDY-XFELD ,
it_t_fmslfields  TYPE STANDARD TABLE OF FMSLFIELDS ,
wa_t_fmslfields  LIKE LINE OF it_t_fmslfields,
it_t_fmslfbdp  TYPE STANDARD TABLE OF FMSLFBDP ,
wa_t_fmslfbdp  LIKE LINE OF it_t_fmslfbdp,
ld_i_fonds_only  TYPE FMDY-XFELD ,
ld_i_fipex_fictr_fonds  TYPE FMDY-XFELD ,
it_t_fmslffbp  TYPE STANDARD TABLE OF FMSLFFBP ,
wa_t_fmslffbp  LIKE LINE OF it_t_fmslffbp,
ld_i_budgetpd_only  TYPE FMDY-XFELD ,
ld_i_bsp_element  TYPE FMDY-XFELD ,
ld_i_bsp_element_bcs  TYPE FMDY-XFELD ,
ld_i_select_without_fonds  TYPE FMDY-XFELD ,
ld_i_select_without_budgetpd  TYPE FMDY-XFELD ,
ld_i_select_without_function  TYPE FMDY-XFELD ,
ld_i_select_without_measure  TYPE FMDY-XFELD ,
ld_i_select_without_grant  TYPE FMDY-XFELD ,
ld_i_status  TYPE FMDY-XFELD ,
ld_i_list_title  TYPE SY-TITLE ,
ld_i_flg_no_list  TYPE FMDY-XFELD ,
ld_i_flg_no_overtake  TYPE FMDY-XFELD ,
ld_i_flg_maint_sequent  TYPE FMDY-XFELD ,
ld_i_flg_maint_multiple  TYPE FMDY-XFELD ,
ld_i_flg_del  TYPE FMDY-XFELD ,
ld_i_flg_check_budget  TYPE FMDY-XFELD ,
ld_i_maint_funcname  TYPE TFDIR-FUNCNAME ,
ld_i_prog_varnt  TYPE RSVAR-VARIANT ,
ld_i_flg_blank_dim_bcs  TYPE FMSLBLNKDIM .


SELECT single FIKRS
FROM FMCI
INTO ld_i_fikrs.


"populate fields of struture and append to itab
append wa_t_fmslbsp to it_t_fmslbsp.

SELECT single GJAHR
FROM FMCI
INTO ld_i_gjahr.


"populate fields of struture and append to itab
append wa_t_fmsltrp to it_t_fmsltrp.

SELECT single VARNT
FROM FMHICI
INTO ld_i_varnt.


"populate fields of struture and append to itab
append wa_t_fmslfctr to it_t_fmslfctr.

SELECT single HIVARNT
FROM FMHISV
INTO ld_i_hivarnt.


"populate fields of struture and append to itab
append wa_t_fmslfpex to it_t_fmslfpex.

SELECT single POPER
FROM T009B
INTO ld_i_poper.


"populate fields of struture and append to itab
append wa_t_fmslffnd to it_t_fmslffnd.

ld_i_fipex_only = some text here

"populate fields of struture and append to itab
append wa_t_fmslpara to it_t_fmslpara.

ld_i_fictr_only = some text here

"populate fields of struture and append to itab
append wa_t_fmslheader to it_t_fmslheader.

ld_i_fonds_bp_only = some text here

"populate fields of struture and append to itab
append wa_t_fmslfields to it_t_fmslfields.

"populate fields of struture and append to itab
append wa_t_fmslfbdp to it_t_fmslfbdp.

ld_i_fonds_only = some text here

ld_i_fipex_fictr_fonds = some text here

"populate fields of struture and append to itab
append wa_t_fmslffbp to it_t_fmslffbp.

ld_i_budgetpd_only = some text here

ld_i_bsp_element = some text here

ld_i_bsp_element_bcs = some text here

ld_i_select_without_fonds = some text here

ld_i_select_without_budgetpd = some text here

ld_i_select_without_function = some text here

ld_i_select_without_measure = some text here

ld_i_select_without_grant = some text here

ld_i_status = some text here
ld_i_list_title = 'some text here'.

ld_i_flg_no_list = some text here

ld_i_flg_no_overtake = some text here

ld_i_flg_maint_sequent = some text here

ld_i_flg_maint_multiple = some text here

ld_i_flg_del = some text here

ld_i_flg_check_budget = some text here

SELECT single FUNCNAME
FROM TFDIR
INTO ld_i_maint_funcname.


ld_i_prog_varnt = some text here
ld_i_flg_blank_dim_bcs = '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 FM_SELECT_MULTIPLE or its description.