Is there a shortcut or should I just loop at the table and check?
I mean I am using an internal table and I want to check if a value is contained in one field of the internal table and I don’t want to loop the table to find the value. Is it possible?
To check for a specific value without doing a loop or transferring values to a work area, you can use the
READstatement with the additionTRANSPORTING NO FIELDSlike so:UPDATE: From release 740 ABAP contains the predicate function
LINE_EXISTSwhich is described in this blog post.It’s a built-in function to which you pass a table expression. Using the above example:
Full syntax of table expression in that predicate see here: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abentable_expressions.htm