SAP ABAP Class CL_DB4_QUERY_BUILDER (DB4: Backend query builder)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-DB-DB4 (Application Component) DB2 for AS/400
     STU4 (Package) CCMS / AS/400
Meta Relationship - Using
# Relationship type Using Short Description Created on
1 Interface implementation (CLASS c. INTERFACES i_ref)  IF_DB4_VIRTUAL_TABLE_METADATA DB4: Backend virtual table metadata 20120712
Properties
Class CL_DB4_QUERY_BUILDER  
Short Description DB4: Backend query builder    
Super Class    
Instantiability of a Class 2  Public 
Final    
General Data
Message Class D4    
Program status     
Category 0   
Package STU4   CCMS / AS/400 
Created 20120712   SAP 
Last change 20140121   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 ABAP Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
2 ADBC Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
Interfaces
# Interface Abstract Final Description Created on
1 IF_DB4_VIRTUAL_TABLE_METADATA DB4: Backend virtual table metadata 20120712
Friends
Class CL_DB4_QUERY_BUILDER has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 CO_CONSTANT Constant Public Type reference (TYPE) I 1 20120712
2 CO_CORRELATED_NAME Constant Public Type reference (TYPE) I 2 20120712
3 CO_HOST_VARIABLE Constant Public Type reference (TYPE) I 0 20120712
4 CO_INTERNAL_TABLE Constant Public Type reference (TYPE) I 3 20130509
5 P_ADBC_COLS_TAB Instance attribute Private Type reference (TYPE) ADBC_COLUMN_TAB 20120912
6 P_CTES_LIST_TAB Instance attribute Private Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
7 P_DISTINCT_CLAUSE Instance attribute Private Type reference (TYPE) STRING Statement's DISTINCT clause 20120712
8 P_FIELDS_TAB Instance attribute Private Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120912
9 P_FIELD_LIST_TAB Instance attribute Private Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
10 P_FIRST_ROWS_CLAUSE Instance attribute Private Type reference (TYPE) I Number of rows for FETCH FIRST clause 20120712
11 P_FROM_CLAUSE_TAB Instance attribute Private Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
12 P_GROUPBY_CLAUSE Instance attribute Private Type reference (TYPE) STRING Statement's GROUP BY clause 20120712
13 P_MODE Instance attribute Private Type reference (TYPE) STRING DB4: Execution mode 20120712
14 P_OPTIONS_TAB Instance attribute Private Type reference (TYPE) DB4BD_OPTIONS_TAB DB4: Backend access options tab 20120816
15 P_ORDERBY_CLAUSE Instance attribute Private Type reference (TYPE) STRING Statement's ORDER BY clause 20120712
16 P_R_ACCESSOR Instance attribute Private Object reference (TYPE REF TO) CL_DB4_VIRTUAL_TABLE_ACCESSOR DB4: Backend virtual table accessor 20120712
17 P_R_STMT Instance attribute Private Object reference (TYPE REF TO) CL_DB4_BACKEND_STATEMENT DB4: Backend statement 20120712
18 P_R_VIRTUAL_TABLE Instance attribute Private Object reference (TYPE REF TO) IF_DB4_VIRTUAL_TABLE DB4: Backend virtual table 20120712
19 P_R_VT_ACCESS Instance attribute Private Object reference (TYPE REF TO) CL_DB4_VIRTUAL_TABLE_ACCESS DB4: Backend virtual table access 20120712
20 P_R_VT_PARSER Instance attribute Private Object reference (TYPE REF TO) CL_DB4_VIRTUAL_TABLE_PARSER DB4: Parser helper for Virtual Talbe info 20120712
21 P_SRC_EXPRESSION Instance attribute Private Type reference (TYPE) TY_SRC_EXPRESSION Source expression 20120712
22 P_STMT_TAB Instance attribute Private Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
23 P_WHERE_CLAUSE_TAB Instance attribute Private Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
Methods
# Method Level Visibility Method type Description Created on
1 ADD_NEW_PARAMS Instance method Private Method Add new parameters to the parameter set 20120712
2 ADJUST_SELECT_LIST_OUT Instance method Private Method Remove SELECTed fields not in output structure 20120712
3 ANALYZE_OUTER_PARAM Instance method Private Method Identify kind of outer parameter 20120712
4 BUILD_DISTINCT_CLAUSE Instance method Private Method Add the DISTINCT clause of the statement 20120712
5 BUILD_FIRSTROWS_CLAUSE Instance method Private Method Build the FETCH FIRST N ROWS ONLY clause of the statement 20120712
6 BUILD_GROUPBY_CLAUSE Instance method Private Method Build the GROUP BY clause of the statement 20120712
7 BUILD_NULL_QUERY Instance method Private Method Build a SELECT of null values 20121123
8 BUILD_ORDERBY_CLAUSE Instance method Private Method Build the ORDER BY clause of the statement 20120712
9 BUILD_SELECT_LIST Instance method Private Method Build the SELECT list clause of the statement 20120712
10 BUILD_WHERE_CLAUSE Instance method Private Method Build the WHERE clause of the statement 20120712
11 CAST_EXPRESSION Instance method Private Method Get the CAST expression for a database type 20130507
12 CONSTRUCTOR Instance method Public Constructor Constructor 20120712
13 EXPAND_ACCESS_METHOD Instance method Private Method Replace an access method by its condition 20120712
14 EXPAND_FIELD_REF Instance method Private Method Replace a referred field by its expression 20120712
15 EXPAND_VIRTUAL_TABLE Instance method Private Method Replace a virtual table access by its SQL statement 20120712
16 GET_ACCESS_STMT Instance method Public Method Generate access statement for virtual table 20120712
17 GET_PARAMS_MAPPING Instance method Private Method Get mapping of a parameter 20120712
18 GET_SELECT_LIST Instance method Private Method Get the SELECTed fields 20120712
19 GET_SELECT_STMT Instance method Private Method Get the complete SELECT statement 20120712
20 INJECT_ITAB_VALUES Instance method Private Method Inject the content of the internal table as host variables 20130509
21 NULL_EXPRESSION Instance method Private Method Get the null expression for a database type 20121123
22 REMOVE_CORRELATED_PARAMS Instance method Private Method Remove correlated parameters from the parameter set 20121102
23 RESOLVE_VIRTUAL_TABLE Instance method Private Method Replace a virtual table access by its output 20120712
24 SWAP_HOST_VARIABLES Instance method Private Method Replace inner by outer parameter in statement 20120712
Events
Class CL_DB4_QUERY_BUILDER has no event.
Types
# Type Visibility Typing Associated Type Description Created on Type Source
1 TY_ACCESS_METHOD Public Attribute reference (LIKE) 20120712
2 TY_ACCESS_METHODS_TAB Public Attribute reference (LIKE) 20120712
3 TY_DDIC_COLUMN Public Attribute reference (LIKE) 20120712
4 TY_DDIC_COLUMNS_TAB Public Attribute reference (LIKE) 20120712
5 TY_FROM_TABLE Public Attribute reference (LIKE) 20120712
6 TY_FROM_TABLES_TAB Public Attribute reference (LIKE) 20120712
7 TY_INTERNAL_TABLE Public See coding 20130509 begin of ty_internal_table , elements type ty_ddic_columns_tab , values_tab type ref to data , end of ty_internal_table
8 TY_JOIN Public Attribute reference (LIKE) 20120712
9 TY_JOINS_TAB Public Attribute reference (LIKE) 20120712
10 TY_PARAM Public See coding 20120712 begin of ty_param, name type string, kind type i, value type ref to data, correlated_name type string, end of ty_param
11 TY_PARAMS_MAP Public See coding 20120712 begin of ty_params_map, inner_name type string, outer_name type string, end of ty_params_map
12 TY_PARAMS_MAP_TAB Public See coding 20120712 ty_params_map_tab type standard table of ty_params_map
13 TY_PARAMS_TAB Public See coding 20120712 ty_params_tab type standard table of ty_param with key name
14 TY_SELECTED_COLUMN Public Attribute reference (LIKE) 20120712
15 TY_SELECTED_COLUMNS_TAB Public Attribute reference (LIKE) 20120712
16 TY_SRC_EXPRESSION Public Attribute reference (LIKE) 20120712
17 TY_TXT_ELEMENT Public Attribute reference (LIKE) 20120712
18 TY_TXT_ELEMENTS_TAB Public Attribute reference (LIKE) 20120712
Method Signatures

