SAP RSZ_P_QUERY_GENERATE Function Module for Generates a Query from an InfoProvider









RSZ_P_QUERY_GENERATE is a standard rsz p 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 rsz p query generate FM, simply by entering the name RSZ_P_QUERY_GENERATE into the relevant SAP transaction such as SE37 or SE38.

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



Function RSZ_P_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 'RSZ_P_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
E_T_RANGE = "
E_TH_ELTDIR = "
E_TH_ELTTXT = "
E_TH_ELTPROP = "
E_TH_ELTXREF = "
E_TH_COMPDIR = "
E_TH_COMPIC = "
E_TH_CHANGES = "
E_TH_SELECT = "
E_TH_RANGE = "
E_T_ELTDIR = "
E_T_ELTTXT = "
E_T_ELTPROP = "
E_T_ELTXREF = "
E_T_COMPDIR = "
E_T_COMPIC = "
E_T_CHANGES = "
E_T_SELECT = "

EXCEPTIONS
INHERITED_ERROR = 1 BAD_LAYOUT_INFO = 2
.



IMPORTING Parameters details for RSZ_P_QUERY_GENERATE

I_INFOPROVIDER -

Data type: RSD_INFOCUBE
Optional: No
Call by Reference: Yes

I_COMPID - Name (ID) of a Reporting Component

Data type: RSZCOMPID
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_PERSIST - Save generated query?

Data type: RS_BOOL
Default: RS_C_FALSE
Optional: Yes
Call by Reference: Yes

I_COMP_TEXT - Query Text

Data type: STRING
Optional: Yes
Call by Reference: Yes

I_T_LAYOUT_INFO - Info on Distribution of Characteristics to Query Areas

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

EXPORTING Parameters details for RSZ_P_QUERY_GENERATE

E_COMPUID - UID of Generated Query

Data type: RSZ_UID
Optional: No
Call by Reference: Yes

E_T_RANGE -

Data type: RZD1_T_RANGE
Optional: No
Call by Reference: Yes

E_TH_ELTDIR -

Data type: RZD1_TH_ELTDIR
Optional: No
Call by Reference: Yes

E_TH_ELTTXT -

Data type: RZD1_TH_ELTTXT
Optional: No
Call by Reference: Yes

E_TH_ELTPROP -

Data type: RZD1_TH_ELTPROP
Optional: No
Call by Reference: Yes

E_TH_ELTXREF -

Data type: RZD1_TH_ELTXREF
Optional: No
Call by Reference: Yes

E_TH_COMPDIR -

Data type: RZD1_TH_COMPDIR
Optional: No
Call by Reference: Yes

E_TH_COMPIC -

Data type: RZD1_TH_COMPIC
Optional: No
Call by Reference: Yes

E_TH_CHANGES -

Data type: RZD1_TH_CHANGES
Optional: No
Call by Reference: Yes

E_TH_SELECT -

Data type: RZD1_TH_SELECT
Optional: No
Call by Reference: Yes

E_TH_RANGE -

Data type: RZD1_TH_RANGE
Optional: No
Call by Reference: Yes

E_T_ELTDIR -

Data type: RZD1_T_ELTDIR
Optional: No
Call by Reference: Yes

E_T_ELTTXT -

Data type: RZD1_T_ELTTXT
Optional: No
Call by Reference: Yes

E_T_ELTPROP -

Data type: RZD1_T_ELTPROP
Optional: No
Call by Reference: Yes

E_T_ELTXREF -

Data type: RZD1_T_ELTXREF
Optional: No
Call by Reference: Yes

E_T_COMPDIR -

Data type: RZD1_T_COMPDIR
Optional: No
Call by Reference: Yes

E_T_COMPIC -

Data type: RZD1_T_COMPIC
Optional: No
Call by Reference: Yes

E_T_CHANGES -

Data type: RZD1_T_CHANGES
Optional: No
Call by Reference: Yes

E_T_SELECT -

Data type: RZD1_T_SELECT
Optional: 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 RSZ_P_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_e_t_range  TYPE RZD1_T_RANGE, "   
lv_e_th_eltdir  TYPE RZD1_TH_ELTDIR, "   
lv_e_th_elttxt  TYPE RZD1_TH_ELTTXT, "   
lv_e_th_eltprop  TYPE RZD1_TH_ELTPROP, "   
lv_e_th_eltxref  TYPE RZD1_TH_ELTXREF, "   
lv_e_th_compdir  TYPE RZD1_TH_COMPDIR, "   
lv_e_th_compic  TYPE RZD1_TH_COMPIC, "   
lv_e_th_changes  TYPE RZD1_TH_CHANGES, "   
lv_e_th_select  TYPE RZD1_TH_SELECT, "   
lv_e_th_range  TYPE RZD1_TH_RANGE, "   
lv_i_compid  TYPE RSZCOMPID, "   SPACE
lv_e_t_eltdir  TYPE RZD1_T_ELTDIR, "   
lv_bad_layout_info  TYPE RZD1_T_ELTDIR, "   
lv_i_persist  TYPE RS_BOOL, "   RS_C_FALSE
lv_e_t_elttxt  TYPE RZD1_T_ELTTXT, "   
lv_e_t_eltprop  TYPE RZD1_T_ELTPROP, "   
lv_i_comp_text  TYPE STRING, "   
lv_e_t_eltxref  TYPE RZD1_T_ELTXREF, "   
lv_i_t_layout_info  TYPE RZD1_T_LAYOUT_INFO, "   
lv_e_t_compdir  TYPE RZD1_T_COMPDIR, "   
lv_e_t_compic  TYPE RZD1_T_COMPIC, "   
lv_e_t_changes  TYPE RZD1_T_CHANGES, "   
lv_e_t_select  TYPE RZD1_T_SELECT. "   

  CALL FUNCTION 'RSZ_P_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
         E_T_RANGE = lv_e_t_range
         E_TH_ELTDIR = lv_e_th_eltdir
         E_TH_ELTTXT = lv_e_th_elttxt
         E_TH_ELTPROP = lv_e_th_eltprop
         E_TH_ELTXREF = lv_e_th_eltxref
         E_TH_COMPDIR = lv_e_th_compdir
         E_TH_COMPIC = lv_e_th_compic
         E_TH_CHANGES = lv_e_th_changes
         E_TH_SELECT = lv_e_th_select
         E_TH_RANGE = lv_e_th_range
         E_T_ELTDIR = lv_e_t_eltdir
         E_T_ELTTXT = lv_e_t_elttxt
         E_T_ELTPROP = lv_e_t_eltprop
         E_T_ELTXREF = lv_e_t_eltxref
         E_T_COMPDIR = lv_e_t_compdir
         E_T_COMPIC = lv_e_t_compic
         E_T_CHANGES = lv_e_t_changes
         E_T_SELECT = lv_e_t_select
    EXCEPTIONS
        INHERITED_ERROR = 1
        BAD_LAYOUT_INFO = 2
. " RSZ_P_QUERY_GENERATE




ABAP code using 7.40 inline data declarations to call FM RSZ_P_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



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!