SAP GTB_INTERFACE Function Module for GTB: Interface to execution









GTB_INTERFACE is a standard gtb interface SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for GTB: Interface to execution 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 gtb interface FM, simply by entering the name GTB_INTERFACE into the relevant SAP transaction such as SE37 or SE38.

Function Group: S4H16N
Program Name: SAPLS4H16N
Main Program: SAPLS4H16N
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GTB_INTERFACE 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 'GTB_INTERFACE'"GTB: Interface to execution
EXPORTING
I_TAB = "Table
* I_VARIANT = ' ' "Layout
* I_OLD_ALV = ' ' "Not ALV grid
* I_CHECKKEY = ' ' "No foreign key check
* I_TECH_NAMES = ' ' "Technical Name as Column Heading
* I_CWIDTH_OPT_OFF = ' ' "Deactivate Column Width Optimization
* I_SCROLL = ' ' "KeyColumnsScrolab.
* I_NO_CONVEXIT = ' ' "Do not use conversion for output
* I_LAYOUT_GET = ' ' "Get last layout automatically
* I_ADD_FIELD = "Additional Field for Exit
* I_ADD_FIELDS_ON = "Use Field Exit
* I_EDIT = ' ' "Single-Character Indicator
* I_UNAME = "User Name
* I_HANA_ACTIVE = ' ' "SAP HANA Mode Active
* I_DBCON = ' ' "Logical Name for a Database Connection
* I_OJKEY = ' ' "Outer Join Definition
* I_DISPLAY_ALL = ' ' "Selection of all Records
* I_TEMPERATURE = ' ' "Data Filter Value for Data Aging
* I_TEMPERATURE_COLD = ' ' "Read All Cold Data
* I_SESSION_CONTROL = "Session Control for Data Aging
* I_EXT_ALV_GRID = "External ALV-Grid Container
* I_DRILLDOWN_GRID = "Activate permanent drilldown GRID at the left
* I_SAPEDIT = ' ' "Single-Character Indicator
* I_FORMULA_NAME = "GTB: Name of Formula
* I_NO_TXT = ' ' "Do not select any texts
* I_MAX_LINES = 500 "Maximum Number of Hits
* I_LINE_DET = ' ' "Only determine number of entries found
* I_DISPLAY = 'X' "Display Results
* I_CLNT_SPEZ = ' ' "Client-dependent selection
* I_CLNT_DEP = ' ' "Table is client-dependent

IMPORTING
E_LINE_NR = "No. of entries found
E_DREF = "Pointer to the Results List
ET_FIELDCAT = "Output List Field Catalog

CHANGING
* IT_AND_SELTAB = "GTB: Table Type for AND Link
* IT_ORDER_BY_FIELDS = "GTB: Table of output fields
* IT_AGGREGATE_FIELDS = "GTB: Internal Table Type for Several Conditions
* IT_TOPLOW_FIELDS = "GTB: Internal Table Type for Several Conditions
* IT_SORTORDER_FIELDS = "GTB: Internal Table Type for Several Conditions
* IT_SELTAB = "GTB: Internal Table Type for Several Conditions
* IT_OUTPUT_FIELDS = "GTB: Table of output fields
* IT_OR_SELTAB = "GTB: Transfer Table Type for Multiple Selection Criteria
* IT_CALLBACK_EVENTS = "GTB: Event Table for exits
* IT_ADD_UP_CURR_FIELDS = "GTB: Table of output fields
* IT_ADD_UP_QUAN_FIELDS = "GTB: Table of output fields
* IT_SUM_UP_FIELDS = "GTB: Table of output fields
* IT_GROUP_BY_FIELDS = "GTB: Table of output fields

EXCEPTIONS
NO_VALUES = 1
.



IMPORTING Parameters details for GTB_INTERFACE

I_TAB - Table

Data type: GTB_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

I_VARIANT - Layout

