SAP TABLES

rsdb/prefer_union_all SAP Parameter attribute - set if UNION ALL shall be used for FOR ALL ENTRIES








rsdb/prefer_union_all is a SAP Parameter attribute which is used to control set if UNION ALL shall be used for FOR ALL ENTRIES information. This is available within R/3 SAP systems depending on the version and release level.

Below is the standard documentation available and a few details of the attributes values .

rsdb/prefer_union_all profile paramerter attributes


Parameter Name: rsdb/prefer_union_all
Description: set if UNION ALL shall be used for FOR ALL ENTRIES
Default Value: -1
Parameter Type ( See IF_PARAMETER_TYPES): Integer(INT)
Restriction Values:
Parameter Unit:
Parameter Group: Database
CSN Component: BC-DB-DBI
System-Wide parameter: Yes
Dynamic Parameter: Yes
Vector Parameter: No
Has Sub-Parameters: No
Check Function Exists: No

Parameter documentation

This parameter is only intended for internal use and must not be changed without explicit instruction from SAP. An internal table [itab] with entry data is always returned to an ABAP SELECT query with the addition FOR ALL ENTRIES. Depending on whether this parameter is set to "0" or "1", a link to whole statements with UNION or an OR connection of condition is generated in the WHERE clause. Each of the linked part-statements/part-conditions represent an entrey of the input table [itab].
Example The open SQL statement

SELECT ... FOR ALL ENTRIES IN itab WHERE f = itab-f. is displayed depending on the parameter rsdb/prefer_union_all as follows on standard-compliant SQL:
rsdb/prefer_union_all = 0 (and rsdb/prefer_in_itab = 0)
SELECT ... WHERE f = itab[1]-f
OR f = itab[2]-f
...
OR f = itab[N]-f
rsdb/prefer_union_all = 1
SELECT ... WHERE f = itab[1]-f
UNION ALL SELECT ... WHERE f = itab[2]-f
...
UNION ALL SELECT ... WHERE f = itab[N]-f Here N refers to the number of lines in itab and itab[i]-f the value of the field f in the i table row.

See SAP Parameter Documentation for full SAP documentation for this profile parameter.