From version 7.40, SP08 SAP introduced a few important changes in SQL:
- Inline declaration
- SQL expression
There are more changes, but here is the focus on the most important and most helpful in daily work.
The main changes compared to the old SQL is data declaration, where we needed to declare all the necessary fields that will be selected. By using inline declaration, this is no longer needed. During select from database
, a structure or table will be created. This is really helpful, as when you need to select a new field or fields, just add them to the field list.
The following are three SELECT
statements. The first of these is created in the old SQL, while the second and third are created with the inline declaration. All the SELECT
statement results are identical.
The first SELECT
statement is also presented with the declaration of the table:
TYPES: BEGIN OF t_spfli, mandt TYPE s_mandt, carrid TYPE s_carr_id, connid TYPE s_conn_id...