Data type: SLIS_VARI
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_OLD_ALV - Not ALV grid

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CHECKKEY - No foreign key check

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TECH_NAMES - Technical Name as Column Heading

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CWIDTH_OPT_OFF - Deactivate Column Width Optimization

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SCROLL - KeyColumnsScrolab.

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NO_CONVEXIT - Do not use conversion for output

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LAYOUT_GET - Get last layout automatically

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ADD_FIELD - Additional Field for Exit

Data type: CHAR40
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ADD_FIELDS_ON - Use Field Exit

Data type: CHAR1
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_EDIT - Single-Character Indicator

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_UNAME - User Name

Data type: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_HANA_ACTIVE - SAP HANA Mode Active

Data type: CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DBCON - Logical Name for a Database Connection

Data type: DBCON_NAME
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_OJKEY - Outer Join Definition

Data type: GTB_OJKEY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DISPLAY_ALL - Selection of all Records

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TEMPERATURE - Data Filter Value for Data Aging

Data type: SY-DATLO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TEMPERATURE_COLD - Read All Cold Data

Data type: CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SESSION_CONTROL - Session Control for Data Aging

Data type: CL_ABAP_SESSION_TEMPERATURE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_EXT_ALV_GRID - External ALV-Grid Container

Data type: CL_GUI_ALV_GRID
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DRILLDOWN_GRID - Activate permanent drilldown GRID at the left

Data type: CHAR1
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SAPEDIT - Single-Character Indicator

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FORMULA_NAME - GTB: Name of Formula

Data type: GTB_FORMULA_NAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NO_TXT - Do not select any texts

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MAX_LINES - Maximum Number of Hits

Data type: SYTABIX
Default: 500
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LINE_DET - Only determine number of entries found

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DISPLAY - Display Results

Data type: CHAR1
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CLNT_SPEZ - Client-dependent selection

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CLNT_DEP - Table is client-dependent

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GTB_INTERFACE

E_LINE_NR - No. of entries found

Data type: GTB_NR_LINES
Optional: No
Call by Reference: No ( called with pass by value option)

E_DREF - Pointer to the Results List

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ET_FIELDCAT - Output List Field Catalog

Data type: LVC_T_FCAT
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for GTB_INTERFACE

IT_AND_SELTAB - GTB: Table Type for AND Link

Data type: GTB_T_AND_CLAUSE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_ORDER_BY_FIELDS - GTB: Table of output fields

Data type: GTB_T_OUTPUT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_AGGREGATE_FIELDS - GTB: Internal Table Type for Several Conditions

Data type: GTB_T_SELTAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_TOPLOW_FIELDS - GTB: Internal Table Type for Several Conditions

Data type: GTB_T_SELTAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_SORTORDER_FIELDS - GTB: Internal Table Type for Several Conditions

Data type: GTB_T_SELTAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_SELTAB - GTB: Internal Table Type for Several Conditions

Data type: GTB_T_SELTAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_OUTPUT_FIELDS - GTB: Table of output fields

Data type: GTB_T_OUTPUT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_OR_SELTAB - GTB: Transfer Table Type for Multiple Selection Criteria

Data type: GTB_T_OR_CLAUSE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_CALLBACK_EVENTS - GTB: Event Table for exits

Data type: GTB_T_EVENTS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_ADD_UP_CURR_FIELDS - GTB: Table of output fields

Data type: GTB_T_OUTPUT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_ADD_UP_QUAN_FIELDS - GTB: Table of output fields

Data type: GTB_T_OUTPUT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_SUM_UP_FIELDS - GTB: Table of output fields

Data type: GTB_T_OUTPUT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_GROUP_BY_FIELDS - GTB: Table of output fields

