SAP TABCONTROL_ARRAY Function Module for SET/RETRIEVE tab control - handles to/from the memory buffered itab
TABCONTROL_ARRAY is a standard tabcontrol array SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SET/RETRIEVE tab control - handles to/from the memory buffered itab processing and below is the pattern details for this FM, 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 tabcontrol array FM, simply by entering the name TABCONTROL_ARRAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: WDTM
Program Name: SAPLWDTM
Main Program: SAPLWDTM
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TABCONTROL_ARRAY 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 'TABCONTROL_ARRAY'"SET/RETRIEVE tab control - handles to/from the memory buffered itab.
EXPORTING
* ACTION = 'W' "
* SHELL_ID = "
* FIELD_NAME = "
* REPORT_NAME = "
* DYNPRO_NAME = "
* CURSOR = "
* NEW_STATE = "
CHANGING
TAB_ID = "
* TAB_CONTROL = "
* FIELD = "
* TABC_STATE = "
* TAB_TITLE = "
* IS_PENDING_CHILD = "
TABLES
* TABCONTROLS = "
IMPORTING Parameters details for TABCONTROL_ARRAY
ACTION -
Data type:Default: 'W'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHELL_ID -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
FIELD_NAME -
Data type: DFIES-FIELDNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
REPORT_NAME -
Data type: TRDIR-NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
DYNPRO_NAME -
Data type: SY-DYNNROptional: Yes
Call by Reference: No ( called with pass by value option)
CURSOR -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
NEW_STATE -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for TABCONTROL_ARRAY
TAB_ID -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
TAB_CONTROL -
Data type: CNTL_HANDLEOptional: Yes
Call by Reference: Yes
FIELD -
Data type: MCTBC_TBFNOptional: Yes
Call by Reference: No ( called with pass by value option)
TABC_STATE -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
TAB_TITLE -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
IS_PENDING_CHILD -
Data type: COptional: Yes
Call by Reference: Yes
TABLES Parameters details for TABCONTROL_ARRAY
TABCONTROLS -
Data type: MCTBC_CTRLOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TABCONTROL_ARRAY 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_action | TYPE STRING, " 'W' | |||
| lv_tab_id | TYPE I, " | |||
| lt_tabcontrols | TYPE STANDARD TABLE OF MCTBC_CTRL, " | |||
| lv_shell_id | TYPE I, " | |||
| lv_tab_control | TYPE CNTL_HANDLE, " | |||
| lv_field | TYPE MCTBC_TBFN, " | |||
| lv_field_name | TYPE DFIES-FIELDNAME, " | |||
| lv_tabc_state | TYPE C, " | |||
| lv_report_name | TYPE TRDIR-NAME, " | |||
| lv_tab_title | TYPE C, " | |||
| lv_dynpro_name | TYPE SY-DYNNR, " | |||
| lv_cursor | TYPE C, " | |||
| lv_is_pending_child | TYPE C, " | |||
| lv_new_state | TYPE C. " |
|   CALL FUNCTION 'TABCONTROL_ARRAY' "SET/RETRIEVE tab control - handles to/from the memory buffered itab |
| EXPORTING | ||
| ACTION | = lv_action | |
| SHELL_ID | = lv_shell_id | |
| FIELD_NAME | = lv_field_name | |
| REPORT_NAME | = lv_report_name | |
| DYNPRO_NAME | = lv_dynpro_name | |
| CURSOR | = lv_cursor | |
| NEW_STATE | = lv_new_state | |
| CHANGING | ||
| TAB_ID | = lv_tab_id | |
| TAB_CONTROL | = lv_tab_control | |
| FIELD | = lv_field | |
| TABC_STATE | = lv_tabc_state | |
| TAB_TITLE | = lv_tab_title | |
| IS_PENDING_CHILD | = lv_is_pending_child | |
| TABLES | ||
| TABCONTROLS | = lt_tabcontrols | |
| . " TABCONTROL_ARRAY | ||
ABAP code using 7.40 inline data declarations to call FM TABCONTROL_ARRAY
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_action) | = 'W'. | |||
| "SELECT single FIELDNAME FROM DFIES INTO @DATA(ld_field_name). | ||||
| "SELECT single NAME FROM TRDIR INTO @DATA(ld_report_name). | ||||
| "SELECT single DYNNR FROM SY INTO @DATA(ld_dynpro_name). | ||||
Search for further information about these or an SAP related objects