
are converted to the data type of the columns before the comparison. If WITH TABLE KEY is used, note that the values of incompatible operands operand1 operand2. Latest notes:The pseudo component table_line can be specified as a component for tables with an unstructured row type, if their whole table entry is defined as a table key. If the addition COMPONENTS is specified, the table key specified in keyname is used. If the addition COMPONENTS is not specified, the primary table key is used. If an arithmetic expression is specified, the calculation type is determined from its operands and the data type of the component and the result, if necessary, is converted to the data type of the component. If necessary, the content of the operands is converted to the data type of the components before the comparison. Duplicate or overlapping keys cannot be specified, nor can columns be specified that are not components of the table key. The first row of the internal table found, whose values in the column of the table key used correspond with the values in the operands operand1 operand2. compatible with the data type of the component or convertible to it must be assigned to every component.

If name only contains blanks, this specified component is ignored when the statement is executed. , which contains the name of the component when the statement is executed. or as a parenthesized character-like data object name1 name2.
Read.ftable rcode code#
ABAP Code Snippet What does it do? Each component of the table key used must be listed either directly as comp_name1 comp_name2. WITH TABLE KEY READ TABLE itab ABAP Alternative 2.COMPONENTS READ TABLE itab WITH TABLE KEY.The statement then does not evaluate the content of the primary table key in the header line instead, it evalu ates the content of the standard key initial fields are subject to special handling (see READ TABLE - obsolete_key ). Apart from classes, the FROM wa declaration can be left out if the internal table has an itab header line with the same name. The standard key of a standard table can be empty. Latest notes:When using the primary table key, note that this key can be the standard key, which can also have unexpected consequences: For structured row types, the standard key covers all character-like and byte-like components. If this is statically identifiable, the syntax check produces a warning. ABAP Code Snippet If the primary table key is used to access a standard table and the key is empty, then the first row of the internal table is read. If the USING KEY addition is specified, the table key specified in keyname is used. If the USING KEY addition is not specified, the primary table key is used. If the key fields in wa are empty, no entries are processed. The first row of the internal table found, whose values in the columns of the table key used match those of the corresponding components of wa, is processed. This concerns functional operand positions. FROM wa ABAP Code Snippet What does it do? For wa, a work area compatible to the row type of the internal table must be specified.

USING KEY READ TABLE itab FROM ABAP Alternative 1.If the value of sy-tabix is used as an index specification following the execution of the READ statement in another processing statement for the internal table, the same table key should be used there, whereby it is important to note that the primary index is always addressed if there is no explicit key specification. ABAP Code Snippet ABAP Code Snippet Latest notes: Note that the sy-tabix system field is always set in relation to the used table key. When the secondary table key is used, a binary scan is used in the sorted key case and a hash algorithm is used in the hash key case. The hash algorithm is used for hashed tables.

When the primary table key is used, the table categories are accessed as follows: Standard tables are searched in a linear fashion. The values can be declared either implicitly in a work area wa behind FROM or by listing the components of the table key explicitly behind TABLE KEY.

ABAP Code Snippet What does it do? Specifying a Table Key as a Search Key Either the primary table key or a secondary table key can be specified. Get Example source ABAP code based on a different SAP table ABAP Statement READ TABLE - table_key Short Reference ABAP Syntax.