Data type: GTB_T_OUTPUT
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_VALUES - No Values Found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GTB_INTERFACE 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_i_tab  TYPE GTB_TAB, "   
lv_e_line_nr  TYPE GTB_NR_LINES, "   
lv_no_values  TYPE GTB_NR_LINES, "   
lv_it_and_seltab  TYPE GTB_T_AND_CLAUSE, "   
lv_i_variant  TYPE SLIS_VARI, "   ' '
lv_it_order_by_fields  TYPE GTB_T_OUTPUT, "   
lv_i_old_alv  TYPE CHAR1, "   ' '
lv_it_aggregate_fields  TYPE GTB_T_SELTAB, "   
lv_i_checkkey  TYPE CHAR1, "   ' '
lv_it_toplow_fields  TYPE GTB_T_SELTAB, "   
lv_i_tech_names  TYPE CHAR1, "   ' '
lv_it_sortorder_fields  TYPE GTB_T_SELTAB, "   
lv_i_cwidth_opt_off  TYPE CHAR1, "   ' '
lv_i_scroll  TYPE CHAR1, "   ' '
lv_i_no_convexit  TYPE CHAR1, "   ' '
lv_i_layout_get  TYPE CHAR1, "   ' '
lv_i_add_field  TYPE CHAR40, "   
lv_i_add_fields_on  TYPE CHAR1, "   
lv_e_dref  TYPE CHAR1, "   
lv_i_edit  TYPE CHAR1, "   ' '
lv_it_seltab  TYPE GTB_T_SELTAB, "   
lv_i_uname  TYPE SY-UNAME, "   
lv_i_hana_active  TYPE CHAR1, "   SPACE
lv_i_dbcon  TYPE DBCON_NAME, "   SPACE
lv_i_ojkey  TYPE GTB_OJKEY, "   SPACE
lv_i_display_all  TYPE CHAR1, "   ' '
lv_i_temperature  TYPE SY-DATLO, "   SPACE
lv_i_temperature_cold  TYPE CHAR1, "   SPACE
lv_i_session_control  TYPE CL_ABAP_SESSION_TEMPERATURE, "   
lv_i_ext_alv_grid  TYPE CL_GUI_ALV_GRID, "   
lv_i_drilldown_grid  TYPE CHAR1, "   
lv_i_sapedit  TYPE CHAR1, "   ' '
lv_et_fieldcat  TYPE LVC_T_FCAT, "   
lv_it_output_fields  TYPE GTB_T_OUTPUT, "   
lv_i_formula_name  TYPE GTB_FORMULA_NAME, "   
lv_i_no_txt  TYPE CHAR1, "   ' '
lv_it_or_seltab  TYPE GTB_T_OR_CLAUSE, "   
lv_i_max_lines  TYPE SYTABIX, "   500
lv_it_callback_events  TYPE GTB_T_EVENTS, "   
lv_i_line_det  TYPE CHAR1, "   ' '
lv_it_add_up_curr_fields  TYPE GTB_T_OUTPUT, "   
lv_i_display  TYPE CHAR1, "   'X'
lv_it_add_up_quan_fields  TYPE GTB_T_OUTPUT, "   
lv_i_clnt_spez  TYPE CHAR1, "   ' '
lv_it_sum_up_fields  TYPE GTB_T_OUTPUT, "   
lv_i_clnt_dep  TYPE CHAR1, "   ' '
lv_it_group_by_fields  TYPE GTB_T_OUTPUT. "   

  CALL FUNCTION 'GTB_INTERFACE'  "GTB: Interface to execution
    EXPORTING
         I_TAB = lv_i_tab
         I_VARIANT = lv_i_variant
         I_OLD_ALV = lv_i_old_alv
         I_CHECKKEY = lv_i_checkkey
         I_TECH_NAMES = lv_i_tech_names
         I_CWIDTH_OPT_OFF = lv_i_cwidth_opt_off
         I_SCROLL = lv_i_scroll
         I_NO_CONVEXIT = lv_i_no_convexit
         I_LAYOUT_GET = lv_i_layout_get
         I_ADD_FIELD = lv_i_add_field
         I_ADD_FIELDS_ON = lv_i_add_fields_on
         I_EDIT = lv_i_edit
         I_UNAME = lv_i_uname
         I_HANA_ACTIVE = lv_i_hana_active
         I_DBCON = lv_i_dbcon
         I_OJKEY = lv_i_ojkey
         I_DISPLAY_ALL = lv_i_display_all
         I_TEMPERATURE = lv_i_temperature
         I_TEMPERATURE_COLD = lv_i_temperature_cold
         I_SESSION_CONTROL = lv_i_session_control
         I_EXT_ALV_GRID = lv_i_ext_alv_grid
         I_DRILLDOWN_GRID = lv_i_drilldown_grid
         I_SAPEDIT = lv_i_sapedit
         I_FORMULA_NAME = lv_i_formula_name
         I_NO_TXT = lv_i_no_txt
         I_MAX_LINES = lv_i_max_lines
         I_LINE_DET = lv_i_line_det
         I_DISPLAY = lv_i_display
         I_CLNT_SPEZ = lv_i_clnt_spez
         I_CLNT_DEP = lv_i_clnt_dep
    IMPORTING
         E_LINE_NR = lv_e_line_nr
         E_DREF = lv_e_dref
         ET_FIELDCAT = lv_et_fieldcat
    CHANGING
         IT_AND_SELTAB = lv_it_and_seltab
         IT_ORDER_BY_FIELDS = lv_it_order_by_fields
         IT_AGGREGATE_FIELDS = lv_it_aggregate_fields
         IT_TOPLOW_FIELDS = lv_it_toplow_fields
         IT_SORTORDER_FIELDS = lv_it_sortorder_fields
         IT_SELTAB = lv_it_seltab
         IT_OUTPUT_FIELDS = lv_it_output_fields
         IT_OR_SELTAB = lv_it_or_seltab
         IT_CALLBACK_EVENTS = lv_it_callback_events
         IT_ADD_UP_CURR_FIELDS = lv_it_add_up_curr_fields
         IT_ADD_UP_QUAN_FIELDS = lv_it_add_up_quan_fields
         IT_SUM_UP_FIELDS = lv_it_sum_up_fields
         IT_GROUP_BY_FIELDS = lv_it_group_by_fields
    EXCEPTIONS
        NO_VALUES = 1
