Professional Documents
Culture Documents
Abap For Bignner
Abap For Bignner
The for all entries creates a where clause, where all the entries in the driver table are combined with
OR. If the number of
entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are
executed to limit the
length of the WHERE clause.
The plus
The plus:
Small amount of data
Mixing processing and reading of data
Easy to code - and understand
The minus:
Large amount of data
when mixed processing isn’t needed
Performance killer no. 1
The plus
Very large amount of data
Similar to Nested selects - when the accesses are planned by the programmer
In some cases the fastest
Not so memory critical
The minus
Very difficult to program/understand
Mixing processing and reading of data not possible
REFRESH X006.
SELECT * FROM T006 INTO X006.
APPEND X006.
ENDSELECT
LOOP AT TAB.
CHECK TAB-K = KVAL.
" ...
ENDLOOP.
REFRESH TAB_DEST.
LOOP AT TAB_SRC INTO TAB_DEST.
APPEND TAB_DEST.
ENDLOOP.
TAB_DEST[] = TAB_SRC[].
LOOP AT TAB.
IF TAB-FLAG IS INITIAL.
TAB-FLAG = 'X'.
ENDIF.
MODIFY TAB.
ENDLOOP.
TAB-FLAG = 'X'.
MODIFY TAB TRANSPORTING FLAG
WHERE FLAG IS INITIAL.
DO 101 TIMES.
DELETE TAB_DEST INDEX 450.
ENDDO.
IF TAB_DIFFERENT = SPACE.
" ...
ENDIF.
IF TAB1[] = TAB2[].
" ...
ENDIF.
LOOP AT TAB.
TAB-DATE = SY-DATUM.
MODIFY TAB.
ENDLOOP.
WA-DATE = SY-DATUM.
LOOP AT TAB.
MODIFY TAB FROM WA TRANSPORTING DATE.
ENDLOOP.
LOOP AT TAB_SRC.
APPEND TAB_SRC TO TAB_DEST.
ENDLOOP
As with the ORDER BY clause it could be better to avoid using SELECT DISTINCT, if some of the
fields are not part of an index. Instead use ABAP SORT + DELETE ADJACENT DUPLICATES on an
internal table, to delete duplciate rows.