LINE_EXISTS

Index

 

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

LINE_EXISTS_Var1_source

Output: Variant 1 – Search by Index

LINE_EXISTS_Var1_output

Sample Source Code: Variant 2 – Search by field-value pair

LINE_EXISTS_Var2_source

Output: Variant 2 – Search by field-value pair

LINE_EXISTS_Var2_output

Check the video for Illustration and Example:

Find the code on GitHub:

Go to Code

Index

 

Leave a Reply