. " GTB_INTERFACE




ABAP code using 7.40 inline data declarations to call FM GTB_INTERFACE

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_i_variant) = ' '.
 
 
DATA(ld_i_old_alv) = ' '.
 
 
DATA(ld_i_checkkey) = ' '.
 
 
DATA(ld_i_tech_names) = ' '.
 
 
DATA(ld_i_cwidth_opt_off) = ' '.
 
DATA(ld_i_scroll) = ' '.
 
DATA(ld_i_no_convexit) = ' '.
 
DATA(ld_i_layout_get) = ' '.
 
 
 
 
DATA(ld_i_edit) = ' '.
 
 
"SELECT single UNAME FROM SY INTO @DATA(ld_i_uname).
 
DATA(ld_i_hana_active) = ' '.
 
DATA(ld_i_dbcon) = ' '.
 
DATA(ld_i_ojkey) = ' '.
 
DATA(ld_i_display_all) = ' '.
 
"SELECT single DATLO FROM SY INTO @DATA(ld_i_temperature).
DATA(ld_i_temperature) = ' '.
 
DATA(ld_i_temperature_cold) = ' '.
 
 
 
 
DATA(ld_i_sapedit) = ' '.
 
 
 
 
DATA(ld_i_no_txt) = ' '.
 
 
DATA(ld_i_max_lines) = 500.
 
 
DATA(ld_i_line_det) = ' '.
 
 
DATA(ld_i_display) = 'X'.
 
 
DATA(ld_i_clnt_spez) = ' '.
 
 
DATA(ld_i_clnt_dep) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!