SAP GRPC_SAP_QUERY_CONTROL_EXECUTE Function Module for SAP Query Control Execution
GRPC_SAP_QUERY_CONTROL_EXECUTE is a standard grpc sap query control 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 SAP Query Control 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 grpc sap query control execute FM, simply by entering the name GRPC_SAP_QUERY_CONTROL_EXECUTE into the relevant SAP transaction such as SE37 or SE38.
Function Group: GRPC_SAP_QUERY
Program Name: SAPLGRPC_SAP_QUERY
Main Program: SAPLGRPC_SAP_QUERY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GRPC_SAP_QUERY_CONTROL_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 'GRPC_SAP_QUERY_CONTROL_EXECUTE'"SAP Query Control Execution.
EXPORTING
I_SESSION_ID = "GRPC unique session ID
I_CONNECTOR = "Target Connector
I_GRC_CONNECTOR = "Target Connector
I_SCHEDULER_ID = "GUID in 'CHAR' Format in Uppercase
I_PERIOD_TYPE = "Attribute Value
I_CONTROL_ID = "GRPC ID of the individual object
I_RULEID = "GRPC ID of the individual object
I_TIMEFRAME = "GRPC Entity API: Timeframe of the session
I_TF_YEAR = "The year of the GRPC entity API session
I_ORGUNIT_ID = "GRPC ID of the individual object
I_SYSTEMTYPE = "System Type
I_FROMDATE = "Current Date of Application Server
I_TODATE = "Current Date of Application Server
IMPORTING
E_OUTXML = "Control result in XML format
E_RETURN_CODE = "Return Value of ABAP Statements
ES_COMPLIANCE_PARAMS = "Control Complicance for Scheduler
ET_MESSAGE = "Table with BAPI Return Information
IMPORTING Parameters details for GRPC_SAP_QUERY_CONTROL_EXECUTE
I_SESSION_ID - GRPC unique session ID
Data type: GRPC_API_SESSION_IDOptional: No
Call by Reference: Yes
I_CONNECTOR - Target Connector
Data type: GRPC_CONNECTOROptional: No
Call by Reference: Yes
I_GRC_CONNECTOR - Target Connector
Data type: GRPC_CONNECTOROptional: No
Call by Reference: Yes
I_SCHEDULER_ID - GUID in 'CHAR' Format in Uppercase
Data type: GRPCSCHEDULER-JOBIDOptional: No
Call by Reference: Yes
I_PERIOD_TYPE - Attribute Value
Data type: GRPC_ATTRVALUEOptional: No
Call by Reference: Yes
I_CONTROL_ID - GRPC ID of the individual object
Data type: GRPC_API_OBJECT_IDOptional: No
Call by Reference: Yes
I_RULEID - GRPC ID of the individual object
Data type: GRPC_API_OBJECT_IDOptional: No
Call by Reference: Yes
I_TIMEFRAME - GRPC Entity API: Timeframe of the session
Data type: GRPC_S_API_TIMEFRAME-TIMEFRAMEOptional: No
Call by Reference: Yes
I_TF_YEAR - The year of the GRPC entity API session
Data type: GRPC_S_API_TF_YEAR-TF_YEAROptional: No
Call by Reference: Yes
I_ORGUNIT_ID - GRPC ID of the individual object
Data type: GRPC_S_COMPLIANCE_PARAMS-ORGUNIT_IDOptional: No
Call by Reference: Yes
I_SYSTEMTYPE - System Type
Data type: GRPC_SYSTEMTYPEOptional: No
Call by Reference: Yes
I_FROMDATE - Current Date of Application Server
Data type: SY-DATUMOptional: No
Call by Reference: Yes
I_TODATE - Current Date of Application Server
Data type: SY-DATUMOptional: No
Call by Reference: Yes
EXPORTING Parameters details for GRPC_SAP_QUERY_CONTROL_EXECUTE
E_OUTXML - Control result in XML format
Data type: STRINGOptional: No
Call by Reference: Yes
E_RETURN_CODE - Return Value of ABAP Statements
Data type: SY-SUBRCOptional: No
Call by Reference: Yes
ES_COMPLIANCE_PARAMS - Control Complicance for Scheduler
Data type: GRPC_S_COMPLIANCE_PARAMSOptional: No
Call by Reference: Yes
ET_MESSAGE - Table with BAPI Return Information
Data type: BAPIRETTABOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for GRPC_SAP_QUERY_CONTROL_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_e_outxml | TYPE STRING, " | |||
| lv_i_session_id | TYPE GRPC_API_SESSION_ID, " | |||
| lv_i_connector | TYPE GRPC_CONNECTOR, " | |||
| lv_i_grc_connector | TYPE GRPC_CONNECTOR, " | |||
| lv_i_scheduler_id | TYPE GRPCSCHEDULER-JOBID, " | |||
| lv_i_period_type | TYPE GRPC_ATTRVALUE, " | |||
| lv_i_control_id | TYPE GRPC_API_OBJECT_ID, " | |||
| lv_e_return_code | TYPE SY-SUBRC, " | |||
| lv_i_ruleid | TYPE GRPC_API_OBJECT_ID, " | |||
| lv_es_compliance_params | TYPE GRPC_S_COMPLIANCE_PARAMS, " | |||
| lv_et_message | TYPE BAPIRETTAB, " | |||
| lv_i_timeframe | TYPE GRPC_S_API_TIMEFRAME-TIMEFRAME, " | |||
| lv_i_tf_year | TYPE GRPC_S_API_TF_YEAR-TF_YEAR, " | |||
| lv_i_orgunit_id | TYPE GRPC_S_COMPLIANCE_PARAMS-ORGUNIT_ID, " | |||
| lv_i_systemtype | TYPE GRPC_SYSTEMTYPE, " | |||
| lv_i_fromdate | TYPE SY-DATUM, " | |||
| lv_i_todate | TYPE SY-DATUM. " |
|   CALL FUNCTION 'GRPC_SAP_QUERY_CONTROL_EXECUTE' "SAP Query Control Execution |
| EXPORTING | ||
| I_SESSION_ID | = lv_i_session_id | |
| I_CONNECTOR | = lv_i_connector | |
| I_GRC_CONNECTOR | = lv_i_grc_connector | |
| I_SCHEDULER_ID | = lv_i_scheduler_id | |
| I_PERIOD_TYPE | = lv_i_period_type | |
| I_CONTROL_ID | = lv_i_control_id | |
| I_RULEID | = lv_i_ruleid | |
| I_TIMEFRAME | = lv_i_timeframe | |
| I_TF_YEAR | = lv_i_tf_year | |
| I_ORGUNIT_ID | = lv_i_orgunit_id | |
| I_SYSTEMTYPE | = lv_i_systemtype | |
| I_FROMDATE | = lv_i_fromdate | |
| I_TODATE | = lv_i_todate | |
| IMPORTING | ||
| E_OUTXML | = lv_e_outxml | |
| E_RETURN_CODE | = lv_e_return_code | |
| ES_COMPLIANCE_PARAMS | = lv_es_compliance_params | |
| ET_MESSAGE | = lv_et_message | |
| . " GRPC_SAP_QUERY_CONTROL_EXECUTE | ||
ABAP code using 7.40 inline data declarations to call FM GRPC_SAP_QUERY_CONTROL_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.| "SELECT single JOBID FROM GRPCSCHEDULER INTO @DATA(ld_i_scheduler_id). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_e_return_code). | ||||
| "SELECT single TIMEFRAME FROM GRPC_S_API_TIMEFRAME INTO @DATA(ld_i_timeframe). | ||||
| "SELECT single TF_YEAR FROM GRPC_S_API_TF_YEAR INTO @DATA(ld_i_tf_year). | ||||
| "SELECT single ORGUNIT_ID FROM GRPC_S_COMPLIANCE_PARAMS INTO @DATA(ld_i_orgunit_id). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_fromdate). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_todate). | ||||
Search for further information about these or an SAP related objects