abapsap-data-services

How to make ABAP understand "_" as a special character in a global variable value from BODS?


I have one requirement in BODS to execute ABAP dataflows with dynamic global variables. The ABAP code is a custom one with dynamic where clause. I am trying to send the global variable value like Field-name like "%underscroe%". But instead of fetching records with only 'underscore', it is fetching all records from the table.

Do you have any solution for this issue?


Solution

  • Use ESCAPE clause for this. If you wanna search for underscore, set

    LIKE '%#_%' ESCAPE '#'.
    

    I am not sure, if it works with BODS though.