Thursday, February 14, 2013

How to read an internal table?


1. READ TABLE itab FROM wa [additions].
2. READ TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn
[ additions].
3. READ TABLE itab WITH KEY k1 = v1 ... kn = vn
[BINARY SEARCH] [ additions].
4. READ TABLE itab INDEX i [additions].

Obsolete Variants

In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Short forms of line operations not allowed.

Effect

Reads an entry from an DS:ABEN.ITAB>internal table, using either its key or its index. The return code SY-SUBRC specifies whether an entry could be read. If you specify a non-unique key (the table must have a NON-UNIQUE key for this to be valid) , the system returns the entry with the lowest index from the set of entries that meet the condition.

Source-http://www.saptechies.com/how-to-read-an-internal-table/

No comments:

Post a Comment