07-13-2020 7:16 PM
I want to do fuzzy search on a field which has leading zeroes, so need to first ltrim the zeroes and implement the fuzzy search. Can anyone help me out on this?
07-14-2020 4:55 AM
Hello skkishor,
There are different approaches for the same as mentioned below:
1) You can Use LTRIM Functionality as shown below
ltrim( matnr, '0' ) as Mat_Output,
2) You can try using ABAP CDS cast expressions follow the examples in the LINK for better understanding.
3) You can always use the AMDP concepts, try using CDS with table functions. This will serve the purpose as it covers wide range of syntaxes.
Regards!
09-16-2022 12:42 PM
Satish's suggestion will not help. Fuzzy search will throw dumps.
You can add one more field from cdc I_Product with below annotations:
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
@Consumption.hidden: true
ProductExternalID
In that case fuzzy search will work using newly added but hidden field.