The product search max hit value in WebClient UI could be configured in SPRO:
If the parameter above is not explicitly set, default value will be retrieved by ABAP code:
There is still a hard coded limit although it never has any chance to be executed due to the default logic discussed so far: An upper limit for the amount of digits in strings and rows in internal tables results from the fact that they are addressed internally and in ABAP statements via 4 byte integers, which limits them to 2147483647.