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

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s