Method ADD_NEW_PARAMS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
2 Changing C_STMT Call by reference Type reference (TYPE) CLIKE 20120712
3 Importing I_OUTPUT Call by reference Type reference (TYPE) ANY 20120712
4 Importing I_VIRTUAL_TABLE Call by reference Type reference (TYPE) CLIKE 20121123
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20121123

Method ADJUST_SELECT_LIST_OUT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_FIELDS_TAB Call by reference Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
2 Importing I_COLUMNS_MAP_TAB Call by reference Type reference (TYPE) DB4BD_COLUMNS_MAP_TAB DB4: Backend columns mapping table 20120713
3 Importing I_OUTPUT Call by reference Type reference (TYPE) ANY 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method ANALYZE_OUTER_PARAM Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_OUTER_NAME Call by reference Type reference (TYPE) CLIKE 20120712
2 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
3 Importing I_INNER_NAME Call by reference Type reference (TYPE) CLIKE 20120712
4 Importing I_OUTER_EXPR Call by reference Type reference (TYPE) CLIKE 20120712

Method ANALYZE_OUTER_PARAM on class CL_DB4_QUERY_BUILDER has no exception.

Method BUILD_DISTINCT_CLAUSE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_DISTINCT_FLAG Call by reference Type reference (TYPE) CLIKE 20120712

