ABAP HANA 7.51: LINE_EXISTS Function
LINE_EXISTS is a table function which checks if the specified line exists in the Internal table or not. This returns either TRUE or FALSE. Argument of this function can be a simple check or a table expression. Some important points to be noted here:
- LINE_EXISTS works as a READ TABLE with TRANSPORTING NO FIELDS which returns SY-SUBRC
- This doesn’t return SY-TABIX or SY-INDEX which can indicate the line of match during search
Sample Source Code: Variant 1 – Search by Index
Output: Variant 1 – Search by Index
Sample Source Code: Variant 2 – Search by field-value pair
Output: Variant 2 – Search by field-value pair
Check the video for Illustration and Example:
Find the code on GitHub: