READ TABLE - free_key

Syntax

... WITH KEY comp1 = dobj1 comp2 = dobj2 ...
         [BINARY SEARCH] ... .

Effect:

After the addition before WITH KEY, components comp1 comp2 ... can be specified as a search key according to the rules in the section specifying components. One data object dobj1 dobj2 ... is assigned to each of the components. The data object must be compatible with or convertible to the data type of the component. The first found line of the internal table is read for which the values in the specified components (or their subareas or attributes) match the values in the assigned data objects dobj1 dobj2 .... If necessary, the content of dobj1 dobj2 ... is converted to the data type of the component before the comparison. No duplicate or overlapping key specifications are permitted. If all names name are initial when dynamically specifying the components, the first row of the table is read.

The search takes place as follows for the individual table types :

Notes:

Example:

The internal table html_viewer_tab contains references to HTML- Controls. In the READ statement, the reference that points to an HTML control in a particular container is read.

DATA: container   TYPE REF TO cl_gui_container,
      html_viewer TYPE REF TO cl_gui_html_viewer.

DATA html_viewer_tab LIKE TABLE OF html_viewer.

...

CREATE OBJECT html_viewer EXPORTING parent = container.
APPEND html_viewer TO html_viewer_tab.

...

READ TABLE html_viewer_tab
           WITH KEY table_line->parent = container
           INTO html_viewer.

...