Skip to content

ABAP Keyword Documentation →  ABAP − Short Reference 

FETCH - Short Reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


FETCH NEXT CURSOR dbcur 
    { { INTO { {[CORRESPONDING FIELDS OF] wa} | (dobj1, dobj2, ...) } }
    | { INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE itab
                       [PACKAGE SIZE n] } }.

Effect

Extracts rows from the results set of a database-cursor opened using OPEN CURSOR.

Additions

  • INTO wa
    Reads a row and assigns it to a work area wa.
  • INTO (dobj1, dobj2, ...)
    Reads a row and assigns it to multiple data objects dobj1, dobj2, ...
  • INTO|APPENDING TABLE itab
    Reads multiple rows and assigns them to an internal table itab or attaches them to the table.
  • CORRESPONDING FIELDS OF
    Restricts the transport to identically named components of the work area wa or to the internal table itab.
  • PACKAGE SIZE n
    Passes the rows in packages of n rows to the internal table itab.