Method BUILD_DISTINCT_CLAUSE on class CL_DB4_QUERY_BUILDER has no exception.

Method BUILD_FIRSTROWS_CLAUSE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_FIRST_ROWS_COUNT Call by reference Type reference (TYPE) CLIKE 20120712

Method BUILD_FIRSTROWS_CLAUSE on class CL_DB4_QUERY_BUILDER has no exception.

Method BUILD_GROUPBY_CLAUSE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_FIELD_LIST Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method BUILD_NULL_QUERY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting E_NULLS_STMT Call by reference Type reference (TYPE) STRING 20121123
2 Importing I_EMPTY_SET Call by reference Type reference (TYPE) ABAP_BOOL 20121123
3 Importing I_FIELDS_TAB Call by reference Type reference (TYPE) DB4BD_ENTRIES_TAB 20121123
4 Importing I_VIRTUAL_TABLE Call by reference Type reference (TYPE) CLIKE 20121123
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20121123

Method BUILD_ORDERBY_CLAUSE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_FIELD_LIST Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method BUILD_SELECT_LIST Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_COLUMNS_MAP_TAB Call by reference Type reference (TYPE) DB4BD_COLUMNS_MAP_TAB DB4: Backend columns mapping table 20120713
2 Importing I_OUTPUT Call by reference Type reference (TYPE) ANY 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method BUILD_WHERE_CLAUSE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_ACCESS_METHOD Call by reference Type reference (TYPE) CLIKE 20120712
2 Importing I_FREE_CONDITION Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method CAST_EXPRESSION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting E_CAST_EXPR Call by reference Type reference (TYPE) STRING 20130507
2 Importing I_FIELD_NAME Call by reference Type reference (TYPE) CLIKE 20130507
3 Importing I_VIRTUAL_TABLE Call by reference Type reference (TYPE) CLIKE 20130507
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20130507

