ABAP Addition 1 ... WITH KEY key 2 ... SEARCH {FKEQ|FKGE|GKEQ|GKGE} 3 ... VERSION vers
What does it do? This variant of the statement READ (not allowed in classes) reads a row from the database table dbtab and assigns the content to a work area.
A table work area dbtab or*dbtab is used implicitly as the work area. The table work area must be declared using the statement TABLES. If, instead of the name of the database table dbtab, the description *dbtab is used, dbtab is actually accessed but an additional table work area is used. All components of the table work area that match the primary key fields of the database table dbtab must be character-type.
For dbtab, you must specify a database table that begins with 'T' and has a maximum length of five characters. If a database table is specified that does not begin with 'T', then the first letter is implicitly replaced by 'T'.
Without the addition WITH KEY, the row to be read is determined by the content of the components of the table work area that correspond to the primary key fields of database table dbtab.
System Fieldssy-subrcMeaning 0A table entry was read. 4No table entry was found under the specified search key. 8The table work area is too short. 12The database table was not found. INTHINT sy-subrc is set to 16, if access to the database specified INTHINT by VERSION is not allowed by the dynamic package check.
Latest notes:This form of READ statement is not allowed in classes. It must be replaced by the statement SELECT . ABAP Code Snippet The obsolete access statements do not support automatic client handling. The client identifier of a database table must be specified explicitly. The application programs are only to work with data for the current client. In systems with multitenancy, this is checked by the ABAP runtime environment. ABAP Code Snippet • WITH KEY READ TABLE dbtab (obsolete)