In the part of the logical expression relevant for the optimization, No optimization takes place when a sorted table or a hashed table is accessed using the the transformable part of the logical expression has the same result as the resulting key access,.the entire logical expression (or a part of the expression) can be transformed to a key access,.If the following prerequisites are not met: Rows of the internal table are tested for the logical expression of the WHERE addition.Īn attempt is made to optimize the access as described under The relevantĬomparison rules apply to the evaluation.Īre accessed without a secondary key being specified, the access is not optimized. The specified components can have any data type. General expression positions at which anyĮxpressions can be specified, but no components of the internal table. The remaining operands of a relational expression are Parenthesized character-like data objects cannot be used to specify a component dynamically here. Table must be specified as individual operands and not as part of an expression. Predicate expression IS INITIAL can be specified as relational expressions. WHERE can be specified for all table categories.Ī logical expression log_exp can be specified after WHERE, in which the first operand of each The row type of the internal table must be statically identifiable. If a static WHERE condition is specified, All rows are processed for which the condition after SELECT fldate, seatsocc, seatsmax, seatsmax - seatsocc AS seatsfreeĬonnid = TABLE seats_tab BY seatsfree DESCENDING. )->add_field( CHANGING field = connid )->request( ).ĭATA seats_tab LIKE STANDARD TABLE OF seats. SORTED BY.ĭATA: carrid TYPE sflight-carrid VALUE 'LH', The result is the same as in the example for APPEND. If an internal table has the same name as a database table, a statement like this accesses the internal table.ĭeletes all rows in an internal table from row 4. The statement DELETE FROM itab has the statement DELETE FROM dbtab with identical syntax. If the value of idx2 is less than the value of idx1, no processing takes place. If the value of idx2 is greater than the number of table rows, it is set to the number of table rows. If the value of idx2 is less than or equal to 0, a runtime error occurs. If the value of idx1 is greater than the total number of table rows, no processing takes place. If the value of idx1 is less than or equal to 0, a runtime error occurs. Numeric expression positions of operand type i. Specified in keyname after USING KEY, the additionsįROM and TO can be used for all table categories and refer to the row numbers of the In this case, they refer to the row numbers of the Is specified in keyname, the additions FROM and TO can only be used for If the addition USING KEY is not used, or the If only TO is specified, all rows in the table from the first row up to row number idx2 are respected. If onlyįROM is specified, all rows of the table from row number idx1 up toĪnd including the last row are taken into account. Up to row number idx2, are respected if the table index used. If these additions are used, only the table rows from row number idx1, or WITH UNIQUE SORTED KEY skey COMPONENTS table_line. Itab because they occur from row 4 in the secondary table index of the secondary key skey. The statement DELETE deletes the first three rows of the internal table Otherwise a syntax error occurs or an exception is raised. If a secondary table key is specified, any WHERE condition also specified must be Unlike the processing of a hashed table when a primary key is used, a preceding sort using the statement SORT has no influence on the processing order when a secondary hash key is specified. The rows are processed in the order in which they were inserted into the table. The rows are processed by ascending row number in the secondary table index Secondary table key is specified, the order in which the rows are accessed is as follows: If the primary table key is specified, the processing behaves in the same way as when no key is explicitly specified. The specified table key influences the order in which the table rows are accessed, and the evaluation of the remaining conditions. The USING KEY addition can be used to specify a table key in keyname used to carry out the processing. If more than one of the additions are specified, those rows are deleted that result from the intersection of the individual additions. Keyname is used to determine the table key to which the additions refer. To delete more than one row, at least one of the additions FROM, TO, or WHERE must be specified. Processing Statements for Internal Tables → SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |