4 weeks ago
Hi, experts.
Is it possible to ignore some characters of field inside of select?
The field xblnr has 'letters and numbers', is it possible to ignore letter part and to compare only the number part?
LOOP at lt_eschf_docli into ls_eschf_docli.
select * from bkpf APPENDING CORRESPONDING FIELDS OF TABLE BKPF_INT
WHERE
bkpf~xblnr = ls_eschf_docli-sernr
and bukrs = 1000
and bldat = LS_ESCHF_DOCLI-ZDATE.
4 weeks ago
4 weeks ago
I don't think 'LIKE' will help.
Let's say.
Xblnr = AA 123456
ls_eschf_docli-sernr = 123456.
ls_eschf_docli-sernr - is always a number, xblnr not always a number.
And i want to put into mine BKPF_INT table, if values are equal ( with ignoring 'letters' of xblnr )
4 weeks ago
LIKE is the way to go - read the manual provided by @Tomas_Buryanek
4 weeks ago
As written by @Tomas_Buryanek you can use a LIKE in where clause (Abap latest version) just build the operand2 from sernr (trailing and leading %, keep or remove leading zeroes?)