I have two smart fields. On the second field i did set the first one as a master. So in the GUI this looks good. But I cannot find out how to make the rest work. The second field never gives me any results any more. I guess I have to change the lookup call but cannot figure out how.
The SQL in your lookup service - I assume that it will be used by the configured LookupCall of your slave field - looks ok. (Here you can refer to your master value by using the binding ":master".)
getConfiguredMasterRequired() on LookupCall is not needed or should be better defined on the slave SmartField - I cannot tell you why this property exists on FormFields and on LookupCalls.
Additionally the execChangedMasterValue() on your slave field can be removed, because the master value will be set to LookupCall by Scout (see AbstractSmartField.prepareBrowseLookup(), prepareKeyLookup(), ...).
If your slave field still stays empty, you can set some breakpoints. F.e. on
... AbstractSmartField.prepareBrowseLookup() to check the master value on the LookupCall
... <your lookup service>.getConfiguredSqlSelect() to check if your SQL is being executed
so in the end, I just had to set the master required and master field on the slave field and change my query in getConfiguredSqlSelect() in the LookupService where the important part is that I can use the :master as the bind value like