Method CONSTRUCTOR Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_MODE Call by reference Type reference (TYPE) STRING `RUN` DB4: Execution mode 20120712
2 Importing I_OPTIONS_TAB Call by reference Type reference (TYPE) DB4BD_OPTIONS_TAB DB4: Backend access options tab 20120816
3 Importing I_R_ACCESSOR Call by reference Object reference (TYPE REF TO) CL_DB4_VIRTUAL_TABLE_ACCESSOR DB4: Backend virtual table accessor 20120712
4 Importing I_R_VIRTUAL_TABLE Call by reference Object reference (TYPE REF TO) IF_DB4_VIRTUAL_TABLE DB4: Backend virtual table 20120712
5 Importing I_SRC_EXPRESSION Call by reference Type reference (TYPE) TY_SRC_EXPRESSION Source expression 20120712

Method CONSTRUCTOR on class CL_DB4_QUERY_BUILDER has no exception.

Method EXPAND_ACCESS_METHOD Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
2 Changing C_STMT Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method EXPAND_FIELD_REF Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_STMT Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method EXPAND_VIRTUAL_TABLE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
2 Changing C_STMT Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method GET_ACCESS_STMT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_COLS_TAB Call by reference Type reference (TYPE) ADBC_COLUMN_TAB 20120712
2 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
3 Exporting E_SEL_STMT Call by reference Type reference (TYPE) STRING 20120712
4 Importing I_COLUMNS_MAP_TAB Call by reference Type reference (TYPE) DB4BD_COLUMNS_MAP_TAB DB4: Backend columns mapping table 20120713
5 Importing I_CONDENSE Call by reference Type reference (TYPE) ABAP_BOOL ABAP_TRUE 20120712
6 Importing I_OUTPUT Call by reference Type reference (TYPE) ANY 20120712
7 Importing I_USE_CTE Call by reference Type reference (TYPE) ABAP_BOOL ABAP_FALSE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method GET_PARAMS_MAPPING Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
2 Exporting E_PARAMS_MAP_TAB Call by reference Type reference (TYPE) TY_PARAMS_MAP_TAB 20120712
3 Importing I_ACCESS_METHOD Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method GET_SELECT_LIST Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_FIELDS_TAB Call by reference Type reference (TYPE) DB4BD_ENTRIES_TAB DB4: Backend entries table 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method GET_SELECT_STMT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_CONDENSE Call by reference Type reference (TYPE) ABAP_BOOL 20120712
2 Returning R_SEL_STMT Value transfer Type reference (TYPE) STRING 20120712

Method GET_SELECT_STMT on class CL_DB4_QUERY_BUILDER has no exception.

Method INJECT_ITAB_VALUES Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20130509

Method INJECT_ITAB_VALUES on class CL_DB4_QUERY_BUILDER has no exception.

Method NULL_EXPRESSION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_DB_TYPE Call by reference Type reference (TYPE) CLIKE 20121123
2 Returning R_EXPRESSION Value transfer Type reference (TYPE) STRING 20121123

Method NULL_EXPRESSION on class CL_DB4_QUERY_BUILDER has no exception.

Method REMOVE_CORRELATED_PARAMS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20121102
2 Importing I_PARAMS_MAP_TAB Call by reference Type reference (TYPE) TY_PARAMS_MAP_TAB 20121102

Method REMOVE_CORRELATED_PARAMS on class CL_DB4_QUERY_BUILDER has no exception.

Method RESOLVE_VIRTUAL_TABLE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_PARAMS_TAB Call by reference Type reference (TYPE) TY_PARAMS_TAB 20120712
2 Changing C_STMT Call by reference Type reference (TYPE) CLIKE 20120712
# Exception Resumable Description Created on
1 CX_DB4_BACKEND DB4: Backend exception class 20120712

Method SWAP_HOST_VARIABLES Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing C_SEL_STMT Call by reference Type reference (TYPE) CLIKE 20120712
2 Importing I_PARAMS_MAP_TAB Call by reference Type reference (TYPE) TY_PARAMS_MAP_TAB 20120712

Method SWAP_HOST_VARIABLES on class CL_DB4_QUERY_BUILDER has no exception.
History
Last changed by/on SAP  20140121 
SAP Release Created in 740