May 2019
Beginner to intermediate
548 pages
12h 39m
English
If we do not know what field we need in the WHERE condition, we can use the dynamic WHERE condition. We can decide during runtime which field will be added to the WHERE condition.
The dynamic WHERE condition is a variable typed as a string, where we have stored text that is similar to code. Let's take a look at the SELECT statement:
SELECT carrid connid FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight WHERE carrid EQ 'AA' AND connid EQ '0017' AND fldate GT '01.01.2015'.
We can also develop this SELECT statement as the following:
SELECT carrid connid FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight WHERE (lv_dyn_where).
lv_dyn_where has the following values: carrid EQ 'AA', connid EQ '0017', and ...
Read now
Unlock full access