More advanced possibilities in OpenSQL
In OpenSQL in ABAP, we have more advanced possibilities. In this section, we will cover the following topics:
- The
WHERE
conditions - The logical operators in
WHERE
- Casting in
WHERE
- The
IN
operator - Range table
- The dynamic
WHERE
condition SELECT SINGLE FOR UPDATE
GROUP BY
ORDER BY
UP TO N ROWS
SELECT
andENDSELECT
FOR ALL ENTRIES
- Subqueries
There are many possibilities here. When we are familiar with them, we can write selects in effective ways while retaining the speed of the executing statement.
WHERE conditions
In the WHERE
condition, we can make it a requirement that fields need to have some values. The important thing here is that when we have STRING
or RAWSTRING
plus LCHR
and LRAW
, we cannot use this field in WHERE
. Creating WHERE
with the mandt
fields is not possible, as the client automatically handles this, but this automatization can be deactivated using CLIENT SPECIFIED
after the FROM
clause. However, this is only the most basic possibility of the WHERE
condition...