SAP Function Modules

STC1_SELECT_SUBSCREEN SAP Function module







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

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


Pattern for FM STC1_SELECT_SUBSCREEN - STC1 SELECT SUBSCREEN





CALL FUNCTION 'STC1_SELECT_SUBSCREEN' "
  EXPORTING
    header =                    "
    tabname =                   " dd02l-tabname
*   display_only =              "
*   endless =                   "
*   handle =                    " tcdat_tab_handle
*   display_toggle =            "
*   sort_forbidden =            "
*   modify_check =              " field_dif-chkroutine
*   insert_check =              " field_dif-chkroutine
*   delete_check =              " field_dif-chkroutine
*   modify_disp_field =         " field_dif-chkroutine
*   no_insert =                 "
*   no_delete =                 "
*   no_move =                   "
*   no_undo =                   "
*   no_button =                 "
*   additional_button =         " field_dif-difftext
*   add_button_call =           " field_dif-push_call
*   add_button_header =         " field_dif-difftext
  IMPORTING
    dynproreport =              " sy-cprog
    dynpronr =                  " sy-dynnr
    tabhandle =                 " tcdat_tab_handle
  TABLES
*   nametab =                   " dfies
    table =                     "
*   fielddif =                  " field_dif
  EXCEPTIONS
    NO_MORE_TABLES = 1          "
    TOO_MANY_FIELDS = 2         "
    NAMETAB_NOT_VALID = 3       "
    HANDLE_NOT_VALID = 4        "
    .  "  STC1_SELECT_SUBSCREEN

ABAP code example for Function Module STC1_SELECT_SUBSCREEN





The ABAP code below is a full code listing to execute function module STC1_SELECT_SUBSCREEN 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_dynproreport  TYPE SY-CPROG ,
ld_dynpronr  TYPE SY-DYNNR ,
ld_tabhandle  TYPE TCDAT_TAB_HANDLE ,
it_nametab  TYPE STANDARD TABLE OF DFIES,"TABLES PARAM
wa_nametab  LIKE LINE OF it_nametab ,
it_table  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_table  LIKE LINE OF it_table ,
it_fielddif  TYPE STANDARD TABLE OF FIELD_DIF,"TABLES PARAM
wa_fielddif  LIKE LINE OF it_fielddif .

DATA(ld_header) = 'some text here'.

SELECT single TABNAME
FROM DD02L
INTO @DATA(ld_tabname).

DATA(ld_display_only) = 'some text here'.
DATA(ld_endless) = 'some text here'.
DATA(ld_handle) = 'Check type of data required'.
DATA(ld_display_toggle) = 'some text here'.
DATA(ld_sort_forbidden) = 'some text here'.

DATA(ld_modify_check) = some text here

DATA(ld_insert_check) = some text here

DATA(ld_delete_check) = some text here

DATA(ld_modify_disp_field) = some text here
DATA(ld_no_insert) = 'some text here'.
DATA(ld_no_delete) = 'some text here'.
DATA(ld_no_move) = 'some text here'.
DATA(ld_no_undo) = 'some text here'.
DATA(ld_no_button) = 'some text here'.

DATA(ld_additional_button) = some text here

DATA(ld_add_button_call) = some text here

DATA(ld_add_button_header) = some text here

"populate fields of struture and append to itab
append wa_nametab to it_nametab.

"populate fields of struture and append to itab
append wa_table to it_table.

"populate fields of struture and append to itab
append wa_fielddif to it_fielddif. . CALL FUNCTION 'STC1_SELECT_SUBSCREEN' EXPORTING header = ld_header tabname = ld_tabname * display_only = ld_display_only * endless = ld_endless * handle = ld_handle * display_toggle = ld_display_toggle * sort_forbidden = ld_sort_forbidden * modify_check = ld_modify_check * insert_check = ld_insert_check * delete_check = ld_delete_check * modify_disp_field = ld_modify_disp_field * no_insert = ld_no_insert * no_delete = ld_no_delete * no_move = ld_no_move * no_undo = ld_no_undo * no_button = ld_no_button * additional_button = ld_additional_button * add_button_call = ld_add_button_call * add_button_header = ld_add_button_header IMPORTING dynproreport = ld_dynproreport dynpronr = ld_dynpronr tabhandle = ld_tabhandle TABLES * nametab = it_nametab table = it_table * fielddif = it_fielddif EXCEPTIONS NO_MORE_TABLES = 1 TOO_MANY_FIELDS = 2 NAMETAB_NOT_VALID = 3 HANDLE_NOT_VALID = 4 . " STC1_SELECT_SUBSCREEN
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 ELSEIF SY-SUBRC EQ 4. "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_dynproreport  TYPE SY-CPROG ,
ld_header  TYPE STRING ,
it_nametab  TYPE STANDARD TABLE OF DFIES ,
wa_nametab  LIKE LINE OF it_nametab,
ld_dynpronr  TYPE SY-DYNNR ,
ld_tabname  TYPE DD02L-TABNAME ,
it_table  TYPE STANDARD TABLE OF STRING ,
wa_table  LIKE LINE OF it_table,
ld_tabhandle  TYPE TCDAT_TAB_HANDLE ,
ld_display_only  TYPE STRING ,
it_fielddif  TYPE STANDARD TABLE OF FIELD_DIF ,
wa_fielddif  LIKE LINE OF it_fielddif,
ld_endless  TYPE STRING ,
ld_handle  TYPE TCDAT_TAB_HANDLE ,
ld_display_toggle  TYPE STRING ,
ld_sort_forbidden  TYPE STRING ,
ld_modify_check  TYPE FIELD_DIF-CHKROUTINE ,
ld_insert_check  TYPE FIELD_DIF-CHKROUTINE ,
ld_delete_check  TYPE FIELD_DIF-CHKROUTINE ,
ld_modify_disp_field  TYPE FIELD_DIF-CHKROUTINE ,
ld_no_insert  TYPE STRING ,
ld_no_delete  TYPE STRING ,
ld_no_move  TYPE STRING ,
ld_no_undo  TYPE STRING ,
ld_no_button  TYPE STRING ,
ld_additional_button  TYPE FIELD_DIF-DIFFTEXT ,
ld_add_button_call  TYPE FIELD_DIF-PUSH_CALL ,
ld_add_button_header  TYPE FIELD_DIF-DIFFTEXT .

ld_header = 'some text here'.

"populate fields of struture and append to itab
append wa_nametab to it_nametab.

SELECT single TABNAME
FROM DD02L
INTO ld_tabname.


"populate fields of struture and append to itab
append wa_table to it_table.
ld_display_only = 'some text here'.

"populate fields of struture and append to itab
append wa_fielddif to it_fielddif.
ld_endless = 'some text here'.
ld_handle = 'Check type of data required'.
ld_display_toggle = 'some text here'.
ld_sort_forbidden = 'some text here'.

ld_modify_check = some text here

ld_insert_check = some text here

ld_delete_check = some text here

ld_modify_disp_field = some text here
ld_no_insert = 'some text here'.
ld_no_delete = 'some text here'.
ld_no_move = 'some text here'.
ld_no_undo = 'some text here'.
ld_no_button = 'some text here'.

ld_additional_button = some text here

ld_add_button_call = some text here

ld_add_button_header = 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 STC1_SELECT_SUBSCREEN or its description.