I wrote the code as bellow to fetch the ESG score of S&P500 for 2019 but just the most recent scores show up. I repeated it with constitutions but the result was the same.
Thanks in advance for your help.
Please, see the discussion on this thread, and in particular this response. For ESG data I strongly recommend using the parameter named Period and explicitly specifying fiscal year instead of using SDate and EDate parameters.