SAP Tutorials Blog

 

Earlier, to search for a text, you would get the data into internal table, loop through the table, change the content of the field to be searched in to upper case, also translate search string to upper case and then perform the ‘CS’ like operation.


Now, just use below,


"Search string - this can be a parameter as well

DATA(search_string) = 'IRon'.


"Code to search using the search string

DATA(str_for_db) = '%' && to_upper( search_string ) && '%'.

SELECT movie FROM zmmovie

  WHERE upper( movie ) LIKE @str_for_db

  INTO TABLE @DATA(lt_movie).


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Deputy Manager

Contact : serkurumsal@yandex.com