SAP GTB_QL_QUERY_EXECUTE Function Module for GTB: Start Query









GTB_QL_QUERY_EXECUTE is a standard gtb ql query execute 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: Start Query 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 ql query execute FM, simply by entering the name GTB_QL_QUERY_EXECUTE into the relevant SAP transaction such as SE37 or SE38.

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



Function GTB_QL_QUERY_EXECUTE 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_QL_QUERY_EXECUTE'"GTB: Start Query
EXPORTING
* I_DISPLAY = "Display results
* I_EXT_ALV_GRID = "External ALV-Grid Container
* IS_QL = "GTB: Query Launcher Output Structure
* I_MODE = "1: Execute, 2: Display, 3: Change&Execute

EXCEPTIONS
VARIANT_DOES_NOT_EXIST = 1 VARIANT_ERROR = 2 NO_VALUES = 3
.



IMPORTING Parameters details for GTB_QL_QUERY_EXECUTE

I_DISPLAY - Display results

Data type: CHAR1
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)

IS_QL - GTB: Query Launcher Output Structure

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

I_MODE - 1: Execute, 2: Display, 3: Change&Execute

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

EXCEPTIONS details

VARIANT_DOES_NOT_EXIST -

Data type:
Optional: No
Call by Reference: Yes

VARIANT_ERROR -

Data type:
Optional: No
Call by Reference: Yes

NO_VALUES -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GTB_QL_QUERY_EXECUTE 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_display  TYPE CHAR1, "   
lv_variant_does_not_exist  TYPE CHAR1, "   
lv_variant_error  TYPE CHAR1, "   
lv_i_ext_alv_grid  TYPE CL_GUI_ALV_GRID, "   
lv_is_ql  TYPE GTB_QL_OUTPUT, "   
lv_no_values  TYPE GTB_QL_OUTPUT, "   
lv_i_mode  TYPE CHAR1. "   

  CALL FUNCTION 'GTB_QL_QUERY_EXECUTE'  "GTB: Start Query
    EXPORTING
         I_DISPLAY = lv_i_display
         I_EXT_ALV_GRID = lv_i_ext_alv_grid
         IS_QL = lv_is_ql
         I_MODE = lv_i_mode
    EXCEPTIONS
        VARIANT_DOES_NOT_EXIST = 1
        VARIANT_ERROR = 2
        NO_VALUES = 3
. " GTB_QL_QUERY_EXECUTE




ABAP code using 7.40 inline data declarations to call FM GTB_QL_QUERY_EXECUTE

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.

 
 
 
 
 
 
 


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!