SAP FC_TOTALS_SELECT Function Module for
FC_TOTALS_SELECT is a standard fc totals select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fc totals select FM, simply by entering the name FC_TOTALS_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: FC0D
Program Name: SAPLFC0D
Main Program: SAPLFC0D
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FC_TOTALS_SELECT 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 'FC_TOTALS_SELECT'".
EXPORTING
* E_CURSOR = 'N' "
* E_RECORDS_ALL = "
* E_SIGN = "
* E_SUMIT = "
* E_SUMCG = "
* E_SUMVS = "
* E_RVERS = "
* E_RYEAR = "
* E_PERID = "
* E_PACK_OUT = "
* E_DATABASE = 'T' "
IT_SEL = "Selection Condition
* IT_FIELDS = "
* IT_KFIG = "
* IT_KFIG_PP = "
* E_FIELDS_ALL = "
* E_KFIG_ALL = "
* E_PERID_CUM = "
IMPORTING
IT_DATA = "
I_DONE = "
EXCEPTIONS
FIELDS_MISSING = 1 KFIG_MISSING = 2 FIELDNAME_WRONG = 3
IMPORTING Parameters details for FC_TOTALS_SELECT
E_CURSOR -
Data type: FC_FLGDefault: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)
E_RECORDS_ALL -
Data type: FC_FLGOptional: Yes
Call by Reference: Yes
E_SIGN -
Data type: FC_FLGOptional: Yes
Call by Reference: Yes
E_SUMIT -
Data type: FC_FLGOptional: Yes
Call by Reference: No ( called with pass by value option)
E_SUMCG -
Data type: FC_FLGOptional: Yes
Call by Reference: No ( called with pass by value option)
E_SUMVS -
Data type: FC_FLGOptional: Yes
Call by Reference: No ( called with pass by value option)
E_RVERS -
Data type: FC_RVERSOptional: Yes
Call by Reference: No ( called with pass by value option)
E_RYEAR -
Data type: FC_RYEAROptional: Yes
Call by Reference: No ( called with pass by value option)
E_PERID -
Data type: FC_PERIDOptional: Yes
Call by Reference: No ( called with pass by value option)
E_PACK_OUT -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
E_DATABASE -
Data type: FC_FLGDefault: 'T'
Optional: Yes
Call by Reference: Yes
IT_SEL - Selection Condition
Data type: FC00_T_SELOptional: No
Call by Reference: Yes
IT_FIELDS -
Data type: FC00_T_FIELDSOptional: Yes
Call by Reference: Yes
IT_KFIG -
Data type: FC00_T_FIELDSOptional: Yes
Call by Reference: Yes
IT_KFIG_PP -
Data type: FC00_T_FIELDSOptional: Yes
Call by Reference: Yes
E_FIELDS_ALL -
Data type: FC_FLGOptional: Yes
Call by Reference: No ( called with pass by value option)
E_KFIG_ALL -
Data type: FC_FLGOptional: Yes
Call by Reference: No ( called with pass by value option)
E_PERID_CUM -
Data type: FC_FLGOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FC_TOTALS_SELECT
IT_DATA -
Data type: TABLEOptional: No
Call by Reference: Yes
I_DONE -
Data type: FC_FLGOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FIELDS_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KFIG_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FIELDNAME_WRONG -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FC_TOTALS_SELECT 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_it_data | TYPE TABLE, " | |||
| lv_e_cursor | TYPE FC_FLG, " 'N' | |||
| lv_fields_missing | TYPE FC_FLG, " | |||
| lv_e_records_all | TYPE FC_FLG, " | |||
| lv_e_sign | TYPE FC_FLG, " | |||
| lv_e_sumit | TYPE FC_FLG, " | |||
| lv_e_sumcg | TYPE FC_FLG, " | |||
| lv_e_sumvs | TYPE FC_FLG, " | |||
| lv_e_rvers | TYPE FC_RVERS, " | |||
| lv_e_ryear | TYPE FC_RYEAR, " | |||
| lv_e_perid | TYPE FC_PERID, " | |||
| lv_e_pack_out | TYPE I, " | |||
| lv_i_done | TYPE FC_FLG, " | |||
| lv_e_database | TYPE FC_FLG, " 'T' | |||
| lv_kfig_missing | TYPE FC_FLG, " | |||
| lv_it_sel | TYPE FC00_T_SEL, " | |||
| lv_fieldname_wrong | TYPE FC00_T_SEL, " | |||
| lv_it_fields | TYPE FC00_T_FIELDS, " | |||
| lv_it_kfig | TYPE FC00_T_FIELDS, " | |||
| lv_it_kfig_pp | TYPE FC00_T_FIELDS, " | |||
| lv_e_fields_all | TYPE FC_FLG, " | |||
| lv_e_kfig_all | TYPE FC_FLG, " | |||
| lv_e_perid_cum | TYPE FC_FLG. " |
|   CALL FUNCTION 'FC_TOTALS_SELECT' " |
| EXPORTING | ||
| E_CURSOR | = lv_e_cursor | |
| E_RECORDS_ALL | = lv_e_records_all | |
| E_SIGN | = lv_e_sign | |
| E_SUMIT | = lv_e_sumit | |
| E_SUMCG | = lv_e_sumcg | |
| E_SUMVS | = lv_e_sumvs | |
| E_RVERS | = lv_e_rvers | |
| E_RYEAR | = lv_e_ryear | |
| E_PERID | = lv_e_perid | |
| E_PACK_OUT | = lv_e_pack_out | |
| E_DATABASE | = lv_e_database | |
| IT_SEL | = lv_it_sel | |
| IT_FIELDS | = lv_it_fields | |
| IT_KFIG | = lv_it_kfig | |
| IT_KFIG_PP | = lv_it_kfig_pp | |
| E_FIELDS_ALL | = lv_e_fields_all | |
| E_KFIG_ALL | = lv_e_kfig_all | |
| E_PERID_CUM | = lv_e_perid_cum | |
| IMPORTING | ||
| IT_DATA | = lv_it_data | |
| I_DONE | = lv_i_done | |
| EXCEPTIONS | ||
| FIELDS_MISSING = 1 | ||
| KFIG_MISSING = 2 | ||
| FIELDNAME_WRONG = 3 | ||
| . " FC_TOTALS_SELECT | ||
ABAP code using 7.40 inline data declarations to call FM FC_TOTALS_SELECT
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.| DATA(ld_e_cursor) | = 'N'. | |||
| DATA(ld_e_database) | = 'T'. | |||
Search for further information about these or an SAP related objects