我在OpenSQL中的表达是:
SELECT * FROM J_1BNFLIN AS B
WHERE SUBSTRING(REFKEY , 1 , 10 )
where子句的substring部分不起作用。我究竟做错了什么?
您可以在WHERE条件中使用LIKE。例如:
DATA: gv_refkey TYPE j_1bnflin-refkey.
gv_refkey = '123%'.
SELECT *
INTO TABLE ...
FROM j_1bnflin
WHERE refkey LIKE gv_refkey.
这将选择字段refkey以'123'开头的所有条目(请注意,%a用作通配符)