SAP RZI_QUERY_GENERATE Function Module for Generates a Query from an InfoProvider
RZI_QUERY_GENERATE is a standard rzi query generate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generates a Query from an InfoProvider 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 rzi query generate FM, simply by entering the name RZI_QUERY_GENERATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: RZI0
Program Name: SAPLRZI0
Main Program: SAPLRZI0
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RZI_QUERY_GENERATE 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 'RZI_QUERY_GENERATE'"Generates a Query from an InfoProvider.
EXPORTING
I_INFOPROVIDER = "
* I_COMPID = ' ' "Name (ID) of a Reporting Component
* I_PERSIST = RS_C_FALSE "Save generated query?
* I_COMP_TEXT = "Query Text
* I_T_LAYOUT_INFO = "Info on Distribution of Characteristics to Query Areas
IMPORTING
E_COMPUID = "UID of Generated Query
EXCEPTIONS
INHERITED_ERROR = 1 BAD_LAYOUT_INFO = 2
IMPORTING Parameters details for RZI_QUERY_GENERATE
I_INFOPROVIDER -
Data type: RSD_INFOCUBEOptional: No
Call by Reference: Yes
I_COMPID - Name (ID) of a Reporting Component
Data type: RSZCOMPIDDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_PERSIST - Save generated query?
Data type: RS_BOOLDefault: RS_C_FALSE
Optional: Yes
Call by Reference: Yes
I_COMP_TEXT - Query Text
Data type: STRINGOptional: Yes
Call by Reference: Yes
I_T_LAYOUT_INFO - Info on Distribution of Characteristics to Query Areas
Data type: RZD1_T_LAYOUT_INFOOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RZI_QUERY_GENERATE
E_COMPUID - UID of Generated Query
Data type: RSZ_UIDOptional: No
Call by Reference: Yes
EXCEPTIONS details
INHERITED_ERROR -
Data type:Optional: No
Call by Reference: Yes
BAD_LAYOUT_INFO - Error in I_T_LAYOUT_INFO
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RZI_QUERY_GENERATE 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_compuid | TYPE RSZ_UID, " | |||
| lv_i_infoprovider | TYPE RSD_INFOCUBE, " | |||
| lv_inherited_error | TYPE RSD_INFOCUBE, " | |||
| lv_i_compid | TYPE RSZCOMPID, " SPACE | |||
| lv_bad_layout_info | TYPE RSZCOMPID, " | |||
| lv_i_persist | TYPE RS_BOOL, " RS_C_FALSE | |||
| lv_i_comp_text | TYPE STRING, " | |||
| lv_i_t_layout_info | TYPE RZD1_T_LAYOUT_INFO. " |
|   CALL FUNCTION 'RZI_QUERY_GENERATE' "Generates a Query from an InfoProvider |
| EXPORTING | ||
| I_INFOPROVIDER | = lv_i_infoprovider | |
| I_COMPID | = lv_i_compid | |
| I_PERSIST | = lv_i_persist | |
| I_COMP_TEXT | = lv_i_comp_text | |
| I_T_LAYOUT_INFO | = lv_i_t_layout_info | |
| IMPORTING | ||
| E_COMPUID | = lv_e_compuid | |
| EXCEPTIONS | ||
| INHERITED_ERROR = 1 | ||
| BAD_LAYOUT_INFO = 2 | ||
| . " RZI_QUERY_GENERATE | ||
ABAP code using 7.40 inline data declarations to call FM RZI_QUERY_GENERATE
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_compid) | = ' '. | |||
| DATA(ld_i_persist) | = RS_C_FALSE. | |||
Search for further information about these or an SAP related objects