how to get time series of S&P 500 PE S&PCOMP(PE)

hi, I am trying to get the time series of S&P 500 PE. Using datastream this is the code--> S&PCOMP(PE) to get to generate the time series chart, but using excel thomson reuter datastream, using the time series request, it keeps giving error message "The remote server returned an error: (501) not implemented". I also cannot use python to retrieve this series. only retried the price but not the PE of S&P 500. Thank you

Best Answer