Sorry but I can’t quite understand what you are trying to say! If you are saying that the ESSM’s range is limited to 35-40 km , because the ship’s or its own sensor’s range is also limited to 35-40 km, then can you explain why they give a range of 50km for this missile?
This was discussed here...