2008 Jul 22 12:51 PM
Hello,
i have a variable with type string.
Now I want to select from a table all entries which begins with this string.
How I have to implement the where element in my select statement?
Regards
Philipp
2008 Jul 22 12:54 PM
SELECT <fields>
FROM <table>
INTO TABLE <internal table>
WHERE <field> LIKE '<string>%'.
ex.
This will select all internal order that starts with '1'.
SELECT aufnr auart
FROM aufk
INTO CORRESPODING FIELDS OF TABLE i_aufk
WHERE aufnr like '1%'.
regards,
Peter
Edited by: Peter Ruiz on Jul 22, 2008 7:55 PM
2008 Jul 22 12:54 PM
SELECT <fields>
FROM <table>
INTO TABLE <internal table>
WHERE <field> LIKE '<string>%'.
ex.
This will select all internal order that starts with '1'.
SELECT aufnr auart
FROM aufk
INTO CORRESPODING FIELDS OF TABLE i_aufk
WHERE aufnr like '1%'.
regards,
Peter
Edited by: Peter Ruiz on Jul 22, 2008 7:55 PM
2008 Jul 22 12:56 PM
Concatenate % on the end of your string, and then use LIKE string
e.g. string containst "AB", concatenate % on the end gives "AB%".