06-02-2022 10:20 AM
Hi,
I know there is a possibility the SAP HANA DB using fuzzy search via constains( name, :iv_name, fuzzy) syntax.
Is there anything similar possible in an internal table?
I use currently CS (contains string) operator, but it doesn't support any fuzzy functionality.
Any hint is welcome.
Thanks,
Peter
06-02-2022 12:12 PM
I don't know the algorithm behind "fuzzy", but there is possibly the ABAP distance function (not specific to internal tables).
06-02-2022 12:32 PM
sandra.rossi: Thanks for the hint.
I have to admit I never used distance( ) fucntion yet, but I think it would work. Checking demoprogram DEMO_STRING_DISTANCE is quite promising.
06-02-2022 3:01 PM
You could try using an AMDP method in an ABAP class passing the internal table along as a parameter. In the AMDP method you can use the native HANA SQL to execute the fuzzy search query against the input table.
06-02-2022 3:07 PM
emanuel.klenner: Thanks for the hint, that would also work. Unfortunately I'm still on non-HANA DB (forgot to mention it 😞 )
06-03-2022 7:28 AM
Hi Peter,
have you tried ABAP CDS View for fuzzy search?
https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/6f/9212bbaf5e4d598c774b96d93f7b79/frameset.htm
or:
06-03-2022 7:40 AM
Hi Thorsten,
Thanks for the info. Unfortunately I'm not on HANA DB yet, so I cannot use AMDP. 😞
Other problem, that the data is taken from the DB already, shown to the user and then the user has possibility to perform a search there.
Best regards,
Peter
06-03-2022 11:24 PM
06-07-2022 7:36 AM
Thanks for the hint about "FIND IN TABLE". I didn't think of that, but that could be also an option.