top of page
blank.png
Search
Writer's pictureSmart Logic Academy

ABAP tricks #15/100: 😀 Table Expressions

•A table expression is a single row read.

•In table expressions, empty square brackets [] cannot be specified behind itab.

•Table expression does not modify the value of the system field sy-tabix. 

•If a table line is not found, the exception CX_SY_ITAB_LINE_NOT_FOUND is raised. 

•The predicate function line_exists can be considered as a short form of the statement READ TABLE with the addition TRANSPORTING NO FIELDS followed by sy-subrc being checked.

• The table function line_index returns the number of the rows found using the table expression. The return value has the type i.



Example: Internal table itab has 4 records.

wa = itab[ 5 ]. 

will lead to a short dump if the exception is not handled


Please share with your ABAP friends and follow us.

If you want to dive deeper, visit our course https://lnkd.in/d35uqwud



32 views0 comments

Comments


bottom of page