SAP Function Modules

SELECTED_KEY_FIGURES_GET SAP Function module - Specify Key Figures to Select, Their Original Fields and References







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

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


Pattern for FM SELECTED_KEY_FIGURES_GET - SELECTED KEY FIGURES GET





CALL FUNCTION 'SELECTED_KEY_FIGURES_GET' "Specify Key Figures to Select, Their Original Fields and References
  EXPORTING
    i_tabnm =                   " tabname       Table Name
*   i_with_reference = FTISC_TRUE  " ftisc_flag
  IMPORTING
    e_fnam_tab =                " ftisc_yt_original_fnam
    e_calc =                    " ftisc_flag
  TABLES
    sf_tab_in =                 " cfbsf01       Selection Condition
    .  "  SELECTED_KEY_FIGURES_GET

ABAP code example for Function Module SELECTED_KEY_FIGURES_GET





The ABAP code below is a full code listing to execute function module SELECTED_KEY_FIGURES_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_e_fnam_tab  TYPE FTISC_YT_ORIGINAL_FNAM ,
ld_e_calc  TYPE FTISC_FLAG ,
it_sf_tab_in  TYPE STANDARD TABLE OF CFBSF01,"TABLES PARAM
wa_sf_tab_in  LIKE LINE OF it_sf_tab_in .

DATA(ld_i_tabnm) = 'Check type of data required'.
DATA(ld_i_with_reference) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_sf_tab_in to it_sf_tab_in. . CALL FUNCTION 'SELECTED_KEY_FIGURES_GET' EXPORTING i_tabnm = ld_i_tabnm * i_with_reference = ld_i_with_reference IMPORTING e_fnam_tab = ld_e_fnam_tab e_calc = ld_e_calc TABLES sf_tab_in = it_sf_tab_in . " SELECTED_KEY_FIGURES_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_e_fnam_tab  TYPE FTISC_YT_ORIGINAL_FNAM ,
ld_i_tabnm  TYPE TABNAME ,
it_sf_tab_in  TYPE STANDARD TABLE OF CFBSF01 ,
wa_sf_tab_in  LIKE LINE OF it_sf_tab_in,
ld_e_calc  TYPE FTISC_FLAG ,
ld_i_with_reference  TYPE FTISC_FLAG .

ld_i_tabnm = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_sf_tab_in to it_sf_tab_in.
ld_i_with_reference = 'Check type of data required'.

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